admin@glassfish.java.net

Re: <engine> has no unique ID

From: Hong Zhang <Hong.Zhang_at_Sun.COM>
Date: Mon, 24 Mar 2008 10:25:19 -0400

Hi, Lloyd

> OK, fine by me. So is the "sniffer" attribute unique within a given
> <application>? If so, we're all set as-is.
>
> <application ... name="hello1">
> <engine sniffer="web" />
> <engine sniffer="security" />
> </application>
>
I know you previously said this:

> To clarify: the name of the <engine> need only be unique within its
> scope (eg the application, web module, etc), because the name of the
> app forms part of the ObjectName. Even in an EAR, if each web module
> has <engine> elements, the web module names are unique, therefore the
> ObjectNames would be unique.


But I am still not too sure about the ear case. I don't know if we will
expose the sub module as part of the <application> element in addition
to the <engine> element. The <engine> element in some sense already
represents a logical "module". So all <engine> elements might just be
under the <application> root element. I need to think more about the ear
case which I haven't been able to spend much time yet. Of course Jerome
might already have a clearer picture in his head :-)

In any case, the sniffer will be unique for standalone web module, so
this scheme will be sufficient for TP2 release.

Thanks,

- Hong


>
>
> On Mar 21, 2008, at 2:06 PM, Jerome Dochez wrote:
>
>>
>> On Mar 21, 2008, at 10:03 AM, Hong Zhang wrote:
>>
>>> Lloyd: thanks for finding a solution for this. The sniffer
>>> attribute is unique at least for the standalone war case, so it
>>> will be ok for TP2.
>>>
>>> Jerome: if we need to have a unique name for the Engine element,
>>> what should it be? I am not yet clear about how the application
>>> element would look like for the ear case where we have multiple
>>> wars inside of ear. Would we have multiple engines with sniffer
>>> value as "web" in that case?
>>
>> I think it should be managed, you can set container's properties per
>> application there. this might be useful to be able to remotely
>> change those.
>>
>> jerome
>>
>>>
>>>
>>> Thanks,
>>>
>>> - Hong
>>>
>>> Lloyd L Chambers wrote:
>>>
>>>> AMX MBeans look like this for now:
>>>>
>>>> amx:j2eeType=X-EngineConfig,name=security,X-ApplicationConfig=hello1
>>>> amx:j2eeType=X-EngineConfig,name=web,X-ApplicationConfig=hello1
>>>>
>>>> The "sniffer" attribute can be used as the unique ID, but I'm not
>>>> sure that it's unique...?
>>>>
>>>> It is preferable to have a name or id.
>>>>
>>>> Lloyd
>>>>
>>>>
>>>> On Mar 20, 2008, at 6:43 PM, Lloyd L Chambers wrote:
>>>>
>>>>> Hong,
>>>>>
>>>>> I see that the <engine> element has no "id" or "name". This
>>>>> causes a headache for MBeans; a unique ObjectName can't be
>>>>> generated that way. All MBeans to date are either singletons
>>>>> within their scope, or have a "name" or "id" or other primary key.
>>>>>
>>>>> Could we please add a name field?
>>>>>
>>>>>
>>>>> For now I can force the unique id to be the value of "sniffer",
>>>>> but that's a hack.
>>>>>
>>>>>
>>>>> Lloyd
>>>>>
>>>>> ---
>>>>> Lloyd L Chambers
>>>>> lloyd.chambers_at_sun.com
>>>>> Sun Microsystems, Inc
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> ---
>>>> Lloyd L Chambers
>>>> lloyd.chambers_at_sun.com
>>>> Sun Microsystems, Inc
>>>>
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>>>
>>
>
> ---
> Lloyd L Chambers
> lloyd.chambers_at_sun.com
> Sun Microsystems, Inc
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>