You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by Jeff Yu <je...@gmail.com> on 2007/12/17 08:39:43 UTC

Re: [jira] Commented: (SM-1091) Deployment bundle for JBI artifacts

Hi Guilluame,
Thanks for your detailed explanation.
I am writing the Delpoyer.java class to install the SA, I have couple
questions with regard to Servicemix 3.x code.

1. Do we need to  register the ServiceUnit into the OSGi Registry when we
deploy the SA?, I'd bet we do, since we need to determine whether it is a
duplicated Service Unit or not.
2. When we expand either the component or the SA in the servicemix 3.x, it
always expand the component or SAs in a version_number folder, what is the
purpose for this, does it mean that we might having sample SA name but with
different version???
3. In the servicemix 4.0, we are going to expand the SA with bundleID
instead of SAName as servicemix3.x did, will it resolve the same SA name but
with different implementation version which I mentioned above?


On Dec 1, 2007 12:48 AM, Guillaume Nodet <gn...@gmail.com> wrote:

> Sure :-)
> The goal is to be JBI compliant.  But the short term and first step is to
> be
> able to deploy the JBI components and sample applications from ServiceMix
> 3.x.  To do that, I have recently added to the builds in smx3 the
> servicemix-shared-compat shared library which contains everything needed
> for
> servicemix jbi components (servicemix-shared only contains jars that are
> not
> included in the container classpath by default).
> Using the offline tool that you've just patched, we should be able to
> convert the JBI artifacts (components, shared libraries and service
> assemblies).  These transformed components should be able to be deployed
> by
> copying them in the deploy directory of smx4.
> These task involves three different modules:
>  * the offline tool
>  * the deployment bundle
>  * the jbi runtime
> You've already worked on the first one.  The deployment tool need to be
> enhanced to deploy service assemblies (this has not been written yet).
>  Take
> a look at
>
> http://svn.apache.org/repos/asf/servicemix/branches/servicemix-4.0/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java
> Once the SAs are deployed onto smx4, we need to ensure that they work
> correctly: the jbi api must be correctly implemented (we can discard the
> management apis for the time being), which means exchanges are sent to the
> correct target endpoint, the exchange status are correctly updated, etc...
> The basics should work, as I've already written an integration test that
> deploys servicemix-shared-compat, servicemix-eip and send an exchange to
> it.
>
> To sum up, the first thing is to write the SA deployment code and make
> some
> real tests using the servicemix 3.x examples (they should run, not only
> deploy).
> Also, I'd like to make sure Ode can be deployed, but this is related to
> SM-1070 which is assigned to Santosh (not sure if he is still willing to
> help on that).
>
> The deployment of SAs involves several things, as described in the JBI
> specification (you should read the section about deployment, which is at
> the
> end of the spec iirc).  The steps are:
>  * check everything is ok (components exists and they are started)
>  * extract the SA to an internal folder ([smx-home]/jbi/sas for example)
> and extract each service unit inside the sa
>  * retrieve jbi component (retrieved from the osgi registry), retrieve
> their ServiceUnitManager, call the deploy method
>  * register a ServiceAssembly object in the osgi registry with lifecycles
> methods (init, start, stop, shutdown) implemented by calling the
> corresponding methods on the ServiceUnitManager
> Feel free to take a look and copy some code from smx3 or ask any
> questions...
>
> On Nov 30, 2007 4:42 PM, Jeff Yu (JIRA) <ji...@apache.org> wrote:
>
> >
> >    [
> >
> https://issues.apache.org/activemq/browse/SM-1091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40763
> ]
> >
> > Jeff Yu commented on SM-1091:
> > -----------------------------
> >
> > Can someone help me elaborate this task, I'm interested in the JBI
> > compatibility layer on SMX 4.0.
> >
> >
> > > Deployment bundle for JBI artifacts
> > > -----------------------------------
> > >
> > >                 Key: SM-1091
> > >                 URL: https://issues.apache.org/activemq/browse/SM-1091
> > >             Project: ServiceMix
> > >          Issue Type: New Feature
> > >            Reporter: Guillaume Nodet
> > >            Assignee: Jeff Yu
> > >             Fix For: 4.0
> > >
> > >
> >
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > You can reply to this email to add a comment to the issue online.
> >
> >
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
>



