org.jboss.resource.adapter.jdbc.remote
Class WrapperDataSourceService

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.resource.connectionmanager.ConnectionFactoryBindingService
              extended by org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, WrapperDataSourceServiceMBean, ConnectionFactoryBindingServiceMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class WrapperDataSourceService
extends ConnectionFactoryBindingService
implements WrapperDataSourceServiceMBean

An mbean service that pvovides the detached invoker ops for the javax.sql.DataSource and related java.sql.* interfaces. TODO this does not belong in the resource adapter

Version:
$Revision: 1.7.6.11 $
Author:
Scott.Stark@jboss.org, Tom.Elrod@jboss.org, adrian@jboss.com

Field Summary
 
Fields inherited from class org.jboss.resource.connectionmanager.ConnectionFactoryBindingService
bindName, cf, cm, jndiName, useJavaContext
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceServiceMBean
OBJECT_NAME
 
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
 
Constructor Summary
WrapperDataSourceService()
           
 
Method Summary
protected  void bindConnectionFactory()
          Bind the connection factory into jndi
protected  void calculateMethodHases()
          Calculate the method hashes
protected  void createProxy()
          Create the proxy TODO this should be external configuration
protected  void destroyProxy()
          Destroy the proxy
 javax.management.ObjectName getJMXInvokerName()
          Get the transport
 Object invoke(org.jboss.invocation.Invocation invocation)
          Expose the DataSource via JMX to invokers.
 void setJMXInvokerName(javax.management.ObjectName jmxInvokerName)
          Set the transport
protected  void startService()
           
protected  void stopService()
           
 
Methods inherited from class org.jboss.resource.connectionmanager.ConnectionFactoryBindingService
createConnectionFactory, determineBindName, getBindName, getConnectionManager, getJndiName, isUseJavaContext, setConnectionManager, setJndiName, setUseJavaContext, unbindConnectionFactory
 
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, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.resource.connectionmanager.ConnectionFactoryBindingServiceMBean
getBindName, getConnectionManager, getJndiName, isUseJavaContext, setConnectionManager, setJndiName, setUseJavaContext
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Constructor Detail

WrapperDataSourceService

public WrapperDataSourceService()
Method Detail

startService

protected void startService()
                     throws Exception
Overrides:
startService in class ConnectionFactoryBindingService
Throws:
Exception

stopService

protected void stopService()
                    throws Exception
Overrides:
stopService in class ConnectionFactoryBindingService
Throws:
Exception

bindConnectionFactory

protected void bindConnectionFactory()
                              throws Exception
Description copied from class: ConnectionFactoryBindingService
Bind the connection factory into jndi

Overrides:
bindConnectionFactory in class ConnectionFactoryBindingService
Throws:
Exception

getJMXInvokerName

public javax.management.ObjectName getJMXInvokerName()
Description copied from interface: WrapperDataSourceServiceMBean
Get the transport

Specified by:
getJMXInvokerName in interface WrapperDataSourceServiceMBean
Returns:
the invoker name

setJMXInvokerName

public void setJMXInvokerName(javax.management.ObjectName jmxInvokerName)
Description copied from interface: WrapperDataSourceServiceMBean
Set the transport

Specified by:
setJMXInvokerName in interface WrapperDataSourceServiceMBean
Parameters:
jmxInvokerName - the invoker name

invoke

public Object invoke(org.jboss.invocation.Invocation invocation)
              throws Exception
Description copied from interface: WrapperDataSourceServiceMBean
Expose the DataSource via JMX to invokers.

Specified by:
invoke in interface WrapperDataSourceServiceMBean
Parameters:
invocation - A pointer to the invocation object
Returns:
Return value of method invocation.
Throws:
Exception - Failed to invoke method.

createProxy

protected void createProxy()
                    throws Exception
Create the proxy TODO this should be external configuration

Throws:
Exception

destroyProxy

protected void destroyProxy()
                     throws Exception
Destroy the proxy

Throws:
Exception

calculateMethodHases

protected void calculateMethodHases()
                             throws Exception
Calculate the method hashes

Throws:
Exception


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.