From 09799856f57195dcca18ed27da5b293f6039a856 Mon Sep 17 00:00:00 2001 From: Jeffrey Bride Date: Sun, 15 Jul 2012 07:59:52 -0400 Subject: [PATCH 1/2] new test --- ejb31-as7-embedded/out.txt | 178 ++++++++++++++++++ ejb31-as7-embedded/pom.xml | 94 +++++++++ ejb31-as7-embedded/readme.txt | 22 +++ .../examples/jbembedded/HelloEJB.java | 17 ++ .../examples/jbembedded/HelloEJBTest.java | 33 ++++ 5 files changed, 344 insertions(+) create mode 100644 ejb31-as7-embedded/out.txt create mode 100644 ejb31-as7-embedded/pom.xml create mode 100644 ejb31-as7-embedded/readme.txt create mode 100644 ejb31-as7-embedded/src/main/java/org/jboss/arquillian/examples/jbembedded/HelloEJB.java create mode 100644 ejb31-as7-embedded/src/test/java/org/jboss/arquillian/examples/jbembedded/HelloEJBTest.java diff --git a/ejb31-as7-embedded/out.txt b/ejb31-as7-embedded/out.txt new file mode 100644 index 0000000..6ca4a69 --- /dev/null +++ b/ejb31-as7-embedded/out.txt @@ -0,0 +1,178 @@ +/usr/lib/jvm/java +[INFO] Scanning for projects... +[WARNING] +[WARNING] Some problems were encountered while building the effective model for org.jboss.arquillian.examples:ejb31-jbembedded:jar:2.0.Final +[WARNING] 'dependencies.dependency.scope' for org.jboss.arquillian:arquillian-bom:pom must be one of [provided, compile, runtime, test, system] but is 'import'. @ line 63, column 21 +[WARNING] +[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. +[WARNING] +[WARNING] For this reason, future Maven versions might no longer support building such malformed projects. +[WARNING] +[INFO] +[INFO] ------------------------------------------------------------------------ +[INFO] Building Arquillian Examples EJB3.1 JBoss AS 7 Embedded 2.0.Final +[INFO] ------------------------------------------------------------------------ +[INFO] +[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ ejb31-jbembedded --- +[INFO] org.jboss.arquillian.examples:ejb31-jbembedded:jar:2.0.Final +[INFO] +- junit:junit:jar:4.8.2:test +[INFO] +- org.jboss.spec:jboss-javaee-6.0:pom:1.0.0.Final:provided +[INFO] | +- org.jboss.spec.javax.annotation:jboss-annotations-api_1.1_spec:jar:1.0.0.Final:provided +[INFO] | +- org.jboss.spec.javax.resource:jboss-connector-api_1.5_spec:jar:1.0.0.Final:provided +[INFO] | +- org.jboss.spec.javax.ejb:jboss-ejb-api_3.1_spec:jar:1.0.0.Final:provided +[INFO] | | \- javax.xml:jaxrpc-api:jar:1.1:provided +[INFO] | +- org.jboss.spec.javax.el:jboss-el-api_2.2_spec:jar:1.0.0.Final:provided +[INFO] | +- org.jboss.spec.javax.interceptor:jboss-interceptors-api_1.1_spec:jar:1.0.0.Final:provided +[INFO] | +- org.jboss.spec.javax.security.jacc:jboss-jacc-api_1.4_spec:jar:1.0.0.Final:provided +[INFO] | +- org.jboss.spec.javax.enterprise.deploy:jboss-jad-api_1.2_spec:jar:1.0.0.Final:provided +[INFO] | +- org.jboss.spec.javax.security.auth.message:jboss-jaspi-api_1.0_spec:jar:1.0.0.Final:provided +[INFO] | +- org.jboss.spec.javax.xml.registry:jboss-jaxr-api_1.0_spec:jar:1.0.0.Final:provided +[INFO] | +- org.jboss.spec.javax.jms:jboss-jms-api_1.1_spec:jar:1.0.0.Final:provided +[INFO] | +- org.jboss.spec.javax.servlet.jsp:jboss-jsp-api_2.2_spec:jar:1.0.0.Final:provided +[INFO] | +- org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:jar:1.0.0.Final:provided +[INFO] | +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:jar:1.0.0.Final:provided +[INFO] | +- org.jboss.spec.javax.xml.bind:jboss-jaxb-api_2.2_spec:jar:1.0.0.Final:provided +[INFO] | +- org.jboss.spec.javax.xml.rpc:jboss-jaxrpc-api_1.1_spec:jar:1.0.0.Final:provided +[INFO] | +- org.jboss.spec.javax.xml.soap:jboss-saaj-api_1.3_spec:jar:1.0.0.Final:provided +[INFO] | +- org.jboss.spec.javax.xml.ws:jboss-jaxws-api_2.2_spec:jar:1.0.0.Final:provided +[INFO] | +- javax.activation:activation:jar:1.1:provided +[INFO] | +- javax.enterprise:cdi-api:jar:1.0-SP4:provided +[INFO] | +- com.sun.faces:jsf-api:jar:2.0.3-b05:provided +[INFO] | +- javax.inject:javax.inject:jar:1:provided +[INFO] | +- javax.jws:jsr181-api:jar:1.0-MR1:provided +[INFO] | +- javax.mail:mail:jar:1.4.2:provided +[INFO] | +- javax.servlet:jstl:jar:1.2:provided +[INFO] | +- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:provided +[INFO] | +- org.jboss.resteasy:jaxrs-api:jar:2.1.0.GA:provided +[INFO] | +- stax:stax-api:jar:1.0.1:provided +[INFO] | \- javax.validation:validation-api:jar:1.0.0.GA:provided +[INFO] +- org.jboss.as:jboss-as-arquillian-container-managed:jar:7.1.1.Final:test +[INFO] | +- org.jboss.as:jboss-as-arquillian-common:jar:7.1.1.Final:test +[INFO] | | +- org.jboss.arquillian.container:arquillian-container-osgi:jar:1.0.2.Final:test +[INFO] | | +- org.jboss.arquillian.testenricher:arquillian-testenricher-cdi:jar:1.0.0.CR7:test +[INFO] | | +- org.jboss.arquillian.testenricher:arquillian-testenricher-ejb:jar:1.0.0.CR7:test +[INFO] | | +- org.jboss.arquillian.testenricher:arquillian-testenricher-initialcontext:jar:1.0.0.CR7:test +[INFO] | | +- org.jboss.arquillian.testenricher:arquillian-testenricher-osgi:jar:1.0.2.Final:test +[INFO] | | +- org.jboss.arquillian.testenricher:arquillian-testenricher-resource:jar:1.0.0.CR7:test +[INFO] | | +- org.jboss.as:jboss-as-arquillian-testenricher-msc:jar:7.1.1.Final:test +[INFO] | | | \- org.jboss.msc:jboss-msc:jar:1.0.2.GA:test +[INFO] | | +- org.jboss.as:jboss-as-controller-client:jar:7.1.1.Final:test +[INFO] | | | +- org.jboss.as:jboss-as-protocol:jar:7.1.1.Final:test +[INFO] | | | | \- org.jboss.xnio:xnio-nio:jar:3.0.3.GA:test +[INFO] | | | +- org.jboss:jboss-dmr:jar:1.1.1.Final:test +[INFO] | | | \- org.jboss.threads:jboss-threads:jar:2.0.0.GA:test +[INFO] | | +- org.jboss.as:jboss-as-jmx:jar:7.1.1.Final:test +[INFO] | | | +- org.jboss:jboss-common-core:jar:2.2.17.GA:test +[INFO] | | | +- org.jboss.as:jboss-as-server:jar:7.1.1.Final:test +[INFO] | | | | +- org.jboss.as:jboss-as-controller:jar:7.1.1.Final:test +[INFO] | | | | | \- org.jboss:staxmapper:jar:1.1.0.Final:test +[INFO] | | | | +- org.jboss.as:jboss-as-domain-http-interface:jar:7.1.1.Final:test +[INFO] | | | | | +- org.jboss.as:jboss-as-domain-management:jar:7.1.1.Final:test +[INFO] | | | | | \- org.jboss.com.sun.httpserver:httpserver:jar:1.0.0.Final:test +[INFO] | | | | +- org.jboss.as:jboss-as-deployment-repository:jar:7.1.1.Final:test +[INFO] | | | | +- org.jboss.as:jboss-as-embedded:jar:7.1.1.Final:test +[INFO] | | | | +- org.jboss.as:jboss-as-platform-mbean:jar:7.1.1.Final:test +[INFO] | | | | +- org.jboss.as:jboss-as-process-controller:jar:7.1.1.Final:test +[INFO] | | | | | \- system:jdk-tools:jar:jdk:system +[INFO] | | | | +- org.jboss.as:jboss-as-remoting:jar:7.1.1.Final:test +[INFO] | | | | | +- org.jboss.as:jboss-as-network:jar:7.1.1.Final:test +[INFO] | | | | | \- org.jboss.as:jboss-as-threads:jar:7.1.1.Final:test +[INFO] | | | | +- org.jboss:jandex:jar:1.0.3.Final:test +[INFO] | | | | +- org.jboss.invocation:jboss-invocation:jar:1.1.1.Final:test +[INFO] | | | | +- org.jboss.logmanager:jboss-logmanager-log4j:jar:1.0.0.GA:test +[INFO] | | | | +- org.jboss.stdio:jboss-stdio:jar:1.0.1.GA:test +[INFO] | | | | \- org.jboss:jboss-vfs:jar:3.1.0.Final:test +[INFO] | | | \- org.jboss.marshalling:jboss-marshalling-river:jar:1.3.11.GA:test +[INFO] | | +- org.jboss.shrinkwrap:shrinkwrap-api:jar:1.0.0-cr-1:test +[INFO] | | +- org.jboss.osgi.spi:jbosgi-spi:jar:3.0.1.Final:test +[INFO] | | | \- org.jboss.osgi.vfs:jbosgi-vfs:jar:1.0.7.Final:test +[INFO] | | +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven:jar:1.0.0-beta-5:test +[INFO] | | | +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-api:jar:1.0.0-beta-5:test +[INFO] | | | +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-api-maven:jar:1.0.0-beta-5:test +[INFO] | | | +- org.sonatype.aether:aether-api:jar:1.8:test +[INFO] | | | +- org.sonatype.aether:aether-util:jar:1.8:test +[INFO] | | | +- org.sonatype.aether:aether-connector-wagon:jar:1.8:test +[INFO] | | | | +- org.sonatype.aether:aether-spi:jar:1.8:test +[INFO] | | | | \- org.codehaus.plexus:plexus-container-default:jar:1.5.5:test +[INFO] | | | | +- org.codehaus.plexus:plexus-classworlds:jar:2.2.2:test +[INFO] | | | | +- org.apache.xbean:xbean-reflect:jar:3.4:test +[INFO] | | | | | \- log4j:log4j:jar:1.2.12:test +[INFO] | | | | \- com.google.collections:google-collections:jar:1.0:test +[INFO] | | | +- org.apache.maven:maven-aether-provider:jar:3.0.1:test +[INFO] | | | | +- org.apache.maven:maven-model:jar:3.0.1:test +[INFO] | | | | +- org.apache.maven:maven-model-builder:jar:3.0.1:test +[INFO] | | | | +- org.apache.maven:maven-repository-metadata:jar:3.0.1:test +[INFO] | | | | +- org.sonatype.aether:aether-impl:jar:1.8:test +[INFO] | | | | +- org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:test +[INFO] | | | | \- org.codehaus.plexus:plexus-utils:jar:2.0.4:test +[INFO] | | | +- org.apache.maven:maven-settings-builder:jar:3.0.1:test +[INFO] | | | | +- org.codehaus.plexus:plexus-interpolation:jar:1.14:test +[INFO] | | | | +- org.apache.maven:maven-settings:jar:3.0.1:test +[INFO] | | | | \- org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:test +[INFO] | | | | \- org.sonatype.plexus:plexus-cipher:jar:1.4:test +[INFO] | | | +- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-7:test +[INFO] | | | +- org.apache.maven.wagon:wagon-file:jar:1.0-beta-7:test +[INFO] | | | \- org.apache.maven.wagon:wagon-http-lightweight:jar:1.0-beta-7:test +[INFO] | | | \- org.apache.maven.wagon:wagon-http-shared:jar:1.0-beta-7:test +[INFO] | | \- org.osgi:org.osgi.core:jar:4.2.0:test +[INFO] | +- org.jboss.as:jboss-as-arquillian-protocol-jmx:jar:7.1.1.Final:test +[INFO] | | +- org.jboss.as:jboss-as-osgi-service:jar:7.1.1.Final:test +[INFO] | | | +- org.jboss.as:jboss-as-ee:jar:7.1.1.Final:test +[INFO] | | | | +- org.hibernate:hibernate-validator:jar:4.2.0.Final:test +[INFO] | | | | | \- org.slf4j:slf4j-api:jar:1.6.1:test +[INFO] | | | | +- org.jboss.interceptor:jboss-interceptor-spi:jar:2.0.0.Final:test +[INFO] | | | | +- org.jboss.metadata:jboss-metadata-common:jar:7.0.1.Final:test +[INFO] | | | | \- org.jboss.metadata:jboss-metadata-ear:jar:7.0.1.Final:test +[INFO] | | | +- org.jboss.as:jboss-as-naming:jar:7.1.1.Final:test +[INFO] | | | | \- org.jboss:jboss-remote-naming:jar:1.0.2.Final:test +[INFO] | | | | \- org.jboss:jboss-ejb-client:jar:1.0.0.Final:test +[INFO] | | | +- org.jboss.modules:jboss-modules:jar:1.1.1.GA:test +[INFO] | | | +- org.jboss.osgi.framework:jbosgi-framework-core:jar:1.1.8.Final:test +[INFO] | | | | +- org.jboss.osgi.deployment:jbosgi-deployment:jar:1.0.12.Final:test +[INFO] | | | | +- org.jboss.osgi.resolver:jbosgi-resolver-felix:jar:1.0.13.Final:test +[INFO] | | | | | +- org.jboss.osgi.resolver:jbosgi-resolver-api:jar:1.0.13.Final:test +[INFO] | | | | | | \- org.jboss.osgi.metadata:jbosgi-metadata:jar:2.0.3.Final:test +[INFO] | | | | | \- org.jboss.osgi.resolver:jbosgi-resolver-spi:jar:1.0.13.Final:test +[INFO] | | | | +- org.jboss.osgi.vfs:jbosgi-vfs30:jar:1.0.7.Final:test +[INFO] | | | | \- org.osgi:org.osgi.compendium:jar:4.2.0:test +[INFO] | | | +- org.jboss.osgi.repository:jbosgi-repository-core:jar:1.0.5:test +[INFO] | | | | \- org.jboss.osgi.repository:jbosgi-repository-api:jar:1.0.5:test +[INFO] | | | | \- org.jboss.osgi.resolver:jbosgi-resolver-api-v2:jar:2.0.0.Beta2:test +[INFO] | | | | \- org.apache.felix:org.apache.felix.resolver:jar:0.1.0.Beta1:test +[INFO] | | | \- org.osgi:org.osgi.enterprise:jar:4.2.0:test +[INFO] | | +- org.jboss.arquillian.core:arquillian-core-spi:jar:1.0.0.CR7:test +[INFO] | | \- org.jboss.arquillian.protocol:arquillian-protocol-jmx:jar:1.0.0.CR7:test +[INFO] | +- org.jboss.logging:jboss-logging:jar:3.1.0.GA:test +[INFO] | +- org.jboss.remoting3:jboss-remoting:jar:3.2.3.GA:test +[INFO] | | \- org.jboss.xnio:xnio-api:jar:3.0.0.GA:test +[INFO] | +- org.jboss.remotingjmx:remoting-jmx:jar:1.0.2.Final:test +[INFO] | | +- org.jboss.logmanager:jboss-logmanager:jar:1.2.2.GA:test +[INFO] | | \- org.jboss.marshalling:jboss-marshalling:jar:1.3.9.GA:test +[INFO] | +- org.jboss.sasl:jboss-sasl:jar:1.0.0.Final:test +[INFO] | +- org.jboss.arquillian.core:arquillian-core-api:jar:1.0.0.CR7:test +[INFO] | \- org.jboss.as:jboss-as-build-config:jar:7.1.1.Final:test +[INFO] +- org.jboss.arquillian:arquillian-bom:pom:1.0.1.Final:import +[INFO] \- org.jboss.arquillian.junit:arquillian-junit-container:jar:1.0.1.Final:test +[INFO] +- org.jboss.arquillian.junit:arquillian-junit-core:jar:1.0.1.Final:test +[INFO] +- org.jboss.arquillian.test:arquillian-test-api:jar:1.0.1.Final:test +[INFO] +- org.jboss.arquillian.test:arquillian-test-spi:jar:1.0.1.Final:test +[INFO] +- org.jboss.arquillian.container:arquillian-container-test-api:jar:1.0.1.Final:test +[INFO] +- org.jboss.arquillian.container:arquillian-container-test-spi:jar:1.0.1.Final:test +[INFO] | \- org.jboss.arquillian.container:arquillian-container-spi:jar:1.0.1.Final:test +[INFO] | \- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-api-base:jar:2.0.0-alpha-3:test +[INFO] +- org.jboss.arquillian.core:arquillian-core-impl-base:jar:1.0.1.Final:test +[INFO] +- org.jboss.arquillian.test:arquillian-test-impl-base:jar:1.0.1.Final:test +[INFO] +- org.jboss.arquillian.container:arquillian-container-impl-base:jar:1.0.1.Final:test +[INFO] | +- org.jboss.arquillian.config:arquillian-config-api:jar:1.0.1.Final:test +[INFO] | +- org.jboss.arquillian.config:arquillian-config-impl-base:jar:1.0.1.Final:test +[INFO] | \- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-spi:jar:2.0.0-alpha-3:test +[INFO] +- org.jboss.arquillian.container:arquillian-container-test-impl-base:jar:1.0.1.Final:test +[INFO] \- org.jboss.shrinkwrap:shrinkwrap-impl-base:jar:1.0.1:test +[INFO] \- org.jboss.shrinkwrap:shrinkwrap-spi:jar:1.0.1:test +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 7.306s +[INFO] Finished at: Sun Jul 15 07:33:01 EDT 2012 +[INFO] Final Memory: 19M/295M +[INFO] ------------------------------------------------------------------------ diff --git a/ejb31-as7-embedded/pom.xml b/ejb31-as7-embedded/pom.xml new file mode 100644 index 0000000..6c7794d --- /dev/null +++ b/ejb31-as7-embedded/pom.xml @@ -0,0 +1,94 @@ + + + + + 4.0.0 + + + org.jboss.arquillian.examples + ejb31-jbembedded + Arquillian Examples EJB3.1 JBoss AS 7 Embedded + 2.0.Final + Simple Arquillian EJB3.1 JBoss AS 7 Embedded Project + + + + 4.8.2 + + + 1.0.1.Final + + + 7.1.1.Final + + + + + + + junit + junit + ${version.junit} + test + + + + + + + + jbossas-embedded-7 + + true + + + + org.jboss.spec + jboss-javaee-6.0 + 1.0.0.Final + pom + provided + + + org.jboss.as + jboss-as-arquillian-container-managed + 7.1.1.Final + test + + + org.jboss.arquillian + arquillian-bom + 1.0.1.Final + import + pom + + + org.jboss.arquillian.junit + arquillian-junit-container + test + 1.0.1.Final + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.6 + 1.6 + UTF-8 + + + + + + + + + + diff --git a/ejb31-as7-embedded/readme.txt b/ejb31-as7-embedded/readme.txt new file mode 100644 index 0000000..6161c40 --- /dev/null +++ b/ejb31-as7-embedded/readme.txt @@ -0,0 +1,22 @@ + + ejb31-jbembedded + + Arquillian enables you to test your business logic in a remote or embedded container. Alternatively, it can deploy an archive to the container so the test can interact as a remote client. + + All about arquillian: http://jboss.org/arquillian + + Example contains EJB3.1 integration test and runs against JBoss AS 6 Embedded container. The projects target is to provide simplest possible setup for this test combination. + + Getting started + ================ + 1) Download sources. + 2) Configure JBoss Maven repositories in settings.xml (http://community.jboss.org/wiki/MavenGettingStarted). + 3) Run: mvn test. + + Tests will be executed within container. Container will be started by Arquillian, automatically. + + System requirements + =================== + All you need to run this project is Java 5.0 (Java SDK 1.5) or greater and + Maven 2.0.10 or greater. This application is setup to be run on a Java EE 6 + certified application server. diff --git a/ejb31-as7-embedded/src/main/java/org/jboss/arquillian/examples/jbembedded/HelloEJB.java b/ejb31-as7-embedded/src/main/java/org/jboss/arquillian/examples/jbembedded/HelloEJB.java new file mode 100644 index 0000000..3126a9e --- /dev/null +++ b/ejb31-as7-embedded/src/main/java/org/jboss/arquillian/examples/jbembedded/HelloEJB.java @@ -0,0 +1,17 @@ +package org.jboss.arquillian.examples.jbembedded; + +import javax.ejb.Stateless; + +/** + * EJB3.1. with no-interface view. + * + * @author Michael Schuetz + */ +@Stateless +public class HelloEJB { + + public String sayHelloEJB(String name) { + + return "Hello " + name; + } +} diff --git a/ejb31-as7-embedded/src/test/java/org/jboss/arquillian/examples/jbembedded/HelloEJBTest.java b/ejb31-as7-embedded/src/test/java/org/jboss/arquillian/examples/jbembedded/HelloEJBTest.java new file mode 100644 index 0000000..705f582 --- /dev/null +++ b/ejb31-as7-embedded/src/test/java/org/jboss/arquillian/examples/jbembedded/HelloEJBTest.java @@ -0,0 +1,33 @@ +package org.jboss.arquillian.examples.jbembedded; + +import javax.ejb.EJB; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit.Arquillian; +import org.jboss.shrinkwrap.api.asset.Asset; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.JavaArchive; +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.assertEquals; + +@RunWith(Arquillian.class) +public class HelloEJBTest { + + @EJB + private HelloEJB helloEJB; + + @Deployment + public static JavaArchive createTestArchive() { + return ShrinkWrap.create(JavaArchive.class, "helloEJB.jar") + .addClasses(HelloEJB.class); + } + + @Test + public void testHelloEJB() { + String result = helloEJB.sayHelloEJB("Michael"); + assertEquals("Hello Michael", result); + } +} + From a4739e915db1b8635d0dbb13478a32b579efa6ed Mon Sep 17 00:00:00 2001 From: Jeffrey Bride Date: Sun, 15 Jul 2012 21:14:04 -0400 Subject: [PATCH 2/2] test now works in as7.1.1 --- .../jboss/arquillian/examples/jbembedded/HelloEJBTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ejb31-as7-embedded/src/test/java/org/jboss/arquillian/examples/jbembedded/HelloEJBTest.java b/ejb31-as7-embedded/src/test/java/org/jboss/arquillian/examples/jbembedded/HelloEJBTest.java index 705f582..c0bf7a2 100644 --- a/ejb31-as7-embedded/src/test/java/org/jboss/arquillian/examples/jbembedded/HelloEJBTest.java +++ b/ejb31-as7-embedded/src/test/java/org/jboss/arquillian/examples/jbembedded/HelloEJBTest.java @@ -5,6 +5,7 @@ import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.junit.Arquillian; import org.jboss.shrinkwrap.api.asset.Asset; +import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.spec.JavaArchive; import org.junit.Test; @@ -15,13 +16,15 @@ @RunWith(Arquillian.class) public class HelloEJBTest { - @EJB + //@EJB(lookup="java:module/HelloEJB!org.jboss.arquillian.examples.jbembedded.HelloEJB") + @EJB(lookup="java:global/helloEJB/HelloEJB!org.jboss.arquillian.examples.jbembedded.HelloEJB") private HelloEJB helloEJB; @Deployment public static JavaArchive createTestArchive() { return ShrinkWrap.create(JavaArchive.class, "helloEJB.jar") - .addClasses(HelloEJB.class); + .addClasses(HelloEJB.class) + .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml"); } @Test