Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 69930 invoked from network); 13 Jan 2011 01:27:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Jan 2011 01:27:25 -0000 Received: (qmail 71918 invoked by uid 500); 13 Jan 2011 01:27:25 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 71865 invoked by uid 500); 13 Jan 2011 01:27:25 -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 71858 invoked by uid 99); 13 Jan 2011 01:27:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jan 2011 01:27:25 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of xhhsld@gmail.com designates 209.85.214.182 as permitted sender) Received: from [209.85.214.182] (HELO mail-iw0-f182.google.com) (209.85.214.182) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jan 2011 01:27:15 +0000 Received: by iwn39 with SMTP id 39so1075815iwn.13 for ; Wed, 12 Jan 2011 17:26:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=0koZoSQmH1l4//9EL9qAisPepKM7vOV5eZs5jYF62YA=; b=uDXPrhmBCXV4/czT0mVuZemVEfosmh6QO+C188AoY2b4qwfys0mkrFRViecTuwRudW etbsETC7593n//+DRL8h1aBWDnred7aeAbOZEc2bYTdMzja1+96yLdWWmkiiU6eZXZwn 336XWPCFLWCTKYtNMizVK7GtMOEuQpk2zQQZ0= 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; b=kSTxYDgs90n9kr4/jBmsZGLa1CDfrDZogiVA3nUtbHB7XSJaIMFUAyhLUd7KuWryy9 1AgUnJ5qkKYTNoGY9cfVu5id3fW9nm9hG0d/+s2lhjjitx0pO9Fhh6C3aXWs7LHS5HVQ d1Zd2wfpUhgORYD5L6TDwoYgcniWwH54AWWcs= MIME-Version: 1.0 Received: by 10.231.206.7 with SMTP id fs7mr1801752ibb.82.1294882014676; Wed, 12 Jan 2011 17:26:54 -0800 (PST) Received: by 10.231.148.142 with HTTP; Wed, 12 Jan 2011 17:26:54 -0800 (PST) In-Reply-To: References: Date: Thu, 13 Jan 2011 09:26:54 +0800 Message-ID: Subject: Re: How to map the lifecycle between blueprint and configuration ? From: Ivan To: dev@geronimo.apache.org Content-Type: multipart/alternative; boundary=00248c0501e582c5eb0499b036e2 X-Virus-Checked: Checked by ClamAV on apache.org --00248c0501e582c5eb0499b036e2 Content-Type: text/plain; charset=ISO-8859-1 I have worked on this issue for some time, now, most codes have been done. But I am thinking that we need to add a new configuration item to the dependency configuration, like --> org.apache.geronimo.specs geronimo-jaxb_2.2_spec eager <--- If a dependency is marked as eager start, we would start them once they are installed. The reason is that, resolved state for classloading is enough for most bundle, but for our spec API and impl, it is not enough, as you might know, we use the OSGi track to check all the service provider and keep them in a registry service, so we need to start those bundles, or they could not work correctly. Thoughts ? Thanks. 2010/11/24 David Jencks > > On Nov 22, 2010, at 11:46 PM, Ivan wrote: > > > 2010/11/23 David Jencks > >> Hi Ivan, >> >> I didn't think there was a way to explicitly get a bundle into the >> "resolved" state. Did I miss something? It was quite a long time ago but I >> think this was the reason I didn't pursue the mapping you suggest. >> > > Seems that call the bundle.loadClass(Object.class.getName()) would > force the framework to resolve the bundle, so far it works for me. > > > I didn't think of that :-) > > Now, I am trying to use a ConfigurationExtender to load the > ConfiguationData from the bundle while it receives the RESOVLED status, and > remove those activator from the car package, in this way, it should more > OSGI friendly. > > > > very good idea... > > >> I wonder how serious this problem is and if we should wait to see what a >> gbean-free geronimo looks like? >> > > I am not quite sure for it. Seems that ImportType.CLASS is not widely > used, I only found them in the client and cluser modules. For the duplicate > ObjectFactory service, it might work, but another extra > javax.naming.spi.InitialContextFactory service for OpenEJB remote client is > also published, not sure whether it would break anything. > > > In general the builder/deployer plugins are supposed to have these > ImportType.CLASS dependencies on the runtime plugins they build stuff for, > e.g jetty8-deployer having a CLASS dependency on jetty8. This is so when > you build a web app plugin for jetty for example using the car-maven-plugin > you don't actually start up a jetty server during your build. > > I would try it for a while, if too much staff is required, I could turn > to other ways, maybe just update the pom files for a temp workaround. But > guess that we still need this change for a gbean-free geronimo ... > thanks. > > > I think if you can make this work fairly easily it will really improve the > geronimo-osgi integration. I hope it works :-) > > thanks! > david jencks > > > > > >> >> thanks >> david jencks >> >> >> >> On Nov 22, 2010, at 10:06 PM, Ivan wrote: >> >> I am thinking that, do we need to seperate the Configuration with its sub >> gbeans now ? Currently, we start the Configuration gbean in the load >> process, and start the sub gbeans in the start process, I guess that in the >> past, we need this, as sometimes it is just required the classloader work, >> not the gbean service. But now, in OSGI, once those bundles are resolved, >> they are ready for class loading request. >> Now, I am trying to make the mapping like : >> resolved -> load configuration data >> started -> configuration gbean + sub gbeans + blueprint service >> Not sure whether I miss anything, please help to point it out, so that I >> could save some time, thanks. >> >> 2010/11/22 Ivan >> >>> Hi, >>> When looking at GERONIMO-5579, I found that in the full profile, >>> there are duplicate JNDI services are published in the server runtime, and >>> those unwanted ones are from client module. In the past, we use >>> ImportType.CLASS to make the class loading ready, so those sub gbeans are >>> not started. But now, those JNDI configurations are from blueprint >>> configurations, and they are published once the bundle is started, and the >>> Configuration is also loaded after the Bundle is started. >>> I think that the blueprint service in the car plays the same role as >>> those sub gbeans, is it possible to change the lifecycle mapping relation ? >>> bundles plugins >>> installed plugin installed >>> resolved configuration gbean started >>> started configuration gbeans started + blueprint service >>> >>> or just remove dependency client module from the client-deployer, and >>> copy all the dependencies from the client module to client-deployer module, >>> Thoughts ? >>> >>> -- >>> Ivan >>> >> >> >> >> -- >> Ivan >> >> >> > > > -- > Ivan > > > -- Ivan --00248c0501e582c5eb0499b036e2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I have worked on this issue for some time, now, most codes have been done. = But I am thinking that we need to add a new configuration item to the depen= dency configuration, like
-->
<dependency>
=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 <g= roupId>org.apache.geronimo.specs</groupId>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 <artifactId>geronimo-jaxb_2.2_spec</artifactId>
=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 <start>eager</start>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 </dependency>
<---
If a= dependency is marked as eager start, we would start them once they are ins= talled.

