aspose file tools*
The moose likes Websphere and the fly likes JNDI Configuration Query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "JNDI Configuration Query" Watch "JNDI Configuration Query" New topic
Author

JNDI Configuration Query

Bhavesh Dak
Ranch Hand

Joined: Jun 27, 2009
Posts: 91
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


SCJP 6(83%), SCWCD 5.0(100%)
Bhavesh Dak
Ranch Hand

Joined: Jun 27, 2009
Posts: 91
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)
at pegmost.test.dbutil.PegmostUtil.main(PegmostUtil.java:28)
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

Joined: Feb 13, 2004
Posts: 443
Suggest you look at this post for some helpful details:
http://www.coderanch.com/t/484139/Websphere/JNDI-Lookup-WebSphere
Bhavesh Dak
Ranch Hand

Joined: Jun 27, 2009
Posts: 91
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

Joined: Feb 13, 2004
Posts: 443
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

Joined: Jul 14, 2008
Posts: 56
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JNDI Configuration Query
 
Similar Threads
Client or Websphere configuration for ejb access
How to redirect IBM HTTP webserver's request to IBM websphere
JNDI in websphere
How to redirect IBM HTTP webserver's request to IBM websphere
Running different apps on different ports or 1 app per port