"driver-name" attribute while creating the JDBC driver

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

"driver-name" attribute while creating the JDBC driver

Jaikiran Pai
I was trying out creation of a JDBC driver through the management
operation. Initially I used this operation:

[standalone@localhost:9999 /]
/subsystem=datasources/jdbc-driver=mysql-5-driver:add(driver-module-name=mysql,
driver-class-name=com.mysql.jdbc.Driver)

Note that it _doesn't_ specify the "driver-name" attribute. However, it
failed with:

{
     "outcome" => "failed",
     "failure-description" => "JBAS014749: Operation handler failed: No
child 'driver-name' exists",
     "rolled-back" => true
}

(the error message isn't clear by the way, but that's a different matter).

I then had to change the operation to explicitly specify the driver-name
attribute:

[standalone@localhost:9999 /]
/subsystem=datasources/jdbc-driver=mysql-5-driver:add(driver-name=mysql-5-driver,
driver-class-name=com.mysql.jdbc.Driver, driver-module-name=mysql)

That worked fine.

But why is this operation unlike other "add" operations which use the
value before the ":" as the name of the new resource? By the way, I even
tried this command:

[standalone@localhost:9999 /]
/subsystem=datasources/jdbc-driver=foo:add(driver-name=bar,
driver-class-name=com.mysql.jdbc.Driver, driver-module-name=mysql)

Note that I use "foo" as the resource name for the add operation and
"bar" as the driver-name attribute value. This creates a driver named
"bar" in the standalone.xml:

<driver name="bar" module="mysql">
<driver-class>com.mysql.jdbc.Driver</driver-class>
</driver>

and there's no reference to "foo" anywhere. So what's the significance
of using it in the operation?

-Jaikiran


_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: "driver-name" attribute while creating the JDBC driver

Jaikiran Pai
Bumping this, since many developers were on vacation when this was sent
soon after 7.1.0 release.

-Jaikiran
On Friday 17 February 2012 03:53 PM, Jaikiran Pai wrote:

> I was trying out creation of a JDBC driver through the management
> operation. Initially I used this operation:
>
> [standalone@localhost:9999 /]
> /subsystem=datasources/jdbc-driver=mysql-5-driver:add(driver-module-name=mysql,
> driver-class-name=com.mysql.jdbc.Driver)
>
> Note that it _doesn't_ specify the "driver-name" attribute. However, it
> failed with:
>
> {
>       "outcome" =>  "failed",
>       "failure-description" =>  "JBAS014749: Operation handler failed: No
> child 'driver-name' exists",
>       "rolled-back" =>  true
> }
>
> (the error message isn't clear by the way, but that's a different matter).
>
> I then had to change the operation to explicitly specify the driver-name
> attribute:
>
> [standalone@localhost:9999 /]
> /subsystem=datasources/jdbc-driver=mysql-5-driver:add(driver-name=mysql-5-driver,
> driver-class-name=com.mysql.jdbc.Driver, driver-module-name=mysql)
>
> That worked fine.
>
> But why is this operation unlike other "add" operations which use the
> value before the ":" as the name of the new resource? By the way, I even
> tried this command:
>
> [standalone@localhost:9999 /]
> /subsystem=datasources/jdbc-driver=foo:add(driver-name=bar,
> driver-class-name=com.mysql.jdbc.Driver, driver-module-name=mysql)
>
> Note that I use "foo" as the resource name for the add operation and
> "bar" as the driver-name attribute value. This creates a driver named
> "bar" in the standalone.xml:
>
> <driver name="bar" module="mysql">
> <driver-class>com.mysql.jdbc.Driver</driver-class>
> </driver>
>
> and there's no reference to "foo" anywhere. So what's the significance
> of using it in the operation?
>
> -Jaikiran
>
>
> _______________________________________________
> jboss-as7-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: "driver-name" attribute while creating the JDBC driver

