Heya,
I'm trying to integrate Derby as an embedded db into the Roller web log
app on Tomcat. All the FAQs and install instructions describe how to
1. create the jdbc/rollerdb JNDI resource and DataSource in the
server.xml file.
2. place the Derby JDBC driver in Tomcat's common/lib subdir
I have a couple problems with this:
1. I don't control the Tomcat installation and don't have access to the
common/lib directory. However, I do have access to a CATALINA_BASE dir
in my home directory and to the app's WEB-INF directory.
2. Without putting the driver in common/lib, the existing instructions
cause exceptions trying to find the Derby driver...obviously derby.jar
isn't in common/lib but is instead in my app's WEB-INF/lib directory.
3. Creating a global JNDI resource and DataSource in server.xml is
causing the exceptions in #2 above.
So, can anyone help me understand how to add the DataSource resource and
JNDI entry somewhere just local to the app itself. I'm trying to put
this information into WEB-INF/web.xml, but I'm not sure this is
possible. Any thoughts?
Thanks for your help!
Regards,
John O'Conner
Bill McGuire - 07 Apr 2006 04:17 GMT
Don't use JNDI. Just get the DataSource (or jdbc driver or connection pool
or whatever) directly. That way you can configure and load everything in
your application environment.
John O'Conner - 09 Apr 2006 07:08 GMT
> Don't use JNDI. Just get the DataSource (or jdbc driver or connection pool
> or whatever) directly. That way you can configure and load everything in
> your application environment.
Thanks for the suggestion. However, I don't have control over the app
itself. It uses JNDI to find the resource, and I can't change that. It
expects to find "jdbc/rollerdb" from JNDI, which points to a DataSource.
Maybe I can find the reference and change it if it's localized to a
single area or two. I'll check it out.
Thanks again,
John