I have set up a datasource in Tomcat's server.xml using dbcp.  It works
fine, I get connections connect to the database, etc.  Now, I am in the
process of putting together quite a bit of DAO code and would like to unit
test each call as I am going through the coding using my JUnit tests.  How
can I connect to Tomcat's JNDI and get a reference to the datasource there
to pass to the classes I am testing?  Or should I just rework my test code
to just create a connection from the DriverManager and go from there?
Anybody doing anything like this with suggestions?  I appreciate any
help....

BTW:  I tried to connect to Tomcat's JDNI using the InitialContext and that
did not work because I could not get a datasource.

Peace,


Haytham


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

Reply via email to