You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Makiet <Bi...@viettel.com.vn> on 2012/09/12 05:51:36 UTC
HOW TO: Hot deploy SCA service withou restart app server
Hi,
I have some interfaces and java classes, and a composite file to expose a part of those interfaces as services.
One day, I want to expose one more service based on an existing interface. I mean no code change needed, only modify the composite file (I guessed).
How can I achieve that without restart my app server?
Best regards
Binh, Nguyen Thanh
RE: HOW TO: Hot deploy SCA service withou restart app server
Posted by "Millies, Sebastian" <Se...@softwareag.com>.
I have not tried that. I think it can get really complicated and would not implement
that manually myself. The naive idea of making the requests wait in Tomcat can quickly
pile up a huge number of threads, at least in the traditional blocking one-thread-per-request
model.
Rather, I’d use a traditional fail-over architecture with redundant servers, and rely on that to
switch to the fail-over server while I restart the node on the primary server. But if you have
that, you might as well restart the application server as a whole.
n Sebastian
From: Binhnt22@viettel.com.vn [mailto:Binhnt22@viettel.com.vn]
Sent: Wednesday, September 12, 2012 10:14 AM
To: dev@tuscany.apache.org
Cc: Binhbm@viettel.com.vn
Subject: RE: HOW TO: Hot deploy SCA service withou restart app server
Hi Sebastian,
That’s a great idea. But there’s one thing I worry when start/stop node.
I want to pause all incoming request that call the node’s services, continue processing all current requests before stop a node.
After start the node, it releases the pause automatically. Can you share your knowledge to solve it?
Best regards
Binh, Nguyen Thanh
From: Millies, Sebastian [mailto:Sebastian.Millies@softwareag.com]
Sent: Wednesday, September 12, 2012 2:27 PM
To: dev@tuscany.apache.org<ma...@tuscany.apache.org>
Subject: RE: HOW TO: Hot deploy SCA service withou restart app server
it’s quite easy using the Tuscany node API. I expose the start/stop methods in an MBean interface
and restart my nodes using JConsole. -- Sebastian
From: Raymond Feng [mailto:enjoyjava@gmail.com]
Sent: Wednesday, September 12, 2012 7:20 AM
To: dev@tuscany.apache.org<ma...@tuscany.apache.org>
Cc: Binhbm@viettel.com.vn<ma...@viettel.com.vn>
Subject: Re: HOW TO: Hot deploy SCA service withou restart app server
At this point, a restart is required even the change only happens in the composite file as the start/stop is tied to web app context listener or servlet filter. Programmatically, you can start/stop a Tuscany node though. So you can potentially make the lifecycle of a composite application more dynamic. We did that for the OSGi enterprise services implementation based on Tuscany/SCA.
Thanks,
Raymond
On Sep 11, 2012, at 8:51 PM, Makiet wrote:
Hi,
I have some interfaces and java classes, and a composite file to expose a part of those interfaces as services.
One day, I want to expose one more service based on an existing interface. I mean no code change needed, only modify the composite file (I guessed).
How can I achieve that without restart my app server?
Best regards
Binh, Nguyen Thanh
IDS Scheer Consulting GmbH
Geschäftsführer/Managing Directors: Michael Rehm, Ivo Totev
Sitz/Registered office: Altenkesseler Straße 17, 66115 Saarbrücken, Germany - Registergericht/Commercial register: Saarbrücken HRB 19681
http://www.ids-scheer-consulting.com
IDS Scheer Consulting GmbH
Geschäftsführer/Managing Directors: Michael Rehm, Ivo Totev
Sitz/Registered office: Altenkesseler Straße 17, 66115 Saarbrücken, Germany - Registergericht/Commercial register: Saarbrücken HRB 19681
http://www.ids-scheer-consulting.com
RE: HOW TO: Hot deploy SCA service withou restart app server
Posted by Makiet <Bi...@viettel.com.vn>.
Hi Sebastian,
That’s a great idea. But there’s one thing I worry when start/stop node.
I want to pause all incoming request that call the node’s services, continue processing all current requests before stop a node.
After start the node, it releases the pause automatically. Can you share your knowledge to solve it?
Best regards
Binh, Nguyen Thanh
From: Millies, Sebastian [mailto:Sebastian.Millies@softwareag.com]
Sent: Wednesday, September 12, 2012 2:27 PM
To: dev@tuscany.apache.org
Subject: RE: HOW TO: Hot deploy SCA service withou restart app server
it’s quite easy using the Tuscany node API. I expose the start/stop methods in an MBean interface
and restart my nodes using JConsole. -- Sebastian
From: Raymond Feng [mailto:enjoyjava@gmail.com]
Sent: Wednesday, September 12, 2012 7:20 AM
To: dev@tuscany.apache.org
Cc: Binhbm@viettel.com.vn
Subject: Re: HOW TO: Hot deploy SCA service withou restart app server
At this point, a restart is required even the change only happens in the composite file as the start/stop is tied to web app context listener or servlet filter. Programmatically, you can start/stop a Tuscany node though. So you can potentially make the lifecycle of a composite application more dynamic. We did that for the OSGi enterprise services implementation based on Tuscany/SCA.
Thanks,
Raymond
On Sep 11, 2012, at 8:51 PM, Makiet wrote:
Hi,
I have some interfaces and java classes, and a composite file to expose a part of those interfaces as services.
One day, I want to expose one more service based on an existing interface. I mean no code change needed, only modify the composite file (I guessed).
How can I achieve that without restart my app server?
Best regards
Binh, Nguyen Thanh
IDS Scheer Consulting GmbH
Geschäftsführer/Managing Directors: Michael Rehm, Ivo Totev
Sitz/Registered office: Altenkesseler Straße 17, 66115 Saarbrücken, Germany - Registergericht/Commercial register: Saarbrücken HRB 19681
<http://www.ids-scheer-consulting.com> http://www.ids-scheer-consulting.com
RE: HOW TO: Hot deploy SCA service withou restart app server
Posted by "Millies, Sebastian" <Se...@softwareag.com>.
it’s quite easy using the Tuscany node API. I expose the start/stop methods in an MBean interface
and restart my nodes using JConsole. -- Sebastian
From: Raymond Feng [mailto:enjoyjava@gmail.com]
Sent: Wednesday, September 12, 2012 7:20 AM
To: dev@tuscany.apache.org
Cc: Binhbm@viettel.com.vn
Subject: Re: HOW TO: Hot deploy SCA service withou restart app server
At this point, a restart is required even the change only happens in the composite file as the start/stop is tied to web app context listener or servlet filter. Programmatically, you can start/stop a Tuscany node though. So you can potentially make the lifecycle of a composite application more dynamic. We did that for the OSGi enterprise services implementation based on Tuscany/SCA.
Thanks,
Raymond
On Sep 11, 2012, at 8:51 PM, Makiet wrote:
Hi,
I have some interfaces and java classes, and a composite file to expose a part of those interfaces as services.
One day, I want to expose one more service based on an existing interface. I mean no code change needed, only modify the composite file (I guessed).
How can I achieve that without restart my app server?
Best regards
Binh, Nguyen Thanh
IDS Scheer Consulting GmbH
Geschäftsführer/Managing Directors: Michael Rehm, Ivo Totev
Sitz/Registered office: Altenkesseler Straße 17, 66115 Saarbrücken, Germany - Registergericht/Commercial register: Saarbrücken HRB 19681
http://www.ids-scheer-consulting.com
RE: HOW TO: Hot deploy SCA service withou restart app server
Posted by Makiet <Bi...@viettel.com.vn>.
Can you share a little bit about your OSGI service implementation? Some
samples or tests
Best regards
Binh, Nguyen Thanh
From: Raymond Feng [mailto:enjoyjava@gmail.com]
Sent: Wednesday, September 12, 2012 12:20 PM
To: dev@tuscany.apache.org
Cc: Binhbm@viettel.com.vn
Subject: Re: HOW TO: Hot deploy SCA service withou restart app server
At this point, a restart is required even the change only happens in the
composite file as the start/stop is tied to web app context listener or
servlet filter. Programmatically, you can start/stop a Tuscany node though.
So you can potentially make the lifecycle of a composite application more
dynamic. We did that for the OSGi enterprise services implementation based
on Tuscany/SCA.
Thanks,
Raymond
On Sep 11, 2012, at 8:51 PM, Makiet wrote:
Hi,
I have some interfaces and java classes, and a composite file to expose a
part of those interfaces as services.
One day, I want to expose one more service based on an existing interface. I
mean no code change needed, only modify the composite file (I guessed).
How can I achieve that without restart my app server?
Best regards
Binh, Nguyen Thanh
Re: HOW TO: Hot deploy SCA service withou restart app server
Posted by Raymond Feng <en...@gmail.com>.
At this point, a restart is required even the change only happens in the composite file as the start/stop is tied to web app context listener or servlet filter. Programmatically, you can start/stop a Tuscany node though. So you can potentially make the lifecycle of a composite application more dynamic. We did that for the OSGi enterprise services implementation based on Tuscany/SCA.
Thanks,
Raymond
On Sep 11, 2012, at 8:51 PM, Makiet wrote:
> Hi,
>
> I have some interfaces and java classes, and a composite file to expose a part of those interfaces as services.
> One day, I want to expose one more service based on an existing interface. I mean no code change needed, only modify the composite file (I guessed).
> How can I achieve that without restart my app server?
>
> Best regards
> Binh, Nguyen Thanh