Skip to content

Instantly share code, notes, and snippets.

@rvazquezglez
Created December 7, 2012 21:14
Show Gist options
  • Save rvazquezglez/4236582 to your computer and use it in GitHub Desktop.
Save rvazquezglez/4236582 to your computer and use it in GitHub Desktop.
Agrega un DataSource por JNDI a Jetty.
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<New id="DSTest" class="org.eclipse.jetty.plus.jndi.Resource">
<Arg></Arg>
<Arg>java:url/datasource</Arg>
<Arg>
<New class="oracle.jdbc.pool.OracleDataSource">
<Set name="DriverType">thin</Set>
<Set name="URL">jdbc:oracle:thin:@host:1521:name</Set>
<Set name="User">user</Set>
<Set name="Password">password</Set>
<Set name="connectionCachingEnabled">true</Set>
<Set name="connectionCacheProperties">
<New class="java.util.Properties">
<Call name="setProperty">
<Arg>MinLimit</Arg>
<Arg>5</Arg>
</Call>
<!-- put the other properties in here too -->
</New>
</Set>
</New>
</Arg>
</New>
</Configure>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment