use of jakarta.resource.spi.ResourceAdapter in project spring-framework by spring-projects.
the class GenericMessageEndpointManager method stop.
/**
* Deactivates the configured message endpoint.
*/
@Override
public void stop() {
synchronized (this.lifecycleMonitor) {
if (this.running) {
ResourceAdapter resourceAdapter = getResourceAdapter();
Assert.state(resourceAdapter != null, "No ResourceAdapter set");
resourceAdapter.endpointDeactivation(getMessageEndpointFactory(), getActivationSpec());
this.running = false;
}
}
}
use of jakarta.resource.spi.ResourceAdapter in project spring-framework by spring-projects.
the class GenericMessageEndpointManager method start.
/**
* Activates the configured message endpoint.
*/
@Override
public void start() {
synchronized (this.lifecycleMonitor) {
if (!this.running) {
ResourceAdapter resourceAdapter = getResourceAdapter();
Assert.state(resourceAdapter != null, "No ResourceAdapter set");
try {
resourceAdapter.endpointActivation(getMessageEndpointFactory(), getActivationSpec());
} catch (ResourceException ex) {
throw new IllegalStateException("Could not activate message endpoint", ex);
}
this.running = true;
}
}
}
Aggregations