Hi,
Is this the complete snippet for the method.. as i see szDataSource is always null.... and even if its set in the class level [not visible in this snippet] its re-assigned as null again.
String szDataSource = null;
if (datasource == null) {
try {
htParms = new Hashtable();
htParms.put(Context.PROVIDER_URL, szProviderURL);
htParms.put(Context.INITIAL_CONTEXT_FACTORY, szContextFactory);
context = new InitialContext(htParms);
temp = context.lookup(
szDataSource);
datasource = (DataSource) temp;
context = null;
}
Thanks!
~Gurumeet