@ Override public final Handle createHandle ( BeanId id ) throws RemoteException { EJSWrapper wrapper = null ; homeEnabled ( ) ; wrapper = getWrapper ( id ) . getRemoteWrapper ( ) ; // f111627; //p116577 if ( ! statelessSessionHome && ! statefulSessionHome ) { if ( cvUsePortableClass ) //p125891 { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "createHandle():Creating portable HandleImpl" ) ; //p125891 // p116577 - start of change // Need to make EntityHandle class use only // SUN JDK or Java EE interfaces. So, we need to pass EJBObject // stub to the EntityHandle constructor. return new HandleImpl ( ( EJBObject ) PortableRemoteObject . toStub ( wrapper ) ) ; // F743-509.CodRev // p116577 - end of change } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "createHandle():Creating non-portable EntityHandle" ) ; //p125891 Properties pFake = null ; return new EntityHandle ( id , beanMetaData , pFake ) ; //p125891 //d145386 } } else { Object wrapperRef = container . getEJBRuntime ( ) . getRemoteReference ( wrapper ) ; EJBObject object = ( EJBObject ) PortableRemoteObject . narrow ( wrapperRef , EJBObject . class ) ; return container . sessionHandleFactory . create ( object ) ; } }
Create a Handle for the given BeanId