A steath: Buffer pool and activation, what is the difference between passivation? A: There is no contact at all, the buffer pool is a state of state session bean and Entity Bean
In order to reduce the use of memory, use an instance pool in memory. When the client generates an object with the HOME interface, an instance is assigned to it, and the object is returned to the instance pool. It originally wanted to buffer pool Is built on a hard disk? Think about the speed of virtual memory, will not be so slow? :) and activated passivation is that the SESSION bean is written to the secondary storage in order to save its state, which is the hard disk. Two axes: How is the EJB call? A: The same is the same as the client. First use the Home interface, and use the remote interface and the EJB object to access each other. No way? The same machine also uses RMI? No way, see the definition of EJB: The structure of EJB is a component structure that develops and configures components-based distributed business applications. Applications developed with EJB structures are scalable, transactional, multi-user security. These applications may only be written once, but they can be configured on the task server platform that supports the EJB specification. So this is why EJB is suitable for high-end applications, but the new Local Interface has changed this :) Three-board ax: Narrow is Dongdong? Narrow is RMI / IIOP in order to be compatible with Corba. Because CORBA does not support absolute mandatory type conversion in order to compatibility with languages such as COBOL. RMI has some ways to convert remote references from a more common type to a more special type. CORBA provides a clear way to limit references for special types. The javax.rmi.portable remoteObject.narrow () method abstracts this method. The Narrow method is required only when the remote reference of the EJB HOME or EJB object is not returned with a special Remote interface type. This happens in six cases:
1. Use the javax.naming.context.lookup () method to get the EJB HOME interface. Object ref = JNDICONTEXT.LOOKUP ("Cabinhome"); Cabinhome Home = (Cabinhome) PortableRemoteObject.Narrow (Ref, Cabinhome.class);
2. Use the javax.ejb.handle.getejbObject () method to get the EJB object reference. Handle Handle = .... // Get Handle Object Ref = Handle.GeteJbobject (); Cabinhome Home = (Cabinhome) PortableRemoteObject.Narrow (Ref, Cabinhome.class);
3. Use the javax.ejb.homehandle.getejbhome () method to get the EJB Home reference. HOMEHANDLE HOMEHDLE = .... // Get Home Handle Ejbhome Ref = HomeHdle.GetejbHome (); Cabinhome Home = (Cabinhome) PortableRemoteObject.Narrow (Ref, Cabinhome.class);
4. Use the javax.ejb.ejbmetadata.getejbhome () method to get the EJB Home reference. EJBmetadata metadata = homehdle.getejbmetadata (); ejbhome ref = metadata.getejbhome (); CabinHome home = (Cabinhome) portableremoteobject.narrow (ref, CabinHome.class);. 5 from a home interface lookup method returns a collection of objects obtained ejb Quote.
6. Return a wide range of EJB objects from any business object.