5 Replies Latest reply on Nov 12, 2010 2:50 PM by aslak

    Arquillian and Glassfish 3.0.1 Remote

    figueiredo

      Hi,

       

      I am still learning Arquillian and I'm trying to use it with JUnit tests on Glassfish 3.0.1 remote, but I'm having some problems. So please excuse me if I am asking a very newbie question.

       

      I am using the basic examples from the Arquillian reference[1][2] in order to test very simple EJBs. I've also read some posts over here, like [3][4], in order to avoid some pitfalls, but I didn't find someone who's got a similar problem as me. I cannot have my test running on Glassfish's (v3.0.1) Remote container because I always get a "DeploymentException" (item (A) followed).

       

      I am using the following (B), (C) and (D) configurations. Please, let me know if I am wrong somewhere.

       

      Thanks in advance.

      - Fabio

       

      References

      ==================================

      [1] http://docs.jboss.org/arquillian/reference/latest/en-US/html_single/#container.glassfish-remote-3

      [2] http://docs.jboss.org/arquillian/reference/latest/en-US/html_single/#gettingstarted

      [3] http://community.jboss.org/thread/158652

      [4] http://community.jboss.org/message/562801

       

       

      === (A) Failure Trace

      ======================================

       

      org.jboss.arquillian.impl.event.FiredEventException: org.jboss.arquillian.spi.DeploymentException: Could not deploy archive

          at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:68)

          at org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115)

          at org.jboss.arquillian.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:99)

          at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:162)

          at org.jboss.arquillian.junit.Arquillian$3$1.evaluate(Arquillian.java:186)

          at org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:297)

          at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:182)

          at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

          at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:127)

          at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)

          at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

      Caused by: org.jboss.arquillian.spi.DeploymentException: Could not deploy archive

          at org.jboss.arquillian.container.jsr88.remote_1_2.JSR88RemoteContainer.deploy(JSR88RemoteContainer.java:146)

          at org.jboss.arquillian.container.glassfish.remote_3.GlassFishJSR88RemoteContainer.deploy(GlassFishJSR88RemoteContainer.java:63)

          at org.jboss.arquillian.impl.handler.ContainerDeployer.callback(ContainerDeployer.java:62)

          at org.jboss.arquillian.impl.handler.ContainerDeployer.callback(ContainerDeployer.java:50)

          at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63)

          ... 14 more

      Caused by: java.lang.IllegalStateException: error submitting remote command

          at org.glassfish.deployapi.SunDeploymentManager.getTargets(SunDeploymentManager.java:170)

          at org.jboss.arquillian.container.jsr88.remote_1_2.JSR88RemoteContainer.deploy(JSR88RemoteContainer.java:135)

          ... 18 more

      Caused by: java.lang.RuntimeException: error submitting remote command

          at org.glassfish.deployment.client.AbstractDeploymentFacility.listReferencedTargets(AbstractDeploymentFacility.java:725)

          at org.glassfish.deployment.client.AbstractDeploymentFacility.listTargets(AbstractDeploymentFacility.java:683)

          at org.glassfish.deployapi.SunDeploymentManager.getTargets(SunDeploymentManager.java:168)

          ... 19 more

      Caused by: java.lang.RuntimeException: org.glassfish.api.admin.InvalidCommandException: Command _get-targets not found

          at org.glassfish.deployment.client.RemoteDeploymentFacility$RemoteCommandRunner.run(RemoteDeploymentFacility.java:121)

          at org.glassfish.deployment.client.AbstractDeploymentFacility.listReferencedTargets(AbstractDeploymentFacility.java:694)

          ... 21 more

      Caused by: org.glassfish.api.admin.InvalidCommandException: Command _get-targets not found

          at com.sun.enterprise.admin.remote.RemoteAdminCommand.fetchCommandModel(RemoteAdminCommand.java:886)

          at com.sun.enterprise.admin.remote.RemoteAdminCommand.getCommandModel(RemoteAdminCommand.java:259)

          at com.sun.enterprise.admin.cli.remote.RemoteCommand.prepare(RemoteCommand.java:295)

          at com.sun.enterprise.admin.cli.CLICommand.execute(CLICommand.java:240)

          at com.sun.enterprise.admin.cli.remote.RemoteCommand.executeAndReturnOutput(RemoteCommand.java:380)

          at org.glassfish.deployment.client.RemoteDeploymentFacility$RemoteCommandRunner.run(RemoteDeploymentFacility.java:117)

          ... 22 more

       

       

      === (B) Arquillian

      === /src/test/resources/arquillian.xml

      ======================================

       

      <?xml version="1.0"?>

      <arquillian xmlns="http://jboss.com/arquillian"

              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

              xmlns:glassfish="urn:arq:org.jboss.arquillian.container.glassfish.remote_3">

       

         <glassfish:container>

            <!-- The administrative port and host the JSR-88 client should connect to. -->

            <glassfish:deploymentUri>deployer:Sun:AppServer::127.0.0.1:4848</glassfish:deploymentUri>

       

            <!-- The host of the remote server. -->

            <glassfish:remoteServerAddress>127.0.0.1</glassfish:remoteServerAddress>

       

            <!-- The HTTP port of the remote server. -->

            <glassfish:remoteServerHttpPort>8080</glassfish:remoteServerHttpPort>

       

            <!-- The JSR-88 implementation factory class. -->

            <glassfish:deploymentFactoryClass>org.glassfish.deployapi.SunDeploymentFactory</glassfish:deploymentFactoryClass>

       

            <!-- The admin username for performing JSR-88 deployments. -->

            <glassfish:deploymentUsername>admin</glassfish:deploymentUsername>

       

            <!-- The admin password for performing JSR-88 deployments.

            Trying to set a empty deploymentPassword will fail. Just exclude the option if you don't have a password set.-->

            <!-- <glassfish:deploymentPassword>password</glassfish:deploymentPassword> -->

       

            <!--

            <glassfish:deploymentTimeoutSeconds>10</glassfish:deploymentTimeoutSeconds>

            -->

        </glassfish:container>

      </arquillian>

       

       

      === (C) Maven's Project Object Model

      === /pom.xml

      =====================================

      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

               xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

          <modelVersion>4.0.0</modelVersion>

       

          <groupId>projectname.access</groupId>

          <artifactId>ProjectName-Access</artifactId>

          <version>0.0.1-SNAPSHOT</version>

       

          <name>ProjectName-Access EJB</name>

       

          <properties>

              <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>

              <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

          </properties>

       

          <repositories>

              <repository>

                    <id>jboss-public-repository-group</id>

                    <name>JBoss Public Maven Repository Group</name>

                    <url>https://repository.jboss.org/nexus/content/groups/public</url>

              </repository>

       

              <repository>

                    <id>download.java.net</id>

                    <name>Java.net Maven Repository</name>

                    <url>http://download.java.net/maven/2</url>

                </repository>

       

              <repository>

                  <id>Glassfish</id>

                  <name>Glassfish Repository</name>

                  <url>http://download.java.net/maven/glassfish/</url>

              </repository>

            </repositories>

       

          <dependencies>

              <dependency>

                  <groupId>org.glassfish</groupId>

                  <artifactId>javax.ejb</artifactId>

                  <version>3.1-b21</version>

                  <type>jar</type>

                  <scope>provided</scope>

              </dependency>

       

              <dependency>

                  <groupId>org.glassfish</groupId>

                  <artifactId>javax.servlet</artifactId>

                  <version>3.1-b21</version>

                  <type>jar</type>

                  <scope>provided</scope>

              </dependency>

       

              <dependency>

                  <groupId>junit</groupId>

                  <artifactId>junit</artifactId>

                  <version>4.8.2</version>

                  <scope>test</scope>

              </dependency>

       

          <dependency>

                  <groupId>javax.enterprise</groupId>

                  <artifactId>cdi-api</artifactId>

                  <version>1.0</version>

              </dependency>

       

              <dependency>

                  <groupId>org.jboss.arquillian</groupId>

                  <artifactId>arquillian-junit</artifactId>

                  <version>1.0.0.Alpha4.SP2</version>

                  <scope>test</scope>

              </dependency>

       

               <dependency>

                  <groupId>org.jboss.arquillian.container</groupId>

                  <artifactId>arquillian-glassfish-remote-3</artifactId>

                  <version>1.0.0.Alpha4.SP1</version>

                      <scope>test</scope>

              </dependency>

       

          <dependency>

              <groupId>org.glassfish.deployment</groupId>

              <artifactId>deployment-client</artifactId>

              <version>3.1-b21</version>

              <scope>test</scope>

          </dependency>

       

          </dependencies>

       

          <build>

              <plugins>

       

                  <plugin>

                      <groupId>org.apache.maven.plugins</groupId>

                      <artifactId>maven-compiler-plugin</artifactId>

                      <version>2.3.2</version>

                      <configuration>

                          <source>1.6</source>

                          <target>1.6</target>

                          <compilerArguments>

                              <endorseddirs>${endorsed.dir}</endorseddirs>

                          </compilerArguments>

                      </configuration>

                  </plugin>

       

                  <plugin>

                      <groupId>org.apache.maven.plugins</groupId>

                      <artifactId>maven-ejb-plugin</artifactId>

                      <version>2.3</version>

                      <configuration>

                          <ejbVersion>3.1</ejbVersion>

                      </configuration>

                  </plugin>

       

                  <plugin>

                      <groupId>org.apache.maven.plugins</groupId>

                      <artifactId>maven-dependency-plugin</artifactId>

                      <version>2.1</version>

                      <executions>

                          <execution>

                              <phase>validate</phase>

                              <goals>

                                  <goal>copy</goal>

                              </goals>

                              <configuration>

                                  <outputDirectory>${endorsed.dir}</outputDirectory>

                                  <silent>true</silent>

                                  <artifactItems>

                                      <artifactItem>

                                          <groupId>javax</groupId>

                                          <artifactId>javaee-endorsed-api</artifactId>

                                          <version>6.0</version>

                                          <type>jar</type>

                                      </artifactItem>

                                  </artifactItems>

                              </configuration>

                          </execution>

                      </executions>

                  </plugin>

              </plugins>

              <finalName>ProjectName-Access</finalName>

          </build>

      </project>

       

       

      === (D) Test Class

      =====================================

       

      package projectname.access.sessionfacade;

       

      import static org.junit.Assert.assertNotNull;

      import static org.junit.Assert.assertTrue;

       

      import javax.ejb.EJB;

       

      import org.jboss.arquillian.api.Deployment;

      import org.jboss.arquillian.junit.Arquillian;

      import org.jboss.shrinkwrap.api.ShrinkWrap;

      import org.jboss.shrinkwrap.api.spec.JavaArchive;

      import org.junit.Test;

      import org.junit.runner.RunWith;

       

      @RunWith(Arquillian.class)

      public class ArquilianTest {

       

          @EJB

          SessionFacade sessionFacadeEJB;

       

          /* Let's try out Arquillian! We need to create a deployment package which then will be deployed by Arquillian on the target container (in our case Glassfish 3.0.1 Remote). */

          @Deployment

          public static JavaArchive createDeployment() {

              return ShrinkWrap.create(JavaArchive.class, "test.jar").addClass(SessionFacade.class);

          }

       

          @Test

          public void testeComportamento() throws Exception {

              String ejbReturnedValue = sessionFacadeEJB.getName();

              assertNotNull(ejbReturnedValue);

       

              String expectedName = "name";

              assertTrue(ejbReturnedValue.endsWith(expectedName));

          }

      }

        • 1. Re: Arquillian and Glassfish 3.0.1 Remote
          aslak

          It might be a version missmatch, your using the Deployment API from 3.1-b21. Try downloading the 3.1-b21 server as well, and see if you get the same error.

           

          Also, not related, but your using two different versions of Arquillian junit and remote container. Stick with the 1.0.0.Alpha4 release, ignore the SPn releases.. (The SPn releases should have been named OSGi-SPn, basically a special OSGi related release targeted for AS7)

          • 2. Re: Arquillian and Glassfish 3.0.1 Remote
            figueiredo

            Many thanks, Aslak. That was the exact solution for the problem.
            After changing Glassfish Server's version from 3.0.1 to 3.1b23, the "DeploymentException" was solved.

             

            Alternatively, I also tested by using purely 3.0.1 versions for Glassfish server, (ii) deployment-client, (iii) javax.ejb and (iv) javax.servlet, which also solves the "DeploymentException".

             

            However, now I can communicate correctly with the server (3.0.1 or 3.1b23), but unfortunatelly cannot use EJBs injections on any of these two configs, since I get a "RuntimeException: Could not inject members" like followed.
            I discovered this is the same problem as described by [1] and [2].

             

            Is there any forethought of when this could be fixed?

             

            Thank you very much again.

             

            Best Regards,
            Fábio

             

            [1] http://community.jboss.org/thread/157620
            [2] https://jira.jboss.org/browse/ARQ-317

             

            === (A) Failure Trace
            ======================
            "RuntimeException: Could not inject members"
            [...]
            Caused by: javax.naming.NamingException: No EJB found in JNDI, tried the following names: java:global/test.ear/test/SessionFacadeBeanBean, java:global/test.ear/test/SessionFacadeBean, java:global/test/SessionFacadeBean, java:global/test/SessionFacadeBeanBean, java:global/test/SessionFacadeBean/no-interface, test/SessionFacadeBeanBean/local, test/SessionFacadeBeanBean/remote, test/SessionFacadeBean/no-interface, SessionFacadeBeanBean/local, SessionFacadeBeanBean/remote, SessionFacadeBean/no-interface,
            [...]

            • 3. Re: Arquillian and Glassfish 3.0.1 Remote
              aslak

              If you put a beans.xml in your archive, even if you don't use CDI, the CDI Arquillian Enricher will take over and do the Injection in the test case. The CDI Enricher forwards the Injection to the BeanManager which has hooks deep into the Server. Letting the BeanManager handle the injection is much more relaiable then the guessing game we have to do to try to do the @EJB injection using the EJBEnricher. We're working on finding a way that lets us do this via the EJBEnricher, but for now, this is the best workaround on EE6 based containers.

              1 of 1 people found this helpful
              • 4. Re: Arquillian and Glassfish 3.0.1 Remote
                figueiredo

                Hi, Aslak.

                 

                Sorry to bother you again, but could you detail this workaround a little further?
                I am still trying to get @EJB injected using Arquillian and Glassfish Remote, but I am new to Java EE and I don't know what content "beans.xml" file should have.

                 

                Does it make sense to use "@Inject" to instantiate a Stateless Session Bean (SLSB)? Because I couldn't get it by "@EJB". (failure trace at the end of this msg)

                 

                My doubt is how, pragmatically, hack/configure "CDI InjectionEnricher in Arquillian" in order to fix JNDI names resolution so that I can use SLSB and EJB container's resources transparently by using "@EJB".

                 

                Following your advice, please consider if I fulfilled it correctly

                 

                (A) I created src/test/resources/beans.xml with the following content
                <beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
                    <alternatives>
                        <class>company.access.sessionfacade.MyEJB</class>
                    </alternatives>
                </beans>

                 

                (B) I annotated my ejb class with @Alternative (I have no idea if this is necessary)
                @Stateless(mappedName = "MyEJB")
                @Alternative
                public class MyEJB {
                    public String getName() {
                        return ("name");
                    }
                }

                 

                (C) Finally, I changed Arquillian's deployment method to:
                @Deployment
                public static JavaArchive createTestArchive() throws IllegalArgumentException, IOException {
                    return ShrinkWrap.create(JavaArchive.class, "test.jar")
                            .addManifestResource(new File("src/test/resources/beans.xml"), ArchivePaths.create("beans.xml")).addClasses(MyEJB.class);
                }

                 

                However, by doing so, I can invoke "@Inject MyEJB myEJB;" and use "myEJB" methods, but I cannot inject by "@EJB MyEJB myEJB;"

                 

                Is this procedure make any sense?
                Could we use all EJB container's services for testing purposes normally with "@Inject"?

                 

                Sorry for this silly question and thank you again.

                 

                Best Regards,
                Fabio

                 

                = Failure Trace if "@EJB MyEJB myEJB;" command were used instead of "@Inject MyEJB myEJB;"
                =================================================
                org.jboss.arquillian.impl.event.FiredEventException: java.lang.RuntimeException: Could not inject members
                    at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:68)
                    at org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115)
                    at org.jboss.arquillian.impl.EventTestRunnerAdaptor.before(EventTestRunnerAdaptor.java:130)
                    at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:206)
                    at org.jboss.arquillian.junit.Arquillian$5$1.evaluate(Arquillian.java:225)
                    at org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:297)
                    at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:221)
                    at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
                    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
                    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
                    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
                    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
                    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
                    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
                    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
                    at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:163)
                    at org.jboss.arquillian.junit.Arquillian$3$1.evaluate(Arquillian.java:186)
                    at org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:297)
                    at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:182)
                    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
                    at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:127)
                    at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
                    at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
                    at org.jboss.arquillian.junit.JUnitTestRunner.execute(JUnitTestRunner.java:69)
                    at org.jboss.arquillian.protocol.servlet_3.ServletTestRunner.doGet(ServletTestRunner.java:84)
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
                    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
                    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
                    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
                    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
                    at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
                    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
                    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:239)
                    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
                    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
                    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
                    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
                    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
                    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
                    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
                    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
                    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
                    at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
                    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
                    at java.lang.Thread.run(Thread.java:662)
                Caused by: java.lang.RuntimeException: Could not inject members
                    at org.jboss.arquillian.testenricher.ejb.EJBInjectionEnricher.injectClass(EJBInjectionEnricher.java:128)
                    at org.jboss.arquillian.testenricher.ejb.EJBInjectionEnricher.enrich(EJBInjectionEnricher.java:50)
                    at org.jboss.arquillian.impl.handler.TestCaseEnricher.callback(TestCaseEnricher.java:42)
                    at org.jboss.arquillian.impl.handler.TestCaseEnricher.callback(TestCaseEnricher.java:32)
                    at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63)
                    ... 50 more
                Caused by: javax.naming.NamingException: No EJB found in JNDI, tried the following names: java:global/test.ear/test/MyEJBBean, java:global/test.ear/test/MyEJB, java:global/test/MyEJB, java:global/test/MyEJBBean, java:global/test/MyEJB/no-interface, test/MyEJBBean/local, test/MyEJBBean/remote, test/MyEJB/no-interface, MyEJBBean/local, MyEJBBean/remote, MyEJB/no-interface,
                    at org.jboss.arquillian.testenricher.ejb.EJBInjectionEnricher.lookupEJB(EJBInjectionEnricher.java:162)
                    at org.jboss.arquillian.testenricher.ejb.EJBInjectionEnricher.injectClass(EJBInjectionEnricher.java:102)
                    ... 54 more

                • 5. Re: Arquillian and Glassfish 3.0.1 Remote
                  aslak

                  you only need to add a empty beans.xml, e.g. archive.addManifestResource(EmptyAsset.INSTANCE, "beans.xml")

                   

                  No need for Alternatives, etc

                   

                  @Statless

                  public class MyBean{}

                   

                  @EJB

                  private MyBean myBean;