Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

generic lookup of Home interface in JNDI  RSS feed

Rashmi Tambe
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have 5-6 service layer components implemented as an EJB and deployed on various Weblogic servers. Multiple web applications communicate to these EJBs. The provider URL from each component�s Weblogic server is kept as an env entry in the web.xml of each application. The web application takes this provider URL to create the initial context as follows �

Now my problem is, since no. of service layers are increasing, no. of env entries in web.xml are increasing. In addition, each environment has different set of URLs to access. I.e for production, development environments, different servers are maintained. So the provider URL changes accordingly. Therefore, before a deploying a web applications, its tedious task to replace the URLs according to environment.

So can I use just one JNDI directory to lookup the components? I.e can I map the lookup on a specific directory to various other Weblogic servers on the back end? i.e each lookup in a web application should a generic one to a specific server. The provider URL would be,

When I try to look up component1�s home interface, the JNDI on �dev_env_server� should know that compoenent1 is actually deployed on �dev_env_server2�:7001 port.

Similarly when I try to lookup componenet2�s home, the JNDI should map it another server �dev_env_server2�:7001 port.

Can JNDI be used this way? Can you deploy EJB to achieve this generic mapping? I have tried my best to explain problem. Any help would be highly appreciated.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!