Methods Summary |
---|
public void | addActiveResourceAdapter(java.lang.String rarModuleName, ActiveResourceAdapter rar)Adds the object implementing ActiveResourceAdapter
interface to the registry.
resourceAdapters.put(rarModuleName,rar);
_logger.log(Level.FINE,
"Added the active resource adapter to connector registry",
rarModuleName);
|
public void | addManagedConnectionFactory(java.lang.String poolName, PoolMetaData pmd)Add MCF instance pertaining to the poolName to the registry.
factories.put(poolName, pmd);
_logger.fine("Added MCF to connector registry for: "+ poolName);
|
public void | addResourceAdapterConfig(java.lang.String rarName, ResourceAdapterConfig raConfig)Add the resource adapter config properties object to registry
against the rarName.
if( rarName != null) {
_logger.log(Level.FINE,
"Adding the resourceAdapter Config to connector registry.",
rarName);
resourceAdapterConfig.put(rarName,raConfig);
}
|
public ActiveResourceAdapter | getActiveResourceAdapter(java.lang.String rarModuleName)Retrieves the object implementing ActiveResourceAdapter interface
from the registry. Key is the rarName.
if(rarModuleName != null) {
_logger.log(Level.FINE,
"returning/found the resource adapter from connector registry",
rarModuleName);
return resourceAdapters.get(rarModuleName);
} else {
_logger.log(Level.FINE,
"Resourceadapter not found in connector registry.Returning null",
rarModuleName);
return null;
}
|
public ActiveResourceAdapter[] | getAllActiveResourceAdapters()Returns all Active Resource Adapters in the connector runtime.
return (ActiveResourceAdapter[])
this.resourceAdapters.values().
toArray(new ActiveResourceAdapter[]{});
|
public com.sun.enterprise.deployment.ConnectorDescriptor | getDescriptor(java.lang.String rarModuleName)Gets the connector descriptor pertaining the rar
ActiveResourceAdapter ar = null;
if(rarModuleName != null) {
ar = resourceAdapters.get(rarModuleName);
}
if (ar != null) {
_logger.log(Level.FINE,
"Found/returing Connector descriptor in connector registry.",
rarModuleName);
return ar.getDescriptor();
} else {
_logger.log(Level.FINE,
"Couldnot find Connector descriptor in connector registry.",
rarModuleName);
return null;
}
|
public static com.sun.enterprise.connectors.ConnectorRegistry | getInstance()Return the ConnectorRegistry instance
_logger.fine("returning the connector registry");
return connectorRegistryInstance;
|
public javax.resource.spi.ManagedConnectionFactory | getManagedConnectionFactory(java.lang.String poolName)Retrieve MCF instance pertaining to the poolName from the registry.
if(poolName != null) {
_logger.log(Level.FINE,
"Returning the MCF from connector registry.", poolName);
PoolMetaData pmd = factories.get( poolName );
if (pmd != null) {
return pmd.getMCF();
}
}
return null;
|
public PoolMetaData | getPoolMetaData(java.lang.String poolName)
return factories.get( poolName );
|
public ResourceAdapterConfig | getResourceAdapterConfig(java.lang.String rarName)Get the resource adapter config properties object registered with
registry against the rarName.
if(rarName != null) {
_logger.log(Level.FINE,
"Returing the resourceadapter Config from registry.",rarName);
return resourceAdapterConfig.get(rarName);
} else {
return null;
}
|
public com.sun.enterprise.connectors.authentication.RuntimeSecurityMap | getRuntimeSecurityMap(java.lang.String poolName)Gets the runtime equivalent of policies enforced by the Security Maps
pertaining to a pool from the Pool's Meta Data.
if(poolName != null) {
_logger.log(Level.FINE,
"Returing the security map from connector registry.", poolName);
PoolMetaData pmd = factories.get(poolName);
return pmd.getRuntimeSecurityMap();
} else {
return null;
}
|
public boolean | isMCFCreated(java.lang.String poolName)Checks if the MCF pertaining to the pool is instantiated and present
in the registry. Each pool has its own MCF instance.
boolean created = factories.containsKey( poolName );
_logger.fine("isMCFCreated " + poolName + " - " + created);
return created;
|
public boolean | isRegistered(java.lang.String rarModuleName)Checks whether the rar is already deployed i.e registered with
connector registry
_logger.log(Level.FINE,
"Checking for MCF presence in connector registry.",rarModuleName);
return resourceAdapters.containsKey(rarModuleName);
|
public boolean | removeActiveResourceAdapter(java.lang.String rarModuleName)Removes the object implementing ActiveResourceAdapter
interface from the registry.
This method is called whenever an active connector module
is removed from the Connector runtime. [eg. undeploy/recreate etc]
Object o = resourceAdapters.remove( rarModuleName );
if( o == null) {
_logger.fine("Failed to remove the resource adapter from connector registry" +
rarModuleName);
return false;
} else {
_logger.log(Level.FINE,
"removed the active resource adapter from connector registry",
rarModuleName);
return true;
}
|
public boolean | removeManagedConnectionFactory(java.lang.String poolName)Remove MCF instance pertaining to the poolName from the registry.
if(factories.remove(poolName) == null) {
_logger.log(Level.FINE,
"Failed to remove the MCF from connector registry.", poolName);
return false;
} else {
_logger.fine("removeMCF " + poolName + " - " + !factories.containsKey(poolName));
return true;
}
|
public boolean | removeResourceAdapterConfig(java.lang.String rarName)Remove the resource adapter config properties object from registry
if(resourceAdapterConfig.remove(rarName) == null) {
_logger.log(Level.FINE,
"failed to remove the resourceAdapter config from registry.",
rarName);
return false;
} else {
_logger.log(Level.FINE,
"Removed the resourceAdapter config map from registry.",
rarName);
return true;
}
|