jndi模式的
server.xml里的数据源:
<Context path="/core" docBase="D:\hssoft\hsUnion\HSSMP\core" reloadable="true">
<Resource name="jdbc/union" auth="Container" type="javax.sql.DataSource"
driverClassName="dm.jdbc.driver.DmDriver"
url="jdbc:DM://127.0.0.1:5236"
username="SYSDBA"
password="SYSDBA" maxActive="100" maxIdle="30" maxWait="10000" />
</Context>
public
class
TestServlet
extends
HttpServlet {
private
static
final
long
serialVersionUID = -8756437098790424507L;
private
final
static
String SERVER_CONFIG =
"/conf/server.xml"
;
public
void
doGet(HttpServletRequest request, HttpServletResponse response)
throws
ServletException, IOException {
doPost(request, response);
}
public
void
doPost(HttpServletRequest request, HttpServletResponse response)
throws
ServletException, IOException {
String config = System.getProperty(
"catalina.home"
) + SERVER_CONFIG;
String jdbcName="union";
}
}