// Lookup the Proxy Factory in the Object Store
StatefulSessionProxyFactory proxyFactory = Ejb3RegistrarLocator.locateRegistrar().lookup(proxyFactoryKey,
StatefulSessionProxyFactory.class);
// Create a new EJB2.x Proxy
Object proxy = proxyFactory.createProxyEjb2x((Serializable) newStatefulInvocation.getSessionId());
InvocationResponse response = marshallResponse(statefulInvocation, proxy, newStatefulInvocation
.getResponseContextInfo());
if (newStatefulInvocation.getSessionId() != null)
response.addAttachment(StatefulConstants.NEW_ID, newStatefulInvocation.getSessionId());