-
1. Re: using "java:comp/env" in client
sgturner Sep 2, 2002 2:25 AM (in response to tsangcn)Check out my September 1 newsletter where you will find an example devoted to this exact question, complete with source code.
http://www.tiburon-e-systems.com/jboss.htm -
2. Re: using "java:comp/env" in client
tsangcn Sep 2, 2002 7:34 AM (in response to tsangcn)Hello
I have read the newsletter. But it is talking about servlet or JSP as EJB client. That is what I already knew. Now I want to have a Java program (with main method and run in command shell) as the EJB client and use ENC to lookup the EJB.
I have tried many ways and it seems that JBoss does not support standalone Java program (with main method) as client to use ENC. It only support the lookup of JNDI name as deploy in jboss.xml for such clients.
Thanks
CN -
3. Re: using "java:comp/env" in client
sgturner Sep 2, 2002 11:34 AM (in response to tsangcn)If you read the J2EE spec, you will see that ENC is for being able to locate components from within other J2EE components. Therefore, having an ENC for a component to be used by a client program with main does not make sense and is not supported by JBoss.
To locate components from a program with main, you can either use the default jndi name which is the ejb-name that JBoss uses or you can set up a name in jboss.xml. -
4. Re: using "java:comp/env" in client
sgturner Sep 2, 2002 12:53 PM (in response to tsangcn)ClientContainer is something entirely different. In JBoss when you ask Jndi for something on the client side, you actually get a dynamic proxy class whose InvocationHandler is an instance of ClientContainer.
-
5. Re: using "java:comp/env" in client
nhebert Sep 2, 2002 9:25 PM (in response to tsangcn)Greg,
Yes, the J2EE Spec does detail the use of the ENC
in J2EE components. However, the J2EE spec does in fact
describe the Application Client Container as a full
fledged J2EE component and as such should have access to
the ENC.
JBoss does not appear to support the ACC but other servers
like Orion/Oracle do.
Cheers,
Noel. -
6. Re: using "java:comp/env" in client
sgturner Sep 3, 2002 12:28 AM (in response to tsangcn)Noel,
I must've missed this one. In fact, I'm looking at version 2.0 final release of EJB spec, dated Aug 14, 2001 and I can't find this. Could you refer me to chapter and verse, please. Thanks -
7. Re: using "java:comp/env" in client
sgturner Sep 3, 2002 12:55 AM (in response to tsangcn)OK. I've got the correct document, now. I see what you are talking about.