Should the resource name included in attribute sets?

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

Should the resource name included in attribute sets?

Heiko W.Rupp
Hi,

I am currently looking at  /system-property and see

[standalone@localhost:9999 /] /system-property=foo:read-resource
{
    "outcome" => "success",
    "result" => {"value" => "hula"}
}

while /path=rhq.home (and /socket-binding-group=x:socket-binding=y) have an
attribute with the name in it.

[standalone@localhost:9999 /] /path=rhq.home:read-resource
{
    "outcome" => "success",
    "result" => {
        "name" => "rhq.home",

For RHQ configuration processing, the name attribute is helpful,
but the larger question is about consistency here.

So should this 'name' attribute be present everywhere or be removed
everywhere?

   Heiko

--
Reg. Adresse: Red Hat GmbH, Technopark II, Haus C,
Werner-von-Siemens-Ring 14, D-85630 Grasbrunn
Handelsregister: Amtsgericht M├╝nchen HRB 153243
Geschaeftsf├╝hrer: Brendan Lane, Charlie Peters, Michael Cunningham, Charles Cachera


_______________________________________________
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: Should the resource name included in attribute sets?

Brian Stansberry
I don't want it to be present everywhere, as that forces 'name' to
become a reserved word, and I want reserved words kept to a minimum.

Agreed that exposing it as an attribute is usually unnecessary; feel
free to remove if you like or file a JIRA for ones you see.

There are some cases where it won't be removed; e.g. I'm working on
exposing the platform mbeans as resources, and the JMX API for some of
those mbeans includes a 'name' attribute so be consistent with that
well-known API the resources will as well.

On 8/18/11 8:27 AM, Heiko W.Rupp wrote:

> Hi,
>
> I am currently looking at  /system-property and see
>
> [standalone@localhost:9999 /] /system-property=foo:read-resource
> {
>      "outcome" =>  "success",
>      "result" =>  {"value" =>  "hula"}
> }
>
> while /path=rhq.home (and /socket-binding-group=x:socket-binding=y) have an
> attribute with the name in it.
>
> [standalone@localhost:9999 /] /path=rhq.home:read-resource
> {
>      "outcome" =>  "success",
>      "result" =>  {
>          "name" =>  "rhq.home",
>
> For RHQ configuration processing, the name attribute is helpful,
> but the larger question is about consistency here.
>
> So should this 'name' attribute be present everywhere or be removed
> everywhere?
>
>     Heiko
>


--
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