2014-11-24 52 views
3

我將我的JBoss服務器連接到新的Postgres數據庫。JBoss日誌Postgres驅動程序是「非JDBC兼容」

在standalone.xml:

<driver name="postgresql" module="com.postgresql.pgjdbc"> 
    <driver-class>org.postgresql.Driver</driver-class> 
</driver> 

在module.xml:

<module xmlns="urn:jboss:module:1.1" name="com.postgresql.pgjdbc"> 
    <resources> 
     <resource-root path="postgresql-9.3-1102.jdbc41.jar"/> 
    </resources> 
    <dependencies> 
     <module name="javax.api"/> 
     <module name="javax.transaction.api"/> 
    </dependencies> 
</module> 

當啓動JBoss的,我得到以下日誌條目:

10:49:57,206 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 25) JBAS010404: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 9.3) 

司機似乎連接和工作。這種違規行爲的後果是什麼?

回答

7

根據這個JBoss的論壇進入無:Why is my JDBC4-compliant driver loaded as "non-JDBC-compliant"?

因爲org.postgresql.Driver#jdbcCompliant()返回false。所以,你 可以忽略,就目前而言,我敢肯定的是,PostgreSQL的JDBC人 想貢獻代碼

和源代碼:

/** 
* Report whether the driver is a genuine JDBC compliant driver. A 
* driver may only report "true" here if it passes the JDBC compliance 
* tests, otherwise it is required to return false. JDBC compliance 
* requires full support for the JDBC API and full support for SQL 92 
* Entry Level. 
* 
* <p>For PostgreSQL, this is not yet possible, as we are not SQL92 
* compliant (yet). 
*/ 
public boolean jdbcCompliant() 
{ 
    return false; 
} 

https://github.com/pgjdbc/pgjdbc/blob/REL9_3_1102/org/postgresql/Driver.java.in

這是一部分TODO清單http://jdbc.postgresql.org/development/todo.html#Compliance