Dave Clark<br />Senior WebSphere Architect<br /><a href="http://www.versant.com" target="_blank" rel="nofollow">Versant Open Access - JDO2 & EJB3</a>
Valentin Tanase
Ranch Hand
Joined: Feb 17, 2005
Posts: 704
posted
0
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.