public class JNDIDirectConnectionFactory extends java.lang.Object implements DirectConnectionFactory
Example
 DirectConnectionFactory factory = JNDIDirectConnectionFactory.newInstance();
 Map<String, Object> props = new HashMap<String, Object>();
 props.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
 props.put(Context.PROVIDER_URL, "t3://" + getHost() + ':' + getPort());
 DirectConnection conn = factory.createConnection(address, props);
 
 
| Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
BEAN_NAME_PROPERTY  | 
static int | 
DEFAULT_MAX_CACHE_SIZE
Default max size of the connection cache of 50 entries 
 | 
static long | 
DEFAULT_MAX_IDLE_TIME
Default idle time is 600 seconds. 
 | 
static java.lang.String | 
SOA_DIRECTCONNECTION_CACHE_MAX_IDLE_TIME
system property name for default max idle time 
 | 
static java.lang.String | 
SOA_DIRECTCONNECTION_CACHE_MAX_SIZE
system property name for default max cache size 
 | 
| Modifier and Type | Method and Description | 
|---|---|
DirectConnection | 
createConnection(java.lang.String servicePath, java.util.Map properties)
Creates a direct binding connection 
 | 
static DirectConnectionFactory | 
newInstance()
Get an instance of DirectConnectionFactory with default cache configuration 
 | 
static DirectConnectionFactory | 
newInstance(int maxCacheSize, long maxIdleTime)
Get an instance of DirectConnectionFactory with specified cache max size and max idle time 
 | 
public static final java.lang.String BEAN_NAME_PROPERTY
public static int DEFAULT_MAX_CACHE_SIZE
public static long DEFAULT_MAX_IDLE_TIME
public static final java.lang.String SOA_DIRECTCONNECTION_CACHE_MAX_IDLE_TIME
public static final java.lang.String SOA_DIRECTCONNECTION_CACHE_MAX_SIZE
public DirectConnection createConnection(java.lang.String servicePath, java.util.Map properties) throws java.lang.Exception
The supported properties include:
javax.naming.ContextJNDIDirectConnectionFactory.BEAN_NAME_PROPERTY - Used to override the default JNDI lookup namecreateConnection in interface DirectConnectionFactoryservicePath - the service path, patterned after /<domain name>/<composite name>/<revision>/<service name> Note that if no domain name is explicitly configured for the composite, then the default value is default.properties - JNDI connection propertiesjava.lang.Exceptionpublic static DirectConnectionFactory newInstance()
public static DirectConnectionFactory newInstance(int maxCacheSize, long maxIdleTime)
maxCacheSize - max size before the cache cleanup is triggeredmaxIdleTime - max idle time before a connection is removed from the cache when the close() is called on the connection