Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 26218 invoked from network); 24 Jan 2007 04:17:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Jan 2007 04:17:01 -0000 Received: (qmail 87870 invoked by uid 500); 24 Jan 2007 04:17:07 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 87728 invoked by uid 500); 24 Jan 2007 04:17:07 -0000 Mailing-List: contact scm-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 scm@geronimo.apache.org Received: (qmail 87717 invoked by uid 99); 24 Jan 2007 04:17:07 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jan 2007 20:17:07 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jan 2007 20:17:00 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 03CEF1A981A; Tue, 23 Jan 2007 20:15:53 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r499250 - in /geronimo/server/trunk/modules/geronimo-kernel/src: main/java/org/apache/geronimo/gbean/ main/java/org/apache/geronimo/gbean/runtime/ test/java/org/apache/geronimo/gbean/ Date: Wed, 24 Jan 2007 04:15:52 -0000 To: scm@geronimo.apache.org From: hogstrom@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070124041553.03CEF1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: hogstrom Date: Tue Jan 23 20:15:51 2007 New Revision: 499250 URL: http://svn.apache.org/viewvc?view=rev&rev=499250 Log: GERONIMO-2607 reversing the kernel patch from ealier. Seems to have broken openejb. We'll reapply when the cause has been corrected. Modified: geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GBeanInfoBuilder.java geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GOperationInfo.java geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/runtime/GBeanOperation.java geronimo/server/trunk/modules/geronimo-kernel/src/test/java/org/apache/geronimo/gbean/GBeanInfoTest.java Modified: geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GBeanInfoBuilder.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GBeanInfoBuilder.java?view=diff&rev=499250&r1=499249&r2=499250 ============================================================================== --- geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GBeanInfoBuilder.java (original) +++ geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GBeanInfoBuilder.java Tue Jan 23 20:15:51 2007 @@ -403,23 +403,23 @@ /** * @deprecated - */ + */ public void addOperation(String name) { - //addOperation(new GOperationInfo(name, NO_ARGS, "")); + addOperation(new GOperationInfo(name, NO_ARGS, "")); } /** * @deprecated */ public void addOperation(String name, Class[] paramTypes) { - //addOperation(new GOperationInfo(name, paramTypes, "")); + addOperation(new GOperationInfo(name, paramTypes, "")); } - private void addOperation(String name, String returnType) { + public void addOperation(String name, String returnType) { addOperation(new GOperationInfo(name, NO_ARGS, returnType)); } - private void addOperation(String name, Class[] paramTypes, String returnType) { + public void addOperation(String name, Class[] paramTypes, String returnType) { addOperation(new GOperationInfo(name, paramTypes, returnType)); } Modified: geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GOperationInfo.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GOperationInfo.java?view=diff&rev=499250&r1=499249&r2=499250 ============================================================================== --- geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GOperationInfo.java (original) +++ geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GOperationInfo.java Tue Jan 23 20:15:51 2007 @@ -38,7 +38,7 @@ /** * The return type of this method. */ - private final String returnType; + private final String type; /** * Parameters of this method. @@ -54,9 +54,9 @@ this(name, name, Collections.EMPTY_LIST, type); } - public GOperationInfo(String name, Class[] paramTypes, String returnType) { + public GOperationInfo(String name, Class[] paramTypes, String type) { this.name = this.methodName = name; - this.returnType = returnType; + this.type = type; String[] args = new String[paramTypes.length]; for (int i = 0; i < args.length; i++) { args[i] = paramTypes[i].getName(); @@ -64,17 +64,17 @@ this.parameters = Collections.unmodifiableList(Arrays.asList(args)); } - public GOperationInfo(String name, String[] paramTypes, String returnType) { - this(name, name, Arrays.asList(paramTypes), returnType); + public GOperationInfo(String name, String[] paramTypes, String type) { + this(name, name, Arrays.asList(paramTypes), type); } - public GOperationInfo(String name, List parameters, String returnType) { - this(name, name, parameters, returnType); + public GOperationInfo(String name, List parameters, String type) { + this(name, name, parameters, type); } - public GOperationInfo(String name, String methodName, List parameters, String returnType) { + public GOperationInfo(String name, String methodName, List parameters, String type) { this.name = name; - this.returnType = returnType; + this.type = type; this.methodName = methodName; this.parameters = Collections.unmodifiableList(new ArrayList(parameters)); } @@ -84,7 +84,7 @@ } public String getReturnType() { - return returnType; + return type; } public String getMethodName() { @@ -96,6 +96,6 @@ } public String toString() { - return "[GOperationInfo: name=" + name + " parameters=" + parameters + " returnType =" + returnType + "]"; + return "[GOperationInfo: name=" + name + " parameters=" + parameters + " type =" + type + "]"; } } Modified: geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/runtime/GBeanOperation.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/runtime/GBeanOperation.java?view=diff&rev=499250&r1=499249&r2=499250 ============================================================================== --- geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/runtime/GBeanOperation.java (original) +++ geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/runtime/GBeanOperation.java Tue Jan 23 20:15:51 2007 @@ -22,6 +22,7 @@ import java.util.Collections; import java.util.Iterator; import java.util.List; +import java.io.Serializable; import org.apache.geronimo.gbean.DynamicGBean; import org.apache.geronimo.gbean.DynamicGOperationInfo; @@ -32,7 +33,9 @@ /** * @version $Rev$ $Date$ */ -public final class GBeanOperation { +public final class GBeanOperation implements Serializable { + private static final long serialVersionUID = -5185515581104192977L; + private final GBeanInstance gbeanInstance; private final String name; private final List parameterTypes; @@ -40,6 +43,7 @@ private final boolean framework; private final GOperationInfo operationInfo; + // TODO - deprecate this and add returnType static GBeanOperation createFrameworkOperation(GBeanInstance gbeanInstance, String name, List parameterTypes, MethodInvoker methodInvoker) { return new GBeanOperation(gbeanInstance, name, parameterTypes, methodInvoker); } @@ -50,7 +54,6 @@ this.name = name; this.parameterTypes = Collections.unmodifiableList(new ArrayList(parameterTypes)); this.methodInvoker = methodInvoker; - // this is not used this.operationInfo = new GOperationInfo(this.name, this.parameterTypes, "java.lang.Object"); } Modified: geronimo/server/trunk/modules/geronimo-kernel/src/test/java/org/apache/geronimo/gbean/GBeanInfoTest.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-kernel/src/test/java/org/apache/geronimo/gbean/GBeanInfoTest.java?view=diff&rev=499250&r1=499249&r2=499250 ============================================================================== --- geronimo/server/trunk/modules/geronimo-kernel/src/test/java/org/apache/geronimo/gbean/GBeanInfoTest.java (original) +++ geronimo/server/trunk/modules/geronimo-kernel/src/test/java/org/apache/geronimo/gbean/GBeanInfoTest.java Tue Jan 23 20:15:51 2007 @@ -85,7 +85,7 @@ public void testGetOperationsSet() { Set gbeanOpSet = gbeanInfo.getOperations(); - assertEquals(3, gbeanOpSet.size()); + assertEquals(1, gbeanOpSet.size()); assertTrue(gbeanOpSet.contains(opInfo)); } @@ -155,8 +155,7 @@ infoFactory.addAttribute(persistentAttrInfo); infoFactory.addOperation(opInfo); - infoFactory.addOperation("addSomething", new Class[]{String.class}); // ignored - infoFactory.addOperation("removeSomething", new Class[]{String.class}); // ignored + infoFactory.addReference(refInfo); infoFactory.addAttribute(CONSTRUCTOR_ARG_0, String.class, true); @@ -176,13 +175,6 @@ } public void setReference(String reference) { - } - - public void addSomething(String something){ - } - - public String removeSomething(String something){ - return null; } } }