@Barry, there are usually tests being carried out killing the server will
leave the database in an inconsistent state. So a graceful shutdown is
needed
@Lance, you are correct, this is a good approach to solve this.
I still think having this around (Checking if a service is built) is an
addition
Why not create your own hub which your db services register with when they
are realized / constructed. You then have a single shutdown listener which
loops the list in order before finally shutting down the db connection.
On 14 Oct 2013 17:38, "Muhammad Gelbana" wrote:
> This cannot guarantee th
I would say if you are really relying on an orderly shutdown you might want
to rethink your design. In general you are far more likely to have a crash
than an orderly shutdown. Personally I stop my web servers with
killall -9 java
On Mon, Oct 14, 2013 at 11:37 AM, Muhammad Gelbana wrote:
> This
This cannot guarantee the order of the shutdown procedure. I need this
executed after all services are shutdown. However, I can inject another
service instead of *RegistryShutdownHub*, this way I can guarantee the
order.
To explain, I'll inject a service which will hold a set of database
connectio
Why not add the following to your database services:
@PostInjection
public void addShutdownListener(RegistryShutdownHub shutdownHub) {
shutdownHub.addRegistryShutdownListener(new Runnable() { … });
}
The shutdown listener will only fire if the service has been realized
(constructed)
My core module shuts down 2 database services but I recently deployed a new
application that uses only one schema so when the
*RegisteryShutdownHub *service
calls the shutdown procedure, the idle database connection service is asked
to shutdown by calling *.close()* and this attempts to instantiate
The Scoreboard is a ServiceActivityTracker. I've never needed to do it
myself but I'm sure you can register your own custom tracker.
On 14 Oct 2013 13:17, "Martin Kersten" wrote:
> Sometimes it is very important. I for myself need this in some tests to
> recognize some specials in tear down and s
Sometimes it is very important. I for myself need this in some tests to
recognize some specials in tear down and set up. And thanks Lance for the
hint. I used another way but this Scoreboard is way more cooler. Wasnt
aware of this.
2013/10/14 Thiago H de Paula Figueiredo
> On Sun, 13 Oct 2013 1
On Sun, 13 Oct 2013 12:14:46 -0300, Muhammad Gelbana
wrote:
Will many agree with me if I asked for a way to safely check if a service
has been initialized or built ?
Why do you need that? If you invoke a service method, the service will be
initialized and ready to use, even if Tapestry-Io
Take a look at the built in ServiceStatus page. You can @Inject
ServiceActivityScoreboard and check ServiceActivity.getStatus()
Will many agree with me if I asked for a way to safely check if a service
has been initialized or built ?
Something like RegistryTools.isBuilt(myServiceReference);
*-*
*Muhammad Gelbana*
http://www.linkedin.com/in/mgelbana
11 matches
Mail list logo