org.exolab.jms.persistence
Class DatabaseService

java.lang.Object
  |
  +--org.exolab.core.service.Service
        |
        +--org.exolab.jms.persistence.DatabaseService
All Implemented Interfaces:
java.io.Serializable, org.exolab.core.service.Serviceable

public class DatabaseService
extends org.exolab.core.service.Service

The DatabaseService is used for managing the persistence aspect of this project.

Version:
$Revision: 1.13 $ $Date: 2004/01/08 05:55:07 $
Author:
Jim Alateras
See Also:
Serialized Form

Method Summary
static PersistenceAdapter getAdapter()
          Return the PersistenceAdapter created by this service.
static java.sql.Connection getConnection()
          Convenience function to return a connection to the PersistenceAdapter
static DatabaseService instance()
          Return the singleton instance of the DatabaseService
 void start()
           
 void stop()
           
 
Methods inherited from class org.exolab.core.service.Service
getName, getState, restart, setState, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

instance

public static DatabaseService instance()
                                throws PersistenceException
Return the singleton instance of the DatabaseService
Returns:
DatabaseService
Throws:
PersistenceException -  

getAdapter

public static PersistenceAdapter getAdapter()
Return the PersistenceAdapter created by this service. This will always be non-null.
Returns:
PersistenceAdapter - the created adapter

getConnection

public static java.sql.Connection getConnection()
                                         throws PersistenceException
Convenience function to return a connection to the PersistenceAdapter
Returns:
Connection - the connection
Throws:
PersistenceException - - if no connection could be retrieved or another error occured.

start

public void start()
           throws org.exolab.core.service.ServiceException
Overrides:
start in class org.exolab.core.service.Service

stop

public void stop()
          throws org.exolab.core.service.ServiceException
Overrides:
stop in class org.exolab.core.service.Service


Copyright © 1999-2004 The OpenJMS Group. All Rights Reserved.