[jboss-as7-dev] problem creating datasources

Heiko Braun hbraun at redhat.com
Fri Apr 8 03:32:17 EDT 2011


comments below

On Apr 7, 2011, at 8:23 PM, Brian Stansberry wrote:

>> [localhost:9999 /]
>> */profile=default/subsystem=datasources/jdbc-driver=hypersonic:add(driver="com.h2database.h2")*
>> {
>> "outcome" => "*failed*",
>> "result" => {"server-groups" => {"main-server-group" => {
>> "server-one" => {
>> "host" => "local",
>> "response" => {
>> "outcome" => "failed",
>> "failure-description" =>
>> "org.jboss.msc.service.DuplicateServiceException: Service
>> jboss.jdbc-driver.\"org.h2.Driver\".1.2 is already registered"
>> }
>> },
>> "server-two" => {
>> "host" => "local",
>> "response" => {
>> "outcome" => "failed",
>> "failure-description" =>
>> "org.jboss.msc.service.DuplicateServiceException: Service
>> jboss.jdbc-driver.\"org.h2.Driver\".1.2 is already registered"
>> }
>> }
>> }}},
>> "failure-description" => "Operation was not applied successfully to any
>> servers"
>> }
>> 
> 
> This I understand. There's already this installed:
> 
> <driver module="com.h2database.h2"/>
> 
> and that results in the driver service already being present. I'll let 
> Jesper, Stefano or John Bailey comment on whether there's any reason to 
> have the 'driver="com.h2database.h2"' parameter to that operation, 
> rather than just requiring the name of the resource to be the name of 
> the module:
> 
> /profile=default/subsystem=datasources/jdbc-driver=com.h2database.h2:add
> 
> You still wouldn't be able to add the module twice, but at least the 
> reason why not would be clear.

Isn't it that "jdbc-driver=hypersonic:add(driver="com.h2database.h2")" means i am adding a new 
jdbc driver "hypersonic" that references "com.h2database.h2" ?

shouldn't this result in:
[localhost:9999 /] /profile=default/subsystem=datasources/jdbc-driver=hypersonic:read-resource
{
    "outcome" => "success",
    "result" => {
        "name" => "hypersonic",
        "driver" => "com.h2database.h2"
    },
    "compensating-operation" => undefined
}

but maybe I am confused by the API







More information about the jboss-as7-dev mailing list