Tomcat and the app server (actually, EJB container) are runnign in the same JVM so you can use the local interface.
However, if you use the remote interface, JBoss is smart enough to know that the session bean is local and use a local connection anyway.
I've never tried using the relfection API to make ejb method calls. I always either cast the ejb to the local interface, or use PortableRemoteObject.narrow for the remote interface, and then make the calls directly on the resulting proxy.
Thanks for the info.
I'm using reflection because my servlet is an XFire one which dispatches SOAP requests to my EJB via an invoker, which uses the reflection API.
I ran some tests an found that in my case local calls from the servlet work with one example EJB, but unfortunately not with my target one, which implements the Service Endpoint Interface (SEI) of my WS. The only difference I can think of so far is that this SEI has been generated by the XFire wsdl to Java utility (wsgen), which might have made it somewhat special in some way (annotations ?). I'm still investigating the issue...