You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by Forrest Xia <fo...@gmail.com> on 2010/01/11 02:54:38 UTC

Fwd: [jira] Updated: (ARIES-100) Another blueprint sample to contribute

Hi Zoe,

Could you please help look at this new blueprint sample contribution jira?
And see if it is ok as an Aries sample to demonstrate blueprint usage?

In this sample, a multiple-nesting inlined managers are adopted. I think it
might be helpful for newbie to learn how to use inlined managers.

If there is anything need to improve or modify, pls just let me know.
Thanks!

Forrest

---------- Forwarded message ----------
From: Forrest Xia (JIRA) <ji...@apache.org>
Date: Wed, Dec 30, 2009 at 8:47 PM
Subject: [jira] Updated: (ARIES-100) Another blueprint sample to contribute
To: aries-dev@incubator.apache.org



    [
https://issues.apache.org/jira/browse/ARIES-100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]

Forrest Xia updated ARIES-100:
------------------------------

   Attachment: blueprint-complexsample.zip

> Another blueprint sample to contribute
> --------------------------------------
>
>                 Key: ARIES-100
>                 URL: https://issues.apache.org/jira/browse/ARIES-100
>             Project: Aries
>          Issue Type: Improvement
>          Components: Blueprint
>    Affects Versions: Incubation
>            Reporter: Forrest Xia
>         Attachments: blueprint-complexsample.zip
>
>
> These days I am testing blueprint MBean, and generated a complex blueprint
sample. With this sample, user can learn how to define nesting components
with blueprint XML.
> To run this sample, besides OSGi framework, these bundles are required:
>
CoreOptions.mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.configadmin").versionAsInProject(),
>
CoreOptions.mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.eventadmin").versionAsInProject(),
>
CoreOptions.mavenBundle().groupId("org.ops4j.pax.logging").artifactId("pax-logging-api").versionAsInProject(),
>
CoreOptions.mavenBundle().groupId("org.ops4j.pax.logging").artifactId("pax-logging-service").versionAsInProject(),
>
CoreOptions.mavenBundle().groupId("org.apache.aries.blueprint").artifactId("org.apache.aries.blueprint").versionAsInProject(),
>
CoreOptions.mavenBundle().groupId("org.apache.aries").artifactId("org.apache.aries.util"),
>
CoreOptions.mavenBundle().groupId("org.apache.aries.jmx").artifactId("aries-jmx-blueprint").versionAsInProject(),

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Re: Fwd: [jira] Updated: (ARIES-100) Another blueprint sample to contribute

Posted by zoe slattery <zo...@googlemail.com>.
Hey Forrest - Thanks! I will look through it tomorrow,

Zoe
> Hi Zoe,
>
> Could you please help look at this new blueprint sample contribution jira?
> And see if it is ok as an Aries sample to demonstrate blueprint usage?
>
> In this sample, a multiple-nesting inlined managers are adopted. I think it
> might be helpful for newbie to learn how to use inlined managers.
>
> If there is anything need to improve or modify, pls just let me know.
> Thanks!
>
> Forrest
>
> ---------- Forwarded message ----------
> From: Forrest Xia (JIRA) <ji...@apache.org>
> Date: Wed, Dec 30, 2009 at 8:47 PM
> Subject: [jira] Updated: (ARIES-100) Another blueprint sample to contribute
> To: aries-dev@incubator.apache.org
>
>
>
>     [
> https://issues.apache.org/jira/browse/ARIES-100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]
>
> Forrest Xia updated ARIES-100:
> ------------------------------
>
>    Attachment: blueprint-complexsample.zip
>
>   
>> Another blueprint sample to contribute
>> --------------------------------------
>>
>>                 Key: ARIES-100
>>                 URL: https://issues.apache.org/jira/browse/ARIES-100
>>             Project: Aries
>>          Issue Type: Improvement
>>          Components: Blueprint
>>    Affects Versions: Incubation
>>            Reporter: Forrest Xia
>>         Attachments: blueprint-complexsample.zip
>>
>>
>> These days I am testing blueprint MBean, and generated a complex blueprint
>>     
> sample. With this sample, user can learn how to define nesting components
> with blueprint XML.
>   
>> To run this sample, besides OSGi framework, these bundles are required:
>>
>>     
> CoreOptions.mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.configadmin").versionAsInProject(),
>   
> CoreOptions.mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.eventadmin").versionAsInProject(),
>   
> CoreOptions.mavenBundle().groupId("org.ops4j.pax.logging").artifactId("pax-logging-api").versionAsInProject(),
>   
> CoreOptions.mavenBundle().groupId("org.ops4j.pax.logging").artifactId("pax-logging-service").versionAsInProject(),
>   
> CoreOptions.mavenBundle().groupId("org.apache.aries.blueprint").artifactId("org.apache.aries.blueprint").versionAsInProject(),
>   
> CoreOptions.mavenBundle().groupId("org.apache.aries").artifactId("org.apache.aries.util"),
>   
> CoreOptions.mavenBundle().groupId("org.apache.aries.jmx").artifactId("aries-jmx-blueprint").versionAsInProject(),
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>   


Re: Fwd: [jira] Updated: (ARIES-100) Another blueprint sample to contribute

Posted by Forrest Xia <fo...@gmail.com>.
Hi Zoe,

Thank you for commitment, I've seen it in the repo :-)

Forrest

Re: Fwd: [jira] Updated: (ARIES-100) Another blueprint sample to contribute

Posted by zoe slattery <zo...@googlemail.com>.
Hi Forrest
>
> The message is printed out by the blueprint jmx bundle for debug purpose
> only, it might be improved to write into log file, not the console. However,
> it won't stop the sample demo. On the console, just hit enter key, you will
> get framework console prompt. In the prompt, user can start those bundle
> manually, then the sample info will be printed out on the console.
>
> By default, I set it not starting the sample when boot. To change this
> behavior, user can modify config.properties like this:
> felix.auto.start.10=\
> "file:bundles/org.apache.aries.samples.blueprint.idverifier.server-1.0.0-incubating-SNAPSHOT.jar"
> \
> "file:bundles/org.apache.aries.samples.blueprint.idverifier.client-1.0.0-incubating-SNAPSHOT.jar"
> \
> "file:bundles/org.apache.aries.samples.blueprint.idverifier.api-1.0.0-incubating-SNAPSHOT.jar"
>   
Ah :-/ Sorry, I should have tried that. It's all committed now and I 
have modified the samples pom so that it will be built along with the 
other samples.

Thanks, Zoe

Re: Fwd: [jira] Updated: (ARIES-100) Another blueprint sample to contribute

Posted by Forrest Xia <fo...@gmail.com>.
On Thu, Jan 14, 2010 at 6:41 PM, zoe slattery
<zo...@googlemail.com>wrote:

> Hi Forrest - Good progress :-) but I have looked and still have a small
> issue. The assembly pom.xml refers to an artifact 'aries-jmx-blueprint',
> this isn't found and the Aries build produces an artifact called
> 'org.apache.aries.jmx.blueprint'.
>
Yep, aries-jmx-blueprint has been renamed to org.apache.aries.jmx.blueprint.


>
> I tried changing the pom.xml and the config.properties file in the assembly
> module so that they refer to 'org.apache.aries.jmx.blueprint'. This gets me
> to something that installs successfully. However, the run (executing run.sh)
> hangs with the message: 'Awaiting MBeanServer service registration'
>

The message is printed out by the blueprint jmx bundle for debug purpose
only, it might be improved to write into log file, not the console. However,
it won't stop the sample demo. On the console, just hit enter key, you will
get framework console prompt. In the prompt, user can start those bundle
manually, then the sample info will be printed out on the console.

By default, I set it not starting the sample when boot. To change this
behavior, user can modify config.properties like this:
felix.auto.start.10=\
"file:bundles/org.apache.aries.samples.blueprint.idverifier.server-1.0.0-incubating-SNAPSHOT.jar"
\
"file:bundles/org.apache.aries.samples.blueprint.idverifier.client-1.0.0-incubating-SNAPSHOT.jar"
\
"file:bundles/org.apache.aries.samples.blueprint.idverifier.api-1.0.0-incubating-SNAPSHOT.jar"


> At this point I think I need to hand it back to you and ask you to look at
> the JMX part - I'm not familiar enough with it to know what needs to be
> done.
>
> Zoe
>
>  Hi Zoe,
>>
>> I've updated the sample based on your comments, could you please help have
>> a
>> look and commit if no problem?
>>
>> Thanks!
>>
>> Forrest
>>
>>
>>
>
>

Re: Fwd: [jira] Updated: (ARIES-100) Another blueprint sample to contribute

Posted by zoe slattery <zo...@googlemail.com>.
Hi Forrest - Good progress :-) but I have looked and still have a small 
issue. The assembly pom.xml refers to an artifact 'aries-jmx-blueprint', 
this isn't found and the Aries build produces an artifact called 
'org.apache.aries.jmx.blueprint'.

