File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes Changing JNDI port for JBOSS 5.1.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Changing JNDI port for JBOSS 5.1.0" Watch "Changing JNDI port for JBOSS 5.1.0" New topic
Author

Changing JNDI port for JBOSS 5.1.0

Anand Loni
Ranch Hand

Joined: Jan 20, 2006
Posts: 150
Hello,

I need to change jndi port binding on JBOSS 5.1.0. Is there any way to do this ?

I am using two instances of jboss on the same machine. I have same ejb application with different versions running on the instance of the jboss.
This is causing ejb lookup problem.

I hope it will be resolved once I will use different jndi port.

Please help

~ Anand,
SCJP 1.5, SCWCD 1.5
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10240
    
168

See ServiceBindingManager


[My Blog] [JavaRanch Journal]
Anand Loni
Ranch Hand

Joined: Jan 20, 2006
Posts: 150
I had a look at the link you mentioned ..but still its not working
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10240
    
168

What exactly did you change and what does "it's not working" mean? Please provide the exact details.
Anand Loni
Ranch Hand

Joined: Jan 20, 2006
Posts: 150
I followed following steps

1. I changed jndi port to 10990 and rmi port to 10980 in file default/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml

2. I restart Jboss

Error I am getting is :
javax.naming.CommunicationException: Could not obtain connection to any of these urls: 192.168.2.143:10990 and discovery failed with error: javax.naming.CommunicationException: Receive timed out
....
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)

....


Any idea what went wrong ??
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10240
    
168

You did not post the entire exception stacktrace, so i am guessing that some client code is (remotely?) doing the lookup? What exact command did you use to start the server? Did you use the -b option?

Also, while posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted.
Anand Loni
Ranch Hand

Joined: Jan 20, 2006
Posts: 150
Hi,

Here is stack trace



I am using -b option to start the server

Here is exact command



 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Changing JNDI port for JBOSS 5.1.0