use of com.sun.enterprise.connectors.ActiveResourceAdapter in project Payara by payara.
the class ConnectorAdminObjectAdminServiceImpl method addAdminObject.
public void addAdminObject(String appName, String connectorName, ResourceInfo resourceInfo, String adminObjectType, String adminObjectClassName, Properties props) throws ConnectorRuntimeException {
ActiveResourceAdapter ar = _registry.getActiveResourceAdapter(connectorName);
if (ar == null) {
ifSystemRarLoad(connectorName);
ar = _registry.getActiveResourceAdapter(connectorName);
}
if (ar instanceof ActiveOutboundResourceAdapter) {
ActiveOutboundResourceAdapter aor = (ActiveOutboundResourceAdapter) ar;
aor.addAdminObject(appName, connectorName, resourceInfo, adminObjectType, adminObjectClassName, props);
} else {
ConnectorRuntimeException cre = new ConnectorRuntimeException("This adapter is not 1.5 compliant");
_logger.log(Level.SEVERE, "rardeployment.non_1.5_compliant_rar", resourceInfo);
throw cre;
}
}
use of com.sun.enterprise.connectors.ActiveResourceAdapter in project Payara by payara.
the class ResourceAdapterAdminServiceImpl method stopAndRemoveActiveResourceAdapter.
/**
* Stops the resourceAdapter and removes it from connector container/
* registry.
*
* @param moduleName Rarmodule name.
* @return true it is successful stop and removal of ActiveResourceAdapter
* false it stop and removal fails.
*/
private boolean stopAndRemoveActiveResourceAdapter(String moduleName) {
ActiveResourceAdapter acr = null;
if (moduleName != null) {
acr = _registry.getActiveResourceAdapter(moduleName);
}
if (acr != null) {
sendStopToResourceAdapter(acr);
/*
// remove the system rar from class loader chain.
if(ConnectorsUtil.belongsToSystemRA(moduleName)) {
ConnectorClassFinder ccf =
(ConnectorClassFinder)ConnectorRegistry.getInstance().
getActiveResourceAdapter(moduleName).getClassLoader();
ConnectorRuntime connectorRuntime = ConnectorRuntime.getRuntime();
DelegatingClassLoader ccl = connectorRuntime.getConnectorClassLoader();
boolean systemRarCLRemoved = ccl.removeDelegate(ccf);
if(_logger.isLoggable(Level.FINE)){
_logger.log(Level.FINE, "System RAR [ "+moduleName+" ] removed from " +
"classloader chain : " + systemRarCLRemoved);
}
}
*/
_registry.removeLockObject(moduleName);
return _registry.removeActiveResourceAdapter(moduleName);
}
return true;
}
Aggregations