ejb-3.0

Where I can find a complete reference of openejb.xml?

Do anyone know where I can find a complete reference of openejb.xml configuration file from OpenEJB? ...

How to configure embedded OpenEJB container for tests properly?

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...

NameNotFoundException when application name contains a period

I have a simple EJB app that used to work about 6 months ago. I installed the latest JDeveloper (11.1.1.3.0) and I'm trying to get it to work again, when I ran into this problem. Deployment fails on this line: TeacherManager teacherManager = (TeacherManager)context.lookup("Uran_2.0-TeacherManager#hu.elte.pgy2.BACNAAI.UranEJB.TeacherMan...

How do I call another Singleton bean from a Singleton bean?

I've tried putting the remote interface of another Singleton bean into another. However, the remote object will always be null. Is there any other way I could get around it? @Singleton public class SingletonBean1 implements SingletonBean1Remote { @EJB SingletonBean2Remote singletonBean2Remote; ... public SingletonBean...

EJB3 JSF application run in jboss 5

I am using JSF 1.2, EJB 3 on JBoss 5. This is my EJB: @Local public interface HelloServiceLocal { public void sayHello(String username); } @Stateless(name="helloService") public class HelloService implements HelloServiceLocal { public void sayHello(String username) { // business logic } } In a JSF backing bean ...

How to check exist item in cart and update it to 1 if user add it again?

Hello All! i have trouble with JPQL statement, i created NameQuery followed: @NamedQuery(name = "Cart.findExistCart", query = "SELECT c FROM Cart c WHERE c.cartPK.userid = :userid AND c.cartPK.itemid = :itemid "), in stateless bean i create one method to active this query followed: public Cart getUserItemCart(int userid,int itemi...

What is the best way to handle a ConstraintViolationException with EJB3 and entitymanager in an SLSB

here is my code snippet: @Stateless public class mySLSB { @PersistenceContext(unitName = "db") private EntityManager myEntityManager; public void crud(MyEntity myEntity) throws MyException { myEntityManager.merge(myEntity); } } However this merge can cause a ConstraintViolationException, which does not throw MyException (which i...

Error deploying MDB with multiple queue names in OpenEJB

The following error appeared at Tomcat/OpenEJB startup after upgrading to OpenEJB 3.1.3: ERROR - Unable to register MBean java.lang.IllegalStateException: javax.management.MalformedObjectNameException: Invalid character ',' in key part of property at org.apache.openejb.monitoring.ObjectNameBuilder.build(ObjectNameBuilder.java:59) ...