-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jens,
On 11/19/2009 5:22 PM, Jens Greven wrote: > Christopher Schultz schrieb: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Jens, >> >> On 11/19/2009 2:59 PM, Jens Greven wrote: >> >>> is there a way of having a writeable JNDI context in Tomcat? I need one >>> to place dataSources in it, because I have a perfectly running >>> DataSourceFactory that is used in other applications as well, so I'd >>> prefer to use this one above everything else to avoid database >>> configurations in multiple places. Or is there a way of telling >>> hibernate to get connections from my DataSourceFactory, thus avoiding >>> the JNDI hassle? >>> >> >> What about using Tomcat's <Resource> configuration in context.xml which >> results in putting a DataSource into the JNDI context. Is there a >> compelling reason to use your own DataSourceFactory? If so, I believe >> you can configure <Resource> to use that. >> >> See http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html >> for more information. >> >> - -chris >> > Chris, > > The main reason for using my own DataSourceFactory is to have all > configuration in one place so in case of any changes to configuration > only one class has to be updated no matter what application uses the > DSF. As we have quite a heterogenous infrastructure, it currently > contains connection information for 7 Databases with individual > ConnectionCustomizers etc. (and changes appear quite frequently...). I > will try with the <Resource>, thanks a lot for the hint ;-) I believe you can set shared configuration either in conf/context.xml (the default context.xml for all webapps, and will therefore be inherited by all deployed webapps) or you can put <Resource> elements into server.xml under <GlobalNamingResources> and then map them to each webapp you deploy. See http://tomcat.apache.org/tomcat-6.0-doc/config/globalresources.html for more information, here. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAksFxngACgkQ9CaO5/Lv0PD/AgCbBeMCJoInrc2vsiTVnLPaeXx2 dUIAoJ2DQqrFLwRpVqfwaoyive3CrjTZ =ZQut -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org