newbie question about ejb


EJB programming & troubleshooting: newbie question about ejb

  1. newbie question about ejb (2 messages)

    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,

    Threaded Messages (2)

  2. newbie question about ejb[ Go to top ]

    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.
  3. newbie question about ejb[ Go to top ]

    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 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