Methods Summary |
---|
void | createLeafMBean(com.sun.enterprise.deployment.Descriptor descriptor)Create jsr77 resource adapter mebans which are contained
within this connector module
ConnectorDescriptor cd = null;
try {
cd = (ConnectorDescriptor) descriptor;
} catch (Exception e) {
throw new MBeanException(e);
}
Switch.getSwitch().getManagementObjectManager().createRARMBean(cd,
this.configManager.getInstanceEnvironment().getName());
|
void | createLeafMBeans()Create jsr77 resource adapter mebans which are contained
within this connector module
Switch.getSwitch().getManagementObjectManager().createRARMBeans(connectorDescriptor,
this.configManager.getInstanceEnvironment().getName());
|
void | createRootMBean()Create jsr77 root mBean
try {
Switch.getSwitch().getManagementObjectManager().createRARModuleMBean(
connectorDescriptor,
this.configManager.getInstanceEnvironment().getName(),
this.configManager.getLocation(this.id));
} catch (Exception e) {
throw new MBeanException(e);
}
|
void | deleteLeafAndRootMBeans()Delete jsr77 mBeans for the module and its' components
deleteLeafMBeans();
deleteRootMBean();
|
void | deleteLeafMBean(com.sun.enterprise.deployment.Descriptor descriptor)Delete jsr77 resource adapter mebans which are contained
within this connector module
ConnectorDescriptor cd = null;
try {
cd = (ConnectorDescriptor) descriptor;
} catch (Exception e) {
throw new MBeanException(e);
}
Switch.getSwitch().getManagementObjectManager().deleteRARMBean(cd,
this.configManager.getInstanceEnvironment().getName());
|
void | deleteLeafMBeans()Delete jsr77 resource adapter mebans which are contained
within this connector module
Switch.getSwitch().getManagementObjectManager().deleteRARMBeans(connectorDescriptor,
this.configManager.getInstanceEnvironment().getName());
|
void | deleteRootMBean()Delete jsr77 root mBean
Switch.getSwitch().getManagementObjectManager().deleteRARModuleMBean(connectorDescriptor,
this.configManager.getInstanceEnvironment().getName());
|
boolean | doLoad(boolean jsr77)Loads stand alone connector module.
//Note: Application.isVirtual will be true for stand-alone module
notifyAppEvent(ApplicationEvent.BEFORE_APPLICATION_LOAD);
if (load()) {
try {
createLeafMBeans();
} catch (MBeanException mbe) {
_logger.log(Level.WARNING,"loader.exception",mbe);
}
return true;
}
return false;
|
public com.sun.enterprise.deployment.ConnectorDescriptor | getConnectorDescriptor()Returns connector descriptor for this module
return connectorDescriptor;
|
boolean | load()Loads stand alone connector module.
try{
ConnectorRuntime cr = ConnectorRuntime.getRuntime();
cr.initialize(ConnectorRuntime.SERVER);
cr.createActiveResourceAdapter(this.configManager.getLocation(this.id),this.id);
return true;
}catch(ConfigException e){
_logger.log(Level.WARNING,"loader.configexception",e);
return false;
}
catch(ConnectorRuntimeException ex) {
_logger.log(Level.WARNING,"Failed to load the rar",ex);
return false;
}
|
private void | setConnectorDescriptor(java.lang.String modID)Create connector descriptor and store in local variable
for subsequent use by jsr77 and connector code.
try {
// hack for setting stand-alone attribute
// this needs to be fixed in connectorArchivist
// remove this code once it is fixed in connectorArchivist
// hack-start
this.application = configManager.getDescriptor(modID, null, false);
connectorDescriptor = (ConnectorDescriptor) application.getStandaloneBundleDescriptor();
// hack-end
} catch(ConfigException ex) {
_logger.log(Level.WARNING,"Failed to get the module directory ");
}
|
void | setState(int state)Set the state for the rootMBean
Switch.getSwitch().getManagementObjectManager().setRARModuleState(state, connectorDescriptor,
this.configManager.getInstanceEnvironment().getName());
|
boolean | unload()Unloads stand alone connector module.
ConnectorRuntime connectorRuntime = ConnectorRuntime.getRuntime();
try {
connectorRuntime.destroyActiveResourceAdapter(this.id,cascade);
configManager.unregisterDescriptor(id);
}
catch(ConnectorRuntimeException cre) {
return false;
}
return true;
|
boolean | unload(boolean jsr77)Unloads stand alone connector module.
if (unload()) {
try {
deleteLeafMBeans();
} catch (MBeanException mbe) {
_logger.log(Level.WARNING,"loader.exception",mbe);
}
return true;
}
return false;
|