tags:

views:

196

answers:

2

I'm currently developing a library for monitoring calls to several remote services (WebServices, EJBs...).

One of the parameters that i would like to register is the port from which a EJB is called (a Stateless Session Bean invoked like a remote object)

There is any standarised way of getting the port? Or should I inspect the JNDI tree for this kind of information?

I'm using the EJB 2.1 spec, but it's also posible for me to use EJB 3

A: 

There is no standard way of getting the port. The port is usually specific to the appserver you are deploying on. Even the protocol would be appserver specific :) - (RMI-JRMP, T3 etc)

talonx
A: 

There is any standardized way of getting the port?

No, this is not part of the spec i.e. not standard. And while the EJB specification mandates the support of RMI-IIOP, this is not the usual way to access EJBs, Java clients usually use JNP or proprietary protocols like T3.

Or should I inspect the JNDI tree for this kind of information?

Nothing standard on this side too so you're just moving the problem.

Pascal Thivent