command to generate client stubs

Hi, I'm quite new to J2EE field and my question must be a simple one.

I've written an enterprise bean (stateless session bean, j2ee 1.4) and also the Home and remote interfaces. I want to generate the client stubs so that other project can invoke the session bean doing a JNDI lookup

I'm using IBMs Rational Application Developer IDE. I can generate the client stubs simply by right-clicking on theEJB project --> create EJB client jar . However I want to use a command to generate it. I believe i've to use either "rmic" or "ejbdeploy" command.but which one? and whats the basic difference between these two

Thanks in advance.

[667 byte] By [javaguy2007a] at [2007-11-27 9:17:22]
# 1

My personal view is that the client stub is not generated at the deploy time, but at the running time when the client invocates the lookup() and create() methods. At that moment, the EJB container will serialize the relevant client stubs and transmit them to the client side through a Stream, and then the client JVM deserializes the stubs. That's why those client stubs must implement the Serializable interface. So you know that the client stubs are actually generated on the server side, i.e., the EJB container at running time.

liaodongyana at 2007-7-12 22:07:47 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...