On Sep 4, 2005, at 4:10 PM, Aaron Mulder wrote:

    So, put all this together, and anything that's stopped is
effectively invisible. One way to make it work is to put the relationship
into the ObjectName and query based on ObjectName.  For example,
"...,type=webconnector,webcontainer=MyJettyContainer,...". However, this
doesn't work if there are multiple containers with the same name
(presumably, in different Configurations).

I suggest you follow JSR77 naming rules and include a fully specified name such as:

geronimo.server:
    j2eeType=WebConnector,
    name=MyConnector,
    WebContainer=MyJettyContainer
    J2EEModule=org/apache/geronimo/Server,
    J2EEApplication=null,
    J2EEServer=geronimo

This should any name collisions.

    That being the case, as far as I can tell there's only one
alternative. That is to use a kernel query to list all connectors of the
correct type.  Then for each one, get its GBeanData, and pick out the
container reference by name, and see what container ObjectName is in
there.  I'm hoping this will always be a full ObjectName even if the
config file only specified certain parameters.  If that's not true, I
think we've exhaused all the options.  Even so, it's pretty brittle in
that the reference name is hardcoded and if it's changed in the GBean
definition but not where this logic is performed then things will silently
break.

I agree that the reference code is fairly brittle. More importantly it is not easy to add new reference types as we run into new situations such as this.

-dain

Reply via email to