public class ArcSDEConnectionFactory extends Object implements ObjectFactory
ObjectFactory
to create an ArcSDE connection pool
to be JNDI
managed.
This factory creates an ISessionPool
out of the following mandatory parameters:
server
(String) the arcsde server
name or IP address
port
(Integer) the TCP/IP port number
where ArcSDE is listening for connection requests
instance
(String) the name of the
arcsde database
user
(String) the database user name to
connect as
password
(String) the database user
password
pool.minConnections
(Integer) how
many connections the connection pool shall be populated with at creation time
pool.maxConnections
(Integer) the
maximum number of connections allowed to be held on the pool at any time
pool.timeOut
(Integer) how
long to wait for an available connection before ISessionPool.getSession()
fails, in
milliseconds.
See the package documentation for further information on how to configure JNDI resources for ArcSDE on GeoTools.
Constructor and Description |
---|
ArcSDEConnectionFactory() |
Modifier and Type | Method and Description |
---|---|
ISessionPool |
getInstance(ArcSDEConnectionConfig config) |
ISessionPool |
getInstance(Map<String,Serializable> properties) |
Object |
getObjectInstance(Object obj,
Name name,
Context nameCtx,
Hashtable<?,?> environment) |
protected String |
getProperty(Reference ref,
String propName,
String defValue) |
void |
setClosableSessionPoolFactory(ISessionPoolFactory newFactory) |
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment) throws Exception
getObjectInstance
in interface ObjectFactory
ISessionPool
ready to be shared (ie, per connection option singleton).
Whether shared or not is a matter of external JNDI configuration.Exception
ObjectFactory.getObjectInstance(Object, Name, Context, Hashtable)
public ISessionPool getInstance(Map<String,Serializable> properties) throws IOException
IOException
public ISessionPool getInstance(ArcSDEConnectionConfig config) throws IOException
IOException
public void setClosableSessionPoolFactory(ISessionPoolFactory newFactory)
Copyright © 1996–2019 Geotools. All rights reserved.