Interoperability between Websphere and Sun JDK

S

Sascha Moellering

Hi,

I've heard that there has been a problem if you try to access an EJB
running on Websphere using the Sun JDK. Is this problem solved? I have
to use JDK 1.3.1 and WAS 5.


Thank you,
Sascha
 
D

David Hilsee

Sascha Moellering said:
Hi,

I've heard that there has been a problem if you try to access an EJB
running on Websphere using the Sun JDK. Is this problem solved? I have
to use JDK 1.3.1 and WAS 5.

This is probably best asked in a websphere-specific newsgroup or forum. I
can tell you that I have been using WAS 5 and Sun's JDK 1.4.2 and could not
perform JNDI lookups, while lookups in IBM's JDK worked just fine. I don't
know if there is a workaround for that problem, or if I was doing something
wrong. It would be nice if there were a solution to the problem, because
then our JWS apps could be more powerful.
 
S

Sudsy

David said:
This is probably best asked in a websphere-specific newsgroup or forum. I
can tell you that I have been using WAS 5 and Sun's JDK 1.4.2 and could not
perform JNDI lookups, while lookups in IBM's JDK worked just fine. I don't
know if there is a workaround for that problem, or if I was doing something
wrong. It would be nice if there were a solution to the problem, because
then our JWS apps could be more powerful.

I might have something to contribute to this discussion. One of the
things I found when running multiple JNDI servers is that both the
protocol AND the implementing classes are significant. There are
also a couple of different ways to specify the parameters. Here's
some sample code:

/* didn't work */
Properties props = new Properties();
props.put( Context.PROVIDER_URL, "iiop://localhost:18099" );
props.put( Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory" );
Context context = new InitialContext( props );

/* did work */
Hashtable env = new Hashtable();
env.put("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
env.put("java.naming.provider.url", "localhost:18099");
Context context = new InitialContext( env );

I wish I had the definitive table of the correct classes and methods
to use for the different JNDI implementations at hand. I've got some
code and lots of notes but I would recommend some trial-and-error to
arrive at a solution which works in your particular environment.

Unless you want to pay me for my time, of course... ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top