Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 85614 invoked from network); 9 Nov 2006 19:16:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Nov 2006 19:16:02 -0000 Received: (qmail 34321 invoked by uid 500); 9 Nov 2006 19:16:10 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 34272 invoked by uid 500); 9 Nov 2006 19:16:10 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 34261 invoked by uid 99); 9 Nov 2006 19:16:10 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Nov 2006 11:16:10 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [199.237.51.194] (HELO green.rootmode.com) (199.237.51.194) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Nov 2006 11:15:55 -0800 X-ClientAddr: 68.171.62.46 Received: from [192.168.15.15] (68-171-62-46.vnnyca.adelphia.net [68.171.62.46]) by green.rootmode.com (8.12.11.20060308/8.12.10) with ESMTP id kA9JFNXs011203 for ; Thu, 9 Nov 2006 14:15:23 -0500 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <20061107202801.39128.qmail@web31714.mail.mud.yahoo.com> References: <20061107202801.39128.qmail@web31714.mail.mud.yahoo.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Dain Sundstrom Subject: Re: Setting domain for tomcat MBeans [was Re: Geronimo jmx question] Date: Thu, 9 Nov 2006 11:15:22 -0800 To: dev@geronimo.apache.org X-Mailer: Apple Mail (2.752.3) X-RootMode-MailScanner-Information: Please contact the ISP for more information X-RootMode-MailScanner: Found to be clean X-MailScanner-From: dain@iq80.com X-Virus-Checked: Checked by ClamAV on apache.org 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. -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 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 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 >