ConnectorAdminObjectAdminServiceImplpublic class ConnectorAdminObjectAdminServiceImpl extends ConnectorServiceImpl implements ConnectorAdminServiceAdminObject administration service. It performs the functionality of
creating and deleting the Admin Objects |
Constructors Summary |
---|
public ConnectorAdminObjectAdminServiceImpl()
super();
|
Methods Summary |
---|
public void | addAdminObject(java.lang.String appName, java.lang.String connectorName, java.lang.String jndiName, java.lang.String adminObjectType, java.util.Properties props)
ActiveResourceAdapter ar =
_registry.getActiveResourceAdapter(connectorName);
if(ar == null) {
ifSystemRarLoad(connectorName);
ar = _registry.getActiveResourceAdapter(connectorName);
}
if (ar instanceof ActiveInboundResourceAdapter) {
ActiveInboundResourceAdapter air =
(ActiveInboundResourceAdapter) ar;
air.addAdminObject(appName,connectorName,jndiName,
adminObjectType, props);
} else {
ConnectorRuntimeException cre = new ConnectorRuntimeException(
"This adapter is not 1.5 compliant");
_logger.log(Level.SEVERE,
"rardeployment.non_1.5_compliant_rar",jndiName);
throw cre;
}
| public void | deleteAdminObject(java.lang.String jndiName)
try {
InitialContext ic = new InitialContext();
ic.unbind(jndiName);
}
catch(NamingException ne) {
ResourcesUtil resutil = ResourcesUtil.createInstance();
if(resutil.adminObjectBelongsToSystemRar(jndiName)) {
return;
}
if(ne instanceof NameNotFoundException){
_logger.log(Level.FINE,
"rardeployment.admin_object_delete_failure",jndiName);
_logger.log(Level.FINE,"", ne);
return;
}
ConnectorRuntimeException cre = new ConnectorRuntimeException(
"Failed to delete admin object from jndi");
cre.initCause(ne);
_logger.log(Level.SEVERE,
"rardeployment.admin_object_delete_failure",jndiName);
_logger.log(Level.SEVERE,"", cre);
throw cre;
}
|
|