I tried changing the pom.xml and the config.properties file in the 
assembly module so that they refer to 'org.apache.aries.jmx.blueprint'. 
This gets me to something that installs successfully. However, the run 
(executing run.sh) hangs with the message: 'Awaiting MBeanServer service 
registration'

At this point I think I need to hand it back to you and ask you to look 
at the JMX part - I'm not familiar enough with it to know what needs to 
be done.

Zoe
> Hi Zoe,
>
> I've updated the sample based on your comments, could you please help have a
> look and commit if no problem?
>
> Thanks!
>
> Forrest
>
>   


Re: Fwd: [jira] Updated: (ARIES-100) Another blueprint sample to contribute

Posted by Forrest Xia <fo...@gmail.com>.
Hi Zoe,

I've updated the sample based on your comments, could you please help have a
look and commit if no problem?

Thanks!

Forrest

Re: Fwd: [jira] Updated: (ARIES-100) Another blueprint sample to contribute

Posted by Forrest Xia <fo...@gmail.com>.
Hi Zoe,

I will made an update according to your comments and post to the JIRA,
thanks for review and comments :-)

Forrest

Re: Fwd: [jira] Updated: (ARIES-100) Another blueprint sample to contribute

Posted by zoe slattery <zo...@googlemail.com>.
Hey Forrest

