Amine

Been playing around w/ the same thing as you.  Have you figured it out yet?  I
am a bit baffled by the role of setting the context in server.xml.   Without making
any changes to server.xml, I downloaded and installed poolman and can run the
database client, querying any of my oracle tables.  However in my servlets, I keep
getting a error when attempting to connect: res-ref-name is not bound in this context.
This all worked fine under tomcat 3.2.  Why do I have to define a context in 
server.xml 4.0
and I didn't in server.xml 3.2?  Poolman seems to work fine w/o one.  Anybody got an 
anwser?

Thanks, Rich

Amine AMAR wrote:

> Hi all,
>
> I have a problem, please can anyone help?
>
> I'm trying to create an Oracle pooled connection as a JNDI resource.
> I made the required configuration:
> WEB-INF\web.xml file:
> <web-app>
> <resource-ref>
>   <res-ref-name>jdbc/toto</res-ref-name>
>   <res-type>oracle.jdbc.pool.OracleConnectionPoolDataSource</res-type>
>   <res-auth>Container</res-auth>
> </resource-ref>
> </web-app>
>
> %TOMCAT_HOME%\conf\server.xml
> <Context path="/titi" docBase="c:\www\titi" debug="0" reloadable="true">
>          <Resource name="jdbc/toto" auth="Container" 
>type="oracle.jdbc.pool.OracleConnectionPoolDataSource"/>
>   <ResourceParams name="jdbc/toto">
>    <parameter>
>     <name>user</name>
>     <value>tutu</value>
>    </parameter>
>    <parameter>
>     <name>password</name>
>     <value>tutu</value>
>    </parameter>
>    <parameter>
>     <name>url</name>
>     <value>jdbc:oracle:thin:@host:port:db</value>
>    </parameter>
>   </ResourceParams>
> </Context>
>
> When I register the resource from a program, everything works fine, when I try to 
>register the pooled connection thru JNDI I get the following error:
> javax.naming.NamingException: Cannot create resource instance
>
> the list bindings and related methods give the following:
> toto: org.apache.naming.ResourceRef: Reference Class Name: 
>oracle.jdbc.pool.OracleConnectionPoolDataSource
> Type: scope
> Content: Shareable
> Type: auth
> Content: Container
> Type: user
> Content: tutu
> Type: url
> Content: jdbc:oracle:thin:@host:port:db
> Type: password
> Content: tutu
>
> Does anybody have a clue?
>
> PS: sorry for my long message, I've been working on this for quite a while now :)
>
> Amine


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to