public String toString() { return current.get_coordinator().get_transaction_name()+": "+ " read="+read+ " write="+write+ " upgrade="+upgrade+ " intention_read="+intention_read+ " intention_write="+intention_write; };
public String get_transaction_name() { Thread current = Thread.currentThread(); if (! contexts.containsKey(current)) return null; try { return ((Control) contexts.get(current)).get_coordinator().get_transaction_name(); } catch (Exception e) { if (logger.isDebugEnabled()) logger.debug("Exception: ", e); } return null; }
/**Returns a printable string representing the current transaction. * * @param * * @return The transaction name. If there is no current transaction, * null is returned. * * @see */ public String get_transaction_name() { String result = null; try { Coordinator coord = CurrentTransaction.getCurrentCoordinator(); // Ask the Coordinator object for its name, and return the value. if( coord != null ) result = coord.get_transaction_name(); } // Ignore Unavailable (return null in this case), but allow other exceptions // to percolate up. catch( Unavailable exc ) {} return result; }
synchronized TransactionCoordinator get_transaction_coordinator( Coordinator current ) { if( coordinators.containsKey( current.get_transaction_name() ) ) { return (TransactionCoordinator)coordinators.get( current.get_transaction_name() ); } TransactionCoordinator coordinator = new TransactionCoordinator( this, current, poa ); try { Resource res = ResourceHelper.narrow( poa.servant_to_reference( coordinator ) ); current.register_resource( res ); } catch ( Exception e ) { e.printStackTrace( System.out ); } coordinators.put( current.get_transaction_name(), coordinator ); return coordinator; }; /* -------------------------------------------------------------------------- */
result = name.equals(other.get_transaction_name()); } else { INVALID_TRANSACTION exc = new INVALID_TRANSACTION(
/** removed synchronization at method level since only tranState requires locking */ public boolean is_same_transaction(Coordinator other) throws SystemException { boolean result = false; // Get the names of the two transactions and compare them. if (tranState != null) { if (name == null) name = superInfo.globalTID.toString(); result = name.equals(other.get_transaction_name()); } else { INVALID_TRANSACTION exc = new INVALID_TRANSACTION( MinorCode.Completed, CompletionStatus.COMPLETED_NO); throw exc; } return result; }
public void finalize () { if (jtsLogger.logger.isTraceEnabled()) { jtsLogger.logger.trace("TopLevelTransaction.finalize ()"); } if (_originalTransaction != null) { String name = null; Coordinator coord = null; try { coord = _originalTransaction.get_coordinator(); if (coord != null) { name = coord.get_transaction_name(); } } catch (Exception e) { } coord = null; jtsLogger.i18NLogger.warn_extensions_tltnestedscope(((name != null) ? name : "UNKNOWN")); name = null; _originalTransaction = null; } super.finalize(); }
public String toString() { String s = current.get_coordinator().get_transaction_name()+ ": state="+state+" to_do="+(to_do==LOCK?"lock":"chng")+" set="; if( set_mode==null ) { s = s + "null"; } else { s = s + set_mode.value(); } s =s +" reset="; if( reset_mode==null ) { s = s +"null"; } else { s = s + reset_mode.value(); } return s; };
return _control.get_coordinator().get_transaction_name();
return _control.get_coordinator().get_transaction_name();
name = coord.get_transaction_name();