How do I get the EJB listening port?
I am currently developing a library for monitoring calls to multiple remote services (WebServices, EJBs ...).
One of the parameters I would like to register is the port from which the EJB is called (a stateless Bean session called as a remote object)
Is there a standard way to get the port? Or should I check the JNDI tree for this kind of information?
I am using EJB 2.1 spec but it is also possible for me to use EJB 3
a source to share
Is there any standardized way to get the port?
No, this is not part of the specification, that is, not standard. Although the EJB specification provides RMI-IIOP support, this is not the usual way to access EJBs, Java clients typically use JNP or proprietary protocols such as T3.
Or do I need to check the JNDI tree for this kind of information?
Nothing standard on this side either, so you just move the problem.
a source to share