i am new to ejb and find out a question that makes me confused. when i'm coding a simple ejb on jboss3.0.0 integrated with tomcat 4.0.3 - for example, a session bean named Hello.jar printin' "Hello, world!" on standard out. then, i have to include Hello.jar in clients' classpath. this action (include jar file in client's classpath) makes me confused because, as i know, it's said that client's only allowed to have access to ejb via remote method. thus, why do i need to inlcude the whole ejb jar in client's classpath. (because i saw in j2ee server, provided via sun, seemly just returning stubs back to clients after deployed successfully.) is there any way not to include the whole jar file for client. or, anyone are able to tell me more detail about how it gets to work for i suppose i may misunderstand some concepts that i do not know yet.
thank you very much,
The client needs only the remote and home interface classes, and all value object classes being passed to/from the remote methods.
In other words, at server-side you have hello.jar, and at client-side you (should) have hello-client.jar. Some build tools can generate the client .jar file for you automagically, but it's quite easy to build it yourself also.
does it mean that only i need to package remote and home interface for clients side? becuase i found out that j2ee server (downloaded from java.sun.com) would automatically generate stubs for clients; but, if i have to package the remote and home interface for clients, it may be annoyed because each time i update ejb on servser side then i need to make remote and home interface jarred additionally. is there any better way? or what kind of strategy would be more correctly?
thanks your reply,
i appreciate it