[jboss-as7-dev] problem creating datasources

Brian Stansberry brian.stansberry at redhat.com
Thu Apr 7 14:23:23 EDT 2011


Comments in-line:

On 4/7/11 3:13 AM, Heiko Braun wrote:
>
>
> Please see the following sequence of commands. It seems that the driver
> is created, also the second operation returns a "failed" status.
>
> [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.

>
> [localhost:9999
> /]*/profile=default/subsystem=datasources/jdbc-driver=hypersonic:add(driver="hypersonic-jdbc-driver")*
> {
> "outcome" => "*failed*",
> "result" => {"domain-failure-description" =>
> [("java.lang.IllegalStateException" => "Resource at address [
> (\"profile\" => \"default\"),
> (\"subsystem\" => \"datasources\"),
> (\"jdbc-driver\" => \"hypersonic\")
> ] already exists")]}
> }
>

I'll have to look into why the failure of the first command didn't 
result in rollback.

Ah, it does, on the servers, but not on the domain controller. I'll have 
to change that so if the rollout-plan doesn't allow any failed servers 
the change gets rolled back on the domain as well.

>
> [localhost:9999 /]
> /*profile=default/subsystem=datasources:read-children-names(child-type=jdbc-driver)*
> {
> "outcome" => "*success*",
> "result" => [
> "com.h2database.h2",
> "*hypersonic*"
> ],
> "compensating-operation" => undefined
> }
>
>
>
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev


-- 
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat



More information about the jboss-as7-dev mailing list