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

+1


a source to share


2 answers


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.

+1


a source


There is no standard way to get a port. The port is usually specific to the application server that you are deploying to. Even the protocol will be application server specific :) - (RMI-JRMP, T3, etc.)



0


a source







All Articles