Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / April 2006

Tip: Looking for answers? Try searching our database.

Using Apache Derby in Tomcat application

Thread view: 
John O'Conner - 05 Apr 2006 18:52 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.