Running servicemix in a linux environment

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Running servicemix in a linux environment

Håkon Sagehaug
Hi

We want to run smx as a service on our system(linux) and wanted to know what
the best way of running smx as a service, is it as a daemon like a web
server or another way.

cheers, Håkon


--
Håkon Sagehaug, Software Developer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)
Reply | Threaded
Open this post in threaded view
|

Re: Running servicemix in a linux environment

Guillaume Nodet
Administrator
We usually recommend the standalone mode, which you can combine with a
daemon library like Apache Commons Daemon
(http://commons.apache.org/daemon/) or Java Service Wrapper
(http://wrapper.tanukisoftware.org).  Note that the latest releases
(>= 3.3.0) of Java Service Wrapper are now GPL.
You can also deploy the provided web application to any web server if
you prefer.

On Thu, Sep 18, 2008 at 3:30 PM, Håkon Sagehaug
<[hidden email]> wrote:

> Hi
>
> We want to run smx as a service on our system(linux) and wanted to know what
> the best way of running smx as a service, is it as a daemon like a web
> server or another way.
>
> cheers, Håkon
>
>
> --
> Håkon Sagehaug, Software Developer
> Parallab, Bergen Center for Computational Science (BCCS)
> UNIFOB AS (University of Bergen Research Company)
>



--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
Reply | Threaded
Open this post in threaded view
|

Re: Running servicemix in a linux environment

Jean-Baptiste Onofré
Another solution is to create a script in /etc/init.d which looks like this :

#!/bin/sh
#
# SMX Init Script
#
SMX_HOME=/opt/apache-servicemix-3.2.2

case "$1" in
start)
   $SMX_HOME/bin/servicemix start > /dev/null 2> &1 &
   echo $! > $SMX_HOME/servicemix.pid
   echo "ServiceMix Started"
;;
stop)
   read pid < $SMX_HOME/servicemix.pid
   kill -9 $pid
   rm $SMX_HOME/servicemix.pid
   echo "ServiceMix Stopped"
;;
restart)
   $0 stop
   $0 start
;;
*)
   echo "Usage: $0 (stop|start|restart)"
   exit 1
;;
esac

exit0

You need to link this init script in the corresponding runlevel.

I manage my Java middleware like this (JBoss, Tomcat, ServiceMix, Weblogic, Websphere, etc).

Regards
   

Le Thu, Sep 18, 2008 at 03:38:32PM +0200, Guillaume Nodet a écrit :

> We usually recommend the standalone mode, which you can combine with a
> daemon library like Apache Commons Daemon
> (http://commons.apache.org/daemon/) or Java Service Wrapper
> (http://wrapper.tanukisoftware.org).  Note that the latest releases
> (>= 3.3.0) of Java Service Wrapper are now GPL.
> You can also deploy the provided web application to any web server if
> you prefer.
>
> On Thu, Sep 18, 2008 at 3:30 PM, Håkon Sagehaug
> <[hidden email]> wrote:
> > Hi
> >
> > We want to run smx as a service on our system(linux) and wanted to know what
> > the best way of running smx as a service, is it as a daemon like a web
> > server or another way.
> >
> > cheers, Håkon
> >
> >
> > --
> > Håkon Sagehaug, Software Developer
> > Parallab, Bergen Center for Computational Science (BCCS)
> > UNIFOB AS (University of Bergen Research Company)
> >
>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/

--
Jean-Baptiste Onofré (Nanthrax)
BuildProcess/AutoDeploy Project Leader
http://buildprocess.sourceforge.net
[hidden email]
PGP : 17D4F086
Reply | Threaded
Open this post in threaded view
|

Re: Running servicemix in a linux environment

Håkon Sagehaug
In reply to this post by Guillaume Nodet
Hi

I've configured Java Service Wrapper for servicemix, but when I start it
none of my services seems to start. I get that servicemix has started, but
none of my su is available.

Here is  the configured part of the wrapper conf,

# Java Application
wrapper.java.command=java

# Java Main class.  This class must implement the WrapperListener interface
#  or guarantee that the WrapperManager class is initialized.  Helper
#  classes are provided to do this for you.  See the Integration section
#  of the documentation for details.
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp

# Java Classpath (include wrapper.jar)  Add class path elements as
#  needed starting from 1
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.classpath.2=../lib/classworlds-1.0.1.jar
wrapper.java.classpath.3=../conf

# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=../lib/


# Java Additional Parameters
wrapper.java.additional.1=-Dderby.system.home=/Home/bccs/hakont/apache-servicemix-3.2.2/data/derby
wrapper.java.additional.2=-Dderby.storage.fileSyncTransactionLog=true
wrapper.java.additional.3=-Dcom.sun.management.jmxremote
wrapper.java.additional.4=-Dclassworlds.conf=../conf/servicemix.conf
wrapper.java.additional.5=-Dservicemix.home=/Home/bccs/hakont/apache-servicemix-3.2.2

wrapper.java.additional.6=-Djava.endorsed.dirs=../lib/endorsed
wrapper.java.additional.7=-server

# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=128

# Maximum Java Heap Size (in MB)
#wrapper.java.maxmemory=512

# Application parameters.  Add parameters as needed starting from 1
wrapper.app.parameter.1=org.codehaus.classworlds.Launcher


Any hints what is wrong and how I can start hole of servicemix

cheers, Håkon

2008/9/18 Guillaume Nodet <[hidden email]>

> We usually recommend the standalone mode, which you can combine with a
> daemon library like Apache Commons Daemon
> (http://commons.apache.org/daemon/) or Java Service Wrapper
> (http://wrapper.tanukisoftware.org).  Note that the latest releases
> (>= 3.3.0) of Java Service Wrapper are now GPL.
> You can also deploy the provided web application to any web server if
> you prefer.
>
> On Thu, Sep 18, 2008 at 3:30 PM, Håkon Sagehaug
> <[hidden email]> wrote:
> > Hi
> >
> > We want to run smx as a service on our system(linux) and wanted to know
> what
> > the best way of running smx as a service, is it as a daemon like a web
> > server or another way.
> >
> > cheers, Håkon
> >
> >
> > --
> > Håkon Sagehaug, Software Developer
> > Parallab, Bergen Center for Computational Science (BCCS)
> > UNIFOB AS (University of Bergen Research Company)
> >
>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
>



--
Håkon Sagehaug, Software Developer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)