You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

ServiceMix Runtime

At the core of ServiceMix 4.x is the small and lightweight OSGi based runtime. This provides a small lightweight container onto which various bundles can be deployed.

The directory layout of the ServiceMix Runtime is as follows

servicemix/
 bin/   
  servicemix       # shell scripts to boot up SMX 
  servicemix.bat 
  wrapper/         # Java Service Wrapper binaries
 
 system/           # the system defined OSGi bundles (i.e. the stuff shipped in the distro) which generally shouldn't be edited by users

 deploy/           # where bundles should be put to be hot-deployed - in jar or expanded format (the latter is good to let folks edit spring.xml files etc)
     

 conf/             # some config files for describing which OSGi container to use; also a text file to be able to describe the maven repos & mvn bundles to deploy

 data/             # directory used to store transient data (logs, activemq journal, transaction log, embedded DB, generated bundles)
  logs/
  generated-bundles/
  activemq/

Hot Deployment

To hot-deploy any OSGi bundles, just drop them into the deploy/ directory. Currently the hot deployment supports

  • OSGi bundles (*.jar)
  • OSGi configuration files (*.cfg)
  • expanded OSGi bundles (so that the contents can be edited directly forcing a reload).

Expanded OSGi bundles

The idea behind expanded OSGi bundles is that you can create an OSGi bundle using directories (rather than a jar) so that you can edit the Spring XML files or other configuration files or Java code in development mode. Then when you change the code, the ServiceMix Runtime will auto-detect this change, stop the previous bundle and redeploy your bundle.

This is great for working with Spring XML files or Camel Routes in a RAD way; so you can edit things in your IDE and the ServiceMix Runtime will automatically redeploy them.

  • No labels