geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: Setting domain for tomcat MBeans [was Re: Geronimo jmx question]
Date Thu, 09 Nov 2006 19:44:34 GMT

On Nov 9, 2006, at 11:22 AM, Jeff Genender wrote:

>
>
> Dain Sundstrom wrote:
>> Please don't put them in the same domain as the rest of the geronimo
>> mbeans.  This will cause many TCK tests to fail and may result in  
>> name
>> collisions.
>
> I agree with Dain as well.

I kinda think it would theoretically be better to get everything in  
the same domain, but not necessarily for 1.2.  Can we find out  
exactly what problems this causes before we reject it out of hand?

thanks
david jencks

>
>>
>> -dain
>>
>> On Nov 7, 2006, at 12:28 PM, anita kulshreshtha wrote:
>>
>>> I am trying to set domain name for tomcat Mbeans to 'geronimo'  
>>> instead
>>> of 'Geronimo'. This will make tomcat MBeans, have names like
>>> geronimo:............... However as it is apparent from this  
>>> trace that
>>> tomcat does not like it. The server behaves normally except for this
>>> trace. The problem is the following code at
>>> http://svn.apache.org/repos/asf/tomcat/container/tags/tc5.5.x/ 
>>> TOMCAT_5_5_15/catalina/src/share/org/apache/catalina/connector/ 
>>> MapperListener.java
>>>
>>>    The TomcatWebAppContext did not have "findMappingObject" and
>>> "findStaticResources"  methods exposed, So I added them. Now I am
>>> getting the attached stack trace during server startup. The console
>>> works fine.
>>>     Does any one know what is going on here?
>>>
>>> Thanks
>>> Anita
>>>
>>>
>>>  private void registerContext(ObjectName objectName)
>>>         throws Exception {
>>>
>>>         String name = objectName.getKeyProperty("name");
>>>
>>>         // If the domain is the same with ours or the engine
>>>         // name attribute is the same... - then it's ours
>>>         String targetDomain=objectName.getDomain();
>>>         if( ! domain.equals( targetDomain )) {
>>>             try {
>>>                 targetDomain = (String) mBeanServer.getAttribute
>>>                     (objectName, "engineName");
>>>             } catch (Exception e) {
>>>                 // Ignore
>>>             }
>>>             if( ! domain.equals( targetDomain )) {
>>>                 // not ours
>>>                 return;
>>>             }
>>>         }
>>>
>>>         String hostName = null;
>>>         String contextName = null;
>>>         if (name.startsWith("//")) {
>>>             name = name.substring(2);
>>>         }
>>>         int slash = name.indexOf("/");
>>>         if (slash != -1) {
>>>             hostName = name.substring(0, slash);
>>>             contextName = name.substring(slash);
>>>         } else {
>>>             return;
>>>         }
>>>         // Special case for the root context
>>>         if (contextName.equals("/")) {
>>>             contextName = "";
>>>         }
>>>
>>>         if(log.isDebugEnabled())
>>>              log.debug(sm.getString
>>>                   ("mapperListener.registerContext", contextName));
>>>
>>>         Object context =
>>>             mBeanServer.invoke(objectName, "findMappingObject",  
>>> null,
>>> null);    <-----------
>>>             //mBeanServer.getAttribute(objectName, "mappingObject");
>>>         javax.naming.Context resources = (javax.naming.Context)
>>>             mBeanServer.invoke(objectName, "findStaticResources",  
>>> null,
>>> null); <-----------
>>>             //mBeanServer.getAttribute(objectName,  
>>> "staticResources");
>>>         String[] welcomeFiles = (String[])
>>>             mBeanServer.getAttribute(objectName, "welcomeFiles");
>>> <------- 3 ----------
>>>
>>>         mapper.addContext(hostName, contextName, context,
>>>                           welcomeFiles, resources);
>>>
>>>     }
>>> --- anita kulshreshtha <a_kulshre@yahoo.com> wrote:
>>>
>>>>
>>>> This seems to be a known problem:
>>>>
>>> http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/ 
>>> apache/catalina/core/StandardContext.html#findMappingObject()
>>>
>>>> public Context findMappingObject()
>>>>
>>>>     FIXME: Fooling introspection ...
>>>>
>>>>     I would like to put a workaround this problem. Any help will be
>>>> appreciated. I have also changed the tomcat engine name from
>>>> 'Geronimo' to
>>>> 'geronimo'.
>>>>
>>>> Thanks
>>>> Anita
>>>>
>>>>
>>>> anita kulshreshtha <a_kulshre@yahoo.com> wrote:
>>>> Could someone please help me understand this? I have
>>>> made some (trivial) modifications to geronimo-tomcat classes to set
>>>> J2EEApplication and J2EEServer.
>>>> During the startup of server I get this trace for each config
>>>> containing a webapp. The server
>>>> otherwise starts fine. The console and the apps are working  
>>>> fine. the
>>>>
>>>> shutdown is also
>>>> clean. The output on jconsole (Mapper, WebModule Mbeans) also looks
>>>> right!
>>>>     The relevant stack trace is attached.
>>>>
>>>> Thanks In Advance
>>>> Anita
>>>>
>>>> P.S. Please let me know if full trace is needed.
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------
>>>> Everyone is raving about the  all-new Yahoo! Mail.
>>>
>>>
>>>
>>>
>>> ____________________________________________________________________ 
>>> ________________
>>>
>>> Do you Yahoo!?
>>> Everyone is raving about the all-new Yahoo! Mail.
>>> http://new.mail.yahoo.com
>>> <err.log>


Mime
View raw message