org.jboss.varia.stats
Class DataSourceInterceptor
java.lang.Object
org.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.varia.stats.DataSourceInterceptor
- All Implemented Interfaces:
- Wrapper, MBeanRegistration, NotificationBroadcaster, NotificationEmitter, CommonDataSource, DataSource, org.jboss.kernel.spi.dependency.KernelControllerContextAware, Service, ServiceMBean, DataSourceInterceptorMBean
- Direct Known Subclasses:
- DataSourceInterceptorJDK5, DataSourceInterceptorJDK6
public abstract class DataSourceInterceptor
- extends ServiceMBeanSupport
- implements DataSource, DataSourceInterceptorMBean
- Version:
- $Revision: 81038 $
- Author:
- Alexey Loubyansky
Fields inherited from interface org.jboss.system.ServiceMBean |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
create, createService, destroy, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, pojoChange, pojoCreate, pojoDestroy, pojoStart, pojoStop, postDeregister, postRegister, preDeregister, preRegister, setKernelControllerContext, start, stop, unsetKernelControllerContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
target
protected DataSource target
- target DataSource
DataSourceInterceptor
public DataSourceInterceptor()
getStatsCollector
public ObjectName getStatsCollector()
- Specified by:
getStatsCollector
in interface DataSourceInterceptorMBean
setStatsCollector
public void setStatsCollector(ObjectName statsCollector)
- Specified by:
setStatsCollector
in interface DataSourceInterceptorMBean
getBindName
public String getBindName()
- Specified by:
getBindName
in interface DataSourceInterceptorMBean
setBindName
public void setBindName(String bindName)
throws NamingException
- Specified by:
setBindName
in interface DataSourceInterceptorMBean
- Throws:
NamingException
getTargetName
public String getTargetName()
- Specified by:
getTargetName
in interface DataSourceInterceptorMBean
setTargetName
public void setTargetName(String targetName)
throws NamingException
- Specified by:
setTargetName
in interface DataSourceInterceptorMBean
- Throws:
NamingException
startService
public void startService()
throws Exception
- Overrides:
startService
in class ServiceMBeanSupport
- Throws:
Exception
stopService
public void stopService()
throws Exception
- Overrides:
stopService
in class ServiceMBeanSupport
- Throws:
Exception
getLoginTimeout
public int getLoginTimeout()
throws SQLException
- Specified by:
getLoginTimeout
in interface CommonDataSource
- Throws:
SQLException
setLoginTimeout
public void setLoginTimeout(int seconds)
throws SQLException
- Specified by:
setLoginTimeout
in interface CommonDataSource
- Throws:
SQLException
getLogWriter
public PrintWriter getLogWriter()
throws SQLException
- Specified by:
getLogWriter
in interface CommonDataSource
- Throws:
SQLException
setLogWriter
public void setLogWriter(PrintWriter out)
throws SQLException
- Specified by:
setLogWriter
in interface CommonDataSource
- Throws:
SQLException
getConnection
public abstract Connection getConnection()
throws SQLException
- Specified by:
getConnection
in interface DataSource
- Throws:
SQLException
getConnection
public abstract Connection getConnection(String username,
String password)
throws SQLException
- Specified by:
getConnection
in interface DataSource
- Throws:
SQLException
logSql
protected void logSql(String sql)
Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.