org.geotools.arcsde.session
Class ArcSDEConnectionPool

Object
  extended by ArcSDEConnectionPool

Deprecated. still here waiting for gce to switch to SessionPool

public class ArcSDEConnectionPool
extends Object

Maintains SeConnection's for a single set of connection properties (for instance: by server, port, user and password) in a pooled way

Since sde connections are not jdbc connections, I can't use Sean's excellent connection pool. So I'll borrow most of it.

This connection pool is configurable in the sense that some parameters can be passed to establish the pooling policy. To pass parameters to the connection pool, you should set some properties in the parameters Map passed to SdeDataStoreFactory.createDataStore, wich will invoke SdeConnectionPoolFactory to get the SDE instance's pool singleton. That instance singleton will be created with the preferences passed the first time createDataStore is called for a given SDE instance/user, if subsecuent calls change that preferences, they will be ignored.

The expected optional parameters that you can set up in the argument Map for createDataStore are:

Author:
Gabriel Roldan, Axios Engineering

Field Summary
static int DEFAULT_CONNECTIONS
          Deprecated. default number of connections a pool creates at first population
static int DEFAULT_MAX_CONNECTIONS
          Deprecated. default number of maximun allowable connections a pool can hold
static int DEFAULT_MAX_WAIT_TIME
          Deprecated.  
protected static Level INFO_LOG_LEVEL
          Deprecated. DOCUMENT ME!
 
Constructor Summary
protected ArcSDEConnectionPool(ArcSDEConnectionConfig config)
          Deprecated. Creates a new SdeConnectionPool object with the connection parameters holded by config
 
Method Summary
 void close()
          Deprecated. closes all connections in this pool
protected  void finalize()
          Deprecated. Ensures proper closure of connection pool at this object's finalization stage.
 int getAvailableCount()
          Deprecated. TODO: Document this method!
 List getAvailableLayerNames()
          Deprecated. Gets the list of available layer names on the database
 ArcSDEConnectionConfig getConfig()
          Deprecated. DOCUMENT ME!
 ArcSDEPooledConnection getConnection()
          Deprecated. DOCUMENT ME!
 int getInUseCount()
          Deprecated. TODO: Document this method!
 int getPoolSize()
          Deprecated. returns the number of actual connections holded by this connection pool.
 boolean isClosed()
          Deprecated.  
 void markConnectionAsFailed(ArcSDEPooledConnection conn)
          Deprecated. Sometimes (and largely without reason) ArcSDEPooledConnections (really their underlying SeConnection objects) just poop out.
 String toString()
          Deprecated.  
 
Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INFO_LOG_LEVEL

protected static final Level INFO_LOG_LEVEL
Deprecated. 
DOCUMENT ME!


DEFAULT_CONNECTIONS

public static final int DEFAULT_CONNECTIONS
Deprecated. 
default number of connections a pool creates at first population

See Also:
Constant Field Values

DEFAULT_MAX_CONNECTIONS

public static final int DEFAULT_MAX_CONNECTIONS
Deprecated. 
default number of maximun allowable connections a pool can hold

See Also:
Constant Field Values

DEFAULT_MAX_WAIT_TIME

public static final int DEFAULT_MAX_WAIT_TIME
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

ArcSDEConnectionPool

protected ArcSDEConnectionPool(ArcSDEConnectionConfig config)
                        throws DataSourceException
Deprecated. 
Creates a new SdeConnectionPool object with the connection parameters holded by config

Parameters:
config - holds connection options such as server, user and password, as well as tuning options as maximun number of connections allowed
Throws:
DataSourceException - DOCUMENT ME!
NullPointerException - DOCUMENT ME!
Method Detail

getPoolSize

public int getPoolSize()
Deprecated. 
returns the number of actual connections holded by this connection pool. In other words, the sum of used and available connections, regardless

Returns:
DOCUMENT ME!

close

public void close()
Deprecated. 
closes all connections in this pool


isClosed

public boolean isClosed()
Deprecated. 

finalize

protected void finalize()
Deprecated. 
Ensures proper closure of connection pool at this object's finalization stage.

Overrides:
finalize in class Object

getAvailableCount

public int getAvailableCount()
Deprecated. 
TODO: Document this method!

Returns:
DOCUMENT ME!

getInUseCount

public int getInUseCount()
Deprecated. 
TODO: Document this method!

Returns:
DOCUMENT ME!

getConnection

public ArcSDEPooledConnection getConnection()
                                     throws DataSourceException,
                                            UnavailableConnectionException
Deprecated. 
DOCUMENT ME!

Returns:
DOCUMENT ME!
Throws:
DataSourceException - DOCUMENT ME!
UnavailableConnectionException
IllegalStateException - DOCUMENT ME!

markConnectionAsFailed

public void markConnectionAsFailed(ArcSDEPooledConnection conn)
Deprecated. 
Sometimes (and largely without reason) ArcSDEPooledConnections (really their underlying SeConnection objects) just poop out. They start behaving strangely, or not behaving at all. You can tell the pool that a particular SeConnection has 'Failed' using this method, and it will do its best to get it out of the pool as soon as you release your hold on it.

Parameters:
conn -

getAvailableLayerNames

public List getAvailableLayerNames()
                            throws DataSourceException
Deprecated. 
Gets the list of available layer names on the database

Returns:
a List<String> with the registered featureclasses on the ArcSDE database
Throws:
DataSourceException

getConfig

public ArcSDEConnectionConfig getConfig()
Deprecated. 
DOCUMENT ME!

Returns:
DOCUMENT ME!

toString

public String toString()
Deprecated. 
Overrides:
toString in class Object


Copyright © 1996-2009 Geotools. All Rights Reserved.