Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 95476 invoked from network); 4 May 2010 18:34:52 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 May 2010 18:34:52 -0000 Received: (qmail 59482 invoked by uid 500); 4 May 2010 18:34:52 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 59436 invoked by uid 500); 4 May 2010 18:34:52 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 59429 invoked by uid 99); 4 May 2010 18:34:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 May 2010 18:34:52 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jgawor@gmail.com designates 209.85.212.54 as permitted sender) Received: from [209.85.212.54] (HELO mail-vw0-f54.google.com) (209.85.212.54) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 May 2010 18:34:44 +0000 Received: by vws7 with SMTP id 7so2856739vws.13 for ; Tue, 04 May 2010 11:34:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=kmqV9QSheVyL3BmLfXv/WuKlHCCBp66C4whpWimOBz4=; b=TtBwFtOSno0a0udL8SmAKkUL7b4wA/pWTGf6xZ097U54LkmCfeYSHa7YwEHNqPIvv9 Mvxvzz+Ace+vL6hpcolRoamOP8In86ClJ+rx9IlxN68SSX5Rrkr/fJjUaHNDCBvtAlHM vRUKVC2SdTp1gx3IwW9ajKqvIZHofNgSNctaI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=e7KmZztqk93ExtW0jZlKvBdIB3EC5I3g0m86ZVG2ydAUfhzGa7iIVBtooCYVsiPaDS 5cyrfj3fAjO6Su1zAWWnpDv2hDzsVHv8P7wIBegDt6Jy41xaOv0io2HJURYJ9DuTGYMH /4qhxi/ec4MLvf4M5cVdVyQNVoPRKbPvctvU8= MIME-Version: 1.0 Received: by 10.220.127.25 with SMTP id e25mr976294vcs.89.1272998062929; Tue, 04 May 2010 11:34:22 -0700 (PDT) Received: by 10.220.46.67 with HTTP; Tue, 4 May 2010 11:34:22 -0700 (PDT) In-Reply-To: <0641E0B1-DA0F-4BE7-A6BD-C7ADC1B2FB9B@yahoo.com> References: <20100504164931.554A6238899C@eris.apache.org> <0641E0B1-DA0F-4BE7-A6BD-C7ADC1B2FB9B@yahoo.com> Date: Tue, 4 May 2010 14:34:22 -0400 Message-ID: Subject: Re: svn commit: r940946 - in /geronimo/server/trunk/plugins: console/console-core/src/main/resources/OSGI-INF/blueprint/ pluto/geronimo-pluto/src/main/java/org/apache/geronimo/pluto/ From: Jarek Gawor To: dev@geronimo.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org The problem is that the gbeans and blueprint are in two different bundles. So we would need to modify the WaitForBlueprintGBean to specify somehow which bundle it should wait on (e.g. based on a package name that the bundle exports). If that sounds good to you, I can go ahead and switch to that. But I'm really confused about the pluto & console code integration. The geronimo-pluto has the PortalContainerServicesGBean bean. This bean is configured via blueprint in console-core module. console-core also has a ConfigActivator that loads WEB-INF/pluto-portal-driver-config.xml. The ConfigActivator is located in geronimo-pluto module. The pluto-portal-driver-config.xml used to live in console-portal-driver module... I was thinking of moving all the pluto configuration into the pluto plugin but I can't quite figure out why things are setup in this way right now. Do you or anyone else know? Jarek On Tue, May 4, 2010 at 1:02 PM, David Jencks wrote= : > Does the WaitForBlueprintGBean gbean I wrote for this purpose not work he= re? =A0If not, is there something we can do to fix it? > > thanks > david jencks > > > On May 4, 2010, at 9:49 AM, gawor@apache.org wrote: > >> Author: gawor >> Date: Tue May =A04 16:49:30 2010 >> New Revision: 940946 >> >> URL: http://svn.apache.org/viewvc?rev=3D940946&view=3Drev >> Log: >> wait for PortalContainerServices gbean to be initialized (since it is in= itialized via blueprint) >> >> Modified: >> =A0 =A0geronimo/server/trunk/plugins/console/console-core/src/main/resou= rces/OSGI-INF/blueprint/pluto-portal-services.xml >> =A0 =A0geronimo/server/trunk/plugins/pluto/geronimo-pluto/src/main/java/= org/apache/geronimo/pluto/AdminConsoleExtensionGBean.java >> =A0 =A0geronimo/server/trunk/plugins/pluto/geronimo-pluto/src/main/java/= org/apache/geronimo/pluto/PortalContainerServices.java >> =A0 =A0geronimo/server/trunk/plugins/pluto/geronimo-pluto/src/main/java/= org/apache/geronimo/pluto/PortalContainerServicesGBean.java >> >> Modified: geronimo/server/trunk/plugins/console/console-core/src/main/re= sources/OSGI-INF/blueprint/pluto-portal-services.xml >> URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/= console-core/src/main/resources/OSGI-INF/blueprint/pluto-portal-services.xm= l?rev=3D940946&r1=3D940945&r2=3D940946&view=3Ddiff >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/server/trunk/plugins/console/console-core/src/main/resource= s/OSGI-INF/blueprint/pluto-portal-services.xml (original) >> +++ geronimo/server/trunk/plugins/console/console-core/src/main/resource= s/OSGI-INF/blueprint/pluto-portal-services.xml Tue May =A04 16:49:30 2010 >> @@ -236,6 +236,7 @@ limitations under the License. >> =A0 =A0 > =A0 =A0 =A0 =A0 =A0 class=3D"org.apache.geronimo.pluto.PortalContainerSe= rvicesGBean" >> =A0 =A0 =A0 =A0 =A0 factory-method=3D"getSingleton" >> + =A0 =A0 =A0 =A0 =A0init-method=3D"init" >> =A0 =A0 =A0 =A0 =A0 activation=3D"eager"> >> =A0 =A0 =A0 =A0 >> =A0 =A0 =A0 =A0 =A0 =A0 >> >> Modified: geronimo/server/trunk/plugins/pluto/geronimo-pluto/src/main/ja= va/org/apache/geronimo/pluto/AdminConsoleExtensionGBean.java >> URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/pluto/ge= ronimo-pluto/src/main/java/org/apache/geronimo/pluto/AdminConsoleExtensionG= Bean.java?rev=3D940946&r1=3D940945&r2=3D940946&view=3Ddiff >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/server/trunk/plugins/pluto/geronimo-pluto/src/main/java/org= /apache/geronimo/pluto/AdminConsoleExtensionGBean.java (original) >> +++ geronimo/server/trunk/plugins/pluto/geronimo-pluto/src/main/java/org= /apache/geronimo/pluto/AdminConsoleExtensionGBean.java Tue May =A04 16:49:3= 0 2010 >> @@ -194,6 +194,8 @@ public class AdminConsoleExtensionGBean >> =A0 =A0 * @see org.apache.geronimo.gbean.GBeanLifecycle#doStart() >> =A0 =A0 */ >> =A0 =A0 public synchronized void doStart() throws Exception { >> + =A0 =A0 =A0 =A0portletContainerServices.waitForInitialization(60 * 100= 0); >> + >> =A0 =A0 =A0 =A0 // check to make sure that a portal driver has registere= d with the container services >> =A0 =A0 =A0 =A0 if (portletContainerServices.getAdminConfiguration() =3D= =3D null) { >> =A0 =A0 =A0 =A0 =A0 =A0 throw new RuntimeException("No portal driver has= been registered with the portal container services"); >> >> Modified: geronimo/server/trunk/plugins/pluto/geronimo-pluto/src/main/ja= va/org/apache/geronimo/pluto/PortalContainerServices.java >> URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/pluto/ge= ronimo-pluto/src/main/java/org/apache/geronimo/pluto/PortalContainerService= s.java?rev=3D940946&r1=3D940945&r2=3D940946&view=3Ddiff >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/server/trunk/plugins/pluto/geronimo-pluto/src/main/java/org= /apache/geronimo/pluto/PortalContainerServices.java (original) >> +++ geronimo/server/trunk/plugins/pluto/geronimo-pluto/src/main/java/org= /apache/geronimo/pluto/PortalContainerServices.java Tue May =A04 16:49:30 2= 010 >> @@ -31,6 +31,8 @@ import org.apache.pluto.driver.services. >> =A0*/ >> public interface PortalContainerServices { >> >> + =A0 =A0boolean waitForInitialization(int timeout) throws InterruptedEx= ception; >> + >> =A0 =A0 AdminConfiguration getAdminConfiguration(); >> =A0 =A0 void setAdminConfiguration(AdminConfiguration adminConfiguration= ); >> >> >> Modified: geronimo/server/trunk/plugins/pluto/geronimo-pluto/src/main/ja= va/org/apache/geronimo/pluto/PortalContainerServicesGBean.java >> URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/pluto/ge= ronimo-pluto/src/main/java/org/apache/geronimo/pluto/PortalContainerService= sGBean.java?rev=3D940946&r1=3D940945&r2=3D940946&view=3Ddiff >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/server/trunk/plugins/pluto/geronimo-pluto/src/main/java/org= /apache/geronimo/pluto/PortalContainerServicesGBean.java (original) >> +++ geronimo/server/trunk/plugins/pluto/geronimo-pluto/src/main/java/org= /apache/geronimo/pluto/PortalContainerServicesGBean.java Tue May =A04 16:49= :30 2010 >> @@ -18,6 +18,9 @@ >> >> package org.apache.geronimo.pluto; >> >> +import java.util.concurrent.CountDownLatch; >> +import java.util.concurrent.TimeUnit; >> + >> import org.slf4j.Logger; >> import org.slf4j.LoggerFactory; >> import org.apache.geronimo.gbean.GBeanInfo; >> @@ -46,7 +49,8 @@ public class PortalContainerServicesGBea >> =A0 =A0 private DriverConfiguration driverConfiguration; >> =A0 =A0 private AdminConfiguration adminConfiguration; >> >> - >> + =A0 =A0private CountDownLatch latch =3D new CountDownLatch(1); >> + >> =A0 =A0 public void doStart() throws Exception { >> =A0 =A0 =A0 =A0 log.debug("Started PortalContainerServicesGBean"); >> =A0 =A0 } >> @@ -111,6 +115,14 @@ public class PortalContainerServicesGBea >> =A0 =A0 =A0 =A0 } >> =A0 =A0 =A0 =A0 return portalServices; >> =A0 =A0 } >> + >> + =A0 =A0public void init() { >> + =A0 =A0 =A0 =A0latch.countDown(); >> + =A0 =A0} >> + >> + =A0 =A0public boolean waitForInitialization(int timeout) throws Interr= uptedException { >> + =A0 =A0 =A0 =A0return latch.await(timeout, TimeUnit.MILLISECONDS); >> + =A0 =A0} >> >> =A0 =A0 public static final GBeanInfo GBEAN_INFO; >> >> >> > >