-- 
Thanks
Jeff

Re: [jira] Commented: (SM-1091) Deployment bundle for JBI artifacts

Posted by Guillaume Nodet <gn...@gmail.com>.
On Dec 17, 2007 8:39 AM, Jeff Yu <je...@gmail.com> wrote:

> Hi Guilluame,
> Thanks for your detailed explanation.
> I am writing the Delpoyer.java class to install the SA, I have couple
> questions with regard to Servicemix 3.x code.
>
> 1. Do we need to  register the ServiceUnit into the OSGi Registry when we
> deploy the SA?, I'd bet we do, since we need to determine whether it is a
> duplicated Service Unit or not.


Yeah, I'd do that.  In particular, we will also expose this object through
JMS later.

>
> 2. When we expand either the component or the SA in the servicemix 3.x, it
> always expand the component or SAs in a version_number folder, what is the
> purpose for this, does it mean that we might having sample SA name but
> with
> different version???


The reason for versionning is to work around the fact that there may be
problems while deleting the folder in case some files are still locked.  If
we use the bundle id instead, it should do the trick (well, I suppose we can
change that later if we find problems).


>
> 3. In the servicemix 4.0, we are going to expand the SA with bundleID
> instead of SAName as servicemix3.x did, will it resolve the same SA name
> but
> with different implementation version which I mentioned above?
>

Good question.  I'm not sure what's the best way yet.  Versionning can be
done per SA, SU or per endpoint.
I'm thinking a per endpoint versionning may be better.  Anyway, from a JBI
perspective, I think we need to reject any attempt to install a SA if there
is already one with the same name (though I can't recall exactly), so
anything we will do will be outside the JBI scope per se.  I'd rather have
something working asap and build on top of it.


>
>
> On Dec 1, 2007 12:48 AM, Guillaume Nodet <gn...@gmail.com> wrote:
>
> > Sure :-)
> > The goal is to be JBI compliant.  But the short term and first step is
> to
> > be
> > able to deploy the JBI components and sample applications from
> ServiceMix
> > 3.x.  To do that, I have recently added to the builds in smx3 the
> > servicemix-shared-compat shared library which contains everything needed
> > for
> > servicemix jbi components (servicemix-shared only contains jars that are
> > not
> > included in the container classpath by default).
> > Using the offline tool that you've just patched, we should be able to
> > convert the JBI artifacts (components, shared libraries and service
> > assemblies).  These transformed components should be able to be deployed
> > by
> > copying them in the deploy directory of smx4.
> > These task involves three different modules:
> >  * the offline tool
> >  * the deployment bundle
> >  * the jbi runtime
> > You've already worked on the first one.  The deployment tool need to be
> > enhanced to deploy service assemblies (this has not been written yet).
> >  Take
> > a look at
> >
> >
> http://svn.apache.org/repos/asf/servicemix/branches/servicemix-4.0/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java
> > Once the SAs are deployed onto smx4, we need to ensure that they work
> > correctly: the jbi api must be correctly implemented (we can discard the
> > management apis for the time being), which means exchanges are sent to
> the
> > correct target endpoint, the exchange status are correctly updated,
> etc...
> > The basics should work, as I've already written an integration test that
> > deploys servicemix-shared-compat, servicemix-eip and send an exchange to
> > it.
> >
> > To sum up, the first thing is to write the SA deployment code and make
> > some
> > real tests using the servicemix 3.x examples (they should run, not only
> > deploy).
> > Also, I'd like to make sure Ode can be deployed, but this is related to
> > SM-1070 which is assigned to Santosh (not sure if he is still willing to
> > help on that).
> >
> > The deployment of SAs involves several things, as described in the JBI
> > specification (you should read the section about deployment, which is at
> > the
> > end of the spec iirc).  The steps are:
> >  * check everything is ok (components exists and they are started)
> >  * extract the SA to an internal folder ([smx-home]/jbi/sas for example)
> > and extract each service unit inside the sa
> >  * retrieve jbi component (retrieved from the osgi registry), retrieve
> > their ServiceUnitManager, call the deploy method
> >  * register a ServiceAssembly object in the osgi registry with
> lifecycles
> > methods (init, start, stop, shutdown) implemented by calling the
> > corresponding methods on the ServiceUnitManager
> > Feel free to take a look and copy some code from smx3 or ask any
> > questions...
> >
> > On Nov 30, 2007 4:42 PM, Jeff Yu (JIRA) <ji...@apache.org> wrote:
> >
> > >
> > >    [
> > >
> >
> https://issues.apache.org/activemq/browse/SM-1091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40763
> > ]
> > >
> > > Jeff Yu commented on SM-1091:
> > > -----------------------------
> > >
> > > Can someone help me elaborate this task, I'm interested in the JBI
> > > compatibility layer on SMX 4.0.
> > >
> > >
> > > > Deployment bundle for JBI artifacts
> > > > -----------------------------------
> > > >
> > > >                 Key: SM-1091
> > > >                 URL:
> https://issues.apache.org/activemq/browse/SM-1091
> > > >             Project: ServiceMix
> > > >          Issue Type: New Feature
> > > >            Reporter: Guillaume Nodet
> > > >            Assignee: Jeff Yu
> > > >             Fix For: 4.0
> > > >
> > > >
> > >
> > >
> > > --
> > > This message is automatically generated by JIRA.
> > > -
> > > You can reply to this email to add a comment to the issue online.
> > >
> > >
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Blog: http://gnodet.blogspot.com/
> >
>
>
>
> --
> Thanks
> Jeff
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: [jira] Commented: (SM-1091) Deployment bundle for JBI artifacts

