try
{
Thread.currentThread().setContextClassLoader(classloader);
try
{
Util.rebind(getEnc(), "UserTransaction", new UserTransactionImpl());
}
catch (NamingException e)
{
NamingException namingException = new NamingException("Could not bind user transaction for ejb name " + ejbName + " into JNDI under jndiName: " + getEnc().getNameInNamespace() + "/" + "UserTransaction");
namingException.setRootCause(e);