[jboss-jira] [JBoss JIRA] Created: (JBAS-3717) correct TCL should be used before starting entity PMs
Alexey Loubyansky (JIRA)
jira-events at jboss.com
Thu Sep 28 11:38:41 EDT 2006
correct TCL should be used before starting entity PMs
-----------------------------------------------------
Key: JBAS-3717
URL: http://jira.jboss.com/jira/browse/JBAS-3717
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: EJB2
Affects Versions: JBossAS-4.0.5.CR1
Reporter: Alexey Loubyansky
Assigned To: Alexey Loubyansky
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);
}
}
}
...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list