Posted by Guillaume Nodet <gn...@gmail.com>.
On Dec 17, 2007 8:44 AM, Jeff Yu <je...@gmail.com> wrote:

> Oh, one more question. ;-)...
>
> When we expand the component, we will have a folder name called
> "workspace",
> what kind of content is supposed to be stored in this folder, what is it
> for?


This is a private folder for the component.  It may store any data that need
to be persisted.
The JBI impl has nothing to do besided creating this directory.


>
> Thanks
> Jeff
>
> On Dec 17, 2007 3:39 PM, Jeff Yu <je...@gmail.com> wrote:
>
> > Hi Guilluame,
> > Thanks for your detailed explanation.
> > I am writing the Delpoyer.java class to install the SA, I have couple
> > questions with regard to Servicemix 3.x code.
> >
> > 1. Do we need to  register the ServiceUnit into the OSGi Registry when
> we
> > deploy the SA?, I'd bet we do, since we need to determine whether it is
> a
> > duplicated Service Unit or not.
> > 2. When we expand either the component or the SA in the servicemix 3.x,
> it
> > always expand the component or SAs in a version_number folder, what is
> the
> > purpose for this, does it mean that we might having sample SA name but
> with
> > different version???
> > 3. In the servicemix 4.0, we are going to expand the SA with bundleID
> > instead of SAName as servicemix3.x did, will it resolve the same SA name
> > but with different implementation version which I mentioned above?
> >
> >
> >
> > On Dec 1, 2007 12:48 AM, Guillaume Nodet <gn...@gmail.com> wrote:
> >
> > > Sure :-)
> > > The goal is to be JBI compliant.  But the short term and first step is
> > > to be
> > > able to deploy the JBI components and sample applications from
> > > ServiceMix
> > > 3.x.  To do that, I have recently added to the builds in smx3 the
> > > servicemix-shared-compat shared library which contains everything
> needed
> > > for
> > > servicemix jbi components (servicemix-shared only contains jars that
> are
> > > not
> > > included in the container classpath by default).
> > > Using the offline tool that you've just patched, we should be able to
> > > convert the JBI artifacts (components, shared libraries and service
> > > assemblies).  These transformed components should be able to be
> deployed
> > > by
> > > copying them in the deploy directory of smx4.
> > > These task involves three different modules:
> > >  * the offline tool
> > >  * the deployment bundle
> > >  * the jbi runtime
> > > You've already worked on the first one.  The deployment tool need to
> be
> > > enhanced to deploy service assemblies (this has not been written yet).
> > >  Take
> > > a look at
> > >
> http://svn.apache.org/repos/asf/servicemix/branches/servicemix-4.0/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java
> > >
> > > Once the SAs are deployed onto smx4, we need to ensure that they work
> > > correctly: the jbi api must be correctly implemented (we can discard
> the
> > > management apis for the time being), which means exchanges are sent to
> > > the
> > > correct target endpoint, the exchange status are correctly updated,
> > > etc...
> > > The basics should work, as I've already written an integration test
> that
> > > deploys servicemix-shared-compat, servicemix-eip and send an exchange
> to
> > > it.
> > >
> > > To sum up, the first thing is to write the SA deployment code and make
> > > some
> > > real tests using the servicemix 3.x examples (they should run, not
> only
> > > deploy).
> > > Also, I'd like to make sure Ode can be deployed, but this is related
> to
> > > SM-1070 which is assigned to Santosh (not sure if he is still willing
> to
> > > help on that).
> > >
> > > The deployment of SAs involves several things, as described in the JBI
> > > specification (you should read the section about deployment, which is
> at
> > > the
> > > end of the spec iirc).  The steps are:
> > >  * check everything is ok (components exists and they are started)
> > >  * extract the SA to an internal folder ([smx-home]/jbi/sas for
> example)
> > > and extract each service unit inside the sa
> > >  * retrieve jbi component (retrieved from the osgi registry), retrieve
> > > their ServiceUnitManager, call the deploy method
> > >  * register a ServiceAssembly object in the osgi registry with
> > > lifecycles
> > > methods (init, start, stop, shutdown) implemented by calling the
> > > corresponding methods on the ServiceUnitManager
> > > Feel free to take a look and copy some code from smx3 or ask any
> > > questions...
> > >
> > > On Nov 30, 2007 4:42 PM, Jeff Yu (JIRA) <jira@apache.org > wrote:
> > >
> > > >
> > > >    [
> > > >
> > >
> https://issues.apache.org/activemq/browse/SM-1091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40763
> > > ]
> > > >
> > > > Jeff Yu commented on SM-1091:
> > > > -----------------------------
> > > >
> > > > Can someone help me elaborate this task, I'm interested in the JBI
> > > > compatibility layer on SMX 4.0.
> > > >
> > > >
> > > > > Deployment bundle for JBI artifacts
> > > > > -----------------------------------
> > > > >
> > > > >                 Key: SM-1091
> > > > >                 URL:
> > > https://issues.apache.org/activemq/browse/SM-1091
> > > > >             Project: ServiceMix
> > > > >          Issue Type: New Feature
> > > > >            Reporter: Guillaume Nodet
> > > > >            Assignee: Jeff Yu
> > > > >             Fix For: 4.0
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > This message is automatically generated by JIRA.
> > > > -
> > > > You can reply to this email to add a comment to the issue online.
> > > >
> > > >
> > >
> > >
> > > --
> > > Cheers,
> > > Guillaume Nodet
> > > ------------------------
> > > Blog: http://gnodet.blogspot.com/
> > >
> >
> >
> >
> > --
> > Thanks
> > Jeff
>
>
>
>
> --
> Thanks
> Jeff
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: [jira] Commented: (SM-1091) Deployment bundle for JBI artifacts

