[jboss-dev-forums] [Design of the JBoss EJB Container] - Re: NPE in JDBCStoreManager

alex.loubyansky@jboss.com do-not-reply at jboss.com
Tue Oct 28 10:35:25 EDT 2008


"scott.stark at jboss.org" wrote : It looks like the EjbModule is starting the pm before the entity container has been started. Why don't we start the pm from the EntityContainer.startService?

It's dictated by the current logic behind the (CMP) persistence manager start:
- first every persistence manager in the EJB module performs its initStoreManager();
- then after all of them initialized, they can be started which includes resolution of CMR and foreign keys (which is the reason why they are started in this way).

So, calling start on one of the PMs won't actually start the PM. Only when the last PM in the EJB module receives the start call they get started.
So, if the PM.start() were in EntityContainer.startService() then after return from EntityContainer.startService(), the container's PM might not had been started and the container would not be usable.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185111#4185111

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185111



More information about the jboss-dev-forums mailing list