private final static Object lock = new Object();
public GMSCallBack(int waitTime, Habitat habitat) {
GMSAdapterService gmsAdapterService = habitat.getComponent(GMSAdapterService.class);
if (gmsAdapterService != null) {
GMSAdapter gmsAdapter = gmsAdapterService.getGMSAdapter();
if (gmsAdapter != null) {
gmsAdapter.registerFailureRecoveryListener(component, this);
this.habitat = habitat;
servers = habitat.getComponent(Servers.class);
this.waitTime = waitTime;
Properties props = TransactionServiceProperties.getJTSProperties(habitat, false);
if (!Configuration.isDBLoggingEnabled()) {
String instanceName = props.getProperty(Configuration.INSTANCE_NAME);
String logdir = props.getProperty(Configuration.LOG_DIRECTORY);
if (Configuration.getORB() == null) {
// IIOP listeners are not setup yet,
// Create recoveryfile file so that automatic recovery will find it even
// if no XA transaction is envolved.
DefaultTransactionService.setServerName(props);
fence = RecoveryLockFile.getDelegatedTransactionRecoveryFence(this);
}
gms = gmsAdapter.getModule();
// Set the member details when GMS service is ready to store it
try {
_logger.log(Level.INFO, "Storing GMS instance " + instanceName +
" data " + TXLOGLOCATION + " : " + logdir);
gms.updateMemberDetails(instanceName, TXLOGLOCATION, logdir);