Hi all,
I would like to connect remotely to the DB2 in linux machine using the JNDI lookup.
In websphere development 5.1, this portion of code is working in 5.1 env :
/////////////////////////////////////////////////////////////////////////
Context MyCtx = null;
DataSource MyDS = null;
Hashtable parms = new Hashtable();
Connection conn = null;
parms.put(Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory ");
MyCtx = new InitialContext(parms);
MyDS = (DataSource) MyCtx.lookup("jdbc/Employee");
conn = MyDS.getConnection();
/////////////////////////////////////////////////////////////////////////
But after i recompile in websphere rational 6.0, the code is not working anymore. It said :
=> Cannot instanciate com.ibm.websphere.naming.WsnInitialContextFactory. .
I have imported the db2jcc.jar, db2jcc_license_cu.jar, can anyone giv me some clue what is happening? Thanks alot.