dain 2004/04/10 02:51:39
Modified: modules/core/src/test/org/openejb/slsb
BasicStatelessContainerTest.java
InvocationTest.java
StatelessClientContainerTest.java
Removed: modules/core/src/test/org/openejb/slsb
OperationFactoryTest.java StatelessContextTest.java
Log:
Rewrote most unit tests to work against the new container
Removed unit tests for already deleted code or functionality
Changed EJBHome and EJBLocalHome remove by primary key on Session beans
to throw RemoveException instead of RemoteException (see EJB 2.1
Specification Section 6.6)
Revision Changes Path
1.3 +102 -118
openejb/modules/core/src/test/org/openejb/slsb/BasicStatelessContainerTest.java
Index: BasicStatelessContainerTest.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/test/org/openejb/slsb/BasicStatelessContainerTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- BasicStatelessContainerTest.java 21 Mar 2004 20:29:25 -0000 1.2
+++ BasicStatelessContainerTest.java 10 Apr 2004 06:51:39 -0000 1.3
@@ -50,20 +50,19 @@
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
-import javax.management.MBeanServer;
import javax.management.ObjectName;
import
org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinator;
import org.apache.geronimo.gbean.jmx.GBeanMBean;
import org.apache.geronimo.kernel.Kernel;
import org.apache.geronimo.kernel.jmx.JMXUtil;
+import org.apache.geronimo.naming.java.ReadOnlyContext;
import org.apache.geronimo.transaction.TransactionManagerProxy;
import junit.framework.TestCase;
import org.openejb.MockTransactionManager;
-import org.openejb.TransactionDemarcation;
import org.openejb.deployment.TransactionPolicySource;
-import org.openejb.dispatch.MethodSignature;
+import org.openejb.dispatch.InterfaceMethodSignature;
import org.openejb.transaction.ContainerPolicy;
import org.openejb.transaction.TransactionPolicy;
@@ -71,69 +70,57 @@
* @version $Revision$ $Date$
*/
public class BasicStatelessContainerTest extends TestCase {
-// private static final ObjectName CONTAINER_NAME =
JMXUtil.getObjectName("geronimo.test:ejb=Mock");
-// private static final ObjectName TM_NAME =
JMXUtil.getObjectName("geronimo.test:role=TransactionManager");
-// private static final ObjectName TCA_NAME =
JMXUtil.getObjectName("geronimo.test:role=TrackedConnectionAssociator");
-// private org.openejb.EJBContainerConfiguration config;
-// private Kernel kernel;
-// private GBeanMBean container;
-// private ObjectName containerName;
-// private Set containerPatterns;
-// private MBeanServer mbServer;
-
- public void testNothing() {
- }
-
- public void XtestRemoteInvocation() throws Throwable {
-// MockHome home = (MockHome) mbServer.invoke(containerName, "getEJBHome",
null, null);
-// MockRemote remote = home.create();
-// assertEquals(2, remote.intMethod(1));
- }
-// todo enable
-// public void testLocalInvocation() throws Throwable {
-// MockLocalHome home = (MockLocalHome) mbServer.invoke(containerName,
"getEJBLocalHome", null, null);
-// MockLocal remote = home.create();
-// assertEquals(2, remote.intMethod(1));
-// assertEquals(2, remote.intMethod(1));
-// remote.remove();
-// }
-
- public void XtestRemoteSpeed() throws Throwable {
-// MockHome home = (MockHome) mbServer.invoke(containerName, "getEJBHome",
null, null);
-// MockRemote remote = home.create();
-// remote.intMethod(1);
- // No stopwatch code for now - just comment it out
- //StopWatch stopWatch = new StopWatch();
- //stopWatch.start();
-// for (int i = 0; i < 1000; i++) {
-// remote.intMethod(1);
-// }
- //stopWatch.stop();
- //System.out.println("Remote: " + stopWatch.getTime());
- }
-
- public void XtestLocalSpeed() throws Throwable {
-// MockLocalHome home = (MockLocalHome) mbServer.invoke(containerName,
"getEJBLocalHome", null, null);
-//
-// MockLocal local = home.create();
-// Integer integer = new Integer(1);
-// local.integerMethod(integer);
-// int COUNT = 10000;
-// for (int i = 0; i < COUNT; i++) {
-// local.integerMethod(integer);
-// }
-//
-// COUNT = 100000;
-// long start = System.currentTimeMillis();
-// for (int i = 0; i < COUNT; i++) {
-// local.integerMethod(integer);
-// }
-// long end = System.currentTimeMillis();
-// System.out.println("Per local call w/out security: " + ((end - start) *
1000000.0 / COUNT) + "ns");
+ private static final ObjectName CONTAINER_NAME =
JMXUtil.getObjectName("geronimo.test:ejb=Mock");
+ private static final ObjectName TM_NAME =
JMXUtil.getObjectName("geronimo.test:role=TransactionManager");
+ private static final ObjectName TCA_NAME =
JMXUtil.getObjectName("geronimo.test:role=TrackedConnectionAssociator");
+ private Kernel kernel;
+ private GBeanMBean container;
+
+ public void testRemoteInvocation() throws Throwable {
+ MockHome home = (MockHome) kernel.getAttribute(CONTAINER_NAME, "EJBHome");
+ MockRemote remote = home.create();
+ assertEquals(2, remote.intMethod(1));
+ }
+
+ public void testLocalInvocation() throws Throwable {
+ MockLocalHome home = (MockLocalHome) kernel.getAttribute(CONTAINER_NAME,
"EJBLocalHome");
+ MockLocal remote = home.create();
+ assertEquals(2, remote.intMethod(1));
+ assertEquals(2, remote.intMethod(1));
+ remote.remove();
+ }
+
+ public void testRemoteSpeed() throws Throwable {
+ MockHome home = (MockHome) kernel.getAttribute(CONTAINER_NAME, "EJBHome");
+ MockRemote remote = home.create();
+ remote.intMethod(1);
+ for (int i = 0; i < 1000; i++) {
+ remote.intMethod(1);
+ }
+ }
+
+ public void testLocalSpeed() throws Throwable {
+ MockLocalHome home = (MockLocalHome) kernel.getAttribute(CONTAINER_NAME,
"EJBLocalHome");
+
+ MockLocal local = home.create();
+ Integer integer = new Integer(1);
+ local.integerMethod(integer);
+ int COUNT = 10000;
+ for (int i = 0; i < COUNT; i++) {
+ local.integerMethod(integer);
+ }
+
+ COUNT = 100000;
+ long start = System.currentTimeMillis();
+ for (int i = 0; i < COUNT; i++) {
+ local.integerMethod(integer);
+ }
+ long end = System.currentTimeMillis();
+ System.out.println("Per local call w/out security: " + ((end - start) *
1000000.0 / COUNT) + "ns");
}
/*
- public void XtestLocalSpeed2() throws Throwable {
+ public void testLocalSpeed2() throws Throwable {
int index = 0;
EJBInvocationImpl invocation = new
EJBInvocationImpl(EJBInterfaceType.REMOTE, index, new Object[]{new Integer(1)});
InvocationResult result = container.invoke(invocation);
@@ -154,60 +141,57 @@
protected void setUp() throws Exception {
super.setUp();
-//
-// config = new org.openejb.EJBContainerConfiguration();
- //config.uri = new URI("async", null, "localhost", 3434, "/JMX", null,
CONTAINER_NAME.toString());
-// config.beanClassName = MockEJB.class.getName();
-// config.homeInterfaceName = MockHome.class.getName();
-// config.localHomeInterfaceName = MockLocalHome.class.getName();
-// config.remoteInterfaceName = MockRemote.class.getName();
-// config.localInterfaceName = MockLocal.class.getName();
-// config.txnDemarcation = TransactionDemarcation.CONTAINER;
-// config.unshareableResources = new HashSet();
-// config.transactionPolicySource = new TransactionPolicySource() {
-// public TransactionPolicy getTransactionPolicy(String methodIntf,
MethodSignature signature) {
-// return ContainerPolicy.Required;
-// }
-// };
-//
-// containerName = CONTAINER_NAME;
-// containerPatterns = new HashSet();
-// containerPatterns.add(containerName);
-//
-// kernel = new Kernel("statelessSessionTest");
-// kernel.boot();
-// mbServer = kernel.getMBeanServer();
-//
-// GBeanMBean transactionManager = new
GBeanMBean(TransactionManagerProxy.GBEAN_INFO);
-// transactionManager.setAttribute("Delegate", new MockTransactionManager());
-// start(TM_NAME, transactionManager);
-//
-// GBeanMBean trackedConnectionAssociator = new
GBeanMBean(ConnectionTrackingCoordinator.GBEAN_INFO);
-// start(TCA_NAME, trackedConnectionAssociator);
-//
-// container = new GBeanMBean(StatelessContainer.GBEAN_INFO);
-// container.setAttribute("EJBContainerConfiguration", config);
-// container.setReferencePatterns("TransactionManager",
Collections.singleton(TM_NAME));
-// container.setReferencePatterns("TrackedConnectionAssociator",
Collections.singleton(TCA_NAME));
-// start(containerName, container);
+ StatelessContainerBuilder builder = new StatelessContainerBuilder();
+ builder.setClassLoader(this.getClass().getClassLoader());
+ builder.setContainerId(CONTAINER_NAME);
+ builder.setEJBName("MockEJB");
+ builder.setBeanClassName(MockEJB.class.getName());
+ builder.setHomeInterfaceName(MockHome.class.getName());
+ builder.setLocalHomeInterfaceName(MockLocalHome.class.getName());
+ builder.setRemoteInterfaceName(MockRemote.class.getName());
+ builder.setLocalInterfaceName(MockLocal.class.getName());
+ builder.setJndiNames(new String[0]);
+ builder.setLocalJndiNames(new String[0]);
+ builder.setUnshareableResources(new HashSet());
+ builder.setTransactionPolicySource(new TransactionPolicySource() {
+ public TransactionPolicy getTransactionPolicy(String methodIntf,
InterfaceMethodSignature signature) {
+ return ContainerPolicy.Required;
+ }
+ });
+ builder.setComponentContext(new ReadOnlyContext());
+ container = builder.createConfiguration();
+
+ kernel = new Kernel("statelessSessionTest");
+ kernel.boot();
+
+ GBeanMBean transactionManager = new
GBeanMBean(TransactionManagerProxy.GBEAN_INFO);
+ transactionManager.setAttribute("Delegate", new MockTransactionManager());
+ start(TM_NAME, transactionManager);
+
+ GBeanMBean trackedConnectionAssociator = new
GBeanMBean(ConnectionTrackingCoordinator.GBEAN_INFO);
+ start(TCA_NAME, trackedConnectionAssociator);
+
+ //start the ejb container
+ container.setReferencePatterns("TransactionManager",
Collections.singleton(TM_NAME));
+ container.setReferencePatterns("TrackedConnectionAssociator",
Collections.singleton(TCA_NAME));
+ start(CONTAINER_NAME, container);
+ }
+
+ protected void tearDown() throws Exception {
+ stop(CONTAINER_NAME);
+ stop(TM_NAME);
+ stop(TCA_NAME);
+ kernel.shutdown();
+ }
+
+ private void start(ObjectName name, GBeanMBean instance) throws Exception {
+ kernel.loadGBean(name, instance);
+ kernel.startGBean(name);
+ }
+
+ private void stop(ObjectName name) throws Exception {
+ kernel.stopGBean(name);
+ kernel.unloadGBean(name);
}
-
-// private void start(ObjectName name, Object instance) throws Exception {
-// mbServer.registerMBean(instance, name);
-// mbServer.invoke(name, "start", null, null);
-// }
-//
-// private void stop(ObjectName name) throws Exception {
-// mbServer.invoke(name, "stop", null, null);
-// mbServer.unregisterMBean(name);
-// }
-
-
-// protected void tearDown() throws Exception {
-// stop(containerName);
-// stop(TM_NAME);
-// stop(TCA_NAME);
-// kernel.shutdown();
-// }
}
1.4 +3 -3
openejb/modules/core/src/test/org/openejb/slsb/InvocationTest.java
Index: InvocationTest.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/test/org/openejb/slsb/InvocationTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- InvocationTest.java 6 Apr 2004 00:43:07 -0000 1.3
+++ InvocationTest.java 10 Apr 2004 06:51:39 -0000 1.4
@@ -125,8 +125,8 @@
StatelessInstanceContext ctx = new StatelessInstanceContext(
"containerID",
instance,
- (EJBProxyFactory)null,
- (UserTransactionImpl) null);
+ null,
+ null);
invocation.setEJBInstanceContext(ctx);
bizMethod.execute(invocation);
long start = System.currentTimeMillis();
1.3 +139 -146
openejb/modules/core/src/test/org/openejb/slsb/StatelessClientContainerTest.java
Index: StatelessClientContainerTest.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/test/org/openejb/slsb/StatelessClientContainerTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- StatelessClientContainerTest.java 21 Mar 2004 20:29:25 -0000 1.2
+++ StatelessClientContainerTest.java 10 Apr 2004 06:51:39 -0000 1.3
@@ -47,7 +47,6 @@
*/
package org.openejb.slsb;
-import java.net.URI;
import java.rmi.RemoteException;
import java.util.HashSet;
import javax.ejb.EJBException;
@@ -59,16 +58,14 @@
import javax.rmi.PortableRemoteObject;
import
org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinator;
-import org.apache.geronimo.core.service.Interceptor;
-import org.apache.geronimo.core.service.Invocation;
-import org.apache.geronimo.core.service.InvocationResult;
-import org.apache.geronimo.core.service.SimpleInvocationResult;
+import org.apache.geronimo.naming.java.ReadOnlyContext;
import junit.framework.TestCase;
+import junit.framework.AssertionFailedError;
+import org.openejb.EJBContainer;
import org.openejb.MockTransactionManager;
-import org.openejb.TransactionDemarcation;
import org.openejb.deployment.TransactionPolicySource;
-import org.openejb.dispatch.MethodSignature;
+import org.openejb.dispatch.InterfaceMethodSignature;
import org.openejb.transaction.ContainerPolicy;
import org.openejb.transaction.TransactionPolicy;
@@ -79,156 +76,152 @@
* @version $Revision$ $Date$
*/
public class StatelessClientContainerTest extends TestCase {
-// private StatelessContainer container;
+ private EJBContainer container;
- public void XtestMetadata() throws Exception {
-// EJBMetaData metaData = container.getEJBHome().getEJBMetaData();
-// assertTrue(metaData.isSession());
-// assertTrue(metaData.isStatelessSession());
-// assertEquals(MockHome.class, metaData.getHomeInterfaceClass());
-// assertEquals(MockRemote.class, metaData.getRemoteInterfaceClass());
-// EJBHome home = metaData.getEJBHome();
-// assertTrue(home instanceof MockHome);
-// try {
-// PortableRemoteObject.narrow(home, MockHome.class);
-// } catch (ClassCastException e) {
-// fail("Unable to narrow home interface");
-// }
-// try {
-// metaData.getPrimaryKeyClass();
-// fail("Expected IllegalStateException");
-// } catch (IllegalStateException e) {
- // OK
-// } catch (Throwable t) {
-// fail("Expected IllegalStateException");
-// }
- }
-
- public void XtestHomeInterface() throws Exception {
-// MockHome home = (MockHome) container.getEJBHome();
-// assertTrue(home.create() instanceof MockRemote);
-// try {
-// home.remove(new Integer(1));
-// fail("Expected RemoveException");
-// } catch (RemoveException e) {
- // OK
-// } catch (Throwable t) {
-// fail("Expected RemoveException");
-// }
-// try {
-// home.remove(new Handle() {
-// public EJBObject getEJBObject() throws RemoteException {
-// return null;
-// }
-// });
-// fail("Expected RemoteException");
-// } catch (RemoteException e) {
- // OK
-// } catch (Throwable t) {
-// fail("Expected RemoteException");
-// }
+ public void testMetadata() throws Exception {
+ EJBMetaData metaData = container.getEJBHome().getEJBMetaData();
+ assertTrue(metaData.isSession());
+ assertTrue(metaData.isStatelessSession());
+ assertEquals(MockHome.class, metaData.getHomeInterfaceClass());
+ assertEquals(MockRemote.class, metaData.getRemoteInterfaceClass());
+ EJBHome home = metaData.getEJBHome();
+ assertTrue(home instanceof MockHome);
+ try {
+ PortableRemoteObject.narrow(home, MockHome.class);
+ } catch (ClassCastException e) {
+ fail("Unable to narrow home interface");
+ }
+ try {
+ metaData.getPrimaryKeyClass();
+ fail("Expected EJBException, but no exception was thrown");
+ } catch (EJBException e) {
+ // OK
+ } catch (AssertionFailedError e) {
+ throw e;
+ } catch (Throwable t) {
+ fail("Expected EJBException, but got " + t.getClass().getName());
+ }
+ }
+
+ public void testHomeInterface() throws Exception {
+ MockHome home = (MockHome) container.getEJBHome();
+ assertTrue(home.create() instanceof MockRemote);
+ try {
+ home.remove(new Integer(1));
+ fail("Expected RemoveException, but no exception was thrown");
+ } catch (RemoveException e) {
+ // OK
+ } catch (AssertionFailedError e) {
+ throw e;
+ } catch (Throwable t) {
+ fail("Expected RemoveException, but got " + t.getClass().getName());
+ }
+ try {
+ home.remove(new Handle() {
+ public EJBObject getEJBObject() throws RemoteException {
+ return null;
+ }
+ });
+ fail("Expected RemoteException, but no exception was thrown");
+ } catch (RemoteException e) {
+ // OK
+ } catch (AssertionFailedError e) {
+ throw e;
+ } catch (Throwable t) {
+ fail("Expected RemoteException, but got " + t.getClass().getName());
+ }
}
public void testLocalHomeInterface() {
-// MockLocalHome localHome = (MockLocalHome) container.getEJBLocalHome();
-// try {
-// localHome.remove(new Integer(1));
-// fail("Expected RemoveException");
-// } catch (RemoveException e) {
- // OK
-// } catch (Throwable t) {
-// fail("Expected RemoveException");
-// }
- }
-
- public void XtestObjectInterface() throws Exception {
-// MockHome home = (MockHome) container.getEJBHome();
-// MockRemote remote = home.create();
-// assertTrue(home == remote.getEJBHome());
-// assertTrue(remote.isIdentical(remote));
-// assertTrue(remote.isIdentical(home.create()));
-// try {
-// remote.getPrimaryKey();
-// fail("Expected RemoteException");
-// } catch (RemoteException e) {
- // OK
-// } catch (Throwable t) {
-// fail("Expected RemoteException");
-// }
-// remote.remove();
+ MockLocalHome localHome = (MockLocalHome) container.getEJBLocalHome();
+ try {
+ localHome.remove(new Integer(1));
+ fail("Expected RemoveException, but no exception was thrown");
+ } catch (RemoveException e) {
+ // OK
+ } catch (AssertionFailedError e) {
+ throw e;
+ } catch (Throwable t) {
+ fail("Expected RemoveExceptions, but got " + t.getClass().getName());
+ }
+ }
+
+ public void testObjectInterface() throws Exception {
+ MockHome home = (MockHome) container.getEJBHome();
+ MockRemote remote = home.create();
+ assertTrue(remote.isIdentical(remote));
+ assertTrue(remote.isIdentical(home.create()));
+ try {
+ remote.getPrimaryKey();
+ fail("Expected RemoteException, but no exception was thrown");
+ } catch (RemoteException e) {
+ // OK
+ } catch (AssertionFailedError e) {
+ throw e;
+ } catch (Throwable t) {
+ fail("Expected RemoteException, but got " + t.getClass().getName());
+ }
+ remote.remove();
}
public void testLocalInterface() throws Exception {
-// MockLocalHome localHome = (MockLocalHome) container.getEJBLocalHome();
-// MockLocal local = localHome.create();
-// assertTrue(localHome == local.getEJBLocalHome());
-// assertTrue(local.isIdentical(local));
-// assertTrue(local.isIdentical(localHome.create()));
-// try {
-// local.getPrimaryKey();
-// fail("Expected EJBException");
-// } catch (EJBException e) {
+ MockLocalHome localHome = (MockLocalHome) container.getEJBLocalHome();
+ MockLocal local = localHome.create();
+ assertTrue(local.isIdentical(local));
+ assertTrue(local.isIdentical(localHome.create()));
+ try {
+ local.getPrimaryKey();
+ fail("Expected EJBException, but no exception was thrown");
+ } catch (EJBException e) {
//OK
-// } catch (Throwable t) {
-// fail("Expected EJBException");
-// }
-// local.remove();
- }
-
- public void XtestInvocation() throws Exception {
-// MockHome home = (MockHome) container.getEJBHome();
-// MockRemote remote = home.create();
-// assertEquals(2, remote.intMethod(1));
-// try {
-// remote.appException();
-// fail("Expected AppException");
-// } catch (AppException e) {
- // OK
-// }
-// try {
-// remote.sysException();
-// fail("Expected RemoteException");
-// } catch (RemoteException e) {
+ } catch (AssertionFailedError e) {
+ throw e;
+ } catch (Throwable t) {
+ fail("Expected EJBException, but got " + t.getClass().getName());
+ }
+ local.remove();
+ }
+
+ public void testInvocation() throws Exception {
+ MockHome home = (MockHome) container.getEJBHome();
+ MockRemote remote = home.create();
+ assertEquals(2, remote.intMethod(1));
+ try {
+ remote.appException();
+ fail("Expected AppException, but no exception was thrown");
+ } catch (AppException e) {
+ // OK
+ }
+ try {
+ remote.sysException();
+ fail("Expected RemoteException, but no exception was thrown");
+ } catch (RemoteException e) {
// OK
-// }
- }
-
- public void XtestProxySpeed() throws Exception {
- Interceptor localEndpoint = new Interceptor() {
-
- public InvocationResult invoke(Invocation invocation) throws Throwable {
- return new SimpleInvocationResult(true, new Integer(1));
- }
-
- };
-
- MethodSignature[] signatures = {new MethodSignature("intMethod", new
Class[]{Integer.TYPE})};
- // TODO: Fix implementation
+ }
}
protected void setUp() throws Exception {
super.setUp();
-// URI uri = new URI("async://localhost:3434#1234");
-//
-// org.openejb.EJBContainerConfiguration config;
-// config = new org.openejb.EJBContainerConfiguration();
- //config.uri = uri;
-// config.ejbName = "MockSession";
-// config.beanClassName = MockEJB.class.getName();
-// config.homeInterfaceName = MockHome.class.getName();
-// config.localHomeInterfaceName = MockLocalHome.class.getName();
-// config.remoteInterfaceName = MockRemote.class.getName();
-// config.localInterfaceName = MockLocal.class.getName();
-// config.txnDemarcation = TransactionDemarcation.CONTAINER;
-// config.unshareableResources = new HashSet();
-// config.transactionPolicySource = new TransactionPolicySource() {
-// public TransactionPolicy getTransactionPolicy(String methodIntf,
MethodSignature signature) {
-// return ContainerPolicy.Required;
-// }
-// };
-// config.contextId = "Mock Deployment Id";
-//
-// container = new StatelessContainer(config, new MockTransactionManager(),
new ConnectionTrackingCoordinator());
-// container.doStart();
+ StatelessContainerBuilder builder = new StatelessContainerBuilder();
+ builder.setClassLoader(this.getClass().getClassLoader());
+ builder.setContainerId("MockEJB");
+ builder.setEJBName("MockEJB");
+ builder.setBeanClassName(MockEJB.class.getName());
+ builder.setHomeInterfaceName(MockHome.class.getName());
+ builder.setLocalHomeInterfaceName(MockLocalHome.class.getName());
+ builder.setRemoteInterfaceName(MockRemote.class.getName());
+ builder.setLocalInterfaceName(MockLocal.class.getName());
+ builder.setJndiNames(new String[0]);
+ builder.setLocalJndiNames(new String[0]);
+ builder.setUnshareableResources(new HashSet());
+ builder.setTransactionPolicySource(new TransactionPolicySource() {
+ public TransactionPolicy getTransactionPolicy(String methodIntf,
InterfaceMethodSignature signature) {
+ return ContainerPolicy.Required;
+ }
+ });
+ builder.setComponentContext(new ReadOnlyContext());
+ builder.setTransactionManager(new MockTransactionManager());
+ builder.setTrackedConnectionAssociator(new ConnectionTrackingCoordinator());
+ container = builder.createContainer();
}
}