15. A Remote object stays in its own heap, while client invoke methods on the Remote object\u2019s
proxy, calling a stub.
16. The stub object handles all the low-level networking details in communicating with the
17. When a client wants to call a method in Remote Object, the client calls the same method in
the stub. The stub lives in the same heap as the client.
18. To the client, a remote method call is identical to a local method call, except a remote
20. Arguments and return values must be one of the following: a primitive, a Serializable object, an array or collection off primitive or Serializable objects, or Remote object. I f the value isn\u2019t one of these, you will get a runtime exception.
31. The Home is the factory for the bean. I ts main job is to hand the client a reference to the bean. But remember, the client can never truly get a reference to the bean \u2013 the best the client can do is to get a reference to the bean\u2019s EJBObject.
32. You create the Home interface by writing an interface that extends javax.ejb.EJBHome( and
interface that extends java.rmi.Remote)
33. The container is responsible for implementing the Home interface by building a class that
implements it, and the container also generates the stub for the Home.
37. The client gets a reference to the bean\u2019s EJBOjbect from the bean\u2019s home.
38. To get the bean\u2019s home, the client does a lookup on JNDI , using the logical name under
which the bean was deployed.
the server\u2019s JNDI \u201c virtual directory tree\u201d
40. For a Remote home interface, the stub returned from JNDI must be both cast and narrow.
41. Narrow is \u201cexotic casting\u201d needed for the stub objects that come from a method that does
not return the stub\u2019s client interface. Since the JNDI lookup return type object, the object
returned from the lookup must be narrowed to the bean\u2019s Home interface, and then cast to the
42. Narrow is required for I I OP stub(I I OP is wire protocol for CORBA), because what\u2019s return from the lookup might not be capable of implementing multiple interface, and thus would know only about the methods in type Objects. Narrowing returns an object that implements the home interface.
44. You expose your bean\u2019s business methods in the component interface.
45. Remote component interface must extend javax.ejb.EJBObject.
46. The client get a reference to the bean\u2019s EJBOjbect by calling a method on the bean\u2019s home
53. The isI dentical() method is kind of like doing an equals() method on the server. I t returns
true for two different stateless beans from the same home, false for two different stateful beans
from the same home, and true for references to entities bean with the same primary key.
54. You can expose your bean to local client using a local client view.
55. Local component interfaces must extend javax.ejb.EJBLocalObject. Local home interfaces
must extend javax.ejb.EJBLocalHome.
56. Methods in local client interfaces do not declare RemoteException.
57. Some of interface methods exposed to Remote clients are not exposed to local clients.
58. Local client cannot get handles, since handles are used to re-establish a connection to the
interrogate the EJB object and Home object.
60. Local home interface have only one remove() method \u2013 the one that takes a primarykey .
the remove() that takes a Handle doesn\u2019t exist in the local home interface, since Handle aren\u2019t
64. Arguments and return values are passed by value when using a local client view. I n other words, they\u2019re passed in the normal java way(object passed by a copy of reference, primitives passed by a copy of the value).
69. Container callbacks comes from two places: the SessionBean interface, and the home
interface. The compiler force you to implement the SessionBean interface, but the callbacks
related to the home are your responsibility, and the compiler won\u2019t know, since your bean class
71. When a bean transitions from does not exist to method \u2013 ready, its constructor is called,
followed by setSessionContext(), and finally the bean\u2019s ejbCreate().
72. A bean instance has specific Bean things that it can do, but none are available during the
75. The Container calls ejbRemove() method on a bean when the client calls remove(), for a stateful bean, or when the container want to reduce the size of pool, for stateless beans. I f a passivate bean time out, the Container will kill the bean without invoking ejbRemove().
interface for session beans and entity beans. That means that the client will see all of the
methods in your component interface, plus the five additional methods from EJBObject.
80. Entity Bean Component interface usually contain getters and setters for field values that
entity beans are typically found rather than created. I n other words, the client is more likely to try to access an existing entity as opposed to making a new entity( which means a new row in the database).
84. I n an entity home, a create() methodis not required ( since create() method in entity beans are for inserting new entities into the database, and you\u2019re not required to allow your client to do that)
method tha searches for a particular entity and returns its component interface( i.e. a reference
to that entity\u2019s EJB Object), or throws an exception.
87. Multple-entity finders do not throw an exception if not matching entities are found. They
simply return an empty collection.
This action might not be possible to undo. Are you sure you want to continue?