org.geotools.arcsde.jndi
Class ArcSDEConnectionFactory
java.lang.Object
org.geotools.arcsde.jndi.ArcSDEConnectionFactory
- All Implemented Interfaces:
- javax.naming.spi.ObjectFactory
public class ArcSDEConnectionFactory
- extends java.lang.Object
- implements javax.naming.spi.ObjectFactory
A 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
And the following optional parameters:
See the package documentation for further information on how to configure JNDI resources for
ArcSDE on GeoTools.
- Since:
- 2.5.7
- Version:
- $Id: ArcSDEConnectionFactory.java 34131 2009-10-12 07:39:40Z mbedward $
- Author:
- Gabriel Roldan (OpenGeo)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArcSDEConnectionFactory
public ArcSDEConnectionFactory()
getObjectInstance
public java.lang.Object getObjectInstance(java.lang.Object obj,
javax.naming.Name name,
javax.naming.Context nameCtx,
java.util.Hashtable<?,?> environment)
throws java.lang.Exception
- Specified by:
getObjectInstance
in interface javax.naming.spi.ObjectFactory
- Returns:
- an
ISessionPool
ready to be shared (ie, per connection option singleton).
Whether shared or not is a matter of external JNDI configuration.
- Throws:
java.lang.Exception
- See Also:
ObjectFactory.getObjectInstance(Object, Name, Context, Hashtable)
getInstance
public ISessionPool getInstance(java.util.Map<java.lang.String,java.lang.String> properties)
throws java.io.IOException
- Throws:
java.io.IOException
getInstance
public ISessionPool getInstance(ArcSDEConnectionConfig config)
throws java.io.IOException
- Throws:
java.io.IOException
setClosableSessionPoolFactory
public void setClosableSessionPoolFactory(ISessionPoolFactory newFactory)
getProperty
protected java.lang.String getProperty(javax.naming.Reference ref,
java.lang.String propName,
java.lang.String defValue)
Copyright © 1996-2010 Geotools. All Rights Reserved.