DB2 with Hibernate and Tomcat
At my current project, we're using AppFuse for our baseline and (currently) Tomcat and MySQL for our databases. Soon we'll be migrating to DB2 for our database. I'm assuming everything will work smoothly with Hibernate, but there's probably some Ant things I will need to modify. For instance, with MySQL, I currently create a new database with the following script:
create database if not exists appfuse; grant all privileges on appfuse.* to test@"%" identified by "test"; grant all privileges on appfuse.* to test@localhost identified by "test";
Is this possible with DB2? It's no biggie if it isn't - at my Comcast gig earlier in the year, we tied AppFuse/Hibernate into Oracle and simply didn't use the db-create nor db-init (creates tables) tasks. I use Hibernate's <schemaexport> task to create the tables - hopefully this will work in DB2. As for Tomcat, has anyone successfully configured DB2 with Tomcat's DBCP? We'll eventually be migrating to Websphere 5, hopefully it's not a big leap from Tomcat 4.1.27.
I haven't done any research on this yet, just wanted to put out some feelers and get any helpful advice before I start banging my head against the wall (hopefully I won't have to).
Websphere offers it's own DB pooling I believe, lookup through JNDI of course.
However, I believe that you can bypass it for the use of DBCP in your application. The trick, as always, is getting all the jars in the right CLASSPATH. :)
I've been following the Hibernate forums and it appears that it will work.
I'm interested in hearing about your experiences because my application also is starting with Tomcat + Hibernate + Spring + Postgresql but will probably need to be put into Websphere + DB2 + Hibernate + Spring.
BTW, I really like your site. I had no idea of blogging software written in Java. Roller looks really nice. Also the Wiki software that you recommend sounds interesting. I've been using veryquickwiki. My Eclipse Plug-in list almost completely matches yours--derived independently from yours--so interesting. I don't currently use Jalopy for code formatting so I'll have to check that one out.
Your page on your Development Environment is excellent!
Posted by mnickel on December 08, 2003 at 11:57 PM MST #
Posted by Anonymous Coward on December 09, 2003 at 01:06 AM MST #
Posted by Matt Raible on December 09, 2003 at 01:08 AM MST #
I'm sure Matt is just waiting on bated breath just for an answer to pop up on his blog. Yup, sure. Just waiting around not doing anything else but praying for the answer.
(sarcasm, heavily laced)
PS, maybe next time, AC, you'll be courageous and not post anonymously... right...
Posted by mnickel on December 09, 2003 at 03:47 AM MST #
Posted by Gavin on December 09, 2003 at 05:09 AM MST #
Posted by Jason on December 09, 2003 at 08:52 PM MST #