You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Ramesh Babu <pr...@podar.net> on 2011/02/04 07:20:36 UTC

send a mail when service assemble start OR stop

Hi, i am new to servicemix. I have to send a mail when service assemble start OR stop. Please help me... Thanks &amp; Regards Ramesh Babu.P &nbsp; Get email for your site ---&gt; http://www.everyone.net 

-- 
View this message in context: http://servicemix.396122.n5.nabble.com/send-a-mail-when-service-assemble-start-OR-stop-tp3370514p3370514.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: send a mail when service assemble start OR stop

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Ramesh

You have several ways to do that:
1/ a very simple solution is to use a kind of JMX poller to get SA/SU 
states. The advantage of this solution is that you can use any SMX 
instance, without any changes on the distribution.
2/ another solution (more fastidious) is to override the implementation 
of the ServiceUnitManager. The problem is that you have to "fork" 
ServiceMix to change the source. I'm not sure it's good solution, 
especially when upgrade to new SMX releases, etc.

Regards
JB


On 02/04/2011 07:20 AM, Ramesh Babu wrote:
>
> Hi, i am new to servicemix. I have to send a mail when service assemble start OR stop. Please help me... Thanks&amp; Regards Ramesh Babu.P&nbsp; Get email for your site ---&gt; http://www.everyone.net
>

Re: send a mail when service assemble start OR stop

Posted by Gert Vanthienen <ge...@gmail.com>.
Ramesh Babu,


If you're new to ServiceMix, I would definitely recommend you to start
with ServiceMix 4 and use OSGi bundles to deploy Camel routes instead
of using JBI service assemblies.  Once you go down that road, it all
becomes a lot easier.  The Camel routes are started with Spring or
Blueprint XML files, so you can easily create a bean there that uses
an init-method/destroy-method to find out when the application context
is being started and stopped.  Another option would be to register a
LifecycleStrategy on the CamelContext.  The interface has callback
methods that will be invoked when the CamelContext is started and
stopped.


Regards,

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



On Fri, Feb 4, 2011 at 7:20 AM, Ramesh Babu <pr...@podar.net> wrote:
>
> Hi, i am new to servicemix. I have to send a mail when service assemble start OR stop. Please help me... Thanks &amp; Regards Ramesh Babu.P &nbsp; Get email for your site ---&gt; http://www.everyone.net
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/send-a-mail-when-service-assemble-start-OR-stop-tp3370514p3370514.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>