WebSphere Commerce suite - Re: Creating a new (extra) Datasource in WebSphere Commerce Develope<br><br&g

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Commerce suite > June 2005 > Re: Creating a new (extra) Datasource in WebSphere Commerce Develope<br><br&g





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Creating a new (extra) Datasource in WebSphere Commerce Develope<br><br&g
Robert Brown

2005-06-20, 2:49 am

I had forgotten (and was reminded thanks to Rhett at Daniel IT) that you
must switch to the Full Development Environment to enable other data
sources. One of the many areas that require the Full Environment
configuration.

This link will explain:

http://publib.boulder.ibm.com/infoc...cdetestenvs.htm

I knew other areas (Dynacache, stateful session beans, performance) that
wouldn't work under the new Lightweight Environment but forgot this...so
assume you are still working under the Lightweight setup. Try the Full
configuration.

R

> I did the following changes...
>
> 1. Using DB2 Configuration Assistant, created an Alias for my Remote Database of another app.
> 2. Updated " C:\WCToolkitBE56\properties\com\ibm\comm
erce\litecontainer\DataSources.properties" with the following.
> a. Added 'jdbc/MYDBDS\ DataSource=myDataSource' after 'jdbc/WPM\ DataSource=paymentsDataSource'.
> b. Added the following at the end.
> myDataSource.driver=COM.ibm.db2.jdbc.app.DB2Driver
> myDataSource.url=jdbc:db2:MYDB // Also tried with 'jdbc:db2://abc.de.fgh.com:2998/MYDB'
> myDataSource.user=<userid> // Gave the actual user id
> myDataSource.password=<pwd> // Gave the actual pwd
>
> 3. Added the following Env Var in 'C:\WCToolkitBE56\properties\com\ibm\com
merce\litecontainer\Env.properties'
> "java\:comp/env/jdbc/MYDBDS=jdbc/MYDBDS"
>
> 4. Used the following code to get the Datasource and Connection:
> ========================================
====================
> DataSource ds = JNDILookupSvc.lookupDataSource("jdbc/MYDBDS");
> ECTrace.trace(ECTraceIdentifiers.COMPONENT_ORDER, CLASS_NAME, methodName, "DataSource after Lookup - '"+ds+"'");
> ds.setLoginTimeout(30000);
> ECTrace.trace(ECTraceIdentifiers.COMPONENT_ORDER, CLASS_NAME, methodName, "DataSource after setting Login Timeout - '"+ds+"'; Login Timeout - '"+ds.getLoginTimeout()+"'");
> _gpopConn = ds.getConnection();
> ========================================
====================
>
> Once I executed the same, I got a 'NullPointerException'. And the message was that 'The url cannot be null'.
>
> Please help me in this regard.
>
> Thanks in advance,
> V

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com