|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.jonas.service.AbsServiceImpl | +--org.objectweb.jonas.dbm.DataBaseServiceImpl
DatabaseService acts as a factory for the DataSource objects. Its goal is to create such objects and to register them in JNDI
Constructor Summary | |
DataBaseServiceImpl()
|
Method Summary | |
void |
createDataSource(java.lang.String datasourceName,
java.util.Properties dsd)
Creates a ConnectionManager (implementation of sql.dataSource). |
void |
doInit(javax.naming.Context ctx)
Initialization of the DataBase service. |
void |
doStart()
Starting DataBase service Initialization of the service is already done. |
void |
doStop()
Stopping DataBase service Unbind DataSources |
ConnectionManager |
getConnectionManager(java.lang.String dsname)
get ConnectionManager for the datasource having this JNDI name. |
java.lang.Integer |
getCurrentNumberOfDataSource()
MBean method: |
java.lang.String |
getDatasourceName(java.lang.String jndiName)
MBean method allowing to determine the datasource name from its jndi name |
java.util.Properties |
getDataSourcePropertiesFile(java.lang.String dsFile)
MBean method: |
java.lang.Integer |
getTotalCurrentNumberOfJDBCConnectionOpen()
MBean method: |
static JonasXAPoolDataSource |
getXAPoolDataSource(java.lang.String dsname)
get the XAPoolDataSource matching the DataSource name |
boolean |
isLoadedDataSource(java.lang.String dsName)
MBean method: |
void |
loadDataSource(java.lang.String name,
java.util.Properties prop)
MBean method: load a new datasource |
void |
traceJdbc()
Propagation of the new configuration of the trace functionnalities in the driver |
void |
unbindDataSources()
Unbind dataSource names from the Naming |
void |
unloadDataSource(java.lang.String name)
MBean method: |
Methods inherited from class org.objectweb.jonas.service.AbsServiceImpl |
getName, init, isStarted, setName, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.objectweb.jonas.service.Service |
getName, init, isStarted, setName, start, stop |
Constructor Detail |
public DataBaseServiceImpl()
Method Detail |
public void doInit(javax.naming.Context ctx) throws ServiceException
doInit
in class AbsServiceImpl
public void doStart() throws ServiceException
doStart
in class AbsServiceImpl
public void doStop() throws ServiceException
doStop
in class AbsServiceImpl
public void createDataSource(java.lang.String datasourceName, java.util.Properties dsd) throws java.lang.Exception
createDataSource
in interface DataBaseService
datasourceName
- - datasource namedsd
- - a set of properties that describes a dataSource and the ConnectionPool
If datasource.factory is set, we create a JonasXAPoolDataSource. If not set, we create an old fashioned ConnectionManager
public void traceJdbc()
public void unbindDataSources() throws javax.naming.NamingException
DataBaseService
unbindDataSources
in interface DataBaseService
public static JonasXAPoolDataSource getXAPoolDataSource(java.lang.String dsname)
public ConnectionManager getConnectionManager(java.lang.String dsname)
public java.lang.Integer getCurrentNumberOfDataSource()
getCurrentNumberOfDataSource
in interface DataBaseServiceImplMBean
public java.lang.Integer getTotalCurrentNumberOfJDBCConnectionOpen()
getTotalCurrentNumberOfJDBCConnectionOpen
in interface DataBaseServiceImplMBean
public boolean isLoadedDataSource(java.lang.String dsName)
public void unloadDataSource(java.lang.String name)
unloadDataSource
in interface DataBaseServiceImplMBean
name
- of the data source to unloadpublic java.util.Properties getDataSourcePropertiesFile(java.lang.String dsFile) throws java.lang.Exception
getDataSourcePropertiesFile
in interface DataBaseServiceImplMBean
public void loadDataSource(java.lang.String name, java.util.Properties prop) throws java.rmi.RemoteException
loadDataSource
in interface DataBaseServiceImplMBean
name
- datasource nameprop
- datasource propertiespublic java.lang.String getDatasourceName(java.lang.String jndiName)
getDatasourceName
in interface DataBaseServiceImplMBean
jndiName
- The jndi name of a datasource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |