Details
-
Bug
-
Resolution: Done
-
Major
-
JBossAS-3.2.8.SP1, JBossAS-4.0.5.CR1
-
None
Description
In EjbModule before starting persistence managers for entity beans, correct thread class loader should be set. Like so
protected void startService() throws Exception
{
// before EntityContainer returns from the startService, its PM should be usable
ListIterator iter = containerOrdering.listIterator();
while( iter.hasNext() )
{
Container con = (Container) iter.next();
if(con.getBeanMetaData().isEntity())
{
ClassLoader oldCl = SecurityActions.getContextClassLoader();
SecurityActions.setContextClassLoader(con.getClassLoader());
try
{ ((EntityContainer)con).getPersistenceManager().start(); }finally
{ // Reset classloader SecurityActions.setContextClassLoader(oldCl); } }
}
...