protected <B> B createNoInterfaceView(SessionContainer container, Serializable sessionId, Class<B> intf)
{
Class<?> beanClass = container.getBeanClass();
String name = container.getDeploymentQualifiedName();
KernelControllerContext endpointContext = (KernelControllerContext) kernel.getController().getContext(name, null);
AsyncMethodsMetaData asyncMethods = null;
JBossEnterpriseBeanMetaData sessionBeanMetaData = container.getXml();
if (sessionBeanMetaData instanceof JBossSessionBean31MetaData)
{
asyncMethods = ((JBossSessionBean31MetaData) sessionBeanMetaData).getAsyncMethods();
}
InvocationHandler invocationHandler = new NoInterfaceViewInvocationHandler(endpointContext, sessionId, intf,
asyncMethods == null ? new AsyncMethodsMetaData() : asyncMethods);
Object noInterfaceView = new JavassistProxyFactory().createProxy(new Class<?>[] {beanClass}, invocationHandler);
return intf.cast(noInterfaceView);
}