Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Installing server as windows service([CDO] Installing server as windows service)
[CDO] Installing server as windows service [message #1713349] Tue, 03 November 2015 14:38 Go to next message
Greg Babcock is currently offline Greg BabcockFriend
Messages: 41
Registered: October 2012
Member
I would like to deploy a CDO server as a windows service. This can easy be done Apache Procrun or another service wrapper. My concern is that as a DB application that does caching, it is preferable to close it gracefully from either the osgi console, or a telnet session.

A. Am I being overly concerned about performing a clean shutdown

B. Is anybody aware of a service runner that provides a hook into the shutdown event to allow a graceful shutdown.

Thanks,

Greg Babcock
Re: [CDO] Installing server as windows service [message #1713736 is a reply to message #1713349] Fri, 06 November 2015 10:29 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6690
Registered: July 2009
Senior Member
Am 03.11.2015 um 15:38 schrieb Greg Babcock:
> I would like to deploy a CDO server as a windows service. This can easy be done Apache Procrun or another service
> wrapper. My concern is that as a DB application that does caching, it is preferable to close it gracefully from
> either the osgi console, or a telnet session.
>
> A. Am I being overly concerned about performing a clean shutdown
Yes and no.

Yes, because the DBStore has automatic crash detection and damage repair at startup time built in. BTW., "damage" sounds
more severe than it probably is. All damage that can happen is related to some internal counters that *optimize* the
startup time; i.e., only information that can be recomputed from the "safe parts" of the overall data can be lost after
ungraceful shutdown. Information such as the last ID that was assigned to an object.

No, because I agree it would be great to be able to perform a clean shutdown when the service stops, but I'm not sure
how that could be done. I suspect it depends on the concrete service wrapper. I'm not very familiar with the different
technologies that are available, nor with what that would mean for CDO. Are you?

> B. Is anybody aware of a service runner that provides a hook into the shutdown event to allow a graceful shutdown.
Unfortunately I'm not. It would be great if others could share their expertise on service wrappers...

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] Installing server as windows service [message #1713755 is a reply to message #1713736] Fri, 06 November 2015 12:52 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6690
Registered: July 2009
Senior Member
Hi Greg,

I quickly searched the web and found http://yajsw.sourceforge.net/ , which I think looks quite promising. Are you
interested in evaluating it and, in case it's a good match, discussing your findings in a new bugzilla?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper



Am 06.11.2015 um 11:29 schrieb Eike Stepper:
> Am 03.11.2015 um 15:38 schrieb Greg Babcock:
>> I would like to deploy a CDO server as a windows service. This can easy be done Apache Procrun or another service
>> wrapper. My concern is that as a DB application that does caching, it is preferable to close it gracefully from
>> either the osgi console, or a telnet session.
>>
>> A. Am I being overly concerned about performing a clean shutdown
> Yes and no.
>
> Yes, because the DBStore has automatic crash detection and damage repair at startup time built in. BTW., "damage"
> sounds more severe than it probably is. All damage that can happen is related to some internal counters that
> *optimize* the startup time; i.e., only information that can be recomputed from the "safe parts" of the overall data
> can be lost after ungraceful shutdown. Information such as the last ID that was assigned to an object.
>
> No, because I agree it would be great to be able to perform a clean shutdown when the service stops, but I'm not sure
> how that could be done. I suspect it depends on the concrete service wrapper. I'm not very familiar with the different
> technologies that are available, nor with what that would mean for CDO. Are you?
>
>> B. Is anybody aware of a service runner that provides a hook into the shutdown event to allow a graceful shutdown.
> Unfortunately I'm not. It would be great if others could share their expertise on service wrappers...
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>


Re: [CDO] Installing server as windows service [message #1713790 is a reply to message #1713755] Fri, 06 November 2015 16:20 Go to previous messageGo to next message
Greg Babcock is currently offline Greg BabcockFriend
Messages: 41
Registered: October 2012
Member
Hello Eike,

I am generally familiar with what needs to happen and will give yajsw a try when I have some time. If I am successful I will write it up in a bugzilla.

Thanks,

Greg
Re: [CDO] Installing server as windows service [message #1714374 is a reply to message #1713790] Thu, 12 November 2015 09:29 Go to previous messageGo to next message
Samuel Leisering is currently offline Samuel LeiseringFriend
Messages: 34
Registered: July 2014
Member
Hi

the NSSM (https://nssm.cc/), generates a CTRL+C command to shut down the service. This can be handled in a JVM Shutdown Hook (http://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html#addShutdownHook(java.lang.Thread))

Greetings,
Samuel

Re: [CDO] Installing server as windows service [message #1714462 is a reply to message #1714374] Thu, 12 November 2015 19:52 Go to previous message
Greg Babcock is currently offline Greg BabcockFriend
Messages: 41
Registered: October 2012
Member
I have been successful starting and stopping the CDO server using Apache procrun similar to what is described in this blog http://dentrassi.de/2014/02/28/eclipse-equinox-as-a-windows-service/ for the SCADA project, but have not been able to connect to the CDO server due to some configuration issue that I have not had the time to investigate. I will make another post with detailed instructions when I have it working.

The yajsw has an example for starting equinox as a service so it would also work, but I have decided not to pursue it because it requires more files and is more complicated to deploy than procrun.
Previous Topic:antlr error on code generation
Next Topic:Generating ecore model code with dependencies: Unable to resolve proxy
Goto Forum:
  


Current Time: Thu Sep 19 17:25:38 GMT 2024

Powered by FUDForum. Page generated in 0.03762 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top