Jason T. Greene
That is just terribly wrong :(

Sent from my iPhone

On Mar 5, 2012, at 1:06 AM, Jaikiran Pai <[hidden email]> wrote:

> Bumping this, since many developers were on vacation when this was sent
> soon after 7.1.0 release.
>
> -Jaikiran
> On Friday 17 February 2012 03:53 PM, Jaikiran Pai wrote:
>> I was trying out creation of a JDBC driver through the management
>> operation. Initially I used this operation:
>>
>> [standalone@localhost:9999 /]
>> /subsystem=datasources/jdbc-driver=mysql-5-driver:add(driver-module-name=mysql,
>> driver-class-name=com.mysql.jdbc.Driver)
>>
>> Note that it _doesn't_ specify the "driver-name" attribute. However, it
>> failed with:
>>
>> {
>>      "outcome" =>  "failed",
>>      "failure-description" =>  "JBAS014749: Operation handler failed: No
>> child 'driver-name' exists",
>>      "rolled-back" =>  true
>> }
>>
>> (the error message isn't clear by the way, but that's a different matter).
>>
>> I then had to change the operation to explicitly specify the driver-name
>> attribute:
>>
>> [standalone@localhost:9999 /]
>> /subsystem=datasources/jdbc-driver=mysql-5-driver:add(driver-name=mysql-5-driver,
>> driver-class-name=com.mysql.jdbc.Driver, driver-module-name=mysql)
>>
>> That worked fine.
>>
>> But why is this operation unlike other "add" operations which use the
>> value before the ":" as the name of the new resource? By the way, I even
>> tried this command:
>>
>> [standalone@localhost:9999 /]
>> /subsystem=datasources/jdbc-driver=foo:add(driver-name=bar,
>> driver-class-name=com.mysql.jdbc.Driver, driver-module-name=mysql)
>>
>> Note that I use "foo" as the resource name for the add operation and
>> "bar" as the driver-name attribute value. This creates a driver named
>> "bar" in the standalone.xml:
>>
>> <driver name="bar" module="mysql">
>> <driver-class>com.mysql.jdbc.Driver</driver-class>
>> </driver>
>>
>> and there's no reference to "foo" anywhere. So what's the significance
>> of using it in the operation?
>>
>> -Jaikiran
>>
>>
>> _______________________________________________
>> jboss-as7-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
> _______________________________________________
> jboss-as7-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: "driver-name" attribute while creating the JDBC driver

Alexey Loubyansky
In reply to this post by Jaikiran Pai
I guess, it'll be less confusing if you add a jdbc-driver command like
this (which should probably be in the standard list)

command add --node-type=subsystem=datasources/jdbc-driver
--command-name=jdbc-driver --property-id=driver-name

And then add the driver using the command.

Alexey

On 03/05/2012 08:06 AM, Jaikiran Pai wrote:

> Bumping this, since many developers were on vacation when this was sent
> soon after 7.1.0 release.
>
> -Jaikiran
> On Friday 17 February 2012 03:53 PM, Jaikiran Pai wrote:
>> I was trying out creation of a JDBC driver through the management
>> operation. Initially I used this operation:
>>
>> [standalone@localhost:9999 /]
>> /subsystem=datasources/jdbc-driver=mysql-5-driver:add(driver-module-name=mysql,
>> driver-class-name=com.mysql.jdbc.Driver)
>>
>> Note that it _doesn't_ specify the "driver-name" attribute. However, it
>> failed with:
>>
>> {
>>        "outcome" =>   "failed",
>>        "failure-description" =>   "JBAS014749: Operation handler failed: No
>> child 'driver-name' exists",
>>        "rolled-back" =>   true
>> }
>>
>> (the error message isn't clear by the way, but that's a different matter).
>>
>> I then had to change the operation to explicitly specify the driver-name
>> attribute:
>>
>> [standalone@localhost:9999 /]
>> /subsystem=datasources/jdbc-driver=mysql-5-driver:add(driver-name=mysql-5-driver,
>> driver-class-name=com.mysql.jdbc.Driver, driver-module-name=mysql)
>>
>> That worked fine.
>>
>> But why is this operation unlike other "add" operations which use the
>> value before the ":" as the name of the new resource? By the way, I even
>> tried this command:
>>
>> [standalone@localhost:9999 /]
>> /subsystem=datasources/jdbc-driver=foo:add(driver-name=bar,
>> driver-class-name=com.mysql.jdbc.Driver, driver-module-name=mysql)
>>
>> Note that I use "foo" as the resource name for the add operation and
>> "bar" as the driver-name attribute value. This creates a driver named
>> "bar" in the standalone.xml:
>>
>> <driver name="bar" module="mysql">
>> <driver-class>com.mysql.jdbc.Driver</driver-class>
>> </driver>
>>
>> and there's no reference to "foo" anywhere. So what's the significance
>> of using it in the operation?
>>
>> -Jaikiran
>>
>>
>> _______________________________________________
>> jboss-as7-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
> _______________________________________________
> jboss-as7-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: "driver-name" attribute while creating the JDBC driver

Brian Stansberry
In reply to this post by Jason T. Greene
Agreed.

https://issues.jboss.org/browse/AS7-4041

On 3/5/12 7:51 AM, Jason Greene wrote:

> That is just terribly wrong :(
>
> Sent from my iPhone
>
> On Mar 5, 2012, at 1:06 AM, Jaikiran Pai<[hidden email]>  wrote:
>
>> Bumping this, since many developers were on vacation when this was sent
>> soon after 7.1.0 release.
>>
>> -Jaikiran
>> On Friday 17 February 2012 03:53 PM, Jaikiran Pai wrote:
>>> I was trying out creation of a JDBC driver through the management
>>> operation. Initially I used this operation:
>>>
>>> [standalone@localhost:9999 /]
>>> /subsystem=datasources/jdbc-driver=mysql-5-driver:add(driver-module-name=mysql,
>>> driver-class-name=com.mysql.jdbc.Driver)
>>>
>>> Note that it _doesn't_ specify the "driver-name" attribute. However, it
>>> failed with:
>>>
>>> {
>>>       "outcome" =>   "failed",
>>>       "failure-description" =>   "JBAS014749: Operation handler failed: No
>>> child 'driver-name' exists",
>>>       "rolled-back" =>   true
>>> }
>>>
>>> (the error message isn't clear by the way, but that's a different matter).
>>>
>>> I then had to change the operation to explicitly specify the driver-name
>>> attribute:
>>>
>>> [standalone@localhost:9999 /]
>>> /subsystem=datasources/jdbc-driver=mysql-5-driver:add(driver-name=mysql-5-driver,
>>> driver-class-name=com.mysql.jdbc.Driver, driver-module-name=mysql)
>>>
>>> That worked fine.
>>>
>>> But why is this operation unlike other "add" operations which use the
>>> value before the ":" as the name of the new resource? By the way, I even
>>> tried this command:
>>>
>>> [standalone@localhost:9999 /]
>>> /subsystem=datasources/jdbc-driver=foo:add(driver-name=bar,
>>> driver-class-name=com.mysql.jdbc.Driver, driver-module-name=mysql)
>>>
>>> Note that I use "foo" as the resource name for the add operation and
>>> "bar" as the driver-name attribute value. This creates a driver named
>>> "bar" in the standalone.xml:
>>>
>>> <driver name="bar" module="mysql">
>>> <driver-class>com.mysql.jdbc.Driver</driver-class>
>>> </driver>
>>>
>>> and there's no reference to "foo" anywhere. So what's the significance
>>> of using it in the operation?
>>>
>>> -Jaikiran
>>>
>>>
>>> _______________________________________________
>>> jboss-as7-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>
>> _______________________________________________
>> jboss-as7-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
> _______________________________________________
> jboss-as7-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev


--
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev