Method from org.apache.geronimo.connector.ActivationSpecWrapper Detail: |
public void activate(MessageEndpointFactory messageEndpointFactory) throws ResourceException {
ResourceAdapter resourceAdapter = activationSpec.getResourceAdapter();
if (resourceAdapter == null) {
resourceAdapterWrapper.registerResourceAdapterAssociation(activationSpec);
}
resourceAdapterWrapper.endpointActivation(messageEndpointFactory, activationSpec);
}
|
public void deactivate(MessageEndpointFactory messageEndpointFactory) {
ResourceAdapter resourceAdapter = activationSpec.getResourceAdapter();
if (resourceAdapter != null) {
resourceAdapterWrapper.endpointDeactivation(messageEndpointFactory, activationSpec);
} else {
//this should never happen, activation spec should have been registered with r.a.
throw new IllegalStateException("ActivationSpec was never registered with ResourceAdapter");
}
}
|
public Object getAttribute(String name) throws Exception {
return delegate.getAttribute(name);
}
Delegating DynamicGBean getAttribute method. |
public String getContainerId() {
return containerId;
}
Returns class of wrapped ActivationSpec. |
public static GBeanInfo getGBeanInfo() {
return GBEAN_INFO;
}
|
public NamedXAResource getRecoveryXAResources() throws SystemException {
if (resourceAdapterWrapper == null) {
throw new IllegalStateException("Attempting to use activation spec when it is not activated");
}
try {
XAResource[] xaResources = resourceAdapterWrapper.getXAResources(new ActivationSpec[]{activationSpec});
if (xaResources == null || xaResources.length == 0) {
return null;
}
return new WrapperNamedXAResource(xaResources[0], containerId);
} catch (ResourceException e) {
throw (SystemException) new SystemException("Could not get XAResource for recovery for mdb: " + containerId).initCause(e);
}
}
|
public ResourceAdapterWrapper getResourceAdapterWrapper() {
return resourceAdapterWrapper;
}
|
public Object invoke(String name,
Object[] arguments,
String[] types) throws Exception {
//we have no dynamic operations.
return null;
}
no-op DynamicGBean method |
public void returnResource(NamedXAResource xaResource) {
//do nothing, no way to return anything.
}
|
public void setAttribute(String name,
Object value) throws Exception {
delegate.setAttribute(name, value);
}
Delegating DynamicGBean setAttribute method. |