/** * Returns the CORBA Object which represents this object. * * @param * @return The CORBA object. * @see */ final synchronized RecoveryCoordinator object() { if (thisRef == null) { if (poa == null) { poa = Configuration.getPOA("RecoveryCoordinator" /*#Frozen*/); recoverable = Configuration.isRecoverable(); } try { if (recoverable && globalTID != null) { // Create the object id from the global transaction // identifier and the internal sequence number. byte[] tidBytes = globalTID.toBytes(); byte[] id = new byte[tidBytes.length + 4]; System.arraycopy(tidBytes, 0, id, 4, tidBytes.length); id[0] = (byte) internalSeq; id[1] = (byte) (internalSeq >> 8); id[2] = (byte) (internalSeq >> 16); id[3] = (byte) (internalSeq >> 24); // Activate the object and create the reference. poa.activate_object_with_id(id, this); org.omg.CORBA.Object obj = poa.create_reference_with_id(id, RecoveryCoordinatorHelper.id()); thisRef = RecoveryCoordinatorHelper.narrow(obj); // thisRef = (RecoveryCoordinator) this; } else { poa.activate_object(this); org.omg.CORBA.Object obj = poa.servant_to_reference(this); thisRef = RecoveryCoordinatorHelper.narrow(obj); // thisRef = (RecoveryCoordinator)this; } } catch (Exception exc) { _logger.log(Level.SEVERE, "jts.create_recoverycoordinator_error"); String msg = LogFormatter.getLocalizedMessage(_logger, "jts.create_recoverycoordinator_error"); throw new org.omg.CORBA.INTERNAL(msg); } } return thisRef; }