Skip to content

Instantly share code, notes, and snippets.

@rvazquezglez
Created December 17, 2012 21:42
Show Gist options
  • Save rvazquezglez/4322560 to your computer and use it in GitHub Desktop.
Save rvazquezglez/4322560 to your computer and use it in GitHub Desktop.
Jetty configuration file to create a DataSource using JNDI, example for Oracle DataBase.
<?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="renaporeport" class="org.eclipse.jetty.plus.jndi.Resource">
<Arg></Arg>
<Arg>renaporeport</Arg>
<Arg>
<New class="oracle.jdbc.pool.OracleDataSource">
<Set name="DriverType">thin</Set>
<Set name="URL">jdbc:oracle:thin:@fmsswdb1:10017:otcd</Set>
<Set name="User">xxxx</Set>
<Set name="Password">xxxx</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