给出:
是否可以确定用于部署的JDBC驱动程序版本? pom.xml没有指定版本。
我尝试过的方法: 我可以列出已安装的驱动程序:
[standalone@localhost:9990 /] /subsystem=datasources:installed-drivers-list
{
"outcome" => "success",
"result" => [
{
"driver-name" => "acme-xyz-processor-3.4.25-develop-1380.war_com.microsoft.sqlserver.jdbc.SQLServerDriver_4_0",
"deployment-name" => "acme-xyz-processor-3.4.25-develop-1380.war_com.microsoft.sqlserver.jdbc.SQLServerDriver_4_0",
"driver-module-name" => undefined,
"module-slot" => undefined,
"driver-datasource-class-name" => undefined,
"driver-xa-datasource-class-name" => undefined,
"driver-class-name" => "com.microsoft.sqlserver.jdbc.SQLServerDriver",
"driver-major-version" => 4,
"driver-minor-version" => 0,
"jdbc-compliant" => true
},
{
"driver-name" => "sqlserver",
"deployment-name" => undefined,
"driver-module-name" => "com.microsoft.sqlserver",
"module-slot" => "main",
"driver-datasource-class-name" => "",
"driver-xa-datasource-class-name" => "",
"driver-class-name" => "com.microsoft.sqlserver.jdbc.SQLServerDriver",
"driver-major-version" => 6,
"driver-minor-version" => 4,
"jdbc-compliant" => true
},
{
"driver-name" => "acme-xyz-processor-3.4.25-develop-1380.war_org.postgresql.Driver_9_4",
"deployment-name" => "acme-xyz-processor-3.4.25-develop-1380.war_org.postgresql.Driver_9_4",
"driver-module-name" => undefined,
"module-slot" => undefined,
"driver-datasource-class-name" => undefined,
"driver-xa-datasource-class-name" => undefined,
"driver-class-name" => "org.postgresql.Driver",
"driver-major-version" => 9,
"driver-minor-version" => 4,
"jdbc-compliant" => false
},
{
"driver-name" => "h2",
"deployment-name" => undefined,
"driver-module-name" => "com.h2database.h2",
"module-slot" => "main",
"driver-datasource-class-name" => "",
"driver-xa-datasource-class-name" => "org.h2.jdbcx.JdbcDataSource",
"driver-class-name" => "org.h2.Driver",
"driver-major-version" => 1,
"driver-minor-version" => 3,
"jdbc-compliant" => true
}
]
}
[standalone@localhost:9990 /]
但这只是驱动程序列表。我真正关心的是,其中一个应用程序显然已经指定了SQL Server JDBC的4.0版本。我没看错吗?
在这一点上,我决定尝试确定我部署的应用程序所使用的版本。
是否可以确定未指定给定部署实际使用的驱动程序?您可能会认为这是最新的,但是我需要确定。