> Well in the localhost directory I have an <app_name>.xml for each Web App
in
> the system, it contains a context tag (going from memory at the moment as
> I'm not in front of the server)
>

This is a new feature in TC5

> > i defined the resource in server.xml.
>
> Guess that will be something for me to try tomorrow.
>

If you do you will have to restart Tomcat before it will work.

If you place it inside the GlobalNamingResource tag you will need to add the
following to the context tag:

<ResourceLink name="jdbc/YourDB" global="jdbc/YourDB"
type="javax.sql.DataSource"/>


Otherwise place it in the context tag you create for your application.
Remember if you define it here you don't need the <app_name>.xml.

Just some hints:

Watch your case and spelling.

Try a direct connection without the connection pool to test the rest of the
setup(name, password, drivers, etc).

Set things up exactly as the example says. Only change what you absolutely
must, which should be nothing. Once you are running you can then make
changes to suit. This caused me a lot of grief.

DataSource ds = ( DataSource ) ctx.lookup("java:comp/env/jdbc/mysql" );
must match
<res-ref-name>jdbc/mysql</res-ref-name> in web.xml
must match
name="jdbc/mysql" in server or <app_name>.xml

Same goes for your type tags as well. Your original post of your config
files didn't match in type or name.

If you use the latest stable MySQL jdbc drivers, the type is
"javax.sql.DataSource"

Use this as a guide:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html

Good Luck

Doug

www.parsonstechnical.com







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

Reply via email to