[ 
http://issues.apache.org/jira/browse/AXIS2-1214?page=comments#action_12436781 ] 
            
Johan Lundberg commented on AXIS2-1214:
---------------------------------------

This is the way of getting a connection to the database while the tomcat 
container is managing the connection pool. I cannot manage without this. 

Context envContext = (Context)initContext.lookup("java:comp/env");
DataSource ds = (DataSource)envContext.lookup("jdbc/TestDB");
Connection conn = ds.getConnection();

> Context envContext = (Context)initContext.lookup("java:comp/env")  throws 
> NameNotFoundException
> -----------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1214
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1214
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.0
>         Environment: axis2 nightly build from 31 August 
> tomcat 5.5.17 
>            Reporter: Johan Lundberg
>
> I am using Axis2 nightly build from 31 August and cannot lookup the 
> java:comp/env context from a created InitialContext created inside a class in 
> the aar-file
> When I do this:
> Context initContext = new InitialContext();
> Context envContext = (Context)initContext.lookup("java:comp/env");
> I get a NameNotFoundException.
> By the way, I am using the distributed axis2.war in tomcat 5.5.17 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to