我可以将多个Jdbc驱动程序(例如mysql postgres等)加载到应用程序服务器并使用适合每个数据库的程序吗? 我有jboss 4.0.5GA,我把postgress jdbc驱动程序放在/ server / lib里,那里也有oracle jdbc。事情是,只有我删除jdbc3(oracle)驱动程序postgres工作但是如果我不删除它jboss使用PostgreSQL Native Driver。有什么想法? 这是我的postgres-ds.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================== -->
<!-- -->
<!-- JBoss Server Configuration -->
<!-- -->
<!-- ===================================================================== -->
<!-- $Id: postgres-ds.xml 41016 2006-02-07 14:23:00Z acoliver $ -->
<!-- ==================================================================== -->
<!-- Datasource config for Postgres -->
<!-- ==================================================================== -->
<datasources>
<local-tx-datasource>
<jndi-name>PostgresDS</jndi-name>
<connection-url>jdbc:postgresql://127.0.0.1:5432/dvdrental</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>postgres</user-name>
<password>password</password>
<!-- sql to call when connection is created. Can be anything, select 1 is valid for PostgreSQL
<new-connection-sql>select 1</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is obtained from pool. Can be anything, select 1 is valid for PostgreSQL
<check-valid-connection-sql>select 1</check-valid-connection-sql>
-->
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<!--<metadata>
<type-mapping>PostgreSQL 7.2</type-mapping>
</metadata>
-->
</local-tx-datasource>
</datasources>
事情就是jboss说:JDBC驱动程序:PostgreSQL Native Driver,版本:PostgreSQL 7.3.4 JDBC3 jdbc驱动程序构建113但是调用displayClassInfo()显示/C:/jboss-4.0.5.GA/server/remedy/ lib / postgresql-9.3-1102.jdbc3.jar。我如何强制使用加载的驱动程序??????