openejb

Tell OpenEJB to ignore MDB

牧云@^-^@ 提交于 2020-01-16 06:20:56
问题 I wrote an unit-test for an activity which finally puts a message into a queue. As soon as a message is put into that queue, a message driven bean starts processing. But I don't want to test MDBs in a unit test. How can I tell OpenEJB to ignore them? I set up OpenEJB with several properties: p.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory"); p.setProperty("openejb.deployments.classpath.include", ".*"); p.setProperty("openejb.localcopy",

Error executing TommEE 1.0 with JSF 2.0

血红的双手。 提交于 2020-01-06 15:00:53
问题 I'm trying use apache-tomee-1.0.0 with my JSF 2.0 web app... but I can't do it :(. My problem is when I run the server logs this error: 30-ago-2012 18:49:39 org.apache.catalina.core.StandardContext listenerStart GRAVE: Excepción enviando evento inicializado de contexto a instancia de escuchador de clase com.sun.faces.config.ConfigureListener java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! org.apache.openejb.jsf.CustomApplicationFactory at com.sun

How to resolve 'Api type [java.util.Set] is not found with the qualifiers' Error when starting TomEE 1.6.0 plus?

自闭症网瘾萝莉.ら 提交于 2020-01-05 03:07:50
问题 Following on from this question TomEE on eclipse, How to call a remote EJB from a JSF Managed bean? I get the following error when I try to start the TomEE 1.6.0 plus server. What should i do? I have searched on the internet and found that this is because of Google Guava 15.0 While I understand what they are talking about I don't know how I can apply the solution to TomEE. The link explains that this error should go away by using open web 1.2.1. I can see that TomEE already uses open web 1.2

How to resolve 'Api type [java.util.Set] is not found with the qualifiers' Error when starting TomEE 1.6.0 plus?

守給你的承諾、 提交于 2020-01-05 03:07:17
问题 Following on from this question TomEE on eclipse, How to call a remote EJB from a JSF Managed bean? I get the following error when I try to start the TomEE 1.6.0 plus server. What should i do? I have searched on the internet and found that this is because of Google Guava 15.0 While I understand what they are talking about I don't know how I can apply the solution to TomEE. The link explains that this error should go away by using open web 1.2.1. I can see that TomEE already uses open web 1.2

Why datasource is not found in JNDI after injection from jndi.properties?

梦想与她 提交于 2019-12-30 18:01:33
问题 This is my persistence.xml : <persistence> <persistence-unit name="MyUnit"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>jdbc/abcDS</jta-data-source> </persistence-unit> </persistence> This is jndi.properties file from src/test/resources which is supposed to create a datasource during testing, since a real application server with a real datasource is absent: java.naming.factory.initial=org.apache.openejb.client.LocalInitialContextFactory jdbc/abcDS=new:/

Why datasource is not found in JNDI after injection from jndi.properties?

青春壹個敷衍的年華 提交于 2019-12-30 18:01:16
问题 This is my persistence.xml : <persistence> <persistence-unit name="MyUnit"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>jdbc/abcDS</jta-data-source> </persistence-unit> </persistence> This is jndi.properties file from src/test/resources which is supposed to create a datasource during testing, since a real application server with a real datasource is absent: java.naming.factory.initial=org.apache.openejb.client.LocalInitialContextFactory jdbc/abcDS=new:/

EJB creating using SessionBean EJBObject and EJBHome interfaces

时光总嘲笑我的痴心妄想 提交于 2019-12-24 03:32:13
问题 I am confused about creating EJB I have seen many samples of EJB on the internet and also sample project in which an EJB is developed using SessionBean , EJBObject and the EJBHome interfaces. In some other examples EJB is created without these interfaces and using only one or two interfaces e.g. if its locally accessible, javax.ejb.Local interface is used while for remotely access javax.ejb.Remote is used. So i am confused about creating EJB. What is the difference between these two type? I

Configure JNDI names with Open EJB

不问归期 提交于 2019-12-24 00:48:55
问题 I'm trying to (unit) test my EJB class without having to startup my websphere environment. Now I'm using Open EJB, but there are some issues with resolving the JNDI Names for other EJBs that are used within my EJB... and there is no way for me to inject mocked classes from my test right now. Getting the InitialContext final Properties properties = new Properties(); properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory"); properties

How can I integrate Jersey with TomEE / openEJB

被刻印的时光 ゝ 提交于 2019-12-23 07:20:14
问题 I am upgrading a code that uses Jersey JAX-RS to run on an Apache TomEE server. Unfortunately it throws errors when I try to use Jersey with TomEE. I am using eclipse and have the JAX-RS project facet turned on. It points to the Jersey library. I have also moved the Jersey libraries into the /lib/ directory to try to solve the problem to no avail. The server throws the following error: May 14, 2012 6:26:44 AM com.sun.jersey.api.core.ScanningResourceConfig logClasses INFO: Provider classes

How to configure embedded OpenEJB container for tests properly?

梦想与她 提交于 2019-12-21 15:24: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=