• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JNDI lookup

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

please see the scenario..
There are two instance of a Jboss server jbdv01s and jbdv01c.
here jbdv01s has an sales application which is calling a service application in the same environment(jbdv01s).
The Flow is given below:

Sales application calls one service application through a intermediate class called adapter class. The jar file of the adapter class has packaged with the sales application's ear file.
This adapter class will lookup for the bean of service application.. Adapter class finds the location of the bean by reading one properties file.
This properties file contains the jndi information like



java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming rg.jnp.interfaces
java.naming.provider.url=dvsvccts01:1600

Here the dvsvccts01:1600 is the location of the bean of service application.

The requirement is to remove the service application from the current env and keep in another server.
So we neeed to change the JNDI port number. It should refer the service application which is running in the new server.
I changed the location by editing the properties file like

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming rg.jnp.interfaces
java.naming.provider.url=dvsvccts01:1500


where 1500 which is the HAJNDI port number of the new server.

But still the Sales application is calling the same service application running in the same server.
ie, no change happened even after i changed the HAJNDI port to new server as java.naming.provider.url=dvsvccts01:1600 to dvsvccts01:1500
Can anybody help me on this?

Thanks and Regards
Sajith
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sajith,


I have seen this issue reported earlier too with JBoss. I haven't given this a try to see if it reproducible on my local server. Based on the various posts that i have seen related to this, the issue seems to manifest when the bean is deployed on the server where the lookup is happening. Irrespective of what provider url you pass to the lookup, it seems to always return the bean from the local server.

How about removing (not deploying) the bean on the dvsvccts01:1600 server?

If that does not solve your issue, please post more details. Also, ensure that the correct properties file is being picked up.
 
The problems of the world fade way as you eat a piece of pie. This tiny ad has never known problems:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic