Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 50591 invoked from network); 20 Feb 2007 21:49:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Feb 2007 21:49:29 -0000 Received: (qmail 26222 invoked by uid 500); 20 Feb 2007 21:49:34 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 26186 invoked by uid 500); 20 Feb 2007 21:49:34 -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 26175 invoked by uid 99); 20 Feb 2007 21:49:34 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Feb 2007 13:49:34 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Feb 2007 13:49:25 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9084D7141A3 for ; Tue, 20 Feb 2007 13:49:05 -0800 (PST) Message-ID: <22580184.1172008145570.JavaMail.jira@brutus> Date: Tue, 20 Feb 2007 13:49:05 -0800 (PST) From: "Dain Sundstrom (JIRA)" To: dev@geronimo.apache.org Subject: [jira] Assigned: (GERONIMO-2416) ProxyMethodInterceptor should work with classes that have start,stop methods In-Reply-To: <26079782.1158685527394.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/GERONIMO-2416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dain Sundstrom reassigned GERONIMO-2416: ---------------------------------------- Assignee: David Jencks (was: Dain Sundstrom) > ProxyMethodInterceptor should work with classes that have start,stop methods > ---------------------------------------------------------------------------- > > Key: GERONIMO-2416 > URL: https://issues.apache.org/jira/browse/GERONIMO-2416 > Project: Geronimo > Issue Type: Bug > Security Level: public(Regular issues) > Components: kernel > Affects Versions: 1.2 > Reporter: David Jencks > Assigned To: David Jencks > Priority: Critical > Fix For: 2.0 > > > jetty6 components usually have lifecycle methods start,stop, and possibly others. If we write a gbean extending these objects ProxyMethodInterceptor blows up with an ArrayIndexOutOfBoundsException (-1). I don't understand why this happens, and there might be a different cause, but the gbeans that have this problem all extend jetty objects with start methods. > A really bad workaround that lets the server start is this patch: > Index: modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/basic/ProxyMethodInterceptor.java > =================================================================== > --- modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/basic/ProxyMethodInterceptor.java (revision 447903) > +++ modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/basic/ProxyMethodInterceptor.java (working copy) > @@ -110,14 +110,29 @@ > invokers[getSuperIndex(proxyType, proxyType.getMethod("equals", new Class[]{Object.class}))] = new EqualsInvoke(kernel); > invokers[getSuperIndex(proxyType, proxyType.getMethod("hashCode", null))] = new HashCodeInvoke(); > invokers[getSuperIndex(proxyType, proxyType.getMethod("toString", null))] = new ToStringInvoke(proxyType.getName()); > - if(GeronimoManagedBean.class.isAssignableFrom(proxyType)) { > - invokers[getSuperIndex(proxyType, proxyType.getMethod("getState", null))] = new GetStateInvoke(kernel); > - invokers[getSuperIndex(proxyType, proxyType.getMethod("getStateInstance", null))] = new GetStateInstanceInvoke(kernel); > - invokers[getSuperIndex(proxyType, proxyType.getMethod("start", null))] = new StartInvoke(kernel); > - invokers[getSuperIndex(proxyType, proxyType.getMethod("startRecursive", null))] = new StartRecursiveInvoke(kernel); > - invokers[getSuperIndex(proxyType, proxyType.getMethod("stop", null))] = new StopInvoke(kernel); > - invokers[getSuperIndex(proxyType, proxyType.getMethod("getStartTime", null))] = new GetStartTimeInvoke(kernel); > - invokers[getSuperIndex(proxyType, proxyType.getMethod("getObjectName", null))] = new GetObjectNameInvoke(kernel); > + if (GeronimoManagedBean.class.isAssignableFrom(proxyType)) { > + int superIndex; > + if ((superIndex = getSuperIndex(proxyType, proxyType.getMethod("getState", null))) > -1) { > + invokers[superIndex] = new GetStateInvoke(kernel); > + } > + if ((superIndex = getSuperIndex(proxyType, proxyType.getMethod("getStateInstance", null))) > -1) { > + invokers[superIndex] = new GetStateInstanceInvoke(kernel); > + } > + if ((superIndex = getSuperIndex(proxyType, proxyType.getMethod("start", null))) > -1) { > + invokers[superIndex] = new StartInvoke(kernel); > + } > + if ((superIndex = getSuperIndex(proxyType, proxyType.getMethod("startRecursive", null))) > -1) { > + invokers[superIndex] = new StartRecursiveInvoke(kernel); > + } > + if ((superIndex = getSuperIndex(proxyType, proxyType.getMethod("stop", null))) > -1) { > + invokers[superIndex] = new StopInvoke(kernel); > + } > + if ((superIndex = getSuperIndex(proxyType, proxyType.getMethod("getStartTime", null))) > -1) { > + invokers[superIndex] = new GetStartTimeInvoke(kernel); > + } > + if ((superIndex = getSuperIndex(proxyType, proxyType.getMethod("getObjectName", null))) > -1) { > + invokers[superIndex] = new GetObjectNameInvoke(kernel); > + } > } > } catch (Exception e) { > // this can not happen... all classes must implement equals, hashCode and toString > Dain, do you have any clues why this is happening? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.