Hi, I don't really know jetty, but in glassfish if you want to use H2 with connection pooling, you: 1. need javax.sql.DataSource or javax.sql.XADataSource 2. need JdbcDataSource as class (DB vendor)
And also, Glassfish states, that you should only use JdbcConnectionPool if you are using a connection pool provider other than the one Glassfish included in it. Csaba Sarkadi 2015. szeptember 28., hétfő 7:54:47 UTC+2 időpontban Josivan Souza a következőt írta: > > Hello. > > I'm trying to understand the purpose and the diference between > JdbcDataSource and JdbcConnectionPool. > > Based in code either JdbcDataSource or JdbcConnectionPool implement > *javax.sql.DataSource*. > > My mains question is: When should I use one or other? > > I have created an JNDI entry in jetty like: > > <New id="h2ds" class="org.eclipse.jetty.plus.jndi.Resource"> > <Arg><Ref refid="itracker" /></Arg> > <Arg>jdbc/itracker_ds</Arg> > <Arg> > <New class="org.h2.jdbcx.JdbcDataSource"> > <Set name="url">db-url</Set> > <Set name="password">user-password</Set> > <Set name="user">user-password</Set> > </New> > </Arg> > </New> > > Can I assume that org.h2.jdbcx.JdbcDataSource works like a pool or should > I use some pool like DBCP or C3P0? > > Cheers > > Josivan > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
