ptm.setJndiTemplate(new ExpectedLookupTemplate("java:comp/UserTransaction", ut)); ptm.setCacheUserTransaction(false); ptm.afterPropertiesSet(); ptm.setJndiTemplate(new ExpectedLookupTemplate("java:comp/UserTransaction", ut2)); tt.execute(new TransactionCallbackWithoutResult() { @Override
ptm.setJndiTemplate(jndiTemplate); ptm.afterPropertiesSet();
jndiTemplate.addObject("jndi-ut", ut); jndiTemplate.addObject("jndi-tm", tm); ptm.setJndiTemplate(jndiTemplate); ptm.afterPropertiesSet();