openejb

TomEE throwing IndexOutOfBoundsException

a 夏天 提交于 2019-12-11 02:22:01
问题 I am trying to deploy a Vaadin/JEE6 application to TomEE. The following exception is thrown during deployment: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myapp]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787) at org.apache

openejb embedded container cannot find persistence.xml

早过忘川 提交于 2019-12-10 13:17:41
问题 I am using openEjb in embedded mode to test a stateless session bean, which has an injected EntityManager. However, when I run the test, it fails because it could not initialize the application. When I see the console I can also see an error related to not being able to find persistence.xml Note: I tried putting WebContent, as well as META-INF in the classpath, but that does not help either. Update: There is something very strange about resource lookups when using openejb + eclipse. I added

Comparing OpenEjb and Glassfish

送分小仙女□ 提交于 2019-12-09 16:30:34
问题 can we replace Glassfish with Tomcat/OpenEJB for lighter applications? What is the performance of OpenEJB comparing to glassfish as EJB container. What is the restrictions of OpenEJB instead of glassfish? Regards 回答1: I guess the question is about the runtime environment but still, I don't understand what lighter application does mean. Memory footprint? Startup time? Deployment time? What problem do you actually have? And please define light. For what it's worth, I consider GlassFish 3 as a

TomEE, EJB and virtual-hosts

痴心易碎 提交于 2019-12-08 07:16:50
问题 I am simulating multiple TomEE (1.7.1) instances using virtual-hosts. I have multiple virtual-hosts that are deploying the same war with the same EJBs. This leads to: org.apache.openejb.DuplicateDeploymentIdException: Application cannot be deployed as it contains deployment-ids which are in use Any suggestions on how to solve this? 回答1: did you try openejb.deploymentId.format = {appId}/{ejbJarId}/{ejbName} in conf/system.properties? To make it even more portable coming 1.7.2 (release process

OpenEJB Local Client Injection Fails

我与影子孤独终老i 提交于 2019-12-06 05:59:11
问题 Note that I'm mirroring the example given here very closely. In fact, my situation is somewhat simpler as I'm not even testing with a persistence unit at this point. My test project provides a simple MDB and a session bean; both the MDB and the session bean are getting loaded as normal, and can be successfully tested (in a constrained fashion) without injection. The suggested injection with the @LocalClient annotation on my unit tests is failing with the known error: javax.naming

OpenEJB Local Client Injection Fails

有些话、适合烂在心里 提交于 2019-12-04 10:58:21
Note that I'm mirroring the example given here very closely. In fact, my situation is somewhat simpler as I'm not even testing with a persistence unit at this point. My test project provides a simple MDB and a session bean; both the MDB and the session bean are getting loaded as normal, and can be successfully tested (in a constrained fashion) without injection. The suggested injection with the @LocalClient annotation on my unit tests is failing with the known error: javax.naming.NamingException: Unable to find injection meta-data for [your-class]. Ensure that class was annotated with @org

How to configure embedded OpenEJB container for tests properly?

感情迁移 提交于 2019-12-04 08:18:10
This is my SLSB: @Stateless public class MyService { PersistenceContext(unitName = "abc") EntityManager em; public boolean exists(int id) { return this.em.find(Employee.class, id) != null; } } This is my persistence.xml (I'm using Glassfish v3): <persistence> <persistence-unit name="abc"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>java:/MyDS</jta-data-source> <properties> <property name="hibernate.archive.autodetection" value="class" /> <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect" /> </properties> </persistence-unit> <

Comparing OpenEjb and Glassfish

▼魔方 西西 提交于 2019-12-04 02:58:00
can we replace Glassfish with Tomcat/OpenEJB for lighter applications? What is the performance of OpenEJB comparing to glassfish as EJB container. What is the restrictions of OpenEJB instead of glassfish? Regards Pascal Thivent I guess the question is about the runtime environment but still, I don't understand what lighter application does mean. Memory footprint? Startup time? Deployment time? What problem do you actually have? And please define light. For what it's worth, I consider GlassFish 3 as a light runtime and my experience with it is very positive. From the product data sheet : Oracle

How to instruct Maven to ignore my main/resources/persistence.xml in favor of test/…?

十年热恋 提交于 2019-12-03 15:37:42
问题 I have two persistence.xml files, for the sake of testing: src/main/resources/META-INF/persistence.xml src/test/resources/META-INF/persistence.xml How to instruct Maven to ignore the first file during testing? Now it is not ignored since OpenEJB says: ERROR - FAIL ... Finder: @PersistenceContext unitName has multiple matches: unitName "abc" has 2 possible matches. 回答1: Check out the alternate descriptors functionality which is aimed at what you're trying to do. Try this setup: src/main

How to instruct Maven to ignore my main/resources/persistence.xml in favor of test/…?

痞子三分冷 提交于 2019-12-03 05:15:05
I have two persistence.xml files, for the sake of testing: src/main/resources/META-INF/persistence.xml src/test/resources/META-INF/persistence.xml How to instruct Maven to ignore the first file during testing? Now it is not ignored since OpenEJB says: ERROR - FAIL ... Finder: @PersistenceContext unitName has multiple matches: unitName "abc" has 2 possible matches. Check out the alternate descriptors functionality which is aimed at what you're trying to do. Try this setup: src/main/resources/META-INF/persistence.xml src/main/resources/META-INF/test.persistence.xml Then you can construct OpenEJB