You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by raakula <ra...@nsn.com> on 2011/08/01 05:55:36 UTC

Migration from SMX3.3.2 to SMX 4.3

Hi,
  We are using SMX 3.3.2 heavily for the last couple of years and built
quite many custom components and after struggling a bit we were able to
bring it to more or less stable state. However we learnt that SMX3.x branch
will be no more supported after SMX3.4
So we are thinking to migrate to SMX4.3 as quickly as possible. But then
have few open questions
1. We learnt and also experienced that that the custom components built for
3.3.2 doesn't deploy directly in 4.3. Same is confirmed from the post 
http://servicemix.396122.n5.nabble.com/Anyone-who-succeeded-in-writing-a-service-engine-for-ServiceMix-4-td3047399.html#a3047436
Is there a tool which can be used for migration? 
I tried to check in the forum and found couple of topics 
(http://servicemix.396122.n5.nabble.com/Migration-from-SMX3-to-SMX4-td418253.html
http://servicemix.396122.n5.nabble.com/Migrating-from-SMX3-to-SMX4-td408981.html)

Both of them doesn't provide any concrete information on the migration
procedure.
Can someone help me in knowing the migration procedure, either a tool or
some step by step instructions would do.

In addition to that few more queries are 

1. How stable is SMX4.3?
2. Is there some performance comparison done b/n SMX3.x and SMX4.x? If so
can you pls share the results with us.
3. Are there any known major issues with SMX4.3 that are going to be fixed
shortly?
4. If we still use SMX3.3.2 is it possible to get some support for next
couple of years down the line?

Answers to these queries will help us in planning our migration path.

regards,
Ramu


--
View this message in context: http://servicemix.396122.n5.nabble.com/Migration-from-SMX3-3-2-to-SMX-4-3-tp4653956p4653956.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Migration from SMX3.3.2 to SMX 4.3

Posted by raakula <ra...@nsn.com>.
Hi,
  I could able to move a step ahead. In pom.xml file I changed the
dependency version to 2011.01 for SMX components. And now I am not getting
this error.
However in Karaf console, I could not see blueprint status as Deployed.
What I am seeing is as below -->
karaf@root> osgi:list |grep -i  MyOwnBC
[ 205] [Active     ] [            ] [       ] [   60] MyOwnBC (0.0.0)
karaf@root>

When I see the BCs brought by SMX, I could see the status as 
[ 160] [Active     ] [Created     ] [       ] [   60] Apache ServiceMix ::
Components :: File Binding Component (2011.01.0)

And then the same MyOwnBC is not getting deployed in linux (RHEL4).

Please let me know the probable reason for first problem.
And also what could be the reason for deployer not trying to deploy the BC
in RHEL?


Thanks in advance.
regards,
Ramu

--
View this message in context: http://servicemix.396122.n5.nabble.com/Migration-from-SMX3-3-2-to-SMX-4-3-tp4653956p4706764.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Migration from SMX3.3.2 to SMX 4.3

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Wrap deployer is introduced from karaf 2.2, but Apache Servicemix 4.3  
is using karaf 2.1.3, so you can't use this feature in Apache  
Servicemix 4.3.

However, you can still write a customer feature where you can use wrap  
handler, something like
<bundle>wrap:mvn:your_bundle_which_is_not_osgi_friendly</bundle>

Just one note, though you can use wrap way(wrap deployer or wrap  
handler), it's not recommend to use it in production, as wrap way just  
add some default OSGi metadata header, but this may not work in some  
cases, wrap way is suitable to do a fast prototype. We suggest you  
should OSGi-fied the bundle with maven-bundle-plugin and maven-shade- 
plugin, just like we do here[1], this way you can totally control the  
OSGi metadata header and ensure everything is ok for you.

[1]https://svn.apache.org/repos/asf/servicemix/smx4/bundles/trunk/

Freeman
On 2011-8-22, at 下午12:10, raakula wrote:

> Thanks again Freeman. When I was reading Karaf user guide, I found  
> that wrap
> bundle has a feature of deploying plain non OSGI jars also. This way  
> all the
> dependent jars, if placed in deploy folder, will be deployed and
> dependencies would be resolved.
> However,  Wrap Non OSGi Jar, is not bundled as part of Apache  
> Servicemix
> 4.3, and found in Fuse SMX 4.4
> Is it possible to get this Wrap Non OSGi Jar installed in Apache  
> Servicemix?
> For that what need to be done?
>
> regards,
> Ramu
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Migration-from-SMX3-3-2-to-SMX-4-3-tp4653956p4722105.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.

---------------------------------------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com










Re: Migration from SMX3.3.2 to SMX 4.3

Posted by raakula <ra...@nsn.com>.
Thanks again Freeman. When I was reading Karaf user guide, I found that wrap
bundle has a feature of deploying plain non OSGI jars also. This way all the
dependent jars, if placed in deploy folder, will be deployed and
dependencies would be resolved.
However,  Wrap Non OSGi Jar, is not bundled as part of Apache Servicemix
4.3, and found in Fuse SMX 4.4
Is it possible to get this Wrap Non OSGi Jar installed in Apache Servicemix?
For that what need to be done?

regards,
Ramu

--
View this message in context: http://servicemix.396122.n5.nabble.com/Migration-from-SMX3-3-2-to-SMX-4-3-tp4653956p4722105.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Migration from SMX3.3.2 to SMX 4.3

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

No, you should deploy all dependent jars as OSGi bundle and use it in  
your customer JBI component bundle(by Import-Package).
Just like we do for other Servicemix shipped JBI components.
I assume you're using Apache Servicemix 4.3, so take a look at
$SMX_HOME/system/org/apache/servicemix/apache-servicemix/4.3.0/apache- 
servicemix-4.3.0-features.xml
There're some feature for JBI components, take one as example like  
servicemix-http and write yours.
Freeman
On 2011-8-19, at 下午12:25, raakula wrote:

> Thanks Freeman, it's working now. However if we need to package some
> dependent jars, should we deploy them as war files now? Or is there  
> some
> better way of deploying it?
>
> regards,
> Ramu
>
>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Migration-from-SMX3-3-2-to-SMX-4-3-tp4653956p4714442.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.

---------------------------------------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com










Re: Migration from SMX3.3.2 to SMX 4.3

Posted by raakula <ra...@nsn.com>.
Thanks Freeman, it's working now. However if we need to package some
dependent jars, should we deploy them as war files now? Or is there some
better way of deploying it?

regards,
Ramu



--
View this message in context: http://servicemix.396122.n5.nabble.com/Migration-from-SMX3-3-2-to-SMX-4-3-tp4653956p4714442.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Migration from SMX3.3.2 to SMX 4.3

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

You should copy servicemix-file1-2011.02-SNAPSHOT.jar but not the  
servicemix-file1-2011.02-SNAPSHOT-installer.zip to deploy folder.
The  servicemix-file1-2011.02-SNAPSHOT.jar is OSGi bundle but   
ervicemix-file1-2011.02-SNAPSHOT-installer.zip is JBI package component.

Freeman
On 2011-8-18, at 下午3:23, raakula wrote:

> Hello Freeman,
>  Thanks again, but then I didn't modify anything from file-bc other  
> than
> changing the bean id.
> I am attaching the code that I was using to compile the BC.
> Once the BC is compiled I copied the
> servicemix-file1-2011.02-SNAPSHOT-installer.zip to deploy folder of  
> SMX4.
> http://servicemix.396122.n5.nabble.com/file/n4711154/smx4.zip smx4.zip
>
> Please let me know if something is wrong here.
>
> regards,
> Ramu
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Migration-from-SMX3-3-2-to-SMX-4-3-tp4653956p4711154.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.

---------------------------------------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com










Re: Migration from SMX3.3.2 to SMX 4.3

Posted by raakula <ra...@nsn.com>.
Hello Freeman,
  Thanks again, but then I didn't modify anything from file-bc other than
changing the bean id.
I am attaching the code that I was using to compile the BC.
Once the BC is compiled I copied the
servicemix-file1-2011.02-SNAPSHOT-installer.zip to deploy folder of SMX4.
http://servicemix.396122.n5.nabble.com/file/n4711154/smx4.zip smx4.zip 

Please let me know if something is wrong here.

regards,
Ramu

--
View this message in context: http://servicemix.396122.n5.nabble.com/Migration-from-SMX3-3-2-to-SMX-4-3-tp4653956p4711154.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Migration from SMX3.3.2 to SMX 4.3

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

All is in the SMX JBI component pom.xml, you can take one as an  
example[1].

The OSGi header is from maven-bundle-plugin,  I think your component's  
pom.xml should follow [1]


[1]https://svn.apache.org/repos/asf/servicemix/components/trunk/bindings/servicemix-file/pom.xml

Freeman
On 2011-8-18, at 下午12:03, raakula wrote:

> Hi Freeman,
>  When I closely check the content of my own build of file bc vs  
> default
> file bc, the MANIFEST.MF file was totally different. It leads to the
> question that is there any change in the build procedure?
> Or is there some upgrade done for maven tooling to support OSGI? If  
> so from
> where to get that information?
> Thanks in advance.
>
> regards,
> Ramu
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Migration-from-SMX3-3-2-to-SMX-4-3-tp4653956p4710869.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.

---------------------------------------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com










Re: Migration from SMX3.3.2 to SMX 4.3

Posted by raakula <ra...@nsn.com>.
Hi Freeman,
  When I closely check the content of my own build of file bc vs default
file bc, the MANIFEST.MF file was totally different. It leads to the
question that is there any change in the build procedure?
Or is there some upgrade done for maven tooling to support OSGI? If so from
where to get that information?
Thanks in advance.

regards,
Ramu

--
View this message in context: http://servicemix.396122.n5.nabble.com/Migration-from-SMX3-3-2-to-SMX-4-3-tp4653956p4710869.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Migration from SMX3.3.2 to SMX 4.3

Posted by raakula <ra...@nsn.com>.
Hi Freeman,
 Thanks and I could able to resolve that issue, but then my BC it's not
deploying.
And I tried to copy the content in similar lines as that of File BC, but
failed to get it right.
Then took File BC and renamed to servicemix-file1 and tried to deploy it to
see how osgi:headers look for both the components. Surprisingly the result
was not the same for both. Is there something that I am missing?

Snap of the original servicemix-file vs renamed one is as below

-----------------------------------------------------------------------
karaf@root> osgi:headers 160

Apache ServiceMix :: Components :: File Binding Component (160)
---------------------------------------------------------------
Karaf-Info = ServiceMix Components;servicemix-file=2011.01
Archiver-Version = Plexus Archiver
Specification-Title = Apache ServiceMix :: Components :: File Binding
Component
Tool = Bnd-0.0.357
Specification-Version = 2011.01
Specification-Vendor = The Apache Software Foundation
Implementation-Version = 2011.01
Build-Jdk = 1.6.0_21
Implementation-Vendor-Id = org.apache.servicemix
Created-By = 1.6.0_21 (Sun Microsystems Inc.)
Implementation-Title = Apache ServiceMix :: Components :: File Binding
Component
Manifest-Version = 1.0
Bnd-LastModified = 1296601567845
Built-By = onofreje
Implementation-Vendor = The Apache Software Foundation

Bundle-Vendor = The Apache Software Foundation
Bundle-Name = Apache ServiceMix :: Components :: File Binding Component
Bundle-DocURL = http://www.apache.org/
Bundle-Description = Provides JBI integration to the file system. It can be
used to read and write files via URI or to periodically poll directories for
new files.
Bundle-SymbolicName = servicemix-file
Bundle-Version = 2011.01.0
Bundle-License = http://www.apache.org/licenses/LICENSE-2.0.txt
Bundle-ManifestVersion = 2

Import-Service =
       
org.apache.servicemix.common.osgi.EndpointWrapper;availability:=optional,
        org.fusesource.commons.management.ManagementStrategy
Export-Service =
       
javax.jbi.component.Component;NAME=servicemix-file;TYPE=binding-component,
       
org.apache.aries.blueprint.NamespaceHandler;osgi.service.blueprint.namespace=http://servicemix.apache.org/file/1.0

DynamicImport-Package =
        javax.*,
        org.w3c.*,
        org.xml.*
Ignore-Package =
        org.apache.servicemix.file,
       
META-INF.services.org.apache.xbean.spring.http.servicemix.apache.org.file,
        org.apache.servicemix.file.comparator
Import-Package =
        javax.jbi;version=1.0,
        javax.jbi.component;version=1.0,
        javax.jbi.management;version=1.0,
        javax.jbi.messaging;version=1.0,
        javax.jbi.servicedesc;version=1.0,
        javax.management,
        javax.xml.namespace,
        org.apache.aries.blueprint,
        org.apache.commons.logging;version=1.1,
        org.apache.servicemix.common;version=2011.1,
        org.apache.servicemix.common.endpoints;version=2011.1,
        org.apache.servicemix.common.locks;version=2011.1,
        org.apache.servicemix.common.locks.impl;version=2011.1,
        org.apache.servicemix.common.osgi;version=2011.1,
        org.apache.servicemix.common.util;version=2011.1,
        org.apache.servicemix.components.util,
        org.apache.servicemix.executors,
        org.apache.servicemix.executors.impl,
        org.apache.servicemix.util,
        org.apache.xbean.blueprint.context.impl,
        org.apache.xbean.spring.context.v2;version=3.7,
        org.fusesource.commons.management,
        org.osgi.service.blueprint;version="[1.0.0,2.0.0)",
        org.springframework.beans.factory.xml;version=3.0,
        sun.misc;resolution:=optional
Export-Package =
        org.apache.servicemix.file;
                uses:="org.apache.servicemix.common.util,
                        javax.jbi.servicedesc,
                        org.apache.servicemix.common,
                        org.apache.commons.logging,
                        org.apache.servicemix.common.locks,
                        javax.jbi,
                        org.apache.servicemix.components.util,
                        javax.xml.namespace,
                        org.apache.servicemix.common.locks.impl,
                        org.apache.servicemix.util,
                        org.apache.servicemix.executors,
                        javax.jbi.messaging,
                        org.apache.servicemix.common.endpoints,
                        javax.jbi.management";
                version=2011.01,
        org.apache.servicemix.file.comparator;version=2011.01,
       
META-INF.services.org.apache.xbean.spring.http.servicemix.apache.org.file
Require-Bundle =
        org.springframework.core,
        org.springframework.beans,
        org.springframework.context

-----------------------------------------------------------------------
-----------------------------------------------------------------------
-----------------------------------------------------------------------

Bundle 207
----------
karaf@root> osgi:headers 206

Bundle 206
----------
Manifest-Version = 1.0
Archiver-Version = Plexus Archiver
Built-By = raakula
Build-Jdk = 1.6.0_24
Created-By = Apache Maven

Bundle-SymbolicName = servicemix-file1
Bundle-Version = 0.0.0

DynamicImport-Package =
        javax.*,
        org.xml.*,
        org.w3c.*


--
View this message in context: http://servicemix.396122.n5.nabble.com/Migration-from-SMX3-3-2-to-SMX-4-3-tp4653956p4707219.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Migration from SMX3.3.2 to SMX 4.3

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

This error means package org.fusesource.commons.management isn't  
available for your JBI component bundle.
You need add OSGi metadata header Import-Package for it.

If you really wanna turn your JBI component into OSGi friendly, I  
strongly suggest you exactly follow other servicemix JBI component as  
an example.
e.g. you can use osgi:headers servicemix-file-bundle-id to see what it  
should be for servicemix-file JBI component, and tell the difference  
with yours.

Freeman
On 2011-8-16, at 下午6:21, raakula wrote:

> Hi,
> Any help in finding the root cause of this problem is highly  
> appreciated.
> Does anyone know when do I get the exception -->
>
> ERROR | rint Extender: 3 | BlueprintContainerImpl | 7 -
> org.apache.aries.blueprint - 0.2.0.incubating | Unable to start  
> blueprint
> container for bundle MyOwn-BC
> org.osgi.service.blueprint.container.ComponentDefinitionException:  
> Unable to
> load class org.fusesource.commons.management.ManagementStrategy from  
> recipe
> ReferenceRecipe[name='managementStrategy']
>
> regards,
> Ramu
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Migration-from-SMX3-3-2-to-SMX-4-3-tp4653956p4703969.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.

---------------------------------------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com










Re: Migration from SMX3.3.2 to SMX 4.3

Posted by raakula <ra...@nsn.com>.
Hi,
 Any help in finding the root cause of this problem is highly appreciated.
Does anyone know when do I get the exception -->

ERROR | rint Extender: 3 | BlueprintContainerImpl | 7 -
org.apache.aries.blueprint - 0.2.0.incubating | Unable to start blueprint
container for bundle MyOwn-BC
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to
load class org.fusesource.commons.management.ManagementStrategy from recipe
ReferenceRecipe[name='managementStrategy']

regards,
Ramu

--
View this message in context: http://servicemix.396122.n5.nabble.com/Migration-from-SMX3-3-2-to-SMX-4-3-tp4653956p4703969.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Migration from SMX3.3.2 to SMX 4.3

Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,


You should be able to migrate any existing components you have by:
- changing the packaging to bundle
- adding a Blueprint XML file to register the component in the OSGi Service
Registry (you can use e.g.
http://svn.apache.org/repos/asf/servicemix/components/trunk/bindings/servicemix-file/src/main/resources/OSGI-INF/blueprint/servicemix-file.xmlas
an example)

Most of the times however, it's a lot easier to avoid writing new components
alltogether and just use POJOs to implement custom stuff and use those from
your Camel routes.  Camel supports using those POJOs in lots of different
ways (cfr. http://camel.apache.org/bean-integration.html) so you're bound to
find a suitable solution that takes away the need for a custom component.

If you do think you need a new component, I would recommend you to write a
Camel component instead of a JBI component.  Those tend to be a lot easier
to code and maintain - also, the Camel API is a bit easier to work with than
the JBI API.


Regards,

Gert Vanthienen
------------------------
FuseSource
Web: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/


On Wed, Aug 10, 2011 at 7:38 AM, raakula <ra...@nsn.com> wrote:

> Hi Jon,
>  Thanks for the response. I will go through it.
> By the way do we have some examples on how to build custom components in
> SMX4.3 and more importantly deploy them.
>
> regards,
> Ramu
>
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/Migration-from-SMX3-3-2-to-SMX-4-3-tp4653956p4684686.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>

Re: Migration from SMX3.3.2 to SMX 4.3

Posted by raakula <ra...@nsn.com>.
Hi Jon,
 Thanks for the response. I will go through it.
By the way do we have some examples on how to build custom components in
SMX4.3 and more importantly deploy them.

regards,
Ramu

--
View this message in context: http://servicemix.396122.n5.nabble.com/Migration-from-SMX3-3-2-to-SMX-4-3-tp4653956p4684686.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Migration from SMX3.3.2 to SMX 4.3

Posted by Jon Anstey <ja...@gmail.com>.
The migration guide from Fuse ESB 3.x to 4.1 may help

http://fusesource.com/docs/esb/4.1/migration/index.html

There is no tool to migrate any ServiceMix 3 application to version
4 unfortunately.

Cheers,
Jon

On Mon, Aug 1, 2011 at 1:25 AM, raakula <ra...@nsn.com> wrote:

> Hi,
>  We are using SMX 3.3.2 heavily for the last couple of years and built
> quite many custom components and after struggling a bit we were able to
> bring it to more or less stable state. However we learnt that SMX3.x branch
> will be no more supported after SMX3.4
> So we are thinking to migrate to SMX4.3 as quickly as possible. But then
> have few open questions
> 1. We learnt and also experienced that that the custom components built for
> 3.3.2 doesn't deploy directly in 4.3. Same is confirmed from the post
>
> http://servicemix.396122.n5.nabble.com/Anyone-who-succeeded-in-writing-a-service-engine-for-ServiceMix-4-td3047399.html#a3047436
> Is there a tool which can be used for migration?
> I tried to check in the forum and found couple of topics
> (
> http://servicemix.396122.n5.nabble.com/Migration-from-SMX3-to-SMX4-td418253.html
>
> http://servicemix.396122.n5.nabble.com/Migrating-from-SMX3-to-SMX4-td408981.html
> )
>
> Both of them doesn't provide any concrete information on the migration
> procedure.
> Can someone help me in knowing the migration procedure, either a tool or
> some step by step instructions would do.
>
> In addition to that few more queries are
>
> 1. How stable is SMX4.3?
> 2. Is there some performance comparison done b/n SMX3.x and SMX4.x? If so
> can you pls share the results with us.
> 3. Are there any known major issues with SMX4.3 that are going to be fixed
> shortly?
> 4. If we still use SMX3.3.2 is it possible to get some support for next
> couple of years down the line?
>
> Answers to these queries will help us in planning our migration path.
>
> regards,
> Ramu
>
>
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/Migration-from-SMX3-3-2-to-SMX-4-3-tp4653956p4653956.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>



-- 
Cheers,
Jon
---------------
FuseSource
Email: jon@fusesource.com
Web: fusesource.com
Twitter: jon_anstey
Blog: http://janstey.blogspot.com
Author of Camel in Action: http://manning.com/ibsen