org.jencks.factory
Class ConnectionManagerFactoryBean

java.lang.Object
  extended by org.jencks.factory.ConnectionManagerFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean

public class ConnectionManagerFactoryBean
extends java.lang.Object
implements org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean

This FactoryBean creates a local JCA connection factory outside a J2EE application server.

The connection manager will be then injected in the LocalConnectionFactoryBean, class of the JCA support of Spring.

Author:
Thierry Templier
See Also:
ConnectionFactoryFactoryBean.setConnectionManager(ConnectionManager)

Constructor Summary
ConnectionManagerFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
          This method checks all the needed parameters to construct the Geronimo connection manager which is implemented by the GenericConnectionManager class.
 void destroy()
           
 int getConnectionMaxIdleMinutes()
           
 int getConnectionMaxWaitMilliseconds()
           
 org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTracker getConnectionTracker()
           
 java.lang.Object getObject()
           
 java.lang.Class<?> getObjectType()
           
 java.lang.String getPartitionStrategy()
           
 org.apache.geronimo.connector.outbound.connectionmanagerconfig.PoolingSupport getPoolingSupport()
           
 int getPoolMaxSize()
           
 int getPoolMinSize()
           
 org.apache.geronimo.connector.outbound.SubjectSource getSubjectSource()
           
 java.lang.String getTransaction()
           
 org.apache.geronimo.transaction.manager.RecoverableTransactionManager getTransactionManager()
           
 org.apache.geronimo.connector.outbound.connectionmanagerconfig.TransactionSupport getTransactionSupport()
           
 boolean isAllConnectionsEqual()
           
 boolean isPooling()
           
 boolean isSingleton()
           
 void setAllConnectionsEqual(boolean allConnectionsEqual)
           
 void setConnectionMaxIdleMinutes(int connectionMaxIdleMinutes)
           
 void setConnectionMaxWaitMilliseconds(int connectionMaxWaitMilliseconds)
           
 void setConnectionTracker(org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTracker tracker)
          Set the connection tracker for the Geronimo Connection Manager.
 void setContainerManagedSecurity(boolean containerManagedSecurity)
          Enables/disables container managed security
 void setPartitionStrategy(java.lang.String partitionStrategy)
           
 void setPooling(boolean pooling)
           
 void setPoolingSupport(org.apache.geronimo.connector.outbound.connectionmanagerconfig.PoolingSupport support)
          Set the pooling support for the Geronimo Connection Manager.
 void setPoolMaxSize(int poolMaxSize)
           
 void setPoolMinSize(int poolMinSize)
           
 void setSubjectSource(org.apache.geronimo.connector.outbound.SubjectSource subjectSource)
           
 void setTransaction(java.lang.String transaction)
           
 void setTransactionManager(org.apache.geronimo.transaction.manager.RecoverableTransactionManager manager)
          Set the transaction manager for the Geronimo Connection Manager.
 void setTransactionSupport(org.apache.geronimo.connector.outbound.connectionmanagerconfig.TransactionSupport support)
          Set the transaction support for the Geronimo Connection Manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionManagerFactoryBean

public ConnectionManagerFactoryBean()
Method Detail

getObject

public java.lang.Object getObject()
                           throws java.lang.Exception
Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean
Throws:
java.lang.Exception

destroy

public void destroy()
             throws java.lang.Exception
Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
Throws:
java.lang.Exception

getObjectType

public java.lang.Class<?> getObjectType()
Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface org.springframework.beans.factory.FactoryBean

getPoolingSupport

public org.apache.geronimo.connector.outbound.connectionmanagerconfig.PoolingSupport getPoolingSupport()

setPoolingSupport

public void setPoolingSupport(org.apache.geronimo.connector.outbound.connectionmanagerconfig.PoolingSupport support)
Set the pooling support for the Geronimo Connection Manager. Geronimo provides two kinds of pool: single and partitioned.

See Also:
SinglePool, PartitionedPool

getTransactionManager

public org.apache.geronimo.transaction.manager.RecoverableTransactionManager getTransactionManager()

setTransactionManager

public void setTransactionManager(org.apache.geronimo.transaction.manager.RecoverableTransactionManager manager)
Set the transaction manager for the Geronimo Connection Manager.


getTransaction

public java.lang.String getTransaction()

setTransaction

public void setTransaction(java.lang.String transaction)

getTransactionSupport

public org.apache.geronimo.connector.outbound.connectionmanagerconfig.TransactionSupport getTransactionSupport()

setTransactionSupport

public void setTransactionSupport(org.apache.geronimo.connector.outbound.connectionmanagerconfig.TransactionSupport support)
Set the transaction support for the Geronimo Connection Manager. Geronimo provides in this case three kinds of support like the JCA specification: no transaction, local transactions, XA transactions.

See Also:
NoTransactions, LocalTransactions, XATransactions

getConnectionTracker

public org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTracker getConnectionTracker()

setConnectionTracker

public void setConnectionTracker(org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTracker tracker)
Set the connection tracker for the Geronimo Connection Manager.


setContainerManagedSecurity

public void setContainerManagedSecurity(boolean containerManagedSecurity)
Enables/disables container managed security


getSubjectSource

public org.apache.geronimo.connector.outbound.SubjectSource getSubjectSource()

setSubjectSource

public void setSubjectSource(org.apache.geronimo.connector.outbound.SubjectSource subjectSource)

isPooling

public boolean isPooling()

setPooling

public void setPooling(boolean pooling)

getPartitionStrategy

public java.lang.String getPartitionStrategy()

setPartitionStrategy

public void setPartitionStrategy(java.lang.String partitionStrategy)

getPoolMaxSize

public int getPoolMaxSize()

setPoolMaxSize

public void setPoolMaxSize(int poolMaxSize)

getPoolMinSize

public int getPoolMinSize()

setPoolMinSize

public void setPoolMinSize(int poolMinSize)

isAllConnectionsEqual

public boolean isAllConnectionsEqual()

setAllConnectionsEqual

public void setAllConnectionsEqual(boolean allConnectionsEqual)

getConnectionMaxWaitMilliseconds

public int getConnectionMaxWaitMilliseconds()

setConnectionMaxWaitMilliseconds

public void setConnectionMaxWaitMilliseconds(int connectionMaxWaitMilliseconds)

getConnectionMaxIdleMinutes

public int getConnectionMaxIdleMinutes()

setConnectionMaxIdleMinutes

public void setConnectionMaxIdleMinutes(int connectionMaxIdleMinutes)

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
This method checks all the needed parameters to construct the Geronimo connection manager which is implemented by the GenericConnectionManager class. If the transaction support property is not set, the method configures the connection manager with the no transaction value. If the pooling support property is not set, the method configures the connection manager with the no pool value. If the realm bridge is not set, the method configure the connection manager with an identity realm bridge.

Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception
See Also:
GenericConnectionManager


Copyright © 2010 LogicBlaze, Inc.. All Rights Reserved.