aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes JNDI lookup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JNDI lookup" Watch "JNDI lookup" New topic
Author

JNDI lookup

thamara chempakam
Greenhorn

Joined: Jul 09, 2007
Posts: 20
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
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10288
    
168

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.


[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JNDI lookup