// Geronimo call context is used to track old state that must be restored
GeronimoCallContext geronimoCallContext = new GeronimoCallContext();
// Demarcate component boundaries for connection tracking if we have a tracker
TrackedConnectionAssociator trackedConnectionAssociator = ejbDeployment.getTrackedConnectionAssociator();
if (trackedConnectionAssociator != null) {
// create the connector context... this only works with a TrackedConnectionAssociator using lazy association
ConnectorInstanceContext connectorContext = new ConnectorInstanceContextImpl(ejbDeployment.getUnshareableResources(),
ejbDeployment.getApplicationManagedSecurityResources());
// Set connector context
try {
geronimoCallContext.oldConnectorContext = trackedConnectionAssociator.enter(connectorContext);
} catch (ResourceException e) {
log.error("Error while entering TrackedConnectionAssociator");
return;
}
}