db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jørgen Løland <Jorgen.Lol...@Sun.COM>
Subject Is it possible to shutdown a service module without shutting down the database?
Date Tue, 12 Feb 2008 12:56:46 GMT
Most of the replication functionality has been added as services named 
MasterFactory and SlaveFactory (implemenentations called Master and 
SlaveController). These are booted from RawStore when replication is 
started, by using Monitor.bootServiceModule. So far, so good.

When replication is stopped, however, there does not seem to be any way 
to remove these services from the monitor without shutting down the 
entire database. If I understand this correctly, there will be a 
reference in Monitor to this service for the entire lifetime of the 
database. That would also mean that the object cannot be gc'ed, which 
looks like a (small) memory leak to me. In addition, this would prevent 
us from creating a new module object of the same type since 
bootServiceModule would return the reference to the old one.

I have tried Monitor.getMonitor().shutdown(slaveFactory_reference), but 
this method shuts down the entire database. An alternative is to call 
stop() on the module, which would stop it from doing anything but not 
remove it's reference in the Monitor. What I'm looking for is basically 
this (from Monitor class javadoc):

"Optionally -  an individual module within a service may be shutdown, 
this will in turn shutdown any modules it started if those module are 
not in use by other modules within the service. This would be handled by 
the monitor, not the module itself."

Am I missing something, or is this functionality not implemented?

-- 
Jørgen Løland

Mime
View raw message