Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 44653 invoked from network); 3 Feb 2005 02:50:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 3 Feb 2005 02:50:11 -0000 Received: (qmail 5850 invoked by uid 500); 3 Feb 2005 02:50:10 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 5764 invoked by uid 500); 3 Feb 2005 02:50:10 -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 Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 5660 invoked by uid 99); 3 Feb 2005 02:50:10 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 02 Feb 2005 18:50:07 -0800 Received: (qmail 44601 invoked by uid 65534); 3 Feb 2005 02:50:06 -0000 Message-ID: <20050203025006.44600.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Thu, 03 Feb 2005 02:50:06 -0000 Subject: svn commit: r151106 [1/2] - in geronimo/trunk/modules: axis/src/java/org/apache/geronimo/axis/ axis/src/test/org/apache/geronimo/axis/ axis/src/test/org/apache/geronimo/axis/preconditions/ connector/src/java/org/apache/geronimo/connector/ connector/src/java/org/apache/geronimo/connector/outbound/ connector/src/java/org/apache/geronimo/connector/outbound/transactionlog/ connector/src/java/org/apache/geronimo/connector/work/ core/src/java/org/apache/geronimo/pool/ derby/src/java/org/apache/geronimo/derby/ interop/src/java/org/apache/geronimo/interop/ jetty/src/java/org/apache/geronimo/jetty/ jetty/src/java/org/apache/geronimo/jetty/connector/ jetty/src/java/org/apache/geronimo/jetty/requestlog/ jmx-remoting/src/java/org/apache/geronimo/jmxremoting/ kernel/src/java/org/apache/geronimo/gbean/ kernel/src/java/org/apache/geronimo/gbean/runtime/ kernel/src/java/org/apache/geronimo/kernel/ kernel/src/java/org/apache/geronimo/kernel/config/ kernel/src/java/org/apache/geronimo/kernel/jmx/ kernel/src/java/org/apache/geronimo/kernel/registry/ kernel/src/test/org/apache/geronimo/gbean/runtime/ mail/src/java/org/apache/geronimo/mail/ security/src/java/org/apache/geronimo/security/jaas/ spring/src/java/org/apache/geronimo/spring/ system/src/java/org/apache/geronimo/system/configuration/ system/src/java/org/apache/geronimo/system/repository/ system/src/java/org/apache/geronimo/system/rmi/ system/src/java/org/apache/geronimo/system/url/ timer/src/java/org/apache/geronimo/timer/ tomcat/src/java/org/apache/geronimo/tomcat/ transaction/src/java/org/apache/geronimo/transaction/log/ To: scm@geronimo.apache.org From: dain@apache.org X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: dain Date: Wed Feb 2 18:49:54 2005 New Revision: 151106 URL: http://svn.apache.org/viewcvs?view=3Drev&rev=3D151106 Log: Fixed lifecycle bug in GeronimoInstance and GeronimoInstanceState where lif= ecycle callback methods were being called from whithin synchronized blocks.= This could create deadlocks in the server when the lifecycle callbacks wo= uld call the lifecycle methods of other servers. Removed use of WaitingException. No code used this and the concept never r= eally worked. This also created a huge amount of complexity in the statema= chine. Removed: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtim= e/GBeanInstanceLifecycleController.java Modified: geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/AxisGbean= .java geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/EJBWSGBea= n=2Ejava geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/POJOWSGBe= an.java geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/WSConfigB= uilder.java geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AbstractW= ebServiceTest.java geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/ComplexTy= peWebServiceTest.java geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/SimpleEJB= WebServiceTest.java geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/SimplePOJ= OWebServiceTest.java geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/precondit= ions/AdminClientDeploymentTest.java geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector= /ResourceAdapterWrapper.java geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector= /outbound/ManagedConnectionFactoryWrapper.java geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector= /outbound/transactionlog/JDBCLog.java geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector= /work/GeronimoWorkManager.java geronimo/trunk/modules/core/src/java/org/apache/geronimo/pool/ClockPool= .java geronimo/trunk/modules/core/src/java/org/apache/geronimo/pool/ThreadPoo= l=2Ejava geronimo/trunk/modules/derby/src/java/org/apache/geronimo/derby/DerbyNe= tworkGBean.java geronimo/trunk/modules/derby/src/java/org/apache/geronimo/derby/DerbySy= stemGBean.java geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/Int= eropGBean.java geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyCo= ntainerImpl.java geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWe= bAppContext.java geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connect= or/HTTPSConnector.java geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connect= or/JettyConnector.java geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/request= log/NCSARequestLog.java geronimo/trunk/modules/jmx-remoting/src/java/org/apache/geronimo/jmxrem= oting/JMXConnector.java geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanL= ifecycle.java geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanL= ifecycleController.java geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtim= e/AbstractGBeanReference.java geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtim= e/GBeanAttribute.java geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtim= e/GBeanCollectionReference.java geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtim= e/GBeanInstance.java geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtim= e/GBeanInstanceState.java geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtim= e/GBeanOperation.java geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtim= e/GBeanReference.java geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtim= e/GBeanSingleReference.java geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/Kerne= l=2Ejava geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/confi= g/Configuration.java geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/jmx/J= MXGBeanRegistry.java geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/regis= try/AbstractGBeanRegistry.java geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/regis= try/BasicGBeanRegistry.java geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/runtim= e/GBeanAttributeTest.java geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/IMAPStore= GBean.java geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/MailGBean= .java geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/POP3Store= GBean.java geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/ProtocolG= Bean.java geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/SMTPTrans= portGBean.java geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/j= aas/GeronimoLoginConfiguration.java geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/j= aas/JaasLoginService.java geronimo/trunk/modules/spring/src/java/org/apache/geronimo/spring/POJOG= Bean.java geronimo/trunk/modules/spring/src/java/org/apache/geronimo/spring/Sprin= gGBean.java geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/confi= guration/FileConfigurationList.java geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/confi= guration/LocalConfigStore.java geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/repos= itory/ReadOnlyRepository.java geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/rmi/R= MIRegistryService.java geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/url/G= eronimoURLFactory.java geronimo/trunk/modules/timer/src/java/org/apache/geronimo/timer/ThreadP= ooledTimer.java geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/Tomca= tWebAppContext.java geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transac= tion/log/HOWLLog.java Modified: geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/Axi= sGbean.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/java/org= /apache/geronimo/axis/AxisGbean.java?view=3Ddiff&r1=3D151105&r2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/AxisGbean= .java (original) +++ geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/AxisGbean= .java Wed Feb 2 18:49:54 2005 @@ -23,7 +23,6 @@ import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.GBeanInfoBuilder; import org.apache.geronimo.gbean.GBeanLifecycle; -import org.apache.geronimo.gbean.WaitingException; import org.apache.geronimo.kernel.jmx.JMXUtil; =20 /** @@ -53,8 +52,7 @@ /** * Constructor AxisGbean * - * @param name - @param objectName + * @param objectName */ public AxisGbean(String objectName) { this.objectName =3D JMXUtil.getObjectName(objectName); @@ -70,10 +68,9 @@ /** * Method doStart * - * @throws WaitingException * @throws Exception */ - public void doStart() throws WaitingException, Exception { + public void doStart() throws Exception { log.info("Axis GBean has started"); log.info(objectName); } @@ -81,10 +78,9 @@ /** * Method doStop * - * @throws WaitingException * @throws Exception */ - public void doStop() throws WaitingException, Exception { + public void doStop() throws Exception { log.info("Axis GBean has stoped"); } =20 Modified: geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/EJB= WSGBean.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/java/org= /apache/geronimo/axis/EJBWSGBean.java?view=3Ddiff&r1=3D151105&r2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/EJBWSGBea= n=2Ejava (original) +++ geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/EJBWSGBea= n=2Ejava Wed Feb 2 18:49:54 2005 @@ -25,7 +25,6 @@ import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.GBeanInfoBuilder; import org.apache.geronimo.gbean.GBeanLifecycle; -import org.apache.geronimo.gbean.WaitingException; =20 =20 /** @@ -57,9 +56,6 @@ =20 /** * Constructor AxisGbean - * - * @param name - * @param objectName */ public EJBWSGBean(String objectName,Configuration ejbConfig,Collection= classList) { this.objectName =3D objectName; @@ -77,10 +73,9 @@ /** * Method doStart * - * @throws WaitingException * @throws Exception */ - public void doStart() throws WaitingException, Exception { + public void doStart() throws Exception { log.info(objectName + "has started"); ClassLoader cl =3D ejbConfig.getConfigurationClassLoader(); for (Iterator it =3D classList.iterator(); it.hasNext();) { @@ -94,10 +89,9 @@ /** * Method doStop * - * @throws WaitingException * @throws Exception */ - public void doStop() throws WaitingException, Exception { + public void doStop() throws Exception { log.info("WebServiceGBean has stoped"); } =20 Modified: geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/POJ= OWSGBean.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/java/org= /apache/geronimo/axis/POJOWSGBean.java?view=3Ddiff&r1=3D151105&r2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/POJOWSGBe= an.java (original) +++ geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/POJOWSGBe= an.java Wed Feb 2 18:49:54 2005 @@ -27,7 +27,6 @@ import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.GBeanInfoBuilder; import org.apache.geronimo.gbean.GBeanLifecycle; -import org.apache.geronimo.gbean.WaitingException; =20 /** * @version $Rev: $ $Date: $ @@ -65,7 +64,7 @@ public void doFail() { } =20 - public void doStart() throws WaitingException, Exception { + public void doStart() throws Exception { log.info("POJO WS starting"); ClassLoader cl =3D new URLClassLoader(new URL[]{moduleURL}); for (Iterator it =3D classList.iterator(); it.hasNext();) { @@ -78,10 +77,9 @@ /** * Method doStop * - * @throws WaitingException * @throws Exception */ - public void doStop() throws WaitingException, Exception { + public void doStop() throws Exception { log.info("WebServiceGBean has stoped"); } =20 Modified: geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/WSC= onfigBuilder.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/java/org= /apache/geronimo/axis/WSConfigBuilder.java?view=3Ddiff&r1=3D151105&r2=3D151= 106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/WSConfigB= uilder.java (original) +++ geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/WSConfigB= uilder.java Wed Feb 2 18:49:54 2005 @@ -31,7 +31,6 @@ import org.apache.geronimo.gbean.GBeanData; import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.GBeanInfoBuilder; -import org.apache.geronimo.gbean.WaitingException; import org.apache.geronimo.kernel.config.Configuration; import org.apache.geronimo.kernel.jmx.JMXUtil; =20 @@ -73,7 +72,7 @@ =20 } =20 - public void doStart() throws WaitingException, Exception { + public void doStart() throws Exception { } =20 public Object getDeploymentPlan(File planFile, JarFile jarFile) throws= DeploymentException { @@ -127,7 +126,7 @@ =20 public void doFail() { } - public void doStop() throws WaitingException, Exception { + public void doStop() throws Exception { } =20 =20 Modified: geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/Abs= tractWebServiceTest.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/test/org= /apache/geronimo/axis/AbstractWebServiceTest.java?view=3Ddiff&r1=3D151105&r= 2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AbstractW= ebServiceTest.java (original) +++ geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AbstractW= ebServiceTest.java Wed Feb 2 18:49:54 2005 @@ -18,8 +18,6 @@ =20 =20 import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; import java.net.URI; =20 import javax.management.ObjectName; @@ -27,7 +25,6 @@ import org.apache.geronimo.axis.testUtils.AxisGeronimoConstants; import org.apache.geronimo.axis.testUtils.TestingUtils; import org.apache.geronimo.gbean.GBeanData; -import org.apache.geronimo.gbean.WaitingException; import org.apache.geronimo.j2ee.deployment.EARConfigBuilder; import org.apache.geronimo.kernel.Kernel; import org.apache.geronimo.kernel.config.ConfigurationStore; @@ -54,7 +51,7 @@ /** * @param testName */ - public AbstractWebServiceTest(String testName) throws FileNotFoundExce= ption, WaitingException, IOException { + public AbstractWebServiceTest(String testName) { super(testName); =20 store =3D AxisGeronimoConstants.STORE; Modified: geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/Com= plexTypeWebServiceTest.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/test/org= /apache/geronimo/axis/ComplexTypeWebServiceTest.java?view=3Ddiff&r1=3D15110= 5&r2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/ComplexTy= peWebServiceTest.java (original) +++ geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/ComplexTy= peWebServiceTest.java Wed Feb 2 18:49:54 2005 @@ -16,8 +16,6 @@ package org.apache.geronimo.axis; =20 import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; import java.lang.reflect.Method; import java.net.URL; import java.net.URLClassLoader; @@ -27,7 +25,6 @@ import org.apache.axis.utils.ClassUtils; import org.apache.geronimo.axis.testUtils.AxisGeronimoConstants; import org.apache.geronimo.axis.testUtils.TestingUtils; -import org.apache.geronimo.gbean.WaitingException; import org.apache.geronimo.j2ee.deployment.EARConfigBuilder; import org.apache.geronimo.kernel.Kernel; =20 @@ -39,13 +36,7 @@ private ObjectName axisname; private Kernel kernel; =20 - /** - * @param testName - * @throws IOException - * @throws WaitingException - * @throws FileNotFoundException - */ - public ComplexTypeWebServiceTest(String testName) throws FileNotFoundE= xception, WaitingException, IOException { + public ComplexTypeWebServiceTest(String testName) { super(testName); } =20 Modified: geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/Sim= pleEJBWebServiceTest.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/test/org= /apache/geronimo/axis/SimpleEJBWebServiceTest.java?view=3Ddiff&r1=3D151105&= r2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/SimpleEJB= WebServiceTest.java (original) +++ geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/SimpleEJB= WebServiceTest.java Wed Feb 2 18:49:54 2005 @@ -17,8 +17,6 @@ =20 import java.io.BufferedReader; import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; import java.io.InputStreamReader; import java.lang.reflect.Method; import java.net.HttpURLConnection; @@ -26,7 +24,6 @@ import java.net.URLClassLoader; =20 import org.apache.geronimo.axis.testUtils.TestingUtils; -import org.apache.geronimo.gbean.WaitingException; import org.apache.geronimo.j2ee.deployment.EARConfigBuilder; =20 /** @@ -35,7 +32,7 @@ */ public class SimpleEJBWebServiceTest extends AbstractWebServiceTest { =20 - public SimpleEJBWebServiceTest(String testName) throws FileNotFoundExc= eption, WaitingException, IOException { + public SimpleEJBWebServiceTest(String testName) { super(testName); } =20 Modified: geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/Sim= plePOJOWebServiceTest.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/test/org= /apache/geronimo/axis/SimplePOJOWebServiceTest.java?view=3Ddiff&r1=3D151105= &r2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/SimplePOJ= OWebServiceTest.java (original) +++ geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/SimplePOJ= OWebServiceTest.java Wed Feb 2 18:49:54 2005 @@ -17,8 +17,6 @@ =20 import java.io.BufferedReader; import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; import java.io.InputStreamReader; import java.lang.reflect.Method; import java.net.HttpURLConnection; @@ -27,7 +25,6 @@ =20 import org.apache.axis.utils.ClassUtils; import org.apache.geronimo.axis.testUtils.TestingUtils; -import org.apache.geronimo.gbean.WaitingException; import org.apache.geronimo.j2ee.deployment.EARConfigBuilder; /** *=20 @@ -36,7 +33,7 @@ public class SimplePOJOWebServiceTest extends AbstractWebServiceTest { =20 =20 - public SimplePOJOWebServiceTest(String testName) throws FileNotFoundEx= ception, WaitingException, IOException { + public SimplePOJOWebServiceTest(String testName) { super(testName); } =20 Modified: geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/pre= conditions/AdminClientDeploymentTest.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/test/org= /apache/geronimo/axis/preconditions/AdminClientDeploymentTest.java?view=3Dd= iff&r1=3D151105&r2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/precondit= ions/AdminClientDeploymentTest.java (original) +++ geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/precondit= ions/AdminClientDeploymentTest.java Wed Feb 2 18:49:54 2005 @@ -20,12 +20,9 @@ import org.apache.axis.utils.ClassUtils; import org.apache.geronimo.axis.AbstractWebServiceTest; import org.apache.geronimo.axis.AxisGeronimoUtils; -import org.apache.geronimo.gbean.WaitingException; =20 import java.io.BufferedReader; import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; @@ -40,7 +37,7 @@ */ =20 public class AdminClientDeploymentTest extends AbstractWebServiceTest { - public AdminClientDeploymentTest(String testName) throws FileNotFoundE= xception, WaitingException, IOException { + public AdminClientDeploymentTest(String testName) { super(testName); } =20 Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/con= nector/ResourceAdapterWrapper.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/jav= a/org/apache/geronimo/connector/ResourceAdapterWrapper.java?view=3Ddiff&r1= =3D151105&r2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector= /ResourceAdapterWrapper.java (original) +++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector= /ResourceAdapterWrapper.java Wed Feb 2 18:49:54 2005 @@ -17,8 +17,6 @@ =20 package org.apache.geronimo.connector; =20 -import java.util.Map; - import javax.resource.ResourceException; import javax.resource.spi.ActivationSpec; import javax.resource.spi.BootstrapContext; @@ -34,7 +32,6 @@ import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.GBeanInfoBuilder; import org.apache.geronimo.gbean.GBeanLifecycle; -import org.apache.geronimo.gbean.WaitingException; import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory; =20 /** @@ -105,11 +102,11 @@ return resourceAdapter.getXAResources(specs); } =20 - public void doStart() throws WaitingException, Exception { + public void doStart() throws Exception { resourceAdapter.start(bootstrapContext); } =20 - public void doStop() throws WaitingException { + public void doStop() { resourceAdapter.stop(); } =20 Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/con= nector/outbound/ManagedConnectionFactoryWrapper.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/jav= a/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.ja= va?view=3Ddiff&r1=3D151105&r2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector= /outbound/ManagedConnectionFactoryWrapper.java (original) +++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector= /outbound/ManagedConnectionFactoryWrapper.java Wed Feb 2 18:49:54 2005 @@ -36,7 +36,6 @@ import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.GBeanInfoBuilder; import org.apache.geronimo.gbean.GBeanLifecycle; -import org.apache.geronimo.gbean.WaitingException; import org.apache.geronimo.kernel.Kernel; import org.apache.geronimo.naming.geronimo.GeronimoContextManager; import org.apache.geronimo.transaction.manager.NamedXAResource; @@ -188,7 +187,7 @@ this.connectionManagerFactory =3D connectionManagerFactory; } =20 - public void doStart() throws WaitingException, Exception { + public void doStart() throws Exception { //register with resource adapter if not yet done if (!registered && (managedConnectionFactory instanceof ResourceAd= apterAssociation)) { if (resourceAdapterWrapper =3D=3D null) { Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/con= nector/outbound/transactionlog/JDBCLog.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/jav= a/org/apache/geronimo/connector/outbound/transactionlog/JDBCLog.java?view= =3Ddiff&r1=3D151105&r2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector= /outbound/transactionlog/JDBCLog.java (original) +++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector= /outbound/transactionlog/JDBCLog.java Wed Feb 2 18:49:54 2005 @@ -33,7 +33,6 @@ import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.GBeanInfoBuilder; import org.apache.geronimo.gbean.GBeanLifecycle; -import org.apache.geronimo.gbean.WaitingException; import org.apache.geronimo.transaction.manager.LogException; import org.apache.geronimo.transaction.manager.Recovery; import org.apache.geronimo.transaction.manager.TransactionBranchInfo; @@ -68,11 +67,11 @@ this.dataSource =3D dataSource; } =20 - public void doStart() throws WaitingException, Exception { + public void doStart() throws Exception { dataSource =3D (DataSource) managedConnectionFactoryWrapper.$getRe= source(); } =20 - public void doStop() throws WaitingException, Exception { + public void doStop() throws Exception { dataSource =3D null; } =20 Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/con= nector/work/GeronimoWorkManager.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/jav= a/org/apache/geronimo/connector/work/GeronimoWorkManager.java?view=3Ddiff&r= 1=3D151105&r2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector= /work/GeronimoWorkManager.java (original) +++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector= /work/GeronimoWorkManager.java Wed Feb 2 18:49:54 2005 @@ -35,7 +35,6 @@ import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.GBeanInfoBuilder; import org.apache.geronimo.gbean.GBeanLifecycle; -import org.apache.geronimo.gbean.WaitingException; import org.apache.geronimo.transaction.context.TransactionContextManager; import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory; =20 @@ -95,13 +94,13 @@ this.transactionContextManager =3D transactionContextManager; } =20 - public void doStart() throws WaitingException, Exception { + public void doStart() throws Exception { syncWorkExecutorPool =3D syncWorkExecutorPool.start(); startWorkExecutorPool =3D startWorkExecutorPool.start(); scheduledWorkExecutorPool =3D scheduledWorkExecutorPool.start(); } =20 - public void doStop() throws WaitingException, Exception { + public void doStop() throws Exception { syncWorkExecutorPool =3D syncWorkExecutorPool.stop(); startWorkExecutorPool =3D startWorkExecutorPool.stop(); scheduledWorkExecutorPool =3D scheduledWorkExecutorPool.stop(); Modified: geronimo/trunk/modules/core/src/java/org/apache/geronimo/pool/Clo= ckPool.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/core/src/java/org= /apache/geronimo/pool/ClockPool.java?view=3Ddiff&r1=3D151105&r2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/core/src/java/org/apache/geronimo/pool/ClockPool= .java (original) +++ geronimo/trunk/modules/core/src/java/org/apache/geronimo/pool/ClockPool= .java Wed Feb 2 18:49:54 2005 @@ -24,8 +24,6 @@ import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.GBeanInfoBuilder; import org.apache.geronimo.gbean.GBeanLifecycle; -import org.apache.geronimo.gbean.WaitingException; - =20 /** * @version $Rev$ $Date$ @@ -50,14 +48,11 @@ this.poolName =3D poolName; } =20 - /** - * @return - */ public ClockDaemon getClockDaemon() { return clockDaemon; } =20 - public void doStart() throws WaitingException, Exception { + public void doStart() throws Exception { clockDaemon =3D new ClockDaemon(); clockDaemon.setThreadFactory(new ThreadFactory() { public Thread newThread(Runnable r) { @@ -69,7 +64,7 @@ log.info("Clock pool " + poolName + " started"); } =20 - public void doStop() throws WaitingException, Exception { + public void doStop() throws Exception { clockDaemon.shutDown(); log.info("Clock pool " + poolName + " stopped"); } Modified: geronimo/trunk/modules/core/src/java/org/apache/geronimo/pool/Thr= eadPool.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/core/src/java/org= /apache/geronimo/pool/ThreadPool.java?view=3Ddiff&r1=3D151105&r2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/core/src/java/org/apache/geronimo/pool/ThreadPoo= l=2Ejava (original) +++ geronimo/trunk/modules/core/src/java/org/apache/geronimo/pool/ThreadPoo= l=2Ejava Wed Feb 2 18:49:54 2005 @@ -24,8 +24,6 @@ import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.GBeanInfoBuilder; import org.apache.geronimo.gbean.GBeanLifecycle; -import org.apache.geronimo.gbean.WaitingException; - =20 /** * @version $Rev$ $Date$ @@ -60,10 +58,10 @@ return nextWorkerID++; } =20 - public void doStart() throws WaitingException, Exception { + public void doStart() throws Exception { } =20 - public void doStop() throws WaitingException, Exception { + public void doStop() throws Exception { executor.shutdownNow(); } =20 Modified: geronimo/trunk/modules/derby/src/java/org/apache/geronimo/derby/D= erbyNetworkGBean.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/derby/src/java/or= g/apache/geronimo/derby/DerbyNetworkGBean.java?view=3Ddiff&r1=3D151105&r2= =3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/derby/src/java/org/apache/geronimo/derby/DerbyNe= tworkGBean.java (original) +++ geronimo/trunk/modules/derby/src/java/org/apache/geronimo/derby/DerbyNe= tworkGBean.java Wed Feb 2 18:49:54 2005 @@ -24,7 +24,6 @@ import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.GBeanInfoBuilder; import org.apache.geronimo.gbean.GBeanLifecycle; -import org.apache.geronimo.gbean.WaitingException; =20 /** * A GBean that manages remote network access to the embedded Derby server= . @@ -58,14 +57,14 @@ this.port =3D port; } =20 - public void doStart() throws WaitingException, Exception { + public void doStart() throws Exception { InetAddress address =3D InetAddress.getByName(host); network =3D new NetworkServerControl(address, port); network.start(null); // todo work out how to add this to our log s= tream log.info("Started on host " + host + ':' + port); } =20 - public void doStop() throws WaitingException, Exception { + public void doStop() throws Exception { if (network !=3D null) { try { network.shutdown(); Modified: geronimo/trunk/modules/derby/src/java/org/apache/geronimo/derby/D= erbySystemGBean.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/derby/src/java/or= g/apache/geronimo/derby/DerbySystemGBean.java?view=3Ddiff&r1=3D151105&r2=3D= 151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/derby/src/java/org/apache/geronimo/derby/DerbySy= stemGBean.java (original) +++ geronimo/trunk/modules/derby/src/java/org/apache/geronimo/derby/DerbySy= stemGBean.java Wed Feb 2 18:49:54 2005 @@ -25,7 +25,6 @@ import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.GBeanInfoBuilder; import org.apache.geronimo.gbean.GBeanLifecycle; -import org.apache.geronimo.gbean.WaitingException; import org.apache.geronimo.system.serverinfo.ServerInfo; =20 /** @@ -47,7 +46,7 @@ this.systemHome =3D derbySystemHome; } =20 - public void doStart() throws WaitingException, Exception { + public void doStart() throws Exception { // set up the system property for the database home String actualHome =3D System.getProperty(SYSTEM_HOME); if (actualHome =3D=3D null) { @@ -64,7 +63,7 @@ log.info("Started in " + actualHome); } =20 - public void doStop() throws WaitingException, Exception { + public void doStop() throws Exception { try { DriverManager.getConnection(SHUTDOWN_ALL, null, null); } catch (SQLException e) { Modified: geronimo/trunk/modules/interop/src/java/org/apache/geronimo/inter= op/InteropGBean.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/interop/src/java/= org/apache/geronimo/interop/InteropGBean.java?view=3Ddiff&r1=3D151105&r2=3D= 151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/Int= eropGBean.java (original) +++ geronimo/trunk/modules/interop/src/java/org/apache/geronimo/interop/Int= eropGBean.java Wed Feb 2 18:49:54 2005 @@ -25,7 +25,6 @@ import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.GBeanInfoBuilder; import org.apache.geronimo.gbean.GBeanLifecycle; -import org.apache.geronimo.gbean.WaitingException; import org.apache.geronimo.interop.IOP.IOR; =20 =20 @@ -105,11 +104,11 @@ * Interface :: GBeanLifecycle */ =20 - public void doStart() throws WaitingException, Exception { + public void doStart() throws Exception { log.info("Started " + getObjectName()); } =20 - public void doStop() throws WaitingException, Exception { + public void doStop() throws Exception { log.info("Stopped " + getObjectName()); } =20 Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/J= ettyContainerImpl.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/or= g/apache/geronimo/jetty/JettyContainerImpl.java?view=3Ddiff&r1=3D151105&r2= =3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyCo= ntainerImpl.java (original) +++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyCo= ntainerImpl.java Wed Feb 2 18:49:54 2005 @@ -26,7 +26,6 @@ import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.GBeanInfoBuilder; import org.apache.geronimo.gbean.GBeanLifecycle; -import org.apache.geronimo.gbean.WaitingException; =20 /** * @version $Rev$ $Date$ @@ -139,11 +138,11 @@ return server.getRequestLog(); } =20 - public void doStart() throws WaitingException, Exception { + public void doStart() throws Exception { server.start(); } =20 - public void doStop() throws WaitingException { + public void doStop() { try { server.stop(true); } catch (InterruptedException e) { Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/J= ettyWebAppContext.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/or= g/apache/geronimo/jetty/JettyWebAppContext.java?view=3Ddiff&r1=3D151105&r2= =3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWe= bAppContext.java (original) +++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWe= bAppContext.java Wed Feb 2 18:49:54 2005 @@ -45,7 +45,6 @@ import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.GBeanInfoBuilder; import org.apache.geronimo.gbean.GBeanLifecycle; -import org.apache.geronimo.gbean.WaitingException; import org.apache.geronimo.jetty.interceptor.BeforeAfter; import org.apache.geronimo.jetty.interceptor.ComponentContextBeforeAfter; import org.apache.geronimo.jetty.interceptor.InstanceContextBeforeAfter; @@ -232,7 +231,7 @@ chain.after(context, httpRequest, httpResponse); } =20 - public void doStart() throws WaitingException, Exception { + public void doStart() throws Exception { // reset the classsloader... jetty likes to set it to null when st= opping setClassLoader(webClassLoader); =20 Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/c= onnector/HTTPSConnector.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/or= g/apache/geronimo/jetty/connector/HTTPSConnector.java?view=3Ddiff&r1=3D1511= 05&r2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connect= or/HTTPSConnector.java (original) +++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connect= or/HTTPSConnector.java Wed Feb 2 18:49:54 2005 @@ -19,7 +19,6 @@ =20 import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.GBeanInfoBuilder; -import org.apache.geronimo.gbean.WaitingException; import org.apache.geronimo.jetty.JettyContainer; import org.apache.geronimo.system.serverinfo.ServerInfo; import org.mortbay.http.SunJsseListener; @@ -94,7 +93,7 @@ return https.getNeedClientAuth(); } =20 - public void doStart() throws WaitingException, Exception { + public void doStart() throws Exception { https.setKeystore(serverInfo.resolvePath(keystore)); super.doStart(); } Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/c= onnector/JettyConnector.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/or= g/apache/geronimo/jetty/connector/JettyConnector.java?view=3Ddiff&r1=3D1511= 05&r2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connect= or/JettyConnector.java (original) +++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connect= or/JettyConnector.java Wed Feb 2 18:49:54 2005 @@ -20,7 +20,6 @@ import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.GBeanInfoBuilder; import org.apache.geronimo.gbean.GBeanLifecycle; -import org.apache.geronimo.gbean.WaitingException; import org.apache.geronimo.jetty.JettyContainer; import org.mortbay.http.HttpListener; import org.mortbay.util.ThreadedServer; @@ -50,13 +49,13 @@ listener.setPort(port); } =20 - public void doStart() throws WaitingException, Exception { + public void doStart() throws Exception { container.addListener(listener); ((ThreadedServer) listener).open(); listener.start(); } =20 - public void doStop() throws WaitingException { + public void doStop() { while (true) { try { listener.stop(); Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/r= equestlog/NCSARequestLog.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/or= g/apache/geronimo/jetty/requestlog/NCSARequestLog.java?view=3Ddiff&r1=3D151= 105&r2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/request= log/NCSARequestLog.java (original) +++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/request= log/NCSARequestLog.java Wed Feb 2 18:49:54 2005 @@ -19,7 +19,6 @@ import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.GBeanInfoBuilder; import org.apache.geronimo.gbean.GBeanLifecycle; -import org.apache.geronimo.gbean.WaitingException; import org.apache.geronimo.jetty.JettyContainer; import org.apache.geronimo.system.serverinfo.ServerInfo; =20 @@ -112,13 +111,13 @@ return preferProxiedForAddress; } =20 - public void doStart() throws WaitingException, Exception { + public void doStart() throws Exception { requestLog.setFilename(serverInfo.resolvePath(filename)); container.setRequestLog(requestLog); requestLog.start(); } =20 - public void doStop() throws WaitingException, Exception { + public void doStop() throws Exception { requestLog.stop(); container.setRequestLog(null); } Modified: geronimo/trunk/modules/jmx-remoting/src/java/org/apache/geronimo/= jmxremoting/JMXConnector.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jmx-remoting/src/= java/org/apache/geronimo/jmxremoting/JMXConnector.java?view=3Ddiff&r1=3D151= 105&r2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/jmx-remoting/src/java/org/apache/geronimo/jmxrem= oting/JMXConnector.java (original) +++ geronimo/trunk/modules/jmx-remoting/src/java/org/apache/geronimo/jmxrem= oting/JMXConnector.java Wed Feb 2 18:49:54 2005 @@ -28,7 +28,6 @@ import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.GBeanInfoBuilder; import org.apache.geronimo.gbean.GBeanLifecycle; -import org.apache.geronimo.gbean.WaitingException; import org.apache.geronimo.kernel.Kernel; import org.apache.geronimo.kernel.jmx.MBeanServerDelegate; =20 @@ -100,7 +99,7 @@ this.url =3D url; } =20 - public void doStart() throws WaitingException, Exception { + public void doStart() throws Exception { JMXServiceURL serviceURL =3D new JMXServiceURL(url); Map env =3D new HashMap(); if (applicationConfigName !=3D null) { Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/= GBeanLifecycle.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/o= rg/apache/geronimo/gbean/GBeanLifecycle.java?view=3Ddiff&r1=3D151105&r2=3D1= 51106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanL= ifecycle.java (original) +++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanL= ifecycle.java Wed Feb 2 18:49:54 2005 @@ -28,17 +28,16 @@ /** * Starts the GBean. This informs the GBean that it is about to trans= ition to the running state. * - * @throws WaitingException if the target is waiting for an external c= ondition before it can fully start * @throws Exception if the target failed to start; this will cause a = transition to the failed state */ - void doStart() throws WaitingException, Exception; + void doStart() throws Exception; =20 /** * Stops the target. This informs the GBean that it is about to trans= ition to the stopped state. * - * @throws WaitingException if the target is waiting for an external c= ondition before it can fully stop + * @throws Exception if the target failed to stop; this will cause a t= ransition to the failed state */ - void doStop() throws WaitingException, Exception; + void doStop() throws Exception; =20 /** * Fails the GBean. This informs the GBean that it is about to transi= tion to the failed state. Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/= GBeanLifecycleController.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/o= rg/apache/geronimo/gbean/GBeanLifecycleController.java?view=3Ddiff&r1=3D151= 105&r2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanL= ifecycleController.java (original) +++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanL= ifecycleController.java Wed Feb 2 18:49:54 2005 @@ -33,16 +33,6 @@ int getState(); =20 /** - * Attempts to bring the component into the fully running state. If an= Exception occurs while - * starting the component, the component is automaticaly failed. - *

