Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JNDI Configuration Query

 
Bhavesh Dak
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
This is first time I am using WebSphere
I want to look up some resources deployed in WebSphere and for that I need to create an InitialContext object
Am not able to find the JNDI configuration in WebSphere console. (Wanted to check the port information, for me 1099 port is not working)
Can any body guide me to get through JNDI configuration
any help anticipated
 
Bhavesh Dak
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look up code [Jars in class path: jnp-client-3.2.1.jar, jboss-common-3.2.1.jar]



Getting following Exception
javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1058)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1127)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:478)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
at javax.naming.InitialContext.lookup(Unknown Source)
...etc...
Caused by: java.net.SocketTimeoutException: Receive timed out
at java.net.PlainDatagramSocketImpl.receive(Native Method)
at java.net.DatagramSocket.receive(Unknown Source)
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1038)
... 5 more
 
Deepak Pant
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suggest you look at this post for some helpful details:
http://www.coderanch.com/t/484139/Websphere/JNDI-Lookup-WebSphere
 
Bhavesh Dak
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Deepak,

I tried with the port mentioned in the link but still getting same exception.
It will be great if you can just help me to locate where the jndi configuration resides in WebSphere

Thanks for reply
 
Deepak Pant
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suggest you try corba style provider URL method mentioned in the link. The port number for base websphere version is generally 2809. For ND version it starts from 98XX.

You can look for Bootstrap port under the server->ports link in the admin console.

The name to lookup gets logged in the WebSphere SystemOut.log file.

 
Victor Ramen
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure if looking up the jndi tree will give the correct port name. But here is what works for me on WAS6.1.

Go to Admin console.
On left hand navigation bar, go to Resources--> JMS
Choose one of ConnectionFactory, QueueConnectioNFactory, TopicConnectionFactory.
On the right hand pane, click on the ConnectionFactoryname.
And you can see the jndi details for this connectionfactory.
 
Bhavesh Dak
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bhavesh Dak wrote:Look up code [Jars in class path: jnp-client-3.2.1.jar, jboss-common-3.2.1.jar]



Getting following Exception
javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1058)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1127)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:478)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
Caused by: java.net.SocketTimeoutException: Receive timed out
at java.net.PlainDatagramSocketImpl.receive(Native Method)
at java.net.DatagramSocket.receive(Unknown Source)
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1038)
... 5 more
 
Bhavesh Dak
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bhavesh Dak wrote:Look up code [Jars in class path: jnp-client-3.2.1.jar, jboss-common-3.2.1.jar]



Getting following Exception
javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1058)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1127)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:478)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
Caused by: java.net.SocketTimeoutException: Receive timed out
at java.net.PlainDatagramSocketImpl.receive(Native Method)
at java.net.DatagramSocket.receive(Unknown Source)
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1038)
... 5 more
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic