[jboss-jira] [JBoss JIRA] (AS7-6565) single jdbc driver deployed inside ear takes name of ear
Frank Langelage (JIRA)
jira-events at lists.jboss.org
Fri Feb 22 17:51:56 EST 2013
[ https://issues.jboss.org/browse/AS7-6565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12756259#comment-12756259 ]
Frank Langelage commented on AS7-6565:
--------------------------------------
The name of this issue mentions drivers inside ear.
But with this source changes also drivers deployed as single jar files get this new naming scheme.
Having these files
-rw-r--r-- 1 jboss informix 869737 Jul 6 2012 ifxjdbc_all.jar
-rw-r--r-- 1 jboss informix 2714016 Aug 23 2011 ojdbc6.jar
-rw-r--r-- 1 jboss informix 584207 Mar 1 2012 sqljdbc4.jar
in deployments folder I get
[standalone at localhost:10699 /] /subsystem=datasources:installed-drivers-list
{
"outcome" => "success",
"result" => [
{
"driver-name" => "sqljdbc4.jar_com.microsoft.sqlserver.jdbc.SQLServerDriver_4_0",
"deployment-name" => "sqljdbc4.jar_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" => "ojdbc6.jar_oracle.jdbc.OracleDriver_11_2",
"deployment-name" => "ojdbc6.jar_oracle.jdbc.OracleDriver_11_2",
"driver-module-name" => undefined,
"module-slot" => undefined,
"driver-datasource-class-name" => undefined,
"driver-xa-datasource-class-name" => undefined,
"driver-class-name" => "oracle.jdbc.OracleDriver",
"driver-major-version" => 11,
"driver-minor-version" => 2,
"jdbc-compliant" => true
},
{
"driver-name" => "ifxjdbc_all.jar_com.informix.jdbc.IfxDriver_3_70",
"deployment-name" => "ifxjdbc_all.jar_com.informix.jdbc.IfxDriver_3_70",
"driver-module-name" => undefined,
"module-slot" => undefined,
"driver-datasource-class-name" => undefined,
"driver-xa-datasource-class-name" => undefined,
"driver-class-name" => "com.informix.jdbc.IfxDriver",
"driver-major-version" => 3,
"driver-minor-version" => 70,
"jdbc-compliant" => true
}
]
}
In server.log I see only
23:07:12,008 INFO [org.jboss.as.server#handleResult] JBAS018559: Deployed "sqljdbc4.jar" (runtime-name : "sqljdbc4.jar")
23:07:12,010 INFO [org.jboss.as.server#handleResult] JBAS018559: Deployed "ojdbc6.jar" (runtime-name : "ojdbc6.jar")
23:07:12,011 INFO [org.jboss.as.server#handleResult] JBAS018559: Deployed "ifxjdbc_all.jar" (runtime-name : "ifxjdbc_all.jar")
which means I have to know, that the driver name is different.
I have to put for instance this
<driver>ifxjdbc_all.jar_com.informix.jdbc.IfxDriver_3_70</driver>
into my *-ds.xml file.
In my eyes an awful change.
Prior to this change I had
<driver>ifxjdbc_all.jar</driver>
in my *-ds.xml files, simply the name of the jar containing the driver.
At least the second goal
"2. driver name (as to be used in datasource definition) should be logged with the log message above."
is not covered.
> single jdbc driver deployed inside ear takes name of ear
> --------------------------------------------------------
>
> Key: AS7-6565
> URL: https://issues.jboss.org/browse/AS7-6565
> Project: Application Server 7
> Issue Type: Feature Request
> Components: JCA
> Affects Versions: 7.1.1.Final, 8.0.0.Alpha1
> Reporter: Tom Eicher
> Assignee: Stefano Maestri
>
> We need to always give service name for jdbdriver as
> {code}
> deploymentUnit.getName() + "_" + driverClassName + "_" + majorVersion +"_" + minorVersion
> {code}
> even if thre is only one driver in the deployment unit. Current behavior is to give just deploymentUnit name in case of only one driver in. The changes makes more clear/readable driver names.
> Original description was:
> Including a JDBC driver, in this case PostgreSQL, in an ear like
> {code}
> myapp.ear:
> lib/postgresql-9.1-901.jdbc4.jar
> {code}
> does deploy the driver:
> {code}
> 23:37:28,118 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) JBAS010404: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 9.1)
> {code}
> however the service name is not {{postgresql_9_1_901_jdbc4_jar}} as expected,
> but it's {{myapp_ear}}.
> (Seen in admin console, and this is the only value accepted in my -ds.xml file.)
> 1. JDBC driver service should pick name of innermost jar, not of containing ear
> 2. driver name (as to be used in datasource definition) should be logged with the log message above.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list