[jboss-as7-dev] New xsd and management operations for drivers

Max Rydahl Andersen max.andersen at redhat.com
Sat May 14 17:04:31 EDT 2011


I'm curious - will there be a way to get the physical location of the drivers ?

Then I could automatically configure the datasources with this as connections in the tooling (both eclipse and forge could use it
for easy setup mimicking what the server will/can see)

/max

On May 13, 2011, at 15:48, Stefano Maestri wrote:

> Hi,
> 
> In this branch
> 
> you can find some changes in datasources subsystem, mainly regarding 
> drivers. Please don't merge it since it needs IronJacamar CR1 not yet 
> released.
> 
> https://github.com/maeste/jboss-as/tree/IJ-CR1
> 
> To get what are changed have a look to the new driver type in xsd
> 
> https://github.com/maeste/IronJacamar/blob/master/common/src/main/resources/schema/datasources_1_0.xsd#L845
> 
> As you can see it provide not-mandatory major and minor version as asked 
> here
> https://issues.jboss.org/browse/AS7-711
> 
> Moreover it provide an attribute called name that is a symbolic name 
> user have to provide and this name is used to address this particular 
> driver. Both in management operations and in standalone/domain.xml 
> removing the annoying notation drivername#major.minor to point to the 
> driver. Since version are optional and no more used for DriverService 
> name they are just used to check if specified version and actual driver 
> version is the same during deployment and as user's information in 
> management and xml.
> 
> Have a look how standalone.xml (same for domain.xml) is now appearing:
> 
> https://github.com/maeste/jboss-as/blob/IJ-CR1/build/src/main/resources/standalone/configuration/standalone.xml#L177
> 
> As you have probably noticed here and in xsd there are 2 element of 
> driver tag to specify driver-class and xa-datasource-class. It permits 
> to support as module also jdbc driver previous than jdbc4. Of course it 
> is possible only as module, while deployment is still supported only for 
> jdbc4 drivers while we can't specify driver-class anywhere.
> 
> Finally here you have the two operation and answer to query installed 
> drivers:
> 
> /subsystem=datasources:installed-drivers-list
> {
>     "outcome" => "success",
>     "result" => [
>         {
>             "driver-name" => "h2",
>             "deployment-name" => undefined,
>             "module-name" => "com.h2database.h2",
>             "module-slot" => "main",
>             "driver-class" => "org.h2.Driver",
>             "major-version" => 1,
>             "minor-version" => 2,
>             "jdbc-compliant" => true
>         },
>         {
>             "driver-name" => "ojdbc6.jar",
>             "deployment-name" => "ojdbc6.jar",
>             "module-name" => undefined,
>             "module-slot" => undefined,
>             "driver-class" => "oracle.jdbc.OracleDriver",
>             "major-version" => 11,
>             "minor-version" => 2,
>             "jdbc-compliant" => true
>         }
>     ],
>     "compensating-operation" => undefined
> }
> [domain at localhost:9999 /] 
> /subsystem=datasources:get-installed-driver(driver-name="ojdbc6.jar")
> {
>     "outcome" => "success",
>     "result" => [{
>         "driver-name" => "ojdbc6.jar",
>         "deployment-name" => "ojdbc6.jar",
>         "driver-module-name" => undefined,
>         "module-slot" => undefined,
>         "driver-class-name" => "oracle.jdbc.OracleDriver",
>         "driver-major-version" => 11,
>         "driver-minor-version" => 2,
>         "jdbc-compliant" => true
>     }],
>     "compensating-operation" => undefined
> }
> 
> 
> As explained in AS7-328 this operation in domain mode are available at 
> host level, and not at domain/profile level. Something like that
> 
> /host=local/server=server-one/subsystem=datasources:installed-drivers-list
> 
> 
> Any comments or suggestions are more than welcome.
> 
> 
> 
> regards
> S.
> 
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev

/max
http://about.me/maxandersen






More information about the jboss-as7-dev mailing list