You have a few choices - you should have a look at the Karaf user manual at http://karaf.apache.org/manual/latest-2.2.x/users-guide/index.html (The version bundled with SMX 4.5.3 is 2.2.11), but you've got some choices:
You can define your modules as Karaf Features. This isn't really ideal for anything that needs regular upgrades, though, as you have to keep on adding new feature URLs for every version (AFAIK), and it generally gets a bit messy. Might be a good idea if you have a large number of bundles, only some of which change at any given time. You can delete the old version of the bundle from the deploy folder, which will remove it from SMX, and then deploy the new version. Probably the most straight-forward solution, though if there are exchanges in progress, Camel / SMX will wait up to 5 minutes before the bundle is forcibly removed, so be careful of that. Or, if you're using Maven, you can deploy the artifacts to $SMX/local-repo (the folder doesn't exist by default), and then use the command "bundle:install mvn:<groupId>/<artifactId>/<version>" to install the bundle. This is a little more involved, as it gives back a Bundle ID which you need to use to start the bundle with "bunde:start <bid>", as they don't get auto-started after installation. You the uninstall the old bundle via the SMX console before installing the new one. This is more of a manual process, but it does provide more control over what is happening, and you can be confident that once the uninstall command is done that the bundle is *gone*. It's also probably more flexible, as you can setup remote maven repositories to install from, if you don't want to copy to the file system. I'm leaning towards the third solution myself, but I'm not sure how easy / hard that will be to automate. Thanks, - Andrew On Thu, Feb 20, 2014 at 4:02 AM, nprajeshgowda <[email protected]>wrote: > Hi, > > We have developed a product using servicemix and osgi. We are coming > up with process to patch the product when it goes to production. > > We have use case where we have two different types of bundles and > need > to know what is thebest way f patching them in production environment . > > 1. Bundles which have camel routes > 2. OSGI service bundle which has code which creates camel routes and > custom logic of creating connection pool to db. > > > Say we have following in production > a. user-bnd-a-1.0.0 - has routes > b. user-camel-bnd-1.0.0 - has routes and db connection pool > > Now in this case if we use the process of placing the latest artifact > say "user-bnd-a-1.0.1" to deploy folder, we will end up having two versions > of the artifact and both bundles will have db connection pool. with this > one > of the connection pool is wasted. And we see routes created from only the > first bundle. > > Can some one please help on how to patch in production environment and > how to over come the above said issue. > > Br, > Rajesh > > > > -- > View this message in context: > http://servicemix.396122.n5.nabble.com/Deployment-of-OSGi-service-bundles-in-Fuse-ESB-SMX-in-production-tp5719178.html > Sent from the ServiceMix - User mailing list archive at Nabble.com. >
