From: Anton K. <ak...@de...> - 2010-11-08 02:04:46
|
Hi Andreas, On 07.11.2010 21:21, Andreas Linke wrote: > > Does anyone has a quick description how to achive this? > (I use the jetty-engine of the current svn-checkout eXist-trunk) I am using the following in main jetty configuration jetty.xml (eXist trunk/rev.12013, jetty-7.1.6) <New id="ds_fnp" class="org.eclipse.jetty.plus.jndi.Resource"> <Arg></Arg> <!-- Global for the JVM --> <Arg>jdbc/fnp</Arg> <Arg> <New class="org.apache.commons.dbcp.BasicDataSource"> <Set name="driverClassName">com.mysql.jdbc.Driver</Set> <Set name="url">jdbc:mysql://mysql-server:3306/database</Set> <Set name="username">username</Set> <Set name="password">password</Set> <Set name="minIdle">1</Set> </New> </Arg> </New> as you see, this is the simplest way - connection pool with max scope of visibility - JVM and sql:get-jndi-connection('jdbc/fnp') in queries. I am not sure that dbcp is currently the best choice for connection pool these days, but it works for me. Regards, Anton |