- * There is no guarantee that the Geronimo MBean will be running when = the method returns. - * - * @throws Exception if a problem occurs while starting the component - */ - void start() throws Exception; - - /** * Attempt to bring the component into the fully stopped state. If an = exception occurs while * stopping the component, tthe component is automaticaly failed. *

@@ -51,11 +41,4 @@ * @throws Exception if a problem occurs while stopping the component */ void stop() throws Exception; - - /** - * Moves this component to the FAILED state. - *

- * The component is guaranteed to be in the failed state when the meth= od returns. - */ - void fail(); } Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/= runtime/AbstractGBeanReference.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/o= rg/apache/geronimo/gbean/runtime/AbstractGBeanReference.java?view=3Ddiff&r1= =3D151105&r2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtim= e/AbstractGBeanReference.java (original) +++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtim= e/AbstractGBeanReference.java Wed Feb 2 18:49:54 2005 @@ -138,44 +138,20 @@ setInvoker =3D null; } =20 - listener =3D new LifecycleAdapter() { - public void running(ObjectName objectName) { - if (!targets.contains(objectName)) { - targets.add(objectName); - targetAdded(objectName); - } - } - - public void stopping(ObjectName objectName) { - removeTarget(objectName); - } - - public void stopped(ObjectName objectName) { - removeTarget(objectName); - } + listener =3D createLifecycleListener(); + } =20 - public void failed(ObjectName objectName) { - removeTarget(objectName); - } + protected abstract LifecycleListener createLifecycleListener(); =20 - public void unloaded(ObjectName objectName) { - removeTarget(objectName); - } + protected abstract void targetAdded(ObjectName target); =20 - private void removeTarget(ObjectName objectName) { - boolean wasTarget =3D targets.remove(objectName); - if (wasTarget) { - targetRemoved(objectName); - } - } - }; - } + protected abstract void targetRemoved(ObjectName target); =20 protected final Kernel getKernel() { return kernel; } =20 - protected DependencyManager getDependencyManager() { + protected final DependencyManager getDependencyManager() { return dependencyManager; } =20 @@ -199,11 +175,11 @@ return proxyType; } =20 - public Object getProxy() { + public final Object getProxy() { return proxy; } =20 - protected void setProxy(Object proxy) { + protected final void setProxy(Object proxy) { this.proxy =3D proxy; } =20 @@ -258,18 +234,28 @@ isOnline =3D false; } =20 - protected abstract void targetAdded(ObjectName target); - - protected abstract void targetRemoved(ObjectName target); - protected final Set getTargets() { return targets; } =20 - public final synchronized void inject() throws Exception { + protected final void addTarget(ObjectName objectName) { + if (!targets.contains(objectName)) { + targets.add(objectName); + targetAdded(objectName); + } + } + + protected final void removeTarget(ObjectName objectName) { + boolean wasTarget =3D targets.remove(objectName); + if (wasTarget) { + targetRemoved(objectName); + } + } + + public final synchronized void inject(Object target) throws Exception { // set the proxy into the instance if (setInvoker !=3D null && patterns.size() > 0) { - setInvoker.invoke(gbeanInstance.getTarget(), new Object[]{getP= roxy()}); + setInvoker.invoke(target, new Object[]{getProxy()}); } } =20 Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/= runtime/GBeanAttribute.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/o= rg/apache/geronimo/gbean/runtime/GBeanAttribute.java?view=3Ddiff&r1=3D15110= 5&r2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtim= e/GBeanAttribute.java (original) +++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtim= e/GBeanAttribute.java Wed Feb 2 18:49:54 2005 @@ -313,9 +313,9 @@ return special; } =20 - public void inject() throws Exception { + public void inject(Object target) throws Exception { if ((persistent || special) && !isConstructorArg && writable) { - setValue(persistentValue); + setValue(target, persistentValue); } } =20 @@ -339,7 +339,7 @@ this.persistentValue =3D persistentValue; } =20 - public Object getValue() throws Exception { + public Object getValue(Object target) throws Exception { if (!readable) { if (persistent) { throw new IllegalStateException("This persistent attribute= is not accessible while started. " + getDescription()); @@ -353,9 +353,8 @@ } =20 // get the target to invoke - Object target =3D gbeanInstance.getTarget(); if (target =3D=3D null && !framework) { - throw new IllegalStateException("GBeanMBean does not have a ta= rget instance to invoke. " + getDescription()); + throw new IllegalStateException("GBean does not have a target = instance to invoke. " + getDescription()); } =20 // call the getter @@ -363,7 +362,7 @@ return value; } =20 - public void setValue(Object value) throws Exception { + public void setValue(Object target, Object value) throws Exception { if (!writable) { if (persistent) { throw new IllegalStateException("This persistent attribute= is not modifable while running. " + getDescription()); @@ -380,9 +379,8 @@ // @todo actually check type =20 // get the target to invoke - Object target =3D gbeanInstance.getTarget(); if (target =3D=3D null && !framework) { - throw new IllegalStateException("GBeanMBean does not have a ta= rget instance to invoke. " + getDescription()); + throw new IllegalStateException("GBean does not have a target = instance to invoke. " + getDescription()); } =20 // call the setter Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/= runtime/GBeanCollectionReference.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/o= rg/apache/geronimo/gbean/runtime/GBeanCollectionReference.java?view=3Ddiff&= r1=3D151105&r2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtim= e/GBeanCollectionReference.java (original) +++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtim= e/GBeanCollectionReference.java Wed Feb 2 18:49:54 2005 @@ -23,6 +23,8 @@ import org.apache.geronimo.gbean.InvalidConfigurationException; import org.apache.geronimo.kernel.Kernel; import org.apache.geronimo.kernel.DependencyManager; +import org.apache.geronimo.kernel.lifecycle.LifecycleAdapter; +import org.apache.geronimo.kernel.lifecycle.LifecycleListener; =20 /** * @version $Rev: 71492 $ $Date: 2004-11-14 21:31:50 -0800 (Sun, 14 Nov 20= 04) $ @@ -32,19 +34,13 @@ super(gbeanInstance, referenceInfo, kernel, dependencyManager); } =20 - public synchronized void start() throws Exception { - // if there are no patterns then there is nothing to start - if (getPatterns().isEmpty()) { - return; + public synchronized boolean start() { + // We only need to start if there are patterns and we don't alread= y have a proxy + if (!getPatterns().isEmpty() && getProxy() =3D=3D null) { + // add a dependency on our target and create the proxy + setProxy(new ProxyCollection(getName(), getReferenceType(), ge= tKernel().getProxyManager(), getTargets())); } - - // if we already have a proxy then we have already been started - if (getProxy() !=3D null) { - return; - } - - // add a dependency on our target and create the proxy - setProxy(new ProxyCollection(getName(), getReferenceType(), getKer= nel().getProxyManager(), getTargets())); + return true; } =20 public synchronized void stop() { @@ -55,17 +51,41 @@ } } =20 - public synchronized void targetAdded(ObjectName target) { + protected synchronized void targetAdded(ObjectName target) { ProxyCollection proxy =3D (ProxyCollection) getProxy(); if (proxy !=3D null) { proxy.addTarget(target); } } =20 - public synchronized void targetRemoved(ObjectName target) { + protected synchronized void targetRemoved(ObjectName target) { ProxyCollection proxy =3D (ProxyCollection) getProxy(); if (proxy !=3D null) { proxy.removeTarget(target); } + } + + protected LifecycleListener createLifecycleListener() { + return new LifecycleAdapter() { + public void running(ObjectName objectName) { + addTarget(objectName); + } + + public void stopping(ObjectName objectName) { + removeTarget(objectName); + } + + public void stopped(ObjectName objectName) { + removeTarget(objectName); + } + + public void failed(ObjectName objectName) { + removeTarget(objectName); + } + + public void unloaded(ObjectName objectName) { + removeTarget(objectName); + } + }; } } Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/= runtime/GBeanInstance.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/o= rg/apache/geronimo/gbean/runtime/GBeanInstance.java?view=3Ddiff&r1=3D151105= &r2=3D151106 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtim= e/GBeanInstance.java (original) +++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/runtim= e/GBeanInstance.java Wed Feb 2 18:49:54 2005 @@ -41,11 +41,11 @@ import org.apache.geronimo.gbean.GOperationSignature; import org.apache.geronimo.gbean.GReferenceInfo; import org.apache.geronimo.gbean.InvalidConfigurationException; -import org.apache.geronimo.gbean.WaitingException; +import org.apache.geronimo.kernel.DependencyManager; import org.apache.geronimo.kernel.Kernel; import org.apache.geronimo.kernel.NoSuchAttributeException; import org.apache.geronimo.kernel.NoSuchOperationException; -import org.apache.geronimo.kernel.DependencyManager; +import org.apache.geronimo.kernel.GBeanNotFoundException; import org.apache.geronimo.kernel.management.EventProvider; import org.apache.geronimo.kernel.management.ManagedObject; import org.apache.geronimo.kernel.management.NotificationType; @@ -60,10 +60,12 @@ public final class GBeanInstance implements ManagedObject, StateManageable= , EventProvider { private static final Log log =3D LogFactory.getLog(GBeanInstance.class= ); =20 - /** - * Attribute name used to retrieve the RawInvoker for the GBean - * @deprecated DO NOT USE THIS... THIS WILL BE REMOVED!!!!!! - */ + private static final int DESTROYED =3D 0; + private static final int CREATING =3D 1; + private static final int RUNNING =3D 2; + private static final int DESTROYING =3D 3; + + /** Attribute name used to retrieve the RawInvoker for the GBean */ public static final String RAW_INVOKER =3D "$$RAW_INVOKER$$"; =20 /** @@ -154,12 +156,12 @@ /** * Has this instance been destroyed? */ - private boolean destroyed =3D true; + private boolean dead =3D false; =20 /** - * Is this gbean running? + * The state of the internal gbean instance that we are wrapping. */ - private boolean running =3D false; + private int instanceState =3D DESTROYED; =20 /** * Target instance of this GBean wrapper @@ -176,6 +178,12 @@ */ private boolean enabled =3D true; =20 + /** + * This is used to signal the creating thread that it should + * fail when it returns from usercode. This is set when a + * reference has gone offline during construction. + */ + private boolean shouldFail =3D false;=20 =20 /** * Construct a GBeanMBean using the supplied GBeanData and class loader @@ -189,7 +197,7 @@ this.objectName =3D gbeanData.getName(); this.kernel =3D kernel; this.lifecycleBroadcaster =3D lifecycleBroadcaster; - this.gbeanInstanceState =3D new GBeanInstanceState(objectName, ker= nel, dependencyManager, new GBeanLifecycleCallback(), lifecycleBroadcaster); + this.gbeanInstanceState =3D new GBeanInstanceState(objectName, ker= nel, dependencyManager, this, lifecycleBroadcaster); this.classLoader =3D classLoader; gbeanLifecycleController =3D new GBeanInstanceLifecycleController(= this); =20 @@ -248,7 +256,7 @@ operations =3D new GBeanOperation[operationsMap.size()]; int opCounter =3D 0; for (Iterator iterator =3D operationsMap.entrySet().iterator(); it= erator.hasNext();) { - Map.Entry entry =3D (Map.Entry)iterator.next(); + Map.Entry entry =3D (Map.Entry) iterator.next(); operations[opCounter] =3D (GBeanOperation) entry.getValue(); operationIndex.put(entry.getKey(), new Integer(opCounter)); opCounter++; @@ -284,7 +292,23 @@ =20 // set the initial attribute values try { - setGBeanData(gbeanData); + // set the attributes + Map dataAttributes =3D gbeanData.getAttributes(); + for (Iterator iterator =3D dataAttributes.entrySet().iterator(= ); iterator.hasNext();) { + Map.Entry entry =3D (Map.Entry) iterator.next(); + String attributeName =3D (String) entry.getKey(); + Object attributeValue =3D entry.getValue(); + setAttribute(attributeName, attributeValue); + } + + // add the references + Map dataReferences =3D gbeanData.getReferences(); + for (Iterator iterator =3D dataReferences.entrySet().iterator(= ); iterator.hasNext();) { + Map.Entry entry =3D (Map.Entry) iterator.next(); + String referenceName =3D (String) entry.getKey(); + Set referencePattern =3D (Set) entry.getValue(); + getReferenceByName(referenceName).setPatterns(referencePat= tern); + } } catch (Exception e) { throw new InvalidConfigurationException("GBeanData could not b= e loaded into the GBeanMBean", e); } @@ -295,22 +319,20 @@ lifecycleBroadcaster.fireLoadedEvent(); } =20 - public void destroy() { + public void die() throws GBeanNotFoundException { synchronized (this) { - if (destroyed) { - return; + if (dead) { + // someone beat us to the punch... this instance should ha= ve never been found in the first place + throw new GBeanNotFoundException(name); } - destroyed =3D true; + dead =3D true; } =20 - lifecycleBroadcaster.fireUnloadedEvent(); - - // just to be sure, stop all the references again - for (int i =3D 0; i < references.length; i++) { - references[i].offline(); - } + // if the bean is already stopped or failed, this will do nothing;= otherwise it will shutdown the bean + gbeanInstanceState.fail(); =20 - target =3D null; + // tell everyone we are done + lifecycleBroadcaster.fireUnloadedEvent(); } =20 /** @@ -337,17 +359,8 @@ * * @return true if the gbean has been destroyed */ - public synchronized boolean isDestroyed() { - return destroyed; - } - - /** - * Is this gbean instance running. Operations and non-persistenct attr= ibtes can not be accessed while not running. - * - * @return true if the gbean is runing - */ - public boolean isRunning() { - return running; + public synchronized boolean isDead() { + return dead; } =20 /** @@ -359,7 +372,7 @@ return type; } =20 - public Object getTarget() { + public synchronized Object getTarget() { return target; } =20 @@ -405,7 +418,7 @@ return NotificationType.TYPES; } =20 - public final long getStartTime() { + public synchronized final long getStartTime() { return startTime; } =20 @@ -454,6 +467,9 @@ */ public final void start() { synchronized (this) { + if (dead) { + throw new IllegalStateException("A dead GBean can not be s= tarted: objectName=3D" + objectName); + } if (!enabled) { throw new IllegalStateException("A disabled GBean can not = be started: objectName=3D" + objectName); } @@ -468,6 +484,9 @@ */ public final void startRecursive() { synchronized (this) { + if (dead) { + throw new IllegalStateException("A dead GBean can not be s= tarted: objectName=3D" + objectName); + } if (!enabled) { throw new IllegalStateException("A disabled GBean can not = be started: objectName=3D" + objectName); } @@ -487,26 +506,35 @@ * Moves this GBeanInstance to the FAILED state. There are no calls t= o dependent children, but they will be * notified using standard J2EE management notification. */ - final void fail() { + final void referenceFailed() { gbeanInstanceState.fail(); } =20 /** * Gets the gbean data for the gbean held by this gbean mbean. + * * @return the gbean data */ public GBeanData getGBeanData() { GBeanData gbeanData =3D new GBeanData(objectName, gbeanInfo); =20 + // copy target into local variables from within a synchronized blo= ck to gaurentee a consistent read + int state; + Object instance; + synchronized (this) { + state =3D instanceState; + instance =3D target; + } + // add the attributes for (int i =3D 0; i < attributes.length; i++) { GBeanAttribute attribute =3D attributes[i]; if (attribute.isPersistent()) { String name =3D attribute.getName(); Object value; - if ((running || attribute.isFramework()) && attribute.isRe= adable()) { + if ((state !=3D DESTROYED || attribute.isFramework()) && a= ttribute.isReadable()) { try { - value =3D attribute.getValue(); + value =3D attribute.getValue(instance); } catch (Throwable throwable) { value =3D attribute.getPersistentValue(); log.debug("Could not get the current value of pers= istent attribute. The persistent " + @@ -529,26 +557,6 @@ return gbeanData; } =20 - public void setGBeanData(GBeanData gbeanData) throws Exception, NoSuch= AttributeException { - // set the attributes - Map attributes =3D gbeanData.getAttributes(); - for (Iterator iterator =3D attributes.entrySet().iterator(); itera= tor.hasNext();) { - Map.Entry entry =3D (Map.Entry) iterator.next(); - String name =3D (String) entry.getKey(); - Object value =3D entry.getValue(); - setAttribute(name, value); - } - - // add the references - Map references =3D gbeanData.getReferences(); - for (Iterator iterator =3D references.entrySet().iterator(); itera= tor.hasNext();) { - Map.Entry entry =3D (Map.Entry) iterator.next(); - String name =3D (String) entry.getKey(); - Set patterns =3D (Set) entry.getValue(); - setReferencePatterns(name, patterns); - } - } - /** * Gets the attribute value using the attribute index. This is the mo= st efficient way to get * an attribute as it avoids a HashMap lookup. @@ -560,8 +568,17 @@ */ public Object getAttribute(int index) throws Exception { GBeanAttribute attribute =3D attributes[index]; - if (running || attribute.isFramework()) { - return attribute.getValue(); + + // copy target into local variables from within a synchronized blo= ck to gaurentee a consistent read + int state; + Object instance; + synchronized (this) { + state =3D instanceState; + instance =3D target; + } + + if (state !=3D DESTROYED || attribute.isFramework()) { + return attribute.getValue(instance); } else { return attribute.getPersistentValue(); } @@ -587,8 +604,16 @@ throw e; } =20 - if (running || attribute.isFramework()) { - return attribute.getValue(); + // copy target into local variables from within a synchronized blo= ck to gaurentee a consistent read + int state; + Object instance; + synchronized (this) { + state =3D instanceState; + instance =3D target; + } + + if (state !=3D DESTROYED || attribute.isFramework()) { + return attribute.getValue(instance); } else { return attribute.getPersistentValue(); } @@ -605,8 +630,17 @@ */ public void setAttribute(int index, Object value) throws Exception, In= dexOutOfBoundsException { GBeanAttribute attribute =3D attributes[index]; - if (running || attribute.isFramework()) { - attribute.setValue(value); + + // copy target into local variables from within a synchronized blo= ck to gaurentee a consistent read + int state; + Object instance; + synchronized (this) { + state =3D instanceState; + instance =3D target; + } + + if (state !=3D DESTROYED || attribute.isFramework()) { + attribute.setValue(instance, value); } else { attribute.setPersistentValue(value); } @@ -623,8 +657,17 @@ */ public void setAttribute(String attributeName, Object value) throws Ex= ception, NoSuchAttributeException { GBeanAttribute attribute =3D getAttributeByName(attributeName); - if (running || attribute.isFramework()) { - attribute.setValue(value); + + // copy target into local variables from within a synchronized blo= ck to gaurentee a consistent read + int state; + Object instance; + synchronized (this) { + state =3D instanceState; + instance =3D target; + } + + if (state !=3D DESTROYED || attribute.isFramework()) { + attribute.setValue(instance, value); } else { attribute.setPersistentValue(value); } @@ -652,10 +695,19 @@ */ public Object invoke(int index, Object[] arguments) throws Exception { GBeanOperation operation =3D operations[index]; - if (!running && !operation.isFramework()) { + + // copy target into local variables from within a synchronized blo= ck to gaurentee a consistent read + int state; + Object instance; + synchronized (this) { + state =3D instanceState; + instance =3D target; + } + + if (state =3D=3D DESTROYED && !operation.isFramework()) { throw new IllegalStateException("Operations can only be invoke= while the GBean instance is running: " + objectName); } - return operation.invoke(arguments); + return operation.invoke(instance, arguments); } =20 /** @@ -678,40 +730,19 @@ throw new NoSuchOperationException("Unknown operation " + sign= ature); } GBeanOperation operation =3D operations[index.intValue()]; - if (!running && !operation.isFramework()) { - throw new IllegalStateException("Operations can only be invoke= while the GBean is running: " + objectName); - } - return operation.invoke(arguments); - } =20 - /** - * Gets the object name patters for a reference. - * - * @param name the reference name - * @return the object name patterns for the reference - */ - public Set getReferencePatterns(String name) { - return getReferenceByName(name).getPatterns(); - } - - /** - * Sets a single object name pattern for a reference. - * - * @param name the reference name - * @param pattern the new single object name pattern for the reference - */ - public void setReferencePattern(String name, ObjectName pattern) { - getReferenceByName(name).setPatterns(Collections.singleton(pattern= )); - } + // copy target into local variables from within a synchronized blo= ck to gaurentee a consistent read + int state; + Object instance; + synchronized (this) { + state =3D instanceState; + instance =3D target; + } =20 - /** - * Sets the object name patterns for a reference. - * - * @param name the reference name - * @param patterns the new object name patterns for the reference - */ - public void setReferencePatterns(String name, Set patterns) { - getReferenceByName(name).setPatterns(patterns); + if (state =3D=3D DESTROYED && !operation.isFramework()) { + throw new IllegalStateException("Operations can only be invoke= while the GBean is running: " + objectName); + } + return operation.invoke(instance, arguments); } =20 private GBeanReference getReferenceByName(String name) { @@ -723,23 +754,35 @@ return reference; } =20 - private class GBeanLifecycleCallback implements GBeanLifecycle { - public void doStart() throws Exception { - // start each of the references... if they need to wait rememb= er the - // waiting exception so we can throw it later. this way we the= dependecies - // are held until we can start - WaitingException waitingException =3D null; + boolean createInstance() throws Exception { + synchronized (this) { + // first check we are still in the correct state to start + if (instanceState =3D=3D CREATING || instanceState =3D=3D RUNN= ING) { + // another thread already completed starting + return false; + } else if (instanceState =3D=3D DESTROYING) { + // this should never ever happen... this method is protect= ed by the GBeanState class which should + // prevent stuff like this happening, but check anyway + throw new IllegalStateException("A stopping instance can n= ot be started until fully stopped"); + } + assert instanceState =3D=3D DESTROYED; + + // Call all start on every reference. This way the dependecie= s are held until we can start + boolean allStarted =3D true; for (int i =3D 0; i < references.length; i++) { - try { - references[i].start(); - } catch (WaitingException e) { - waitingException =3D e; - } + allStarted =3D references[i].start() && allStarted; } - if (waitingException !=3D null) { - throw waitingException; + if (!allStarted) { + return false; } =20 + // we are definately going to (try to) start... if this fails = the must clean up these variables + instanceState =3D CREATING; + startTime =3D System.currentTimeMillis(); + } + + Object instance =3D null; + try { GConstructorInfo constructorInfo =3D gbeanInfo.getConstructor(= ); Class[] parameterTypes =3D constructor.getParameterTypes(); =20 @@ -760,7 +803,7 @@ =20 // create instance try { - target =3D constructor.newInstance(parameters); + instance =3D constructor.newInstance(parameters); } catch (InvocationTargetException e) { Throwable targetException =3D e.getTargetException(); if (targetException instanceof Exception) { @@ -774,67 +817,191 @@ throw e; } =20 + // write the target variable in a synchronized block so it is = available to all threads + // we do this before calling the setters or start method so th= e bean can be called back + // from a setter start method + synchronized (this) { + target =3D instance; + } + // inject the persistent attribute value into the new instance for (int i =3D 0; i < attributes.length; i++) { - attributes[i].inject(); + checkIfShouldFail(); + attributes[i].inject(instance); } =20 // inject the proxies into the new instance for (int i =3D 0; i < references.length; i++) { - references[i].inject(); + checkIfShouldFail(); + references[i].inject(instance); } =20 - running =3D true; - startTime =3D System.currentTimeMillis(); - if (target instanceof GBeanLifecycle) { - ((GBeanLifecycle) target).doStart(); + if (instance instanceof GBeanLifecycle) { + checkIfShouldFail(); + ((GBeanLifecycle) instance).doStart(); + } + + // all done... we are now fully running + synchronized (this) { + checkIfShouldFail(); + instanceState =3D RUNNING; + this.notifyAll(); + } + + return true; + } catch (Throwable t) { + // something went wrong... we need to destroy this instance + synchronized (this) { + instanceState =3D DESTROYING; + } + + if (instance instanceof GBeanLifecycle) { + try { + ((GBeanLifecycle) instance).doFail(); + } catch (Throwable ignored) { + log.error("Problem in doFail of " + objectName, ignore= d); + } + } + + // bean has been notified... drop our reference + synchronized (this) { + // stop all of the references + for (int i =3D 0; i < references.length; i++) { + references[i].stop(); + } + + target =3D null; + instanceState =3D DESTROYED; + startTime =3D 0; + this.notifyAll(); } + + if (t instanceof Exception) { + throw (Exception) t; + } else if (t instanceof Error) { + throw (Error) t; + } else { + throw new Error(t); + } + } + } + + private synchronized void checkIfShouldFail() throws Exception { + if (shouldFail) { + shouldFail =3D false; + throw new Exception("A reference has failed so construction ca= n not complete"); } + } =20 - public void doStop() throws Exception { - if (target instanceof GBeanLifecycle) { - ((GBeanLifecycle) target).doStop(); + boolean destroyInstance(boolean stop) throws Exception { + Object instance; + synchronized (this) { + if (!stop && instanceState =3D=3D CREATING) { + // signal to the creating thead that it should fail + shouldFail =3D true; + return false; } =20 - running =3D false; + // if the instance is being created we need to wait + // for it to finish before we can try to stop it + while (instanceState =3D=3D CREATING) { + // todo should we limit this wait? If so, how do we confi= gure the wait time? + try { + this.wait(); + } catch (InterruptedException e) { + // clear the interrupted flag + Thread.interrupted(); + // rethrow the interrupted exception.... someone was s= ick of us waiting + throw e; + } + } =20 - // stop all of the references - for (int i =3D 0; i < references.length; i++) { - references[i].stop(); + if (instanceState =3D=3D DESTROYING || instanceState =3D=3D DE= STROYED) { + // another thread is already stopping or has already stopp= ed + return false; } + assert instanceState =3D=3D RUNNING; + + // we are definately going to stop... if this fails the must c= lean up these variables + instanceState =3D DESTROYING; + instance =3D target; + } =20 - if (target !=3D null) { - // stop all of the attributes + // update the persistent attributes + // do not update the persistent attibute values in the case of a f= ailure + // failed gbeans may have corrupted attributes that would be persi= sted + Exception problem =3D null; + if (stop && instance !=3D null) { + try { + // get all the data but don't update in case there is an e= xception + Map data =3D new HashMap(); for (int i =3D 0; i < attributes.length; i++) { GBeanAttribute attribute =3D attributes[i]; if (attribute.isPersistent() && attribute.isReadable()= ) { // copy the current attribute value to the persist= ent value - Object value =3D attribute.getValue(); + Object value =3D null; + try { + value =3D attribute.getValue(instance); + } catch (Throwable e) { + // There is no reason to create a new Exceptio= n sub class as this exception will + // simply be caught and logged on GBeanInstanc= eState + throw new Exception("Problem while updaing the= persistent value of attibute: " + + "Attribute Name: " + attribute.getName= () + ", " + + "Type: " + attribute.getType() + ", " + + "GBeanInstance: " + getName(), e); + } + data.put(attribute, value); + } + } + // now we have all the data we can update the persistent v= alues + for (int i =3D 0; i < attributes.length; i++) { + GBeanAttribute attribute =3D attributes[i]; + if (attribute.isPersistent() && attribute.isReadable()= ) { + // copy the current attribute value to the persist= ent value + Object value =3D data.get(attribute); attribute.setPersistentValue(value); } } - - target =3D null; + } catch (Exception e) { + // the getter threw an exception; now we must to fail + stop =3D false; + problem =3D e; } } =20 - public void doFail() { - running =3D false; - - if (target instanceof GBeanLifecycle) { - ((GBeanLifecycle) target).doFail(); + // we notify the bean before removing our reference so the bean ca= n be called back while stopping + if (instance instanceof GBeanLifecycle) { + if (stop) { + try { + ((GBeanLifecycle) instance).doStop(); + } catch (Throwable ignored) { + log.error("Problem in doStop of " + objectName, ignore= d); + } + } else { + try { + ((GBeanLifecycle) instance).doFail(); + } catch (Throwable ignored) { + log.error("Problem in doFail of " + objectName, ignore= d); + } } + } =20 + // bean has been notified... drop our reference + synchronized (this) { // stop all of the references for (int i =3D 0; i < references.length; i++) { references[i].stop(); } =20 target =3D null; + instanceState =3D DESTROYED; + startTime =3D 0; + } =20 - // do not stop the attibutes in the case of a failure - // failed gbeans may have corrupted attributes that would be p= ersisted + if (problem !=3D null) { + throw problem; } + return true; } =20 private void addManagedObjectAttributes(Map attributesMap) { @@ -963,36 +1130,36 @@ private void addManagedObjectOperations(Map operationsMap) { operationsMap.put(new GOperationSignature("start", Collections.EMP= TY_LIST), GBeanOperation.createFrameworkOperation(this, - "start", - Collections.EMPTY_LIST, - new MethodInvoker() { - public Object invoke(Object target, Object[] arguments= ) throws Exception { - start(); - return null; - } - })); + "start", + Collections.EMPTY_LIST, + new MethodInvoker() { + public Object invoke(Object target, Object[] a= rguments) throws Exception { + start(); + return null; + } + })); =20 operationsMap.put(new GOperationSignature("startRecursive", Collec= tions.EMPTY_LIST), GBeanOperation.createFrameworkOperation(this, - "startRecursive", - Collections.EMPTY_LIST, - new MethodInvoker() { - public Object invoke(Object target, Object[] arguments= ) throws Exception { - startRecursive(); - return null; - } - })); + "startRecursive", + Collections.EMPTY_LIST, + new MethodInvoker() { + public Object invoke(Object target, Object[] a= rguments) throws Exception { + startRecursive(); + return null; + } + })); =20 operationsMap.put(new GOperationSignature("stop", Collections.EMPT= Y_LIST), GBeanOperation.createFrameworkOperation(this, - "stop", - Collections.EMPTY_LIST, - new MethodInvoker() { - public Object invoke(Object target, Object[] arguments= ) throws Exception { - stop(); - return null; - } - })); + "stop", + Collections.EMPTY_LIST, + new MethodInvoker() { + public Object invoke(Object target, Object[] a= rguments) throws Exception { + stop(); + return null; + } + })); } =20 private GBeanInfo rebuildGBeanInfo(GConstructorInfo constructor, Strin= g j2eeType) { @@ -1018,6 +1185,56 @@ constructor, operationInfos, referenceInfos); + } + + public static final class GBeanInstanceLifecycleController implements = GBeanLifecycleController { + /** + * The GeronimoInstance which owns the target. + */ + private final GBeanInstance gbeanInstance; + + /** + * Creates a new context for a target. + * + * @param gbeanInstance the GeronimoInstance + */ + public GBeanInstanceLifecycleController(GBeanInstance gbeanInstanc= e) { + this.gbeanInstance =3D gbeanInstance; + } + + /** + * Gets the state of this component as an int. + * The int return is required by the JSR77 specification. + * + * @return the current state of this component + */ + public int getState() { + return gbeanInstance.getState(); + } + + /** + * Attempt to bring the component into the fully stopped state. If= an exception occurs while + * stopping the component, tthe component is automaticaly failed. + *

+ * There is no guarantee that the Geronimo MBean will be stopped w= hen the method returns. + * + * @throws Exception if a problem occurs while stopping the compon= ent + */ + public void stop() throws Exception { + synchronized(gbeanInstance) { + if (gbeanInstance.instanceState =3D=3D CREATING) { + throw new IllegalStateException("Stop can not be calle= d until instance is fully started"); + } else if (gbeanInstance.instanceState =3D=3D DESTROYING) { + log.debug("Stop ignored. GBean is already being stopp= ed"); + return; + } else if (gbeanInstance.instanceState =3D=3D DESTROYED) { + log.debug("Stop ignored. GBean is already stopped"); + return; + } + } + gbeanInstance.stop(); + } + } =20 public String toString() {