Class CobolConnectionManager

The default ConnectionManager implementation for the non-managed scenario. This provides a hook for a resource adapter to pass a connection request to an application server.
Restriction: This topic applies only when the Enterprise Server feature is enabled.
java.lang.Object

extended bycom.microfocus.cobol.connector.spi.CobolConnectionManager

All Implemented Interfaces

ConnectionManager, Serializable

Class Specifications

public class CobolConnectionManager

extends Object

implements ConnectionManager, Serializable

See Also:

Serialized Form

Constructor Summary

CobolConnectionManager(com.microfocus.cobol.connector.spi.ManagedConnectionPool.PoolParams poolParams, ManagedConnectionFactory mcf)
Create a CobolConnectionManager.

Methods

Method Summary
Object allocateConnection(ManagedConnectionFactory mcf ConnectionRequestInfo info

Allocate a connection.

int getBlockingTimeout

Get the blocking timeout.

int getConnectionCount

Get the connection count.

long getIdleTimeout

Get the idle timeout.

int getMaxSize

Get the maximum pool parameter size.

int getMinSize

Get the minimum pool parameter size.

void setBlockingTimeout

Set the blocking timeout.

void setIdleTimeout

Set the idle timeout.

void setMaxSize

Set the maximum pool parameter size.

void setMinSize

Set the minimum pool parameter size.

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CobolConnectionManager
public CobolConnectionManager(com.microfocus.cobol.connector.spi.ManagedConnectionPool.PoolParams 
                              poolParams, ManagedConnectionFactory mcf)

Create a CobolConnectionManager.

Parameters:
poolParams Pool parameters
mcf Managed Connection Factory instance

Method Detail

setMinSize
public int setMinSize()

Set the minimum pool parameter size.

Parameters:
minSize Minimum size.
getMinSize
public int getMinSize()

Get the minimum pool parameter size.

Returns:
The minimum pool parameter size.
setMaxSize
public void setMaxSize(int maxSize)

Set the maximum pool parameter size.

Parameters:
maxSize Maximum size.
getMaxSize
public int getMaxSize()

Get the maximum pool parameter size.

Returns:
The maximum pool parameter size.
setBlockingTimeout
public void setBlockingTimeout(int blockingTimeout)

Set the blocking timeout.

Parameters:
blockingTimeout The blocking timeout value.
getBlockingTimeout
public int getBlockingTimeout()

Get the blocking timeout.

Returns:
The blocking timeout.
setIdleTimeout
public void setIdleTimeout(long idleTimeout)

Set the idle timeout.

Parameters:
idleTimeout The idle timeout value.
getIdleTimeout
public long getIdleTimeout()

Get the idle timeout.

Returns:
The idle timeout.
allocateConnection
public Object allocateConnection(ManagedConnectionFactory mcf
                                 ConnectionRequestInfo info
                          throws ResourceException)

Allocate a connection.

Specified by:
connectionErrorOccurred in interface ConnectionManager
Parameters:
mcf Managed Connection Factory instance.
info Connection Request Info instance .
Returns:
CobolManagedConnection instance.
Throws:
ResourceException
getConnectionCount
public int getConnectionCount()

Get the connection count.

Returns:
The connection count.