Hi Srinivas,
Serializable means the Object can be sent through the Internet. Usually, we need to implement the 2 methods: writeObject() and readObject(), which defines how the object is imported and exported.
As in the Employer class,
String and Collection are serializable, and thus, you dont need to define how they can be sent via the network. But if it contains some non-serializable objects, OR you dont want to send some attributes via the network, you need to define how the objects be sent. If you do not want to send it, you can provide the
transient keyword to fulfill this.
For your case, since Client never directly access any
EJB, it only access the EJBObject (provided by the container) and the EJBObject invokes the method from EJB you need, thus, your code seems do not work.
Did you create any component interface and home interface so that the container can invoke the bean for you? In WSAD, you can generate all sets of related interfaces by adding a new EJB via the deployment discriptor.
Nick.
SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)