private ManagedConnectionInfo getSharedManagedConnectionInfo(ContainerTransactionContext transactionContext) {
return ((TransactionCachingInterceptor.ManagedConnectionInfos)transactionContext.getManagedConnectionInfo(transactionCachingInterceptor)).getShared();
}
public void testGetConnectionOutsideTransaction() throws Exception {
TransactionContext.setContext(new UnspecifiedTransactionContext());
ConnectionInfo connectionInfo1 = makeConnectionInfo();
transactionCachingInterceptor.getConnection(connectionInfo1);
assertTrue("Expected to get an initial connection", obtainedConnectionInfo != null);
assertTrue("Expected nothing returned yet", returnedConnectionInfo == null);
assertTrue("Expected no ManagedConnectionInfo in the TransactionContext",