Below is the example. We have an application which is deployed in Oracle Weblogic Server. And We have client who use our application by creating connection using weblogic context like below.
env.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
env.put(Context.PROVIDER_URL,
"t3://weblogicServer:7001");
Context ctx = new InitialContext(env);```
** Now When they make this connection we want to get their hostname in our application.
Is there any way to achieve this. **
WebLogic Server has a propagation API that enables to send data from client to EJBs or web services hosted in WebLogic Server.
Read this documentation first.
Code sample used to send an information from a T3 client to an EJB hosted in WebLogic Server.
Client side :
EJB Side :