Distribute server ID through EJB Weblogic calls

Is there a way to assign an identifier to a Weblogic server so that calls from one server to another propagate the identifier of the calling server?

As an example, I have two servers: ServerA and ServerB. I have a test client that views EJB on ServerA and calls a method on it. Then, the EJB on ServerA scans the EJB on ServerB and calls the method on it.

When using authentication on the first call, the principal extends from ServerA to ServerB, so context.getCallerPrincipal () returns the same on both servers.

Now I would like to call EJB on ServerA without using authentication, and when EJB is called on ServerB, it should return ServerA-main when calling context.getCallerPrincipal ().

The end result is that I want to be able to indicate that ServerA can call EJB methods on ServerB, but ServerX, for example, cannot be resolved.

I'm not sure if this is possible?

+3
source share

All Articles