| org.tigris.scarab.services.TorqueService
TorqueService | public class TorqueService extends BaseService (Code) | | Turbine does not yet have a way to initialize components directly, and
use of fulcrum's DatabaseService causes fulcrum to try to treat all the
Managers as services. So this service is used to initialize Torque.
It also creates an instance of each scarab om object to avoid deadlock.
author: John McNally version: $Id: TorqueService.java 9891 2005-10-23 13:57:24Z jorgeuriarte $ |
Method Summary | |
public void | init() Initializes the service by setting up Torque. | protected void | loadOM() This method loads all the classes in the org.tigris.scarab.om
package. | public void | shutdown() Shuts down the service. |
init | public void init() throws InitializationException(Code) | | Initializes the service by setting up Torque.
|
loadOM | protected void loadOM() throws Exception(Code) | | This method loads all the classes in the org.tigris.scarab.om
package. The torque classes of Foo and FooPeer contain a circular
relationship so loading the class of Foo requires a FooPeer instance
and creating a FooPeer instance requires the Foo class to be loaded.
It is possible to deadlock if multiple threads attempt to load Foo
simultaneously. A full analysis of possible deadlock scenarios has not
been done, so to be as safe as possible we create one instance of each
om object via the Manager.getInstance() method; this makes sure the
Managers are initialized as well. It may be possible to
reduce this to only calling Class.forName on each class.
|
shutdown | public void shutdown()(Code) | | Shuts down the service.
This method halts the IDBroker's daemon thread in all of
the DatabaseMap's.
|
|
|