The reason is that, resolved state for classloading is enough for most = bundle, but for our spec API and impl, it is not enough, as you might know,= we use the OSGi track to check all the service provider and keep them in a= registry service, so we need to start those bundles, or they could not wor= k correctly.
Thoughts ?
Thanks.


2010/11/24 Davi= d Jencks <da= vid_jencks@yahoo.com>

On No= v 22, 2010, at 11:46 PM, Ivan wrote:

2010/11/23 David Jencks <<= a href=3D"mailto:david_jencks@yahoo.com" target=3D"_blank">david_jencks@yah= oo.com>
Hi Ivan,

I didn= 9;t think there was a way to explicitly get a bundle into the "resolve= d" state. =A0Did I miss something? =A0It was quite a long time ago but= I think this was the reason I didn't pursue the mapping you suggest.

=A0 =A0 Seems that call the bundle.loadClass(Ob= ject.class.getName()) would force the framework to resolve the bundle, so far it works for me.

I didn't think of that :-)

=A0 =A0 Now, I am trying to use a ConfigurationExtender to load the Co= nfiguationData from the bundle while it receives the RESOVLED status, and r= emove those activator from the car package, in this way, it should more OSG= I friendly. =A0=A0
=A0

very good idea...


I wonder how seri= ous this problem is and if we should wait to see what a gbean-free geronimo= looks like?

=A0 =A0 I am not quite sure for it. Seems that = ImportType.CLASS is not widely used, I only found them in the client and cl= user modules. For the duplicate ObjectFactory service, it might work, but a= nother extra javax.naming.spi.InitialContextFactory service for OpenEJB rem= ote client is also published, not sure whether it would break anything.

In general the builder/deploy= er plugins are supposed to have these ImportType.CLASS dependencies on the = runtime plugins they build stuff for, e.g jetty8-deployer having a CLASS de= pendency on jetty8. =A0This is so when you build a web app plugin for jetty= for example using the car-maven-plugin you don't actually start up a j= etty server during your build.

=A0 =A0 I would try it for a while, if too much staff is required, I could = turn to other ways, maybe just update the pom files for a temp workaround. = But guess that we still need this change for a gbean-free geronimo ...
=A0 =A0 thanks. =A0=A0

I think if you can make this work fairly easily it will really improve t= he geronimo-osgi integration. =A0I hope it works :-)

thanks!
david jencks



=A0
=

thanks
= david jencks



On Nov 22, 2010, at 10:06 PM, Ivan wrote:

I am thinking that, do we need to seperate the Configuration with= its sub gbeans now ? Currently, we start the Configuration gbean in the lo= ad process, and start the sub gbeans in the start process, I guess that in = the past, we need this, as sometimes it is just required the classloader wo= rk, not the gbean service. But now, in OSGI, once those bundles are resolve= d, they are ready for class loading request.
Now, I am trying to make the mapping like :
resolved=A0 -> load confi= guration data
started=A0=A0 -> configuration gbean + sub gbeans + blu= eprint service
Not sure whether I miss anything, please help to point it= out, so that I could save some time, thanks.

2010/11/22 Ivan <xhhsld@gmail.com>
Hi,
=A0=A0=A0 When looking at GERONIMO-5579, I found that in the full pr= ofile, there are duplicate JNDI services are published in the server runtim= e, and those unwanted ones are from client module. In the past, we use Impo= rtType.CLASS to make the class loading ready, so those sub gbeans are not s= tarted. But now, those JNDI configurations are from blueprint configuration= s, and they are published once the bundle is started, and the Configuration= is also loaded after the Bundle is started.
=A0=A0=A0 I think that the blueprint service in the car plays the same role= as those sub gbeans, is it possible to change the lifecycle mapping relati= on ?
=A0=A0 bundles =A0=A0=A0 plugins
=A0=A0 installed =A0=A0=A0 plug= in installed
=A0=A0 resolved=A0=A0=A0 configuration gbean started
=A0=A0 started =A0 =A0=A0 configuration gbeans started + blueprint service= =A0

=A0=A0 or just remove dependency client module from the client-= deployer, and copy all the dependencies from the client module to client-de= ployer module,
=A0=A0 Thoughts ?
=A0=A0
--
Ivan



--
Ivan




--
Ivan




--
Ivan
--00248c0501e582c5eb0499b036e2--