That worked, thanks.

>-----Original Message-----
>From: Mikolaj Rydzewski [mailto:[email protected]]
>Sent: Tuesday, November 03, 2009 9:11 AM
>To: Tomcat Users List
>Subject: Re: Trouble with context and JNDI resource
>
>Mike Baranski wrote:
>>              <Resource name="proteus" auth="Container"
>> type="org.apache.commons.dbcp.BasicDataSource"
>>
>Why not to use jdbc/proteus? Just to follow convention. I'd also rather
>use javax.sql.DataSource as type attribute.
>>              <resource-env-ref-name>
>>                      proteus
>>              </resource-env-ref-name>
>>
>The same, use jdbc/proteus.
>> I have this code:
>>
>> l.debug("Created the status xmlrpc class");
>> Context initCtx = new InitialContext();
>> Context envCtx = (Context) initCtx.lookup("");
>> this.setDataSource((BasicDataSource) envCtx.lookup("proteus"));
>>
>What about following:
>
>new InitialContext().lookup("java:comp/env/jdbc/proteus");
>
>
>--
>Mikolaj Rydzewski <[email protected]>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [email protected]
>For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to