-
1. Re: EJB Remote client
raja05 Dec 6, 2003 2:47 PM (in response to stanimir)Jboss creates dynamic proxies instead of stubs (which also eliminates the need for ejbc or similar kind used in weblogic). All you need to do from ur client is have the remote interfaces for ur ejb and have a jndi.properties that has values for java.naming.provider.url=jnp://machinename:1099
java.naming.factory.initial=Lookup getting started docs for this classname
-Raj -
2. Re: EJB Remote client
stanimir Dec 7, 2003 3:37 AM (in response to stanimir)Hi Raj,
Thanks a lot.
I understand what you mean but I have another question.
You wrote "All you need to do from ur client is have the remote interfaces for ur ejb..."
Do you mean that I have to include the home and the remote interfaces in the client jar or I have to include the EJB jar in the client classpath?
The latter implies that the EJB jar must be present on the client machine.
Which solution is more convinient on your opinion?
Thank you.
Stan. -
3. Re: EJB Remote client
jonlee Dec 7, 2003 4:00 AM (in response to stanimir)You actually want just the interfaces in the client environment. Ideally, you don't want to have the implementation included in the client environment.
One of the reasons for using an EJB is to be able to use the remote component, without "knowing" how the remote component does the work. It is a standard idiom or style for Java to use the interface to separate the "user" of an object from the implementation of the object - see "A System of Patterns" by Frank Buschmann, et al for a lengthy description of idioms.
So include the home and remote interfaces in your client environment. -
4. Re: EJB Remote client
stanimir Dec 7, 2003 9:06 AM (in response to stanimir)Hi Jonlee,
thank you very much.
Let me see if I understood what you meant.
So you suggested that I include the home and the remote interfaces of the remote EJB in the client classpath. And the job is done.
Is it a good grasp of your message??
thank you very much.
Stan -
5. Re: EJB Remote client
jonlee Dec 7, 2003 5:39 PM (in response to stanimir)Yes. That's it. Although, most times you build a client jar that has the interfaces - it would be part of the build process; build the EJB deployment JAR, build the EJB client JAR.
-
6. Re: EJB Remote client
stanimir Dec 8, 2003 10:54 AM (in response to stanimir)Hi Jonlee,
Thank you very much.
Cheers.
Stan