Package org.jboss.shrinkwrap.api.spec

Examples of org.jboss.shrinkwrap.api.spec.JavaArchive


      final JBossEJBContainerProvider ejbContainer = (JBossEJBContainerProvider) EJBContainer
            .createEJBContainer(ejbContainerProps);
      final ShrinkWrapEJBContainer shrinkwrapEjbContainer = new ShrinkWrapEJBContainerImpl(ejbContainer);

      // Define the EJB JAR
      final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "outputSlsb.jar").addClasses(OutputBean.class,
            OutputLocalBusiness.class);

      // Deploy the JAR
      shrinkwrapEjbContainer.deploy(archive);
View Full Code Here


      return webArchive;
   }

   protected JavaArchive createWeldArchive(Class<?>...classes)
   {
      JavaArchive javaArchive = ShrinkWrap.create(JavaArchive.class, "weld.jar")
         .addClasses(classes)
         .addResource("org/jboss/test/deployers/as/support/weld/META-INF/beans.xml", META_BEANS_XML);
     
      getLog().debug(javaArchive.toString(true));
      return javaArchive;
   }
View Full Code Here

   }

   protected JavaArchive createMcArchive(String packageFragment, Class<?>...classes)
   {
     
      JavaArchive javaArchive = ShrinkWrap.create(JavaArchive.class, "mc.jar")
         .addClasses(classes)
         .addResource("org/jboss/test/deployers/as/support/" + packageFragment + "/META-INF/jboss-beans.xml", JBOSS_BEANS_XML);
     
      getLog().debug(javaArchive.toString(true));
      return javaArchive;
   }
View Full Code Here

   protected DeploymentUnit unit;

   public void testEjbJar() throws Exception
   {
      JavaArchive ejbJar = createEjbJar(true);
      unit = assertDeploy(ejbJar);

      E environment = assertSingleEnvironment(EJB_JAR_NAME);
      assertExpectedClasses(environment, PlainJavaBean.class);
      assertExpectedResources(environment, "ejb.jar");
View Full Code Here

      assertExpectedResources(environment, "ejb.jar");
   }

   public void testEjbJarWithoutXml() throws Exception
   {
      JavaArchive ejbJar = createEjbJar(false);
      unit = assertDeploy(ejbJar);
     
      assertEmptyEnvironment();
   }
View Full Code Here

   }

   public void testEjbJarInEar() throws Exception
   {
      EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, EAR_NAME);
      JavaArchive ejbJar = createEjbJar(true);
      ear.addModule(ejbJar);
      MockArchiveManifest.addManifest(ear);
      unit = assertDeploy(ear);
     
      E environment = assertSingleEnvironment(EAR_NAME);
View Full Code Here

   }

   public void testEjbJarWithoutXmlInEar() throws Exception
   {
      EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, EAR_NAME);
      JavaArchive ejbJar = createEjbJar(false);
      ear.addModule(ejbJar);
      MockArchiveManifest.addManifest(ear);
      unit = assertDeploy(ear);
     
      assertEmptyEnvironment();
View Full Code Here

   }

   public void testEjbJarsInEar() throws Exception
   {
      EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, EAR_NAME);
      JavaArchive ejbJar1 = createEjbJar("ejbJar1.jar", true, PlainJavaBean.class);
      ear.addModule(ejbJar1);
      JavaArchive ejbJar2 = createEjbJar("ejbJar2.jar", true, MySLSBean.class, BusinessInterface.class);
      ear.addModule(ejbJar2);
      MockArchiveManifest.addManifest(ear);
      unit = assertDeploy(ear);
     
      E environment = assertSingleEnvironment(EAR_NAME);
View Full Code Here

   }

   public void testMixedEjbJarsInEar() throws Exception
   {
      EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, EAR_NAME);
      JavaArchive ejbJar1 = createEjbJar("ejbJar1.jar", false, PlainJavaBean.class);
      ear.addModule(ejbJar1);
      JavaArchive ejbJar2 = createEjbJar("ejbJar2.jar", true, MySLSBean.class, BusinessInterface.class);
      ear.addModule(ejbJar2);
      MockArchiveManifest.addManifest(ear);
      unit = assertDeploy(ear);
     
      E environment = assertSingleEnvironment(EAR_NAME);
View Full Code Here

   }

   public void testEjbJarsWithoutXmlInEar() throws Exception
   {
      EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, EAR_NAME);
      JavaArchive ejbJar1 = createEjbJar("ejbJar1.jar", false, PlainJavaBean.class);
      ear.addModule(ejbJar1);
      JavaArchive ejbJar2 = createEjbJar("ejbJar2.jar", false, MySLSBean.class, BusinessInterface.class);
      ear.addModule(ejbJar2);
      MockArchiveManifest.addManifest(ear);
      unit = assertDeploy(ear);
     
      assertEmptyEnvironment();
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.api.spec.JavaArchive

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.