-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 19-Oct-2001 Bruce Snyder wrote: > I was wondering the same exact thing, Ned. Earlier today there was a message > posted with the title: > > [castor-dev] Using Castor with Tomcat 4 > > This touches on the Tomcat JNDI config and I was thinking that I could > simply use PoolMan in Tomcat's web.xml. Whattya think?
That's one way, sure. However, I wanted to see how to configure server.xml (and web.xml if possiable/needed) to make available the JDBC driver to the webapps, rather than have a servlet load it into the JNDI connection. Example of how to do this is at: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.html under the JDBC direction. Note that for some people this causes the fol lowing problems a) Since this is in the server.xml file, all webapps have access to the listed JDBC drivers. (I think) In my case, this isn't a problem but might be for some people b) PoolMan and your jdbc driver need to be in the tomcat 4.0 common lib directory, rather than under WEB-INF/lib. Castor can still live in WEB-INF/lib since its local to your app. I don't know if these problems are severe enough to warrent manual usage of a servlet init method to insert the JDBC driver into the servlet method. But for the sake of argument, lets say that these problems minor. In fact, for this discussion, lets say that we want all webapps in our installation to have access to JDO via JNDI just like we have access to JDBC via JNDI. Sure, we can still do that init method described in msg11192.html to place it into the JNDI structure directly. Or, in Tomcat 4.0 they mention the usage of a custom resource factory for inserting objects into JNDI based on the server.xml file. What I was looking for was this approach... rather than the servlet loading it manually, finding a way to load it automatically using Tomcat's resources. (Which would be even better if we didn't have to write a factory class, but if we could find a configuration that would do it for us.) Its my current holy grail (Holy quale? ;-) of Tomcat/JNDI/Castor integration. I wanted to see if others have done this before I do it over the weekend. Virtually, Ned Wolpert <[EMAIL PROTECTED]> D08C2F45: 28E7 56CB 58AC C622 5A51 3C42 8B2B 2739 D08C 2F45 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE70KSMiysnOdCML0URAiJyAJ9NRdd9gVQZwVjQ+ffscEpLlPf4PgCfRdbf gTGNp7hA1KQES5mbOq4GTQI= =X1qn -----END PGP SIGNATURE----- ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
