Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

sun Client doing jndi lookup on WAS6.........getting object as null..?

 
Akhil Jain
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to access some code deployed on IBM WAS6 from an application client running on JBOss. when i am trying to do the jndi lookup for eis/XUConnectionFactory which is a JNDI name for a Resource Adapter, though i am not getting any corba or nameNotFound exception but the object which is returned is null.

I think its some kind of Marshalling and Un-Marshalling issues.the way IBM JVM is marshalling the object stream and the way SUN JVM is retrieving that Object.

But i am completely unaware of the solution.

can somebody please help me in this regard.The code which i am using is as below:
...
Properties prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.cosnaming.CNCtxFactory");

prop.put(Context.PROVIDER_URL,"iiop://<ServerIP>:<Bootstrap_Port>")
Context ctx = new InitialContext(prop);
Object obj = ctx.lookup("cell/nodes/<myNodeName>/servers/<Server_name>/eis/XUConnectionFactory");


if somebody had this problem or know the solution please help me.
Jars which i am using are:
Additional jars:--
naming.jar
namingclient.jar
namingserver.jar
ras.jar

JRE System Library[jre1.5.0_02]:--
rt.jar
jsse.jar
dnsns.jar
sunjce_provider.jar
sunpkcs11.jar

In JBOSS 4.0 runtime:--
jboss-j2ee.jar
javax.servlet.jar
javax.servlet.jsp.jar
activation.jar
mail.jar
 
Andreas Schaefer
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I discourage you from creating an initial context with properties. You should use instead the no-args initial context constructor and then use the 'corbaname' JNDI lookup name (I already mentioned that in another thread how this look likes).

-Andy
 
Akhil Jain
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i dint get your second meaningful line."use 'corbaname' to do jndi lookup"....if you could give me some example line to be more clear on what you want to suggest, that will be really nice.
 
Andreas Schaefer
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you would have searched JavaRanch with the keyword 'corbaname' then you would have found this:

http://www.coderanch.com/t/317912/EJB-JEE/java/JNDI-rebind-not-reflecting-changes

-Andy
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!