protected void startService() throws Exception {
Context ctx = new InitialContext();
// Bind the in VM UserTransaction interface
ctx.bind(JNDI_NAME, ClientUserTransaction.getSingleton());
// Get the UserTransactionSession proxy
txProxy = getServer().getAttribute(txProxyName, "Proxy");
// Build the UserTransactionSession interface method map
HashMap tmpMap = new HashMap(13);
Method[] methods = UserTransactionSession.class.getMethods();
for(int m = 0; m < methods.length; m ++)
{
Method method = methods[m];
Long hash = new Long(MarshalledInvocation.calculateHash(method));
tmpMap.put(hash, method);
}
// Add the UserTransactionSessionFactory interface method map
methods = UserTransactionSessionFactory.class.getMethods();
for(int m = 0; m < methods.length; m ++)
{
Method method = methods[m];
Long hash = new Long(MarshalledInvocation.calculateHash(method));
tmpMap.put(hash, method);
}
marshalledInvocationMapping = Collections.unmodifiableMap(tmpMap);
}
|