org.jboss.resource.connectionmanager
Class ConnectionFactoryBindingService

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.resource.connectionmanager.ConnectionFactoryBindingService
All Implemented Interfaces:
MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src)
Direct Known Subclasses:
WrapperDataSourceService (src)

public class ConnectionFactoryBindingService
extends ServiceMBeanSupport (src)

Handles the binding of the connection factory into jndi


Field Summary
protected  java.lang.String bindName
          The bind name
protected  java.lang.Object cf
          The connection factory
protected  ObjectName (src) cm
          The connection manager
protected  java.lang.String jndiName
          The jndi name
protected  boolean useJavaContext
          Whether to use the java naming context
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean (src)
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
ConnectionFactoryBindingService()
           
 
Method Summary
protected  void bindConnectionFactory()
          Bind the connection factory into jndi
protected  void createConnectionFactory()
          Create the connection factory
protected  void determineBindName()
          Determine the bind name
 java.lang.String getBindName()
          Get the bind name
 ObjectName (src) getConnectionManager()
          Get the connection manager
 java.lang.String getJndiName()
          Get the jndi name
 boolean isUseJavaContext()
          Are we using the java naming context
 void setConnectionManager(ObjectName (src)  cm)
          Set the connection manager
 void setJndiName(java.lang.String jndiName)
          Set the jndi name
 void setUseJavaContext(boolean useJavaContext)
          Set whether to use the java naming context
protected  void startService()
          Sub-classes should override this method to provide custum 'start' logic.
protected  void stopService()
          Sub-classes should override this method to provide custum 'stop' logic.
protected  void unbindConnectionFactory()
          Unbind the connection factory into jndi
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, createService, destroy, destroyService, 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 (src)
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cm

protected ObjectName (src)  cm
The connection manager


jndiName

protected java.lang.String jndiName
The jndi name


bindName

protected java.lang.String bindName
The bind name


useJavaContext

protected boolean useJavaContext
Whether to use the java naming context


cf

protected java.lang.Object cf
The connection factory

Constructor Detail

ConnectionFactoryBindingService

public ConnectionFactoryBindingService()
Method Detail

startService

protected void startService()
                     throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'start' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
startService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

stopService

protected void stopService()
                    throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'stop' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
stopService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

getConnectionManager

public ObjectName (src)  getConnectionManager()
Get the connection manager

Returns:
the connection manager

setConnectionManager

public void setConnectionManager(ObjectName (src)  cm)
Set the connection manager

Parameters:
cm - the connection manager

getBindName

public java.lang.String getBindName()
Get the bind name

Returns:
the real jndi binding

getJndiName

public java.lang.String getJndiName()
Get the jndi name

Returns:
the jndi name

setJndiName

public void setJndiName(java.lang.String jndiName)
Set the jndi name

Parameters:
jndiName - the jndi name

isUseJavaContext

public boolean isUseJavaContext()
Are we using the java naming context

Returns:
true when using the java naming context, false otherwise

setUseJavaContext

public void setUseJavaContext(boolean useJavaContext)
Set whether to use the java naming context

Parameters:
useJavaContext - pass true to use the java naming context, false otherwise

determineBindName

protected void determineBindName()
                          throws java.lang.Exception
Determine the bind name

Throws:
java.lang.Exception

createConnectionFactory

protected void createConnectionFactory()
                                throws java.lang.Exception
Create the connection factory

Throws:
java.lang.Exception

bindConnectionFactory

protected void bindConnectionFactory()
                              throws java.lang.Exception
Bind the connection factory into jndi

Throws:
java.lang.Exception

unbindConnectionFactory

protected void unbindConnectionFactory()
                                throws java.lang.Exception
Unbind the connection factory into jndi

Throws:
java.lang.Exception