Hi John,
I'm just learning about these things myself, but I think that since you
want Derby embedded into your app, you don't want to create a jdbc JNDI
resource. You can just invoke the Derby embedded driver directly from
your application. If you do this, placing the driver in the
application's lib dir should work fine and you have no Tomcat
configuration to do.
As Lance mentioned in our earlier conversation, if you configure Derby
to be accessed by JNDI, the container itself has to have access to the
Derby driver and you must place it in common/lib, not the applications
lib dir.
-- Michelle
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
|