I took a look at the sample and have some suggestions for you :-).

First (and I do know this is trivial) it doesn't compile, I'm sure this 
is just a typo but it would be good to fix it. The problem is duplicate 
package statements in PersonIdVerifierSimpleImpl.java.

The second issue is that you have the interface mixed in with the 
implementation - this is not best (OSGi ) practice. The interface should 
be in a separate bundle, have a look at the blog-sample and helloworld 
sample to see how this is done . This may seem a small point but I think 
any samples we have should demonstrate not only how to do things but the 
best way to do them.

Thirdly, I think the sample should be 
org.apache.aries.samples.blueprint.whatever-you-want, where 
'whatever-you-want' is maybe 'inlined-managers'?

Finally - rather than asking the user to collect up all the platform 
bundles that you need to run the code, how about doing it automatically 
using Maven as we have with the hello-world and blog samples?

How do you feel about making these changes? I'd be happy to put it into 
SVN if you made them.

Zoe


> Hi Zoe,
>
> Could you please help look at this new blueprint sample contribution jira?
> And see if it is ok as an Aries sample to demonstrate blueprint usage?
>
> In this sample, a multiple-nesting inlined managers are adopted. I think it
> might be helpful for newbie to learn how to use inlined managers.
>
> If there is anything need to improve or modify, pls just let me know.
> Thanks!
>
> Forrest
>
> ---------- Forwarded message ----------
> From: Forrest Xia (JIRA) <ji...@apache.org>
> Date: Wed, Dec 30, 2009 at 8:47 PM
> Subject: [jira] Updated: (ARIES-100) Another blueprint sample to contribute
> To: aries-dev@incubator.apache.org
>
>
>
>     [
> https://issues.apache.org/jira/browse/ARIES-100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]
>
> Forrest Xia updated ARIES-100:
> ------------------------------
>
>    Attachment: blueprint-complexsample.zip
>
>   
>> Another blueprint sample to contribute
>> --------------------------------------
>>
>>                 Key: ARIES-100
>>                 URL: https://issues.apache.org/jira/browse/ARIES-100
>>             Project: Aries
>>          Issue Type: Improvement
>>          Components: Blueprint
>>    Affects Versions: Incubation
>>            Reporter: Forrest Xia
>>         Attachments: blueprint-complexsample.zip
>>
>>
>> These days I am testing blueprint MBean, and generated a complex blueprint
>>     
> sample. With this sample, user can learn how to define nesting components
> with blueprint XML.
>   
>> To run this sample, besides OSGi framework, these bundles are required:
>>
>>     
> CoreOptions.mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.configadmin").versionAsInProject(),
>   
> CoreOptions.mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.eventadmin").versionAsInProject(),
>   
> CoreOptions.mavenBundle().groupId("org.ops4j.pax.logging").artifactId("pax-logging-api").versionAsInProject(),
>   
> CoreOptions.mavenBundle().groupId("org.ops4j.pax.logging").artifactId("pax-logging-service").versionAsInProject(),
>   
> CoreOptions.mavenBundle().groupId("org.apache.aries.blueprint").artifactId("org.apache.aries.blueprint").versionAsInProject(),
>   
> CoreOptions.mavenBundle().groupId("org.apache.aries").artifactId("org.apache.aries.util"),
>   
> CoreOptions.mavenBundle().groupId("org.apache.aries.jmx").artifactId("aries-jmx-blueprint").versionAsInProject(),
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>