Posted by Jeff Yu <je...@gmail.com>.
Oh, one more question. ;-)...

When we expand the component, we will have a folder name called "workspace",
what kind of content is supposed to be stored in this folder, what is it
for?

Thanks
Jeff

On Dec 17, 2007 3:39 PM, Jeff Yu <je...@gmail.com> wrote:

> Hi Guilluame,
> Thanks for your detailed explanation.
> I am writing the Delpoyer.java class to install the SA, I have couple
> questions with regard to Servicemix 3.x code.
>
> 1. Do we need to  register the ServiceUnit into the OSGi Registry when we
> deploy the SA?, I'd bet we do, since we need to determine whether it is a
> duplicated Service Unit or not.
> 2. When we expand either the component or the SA in the servicemix 3.x, it
> always expand the component or SAs in a version_number folder, what is the
> purpose for this, does it mean that we might having sample SA name but with
> different version???
> 3. In the servicemix 4.0, we are going to expand the SA with bundleID
> instead of SAName as servicemix3.x did, will it resolve the same SA name
> but with different implementation version which I mentioned above?
>
>
>
> On Dec 1, 2007 12:48 AM, Guillaume Nodet <gn...@gmail.com> wrote:
>
> > Sure :-)
> > The goal is to be JBI compliant.  But the short term and first step is
> > to be
> > able to deploy the JBI components and sample applications from
> > ServiceMix
> > 3.x.  To do that, I have recently added to the builds in smx3 the
> > servicemix-shared-compat shared library which contains everything needed
> > for
> > servicemix jbi components (servicemix-shared only contains jars that are
> > not
> > included in the container classpath by default).
> > Using the offline tool that you've just patched, we should be able to
> > convert the JBI artifacts (components, shared libraries and service
> > assemblies).  These transformed components should be able to be deployed
> > by
> > copying them in the deploy directory of smx4.
> > These task involves three different modules:
> >  * the offline tool
> >  * the deployment bundle
> >  * the jbi runtime
> > You've already worked on the first one.  The deployment tool need to be
> > enhanced to deploy service assemblies (this has not been written yet).
> >  Take
> > a look at
> > http://svn.apache.org/repos/asf/servicemix/branches/servicemix-4.0/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java
> >
> > Once the SAs are deployed onto smx4, we need to ensure that they work
> > correctly: the jbi api must be correctly implemented (we can discard the
> > management apis for the time being), which means exchanges are sent to
> > the
> > correct target endpoint, the exchange status are correctly updated,
> > etc...
> > The basics should work, as I've already written an integration test that
> > deploys servicemix-shared-compat, servicemix-eip and send an exchange to
> > it.
> >
> > To sum up, the first thing is to write the SA deployment code and make
> > some
> > real tests using the servicemix 3.x examples (they should run, not only
> > deploy).
> > Also, I'd like to make sure Ode can be deployed, but this is related to
> > SM-1070 which is assigned to Santosh (not sure if he is still willing to
> > help on that).
> >
> > The deployment of SAs involves several things, as described in the JBI
> > specification (you should read the section about deployment, which is at
> > the
> > end of the spec iirc).  The steps are:
> >  * check everything is ok (components exists and they are started)
> >  * extract the SA to an internal folder ([smx-home]/jbi/sas for example)
> > and extract each service unit inside the sa
> >  * retrieve jbi component (retrieved from the osgi registry), retrieve
> > their ServiceUnitManager, call the deploy method
> >  * register a ServiceAssembly object in the osgi registry with
> > lifecycles
> > methods (init, start, stop, shutdown) implemented by calling the
> > corresponding methods on the ServiceUnitManager
> > Feel free to take a look and copy some code from smx3 or ask any
> > questions...
> >
> > On Nov 30, 2007 4:42 PM, Jeff Yu (JIRA) <jira@apache.org > wrote:
> >
> > >
> > >    [
> > >
> > https://issues.apache.org/activemq/browse/SM-1091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40763
> > ]
> > >
> > > Jeff Yu commented on SM-1091:
> > > -----------------------------
> > >
> > > Can someone help me elaborate this task, I'm interested in the JBI
> > > compatibility layer on SMX 4.0.
> > >
> > >
> > > > Deployment bundle for JBI artifacts
> > > > -----------------------------------
> > > >
> > > >                 Key: SM-1091
> > > >                 URL:
> > https://issues.apache.org/activemq/browse/SM-1091
> > > >             Project: ServiceMix
> > > >          Issue Type: New Feature
> > > >            Reporter: Guillaume Nodet
> > > >            Assignee: Jeff Yu
> > > >             Fix For: 4.0
> > > >
> > > >
> > >
> > >
> > > --
> > > This message is automatically generated by JIRA.
> > > -
> > > You can reply to this email to add a comment to the issue online.
> > >
> > >
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Blog: http://gnodet.blogspot.com/
> >
>
>
>
> --
> Thanks
> Jeff




-- 
Thanks
Jeff