This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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
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
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?
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.