Skip to content

Instantly share code, notes, and snippets.

@char1st
Created December 11, 2012 01:19
Show Gist options
  • Save char1st/4254934 to your computer and use it in GitHub Desktop.
Save char1st/4254934 to your computer and use it in GitHub Desktop.
jetty jndi
<?xml version="1.0" encoding="UTF-8"?>
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<New class="org.eclipse.jetty.plus.jndi.Resource" id="DSTestll">
<Arg />
<Arg>jdbc/mysqlDScall</Arg>
<Arg>
<Call id="dsbyfact" class="com.alibaba.druid.pool.DruidDataSourceFactory"
name="createDataSource">
<Arg>
<Map>
<Entry>
<Item>username</Item>
<Item>
<New class="java.lang.String">
<Arg>root</Arg>
</New>
</Item>
</Entry>
<Entry>
<Item>url</Item>
<Item>
<New class="java.lang.String">
<Arg>jdbc:mysql://localhost:3306/jnditest</Arg>
</New>
</Item>
</Entry>
</Map>
</Arg>
</Call>
</Arg>
</New>
</Configure>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment