if (transacted)
{
acknowledgeMode = Session.SESSION_TRANSACTED;
}
ThreadContextClassLoaderChanger tccc = new ThreadContextClassLoaderChanger();
try
{
tccc.set(getClass().getClassLoader());
SessionDelegate sessionDelegate =
delegate.createSessionDelegate(transacted, acknowledgeMode, isXA);
return new JBossSession(sessionDelegate, type);
}
finally
{
tccc.restore();
}
}