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.
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.
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.
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
JBoss does not appear to support the ACC but other servers
like Orion/Oracle do.
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
OK. I've got the correct document, now. I see what you are talking about.