posted 19 years ago
This is a very simple task. It looks almost identical with the way any client calls the bean, with couple of differences only:
When you build the initial context, you don�t need to set the environment, because your code runs on the server and it is already set.You can "cast" rather then "narrowing" to get a reference to the bean�s local interface.
Your code will look like this:
One more thing: this is the best approach. However you can access your bean through the remote interface, if the bean and the servlet doesn�t share the same classloader.
Regards.
I think, therefore I exist -- Rene Descartes