{
initParameterTypes = unadvisedMethod.getParameterTypes();
initParameterValues = statefulInvocation.getArguments();
}
Invocation invocation = invokeInit(statefulInvocation.getMetaData(), unadvisedMethod, sessionId, initParameterTypes, initParameterValues);
// Get JNDI Registrar
JndiSessionRegistrarBase sfsbJndiRegistrar = this.getJndiRegistrar();
// Determine if local/remote
boolean isLocal = EJBLocalObject.class.isAssignableFrom(unadvisedMethod.getDeclaringClass());
// Get the metadata
JBossSessionBeanMetaData smd = this.getMetaData();
// Get the appropriate JNDI Name
String jndiName = isLocal ? smd.getLocalJndiName() : smd.getJndiName();
// Find the Proxy Factory Key for this SFSB
String proxyFactoryKey = sfsbJndiRegistrar.getProxyFactoryRegistryKey(jndiName, smd, isLocal);
// 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(sessionId);
InvocationResponse response = marshallResponse(statefulInvocation, proxy, invocation.getResponseContextInfo());
response.addAttachment(StatefulConstants.NEW_ID, sessionId);
return response;
}
else if (unadvisedMethod.getName().equals("remove"))
{