ClientSessionDelegate sessionDelegate = (ClientSessionDelegate)invocation.invokeNext();
DelegateSupport delegate = (DelegateSupport)sessionDelegate;
ConnectionState connectionState = (ConnectionState)getState(invocation);
MethodInvocation mi = (MethodInvocation)invocation;
boolean transacted = ((Boolean)mi.getArguments()[0]).booleanValue();
int ackMode = ((Integer)mi.getArguments()[1]).intValue();
boolean xa = ((Boolean)mi.getArguments()[2]).booleanValue();
boolean isCC = false;
if (mi.getArguments().length >= 4)
{
isCC = ((Boolean)mi.getArguments()[3]).booleanValue();
}
SessionState sessionState =
new SessionState(connectionState, sessionDelegate, transacted,
ackMode, xa, sessionDelegate.getDupsOKBatchSize(),