ejb-3.1

Glassfish doesn't bring up EntityManager if DAO is not Stateless

I have an EAR application with an EJB module, that contains one persistence unit and many EJBs (as service and DAO layer). @Stateless public class BranchDAO { @PersistenceContext private EntityManager entityManager; } But DAOs as Stateless beans are not recommended. So I create this annotation using...

(AS7) Error calling remote EJB method with proxified CDI bean in parameter

Can I call a remote EJB method with CDI bean in parameter method? Like this: I have a LoggedUserProducer.java thats produces a User from the database. public class LoggedUserProducer { @Produces @SessionScoped @LoggedUser public User produceLoggedUser() throws Exception { ... //load user from...

How to Sync Entity Bean with Database After Trigger Update

PostgreSQL 9.1 Glassfish 3.1.2.2 Firefox 10.0.0.7 Linux I am using JPA to persist entities in PostgreSQL. However, there is one table (named Position) which is populated by triggers and I use an entity of that table which acts as a read only. The entity never persist data into this table as it's...

Second Call to remote EJB3 bean from jsf in different application - Delegate not set

I'm getting a strange exception the SECOND time my remote ejb is called from my JSF Managed Bean. The first time the bean is called, the results are returned to the screen. However if I then click an action that calls the ejb for a second time, then I get the following Exception: SystemErr R java...