tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Propes, Barry L " <barry.l.pro...@citi.com>
Subject RE: DB connection error -Tomcat 6 config
Date Thu, 18 Mar 2010 22:15:07 GMT
A little bit...but I'll probe into it some more.

Thanks for the suggestion. 

-----Original Message-----
From: Bob Hall [mailto:rfhall3@yahoo.com] 
Sent: Thursday, March 18, 2010 5:14 PM
To: Tomcat Users List
Subject: RE: DB connection error -Tomcat 6 config

--- On Thu, 3/18/10 at 3:07 PM, Propes, Barry L <barry.l.propes@citi.com> wrote:

> Yes, it should be.
> 
> Not sure how that got jumbled as such but what I did have
> was:
> 
> Connection connection = null;
> Context initCtx = new InitialContext(); Context envCtx = (Context) 
> initCtx.lookup("java:comp/env"); DataSource ds = (DataSource) 
> envCtx.lookup("jdbc/myoracle");
> 
> Tried other variations seen elsewhere on here as suggested.
> But still no dice.
> Odd - like I'd mentioned earlier, I can pass params through (DBUrl, 
> user, password) and hit it, but not with a Context object.
> 

Have you tried 'exploring' JNDI?

  NamingEnumeration<NameClassPair> list = initCtx.list("java:comp/env");

- Bob


      

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message