-
1. Re: package javax.ejb.embeddable does not exist
jaikiran Sep 14, 2010 10:18 AM (in response to nimo22)That package is available in JBOSS_HOME/client/jboss-ejb-api_3.1_spec.jar
-
2. Re: package javax.ejb.embeddable does not exist
nimo22 Sep 14, 2010 10:58 AM (in response to jaikiran)Thank you,
I had included the JBOSS 6 Runtime (whit all its libs) into my eclipse-classpath.
I can import it into classes - however, TestNG (Maven) can not find it.I guess, I have to import it into my pom.xml with <scope>test</scope>.
I will try it.
thanks.
// is available under my classpath
import javax.ejb.embeddable.EJBContainer;
import javax.naming.Context;
private static EJBContainer ec;
private static Context ctx;
@BeforeClass
public void setUp() {
ec = EJBContainer.createEJBContainer();
ctx = ec.getContext();
}
@Test
public void test() throws Exception{
MyBean ejb = (MyBean) ctx.lookup("java:global/MyBean");...
}
-
3. Re: package javax.ejb.embeddable does not exist
nimo22 Sep 15, 2010 4:52 AM (in response to nimo22)I use this dependency within Maven-pom:
<dependency>
<groupId>org.jboss.ejb3</groupId>
<artifactId>jboss-ejb3-api</artifactId>
<scope>provided</scope>
<version>3.1.0</version>
</dependency>I cannot change the scope to "test", as then all non-test-beans does not compile properly.
In glassfish, there is a extra lib which makes it easy to integrate the embeeded-container for my test-suite:
<dependency>
<groupId>org.glassfish.embedded</groupId>
<artifactId>glassfish-embedded-all</artifactId>
<version>3.0</version>
<scope>test</scope>
</dependency>How can I put the embeeded container with JBOSS in Maven for my test-suite? I cannot find the appropriate dependency (something like jboss-embedded-all). I use ejb 3.1 and jboss 6m4.
-
4. Re: package javax.ejb.embeddable does not exist
jaikiran Sep 15, 2010 6:39 AM (in response to nimo22) -
5. Re: package javax.ejb.embeddable does not exist
nimo22 Sep 15, 2010 7:01 AM (in response to jaikiran)thank you,
I added this in my pom:
<repositories>
<repository>
<id>repository.jboss.org</id>
<name>JBoss Repository</name>
<url>http://repository.jboss.org/maven2</url>
</repository><!-- Provide this JBoss repository for testsuites (TestNG) -->
<repository>
<id>repository.jboss.org</id>
<name>JBoss Repository 2</name>
<url>https://repository.jboss.org/nexus/content/groups/public/org/jboss/spec/jboss-javaee-6.0/1.0.0.Beta6/jboss-javaee-6.0-1.0.0.Beta6.pom</url>
</repository>
</repositories><dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>1.0.0.Beta6</version>
<type>pom</type><!--I need this dependency only for TestNG -->
<scope>test</scope>
</dependency>However, I get this Maven-Error:
15.09.10 12:58:55 MESZ: [WARN] Missing POM for org.jboss.spec:jboss-javaee-6.0:pom:1.0.0.Beta6
15.09.10 12:58:55 MESZ: Missing artifact org.jboss.spec:jboss-javaee-6.0:pom:1.0.0.Beta6:test
15.09.10 12:58:55 MESZ: Maven Builder: AUTO_BUILD15.09.10 12:54:41 MESZ: Maven Builder: AUTO_BUILD
15.09.10 12:54:43 MESZ: Could not download sources for org.jboss.interceptor:jboss-interceptor-api:1.1
15.09.10 12:54:44 MESZ: Could not download sources for javax.annotation:jsr250-api:1.0
15.09.10 12:54:45 MESZ: Could not download sources for org.slf4j:slf4j-api:1.5.9.RC1
15.09.10 12:54:46 MESZ: Could not download sources for javax.xml.bind:jaxb-api:2.1
15.09.10 12:54:47 MESZ: Could not download sources for javax.xml.stream:stax-api:1.0-2
15.09.10 12:54:48 MESZ: Could not download sources for javax.activation:activation:1.1
15.09.10 12:54:49 MESZ: Could not download sources for com.sun.xml.bind:jaxb-impl:2.1.3
15.09.10 12:54:50 MESZ: Could not download sources for javax.faces:jsf-api:2.0.0-RC
15.09.10 12:54:51 MESZ: Could not download sources for org.testng:testng:5.10:jdk15
15.09.10 12:54:53 MESZ: Could not download sources for junit:junit:3.8.1
15.09.10 12:54:54 MESZ: Could not download sources for org.glassfish.web:el-impl:2.1.2-b04
15.09.10 12:54:55 MESZ: Could not download sources for org.glassfish.web:el-impl:2.1.2-b04
15.09.10 12:54:56 MESZ: Could not download sources for concurrent:concurrent:1.3.4...
Formerly, there was a jboss-embeedable.jar, but I have thought, that this is no more needed with ejb 3.1. What is wrong?
-
6. Re: package javax.ejb.embeddable does not exist
nimo22 Sep 16, 2010 2:51 AM (in response to nimo22)I have to make this available for TestNG:
import javax.ejb.embeddable.EJBContainer;
import javax.naming.Context;I tried it with glassfish-embeeded, it works without problems - however, I have to use glassfish.
<dependency>
<groupId>org.glassfish.embedded</groupId>
<artifactId>glassfish-embedded-all</artifactId>
<version>3.0</version>
<scope>test</scope>
</dependency>but with Jboss it is a torture as it is not working:
<repositories>
<repository>
<id>repository.jboss.org</id>
<name>JBoss Repository</name>
<url>http://repository.jboss.org/maven2</url>
</repository><!-- Provide this JBoss repository for testsuites (TestNG) -->
<repository>
<id>repository.jboss.org</id>
<name>JBoss Repository 2</name>
<url>https://repository.jboss.org/nexus/content/groups/public/org/jboss/spec/jboss-javaee-6.0/1.0.0.Beta6/jboss-javaee-6.0-1.0.0.Beta6.pom</url>
</repository>
</repositories><dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>1.0.0.Beta6</version>
<type>pom</type><!--I need this dependency only for TestNG -->
<scope>test</scope>
</dependency>Is my dependency false? Can anyone provide me an (up-to date) pom to use jboss-embeeded with jboss 6 and maven for TestNG-Classes?
-
7. Re: package javax.ejb.embeddable does not exist
jaikiran Sep 16, 2010 2:55 AM (in response to nimo22)nimo stephan wrote:
but with Jboss it is a torture as it is not working:
<repositories>
<repository>
<id>repository.jboss.org</id>
<name>JBoss Repository</name>
<url>http://repository.jboss.org/maven2</url>
</repository><!-- Provide this JBoss repository for testsuites (TestNG) -->
<repository>
<id>repository.jboss.org</id>
<name>JBoss Repository 2</name>
<url>https://repository.jboss.org/nexus/content/groups/public/org/jboss/spec/jboss-javaee-6.0/1.0.0.Beta6/jboss-javaee-6.0-1.0.0.Beta6.pom</url>
</repository>
</repositories>You are using a wrong repository URL. The JBoss repository URL is
http://repository.jboss.org/nexus/content/groups/public-jboss/
See this form more details http://community.jboss.org/wiki/MavenGettingStarted-Users
-
8. Re: package javax.ejb.embeddable does not exist
nimo22 Sep 16, 2010 3:17 AM (in response to jaikiran)Thank you!!
This repo works! However, I get still little problems but they are dependency-issues..appropriate for http://community.jboss.org/en/build?view=discussions.