Methods Summary |
---|
private void | PreCompletionCheck()This implements the checked behaviour for threads calling
the terminator object's completion methods directly.
/* This method has been newly added (Ram J) */
StatusHolder status = new StatusHolder();
Long localTID = new Long(control.getLocalTID(status));
// check if the transaction is active, else throw exception
if (status.value != Status.StatusActive) {
if( status.value == Status.StatusRolledBack) {
TRANSACTION_ROLLEDBACK exc =
new TRANSACTION_ROLLEDBACK(0,
CompletionStatus.COMPLETED_NO);
throw exc;
}
INVALID_TRANSACTION exc =
new INVALID_TRANSACTION(MinorCode.Completed,
CompletionStatus.COMPLETED_NO);
throw exc;
}
// check if there is no outstanding requests, else throw exception
// CHECK(Ram J) should a check for active thread associations
// be done here as well ??
if (control.isOutgoing()) {
INVALID_TRANSACTION exc =
new INVALID_TRANSACTION(MinorCode.DeferredActivities,
CompletionStatus.COMPLETED_NO);
throw exc;
}
|
public Request | _create_request(Context ctx, java.lang.String operation, NVList arg_list, NamedValue result)
throw new org.omg.CORBA.NO_IMPLEMENT("This is a locally constrained object.");
|
public Request | _create_request(Context ctx, java.lang.String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts)
throw new org.omg.CORBA.NO_IMPLEMENT("This is a locally constrained object.");
|
public org.omg.CORBA.Object | _duplicate()
throw new org.omg.CORBA.NO_IMPLEMENT("This is a locally constrained object.");
|
public org.omg.CORBA.DomainManager[] | _get_domain_managers()
throw new org.omg.CORBA.NO_IMPLEMENT("This is a locally constrained object.");
|
public org.omg.CORBA.Object | _get_interface_def()
throw new org.omg.CORBA.NO_IMPLEMENT("This is a locally constrained object.");
|
public org.omg.CORBA.Policy | _get_policy(int policy_type)
throw new org.omg.CORBA.NO_IMPLEMENT("This is a locally constrained object.");
|
public int | _hash(int maximum)
throw new org.omg.CORBA.NO_IMPLEMENT("This is a locally constrained object.");
|
public boolean | _is_a(java.lang.String repository_id)
throw new org.omg.CORBA.NO_IMPLEMENT("This is a locally constrained object.");
|
public boolean | _is_equivalent(org.omg.CORBA.Object that)
throw new org.omg.CORBA.NO_IMPLEMENT("This is a locally constrained object.");
|
public boolean | _non_existent()
throw new org.omg.CORBA.NO_IMPLEMENT("This is a locally constrained object.");
|
public void | _release()
throw new org.omg.CORBA.NO_IMPLEMENT("This is a locally constrained object.");
|
public Request | _request(java.lang.String operation)
throw new org.omg.CORBA.NO_IMPLEMENT("This is a locally constrained object.");
|
public org.omg.CORBA.Object | _set_policy_override(org.omg.CORBA.Policy[] policies, org.omg.CORBA.SetOverrideType set_add)
throw new org.omg.CORBA.NO_IMPLEMENT("This is a locally constrained object.");
|
public synchronized void | commit(boolean reportHeuristics)Requests that the transaction controlled by the Terminator object be
committed.
The commit is passed on the the CoordinatorTerm object. If the heuristic
report flag is set, any heuristic exception raised by the
root Coordinator is returned to the caller,
otherwise any heuristic exception is discarded.
This operation is part of the OMG interface and must not return
any exceptions other than those defined in the OMG interface.
// for checked transaction behaviour (Ram J)
PreCompletionCheck();
// Try to commit the transaction. If the client does not want a
// heuristic report, then the transaction can be completed promptly.
// If the client does not want heuristic reporting, and an
// exception was raised, and it is a Heuristic exception, forget it.
// Any other exception that is raised is returned to the client.
try {
coordTerm.commit(!reportHeuristics);
} catch (HeuristicMixed exc) {
if (reportHeuristics) {
control.destroy(); // added (Ram J) for memory Leak fix
throw exc;
}
} catch (HeuristicHazard exc) {
if (reportHeuristics) {
control.destroy(); // added (Ram J) for memory Leak fix
throw exc;
}
} catch (TRANSACTION_ROLLEDBACK exc) {
control.destroy(); // added (Ram J) for memory Leak fix
throw exc;
} catch(LogicErrorException exc) {
control.destroy(); // added (Ram J) for memory Leak fix
INTERNAL ex2 = new INTERNAL(MinorCode.LogicError,
CompletionStatus.COMPLETED_NO);
throw ex2;
} catch (INTERNAL exc) { // added (Ram J) percolate up system excs
control.destroy();
throw (INTERNAL) exc;
}
control.destroy(); // added (Ram J) for memory Leak fix
|
final synchronized void | destroy()Destroys the TerminatorImpl object.
if (poa != null && thisRef != null) {
try {
poa.deactivate_object(poa.reference_to_id(thisRef));
thisRef = null;
} catch (Exception exc) {
_logger.log(Level.WARNING,"jts.object_destroy_error","Terminator");
}
}
//finalize();
|
final synchronized java.lang.Terminator | object()Returns the CORBA Object which represents this object.
if (thisRef == null) {
if (poa == null) {
poa = Configuration.getPOA("transient"/*#Frozen*/);
}
try {
poa.activate_object(this);
thisRef =
TerminatorHelper.narrow(poa.servant_to_reference(this));
//thisRef = (Terminator) this;
} catch(ServantAlreadyActive saexc) {
_logger.log(Level.SEVERE,"jts.create_terminator_object_error",saexc);
String msg = LogFormatter.getLocalizedMessage(_logger,
"jts.create_terminator_object_error");
throw new org.omg.CORBA.INTERNAL(msg);
} catch(ServantNotActive snexc) {
_logger.log(Level.SEVERE,"jts.create_terminator_object_error",snexc);
String msg = LogFormatter.getLocalizedMessage(_logger,
"jts.create_terminator_object_error");
throw new org.omg.CORBA.INTERNAL(msg);
} catch(Exception exc) {
_logger.log(Level.SEVERE,"jts.create_terminator_object_error",exc);
String msg = LogFormatter.getLocalizedMessage(_logger,
"jts.create_terminator_object_error");
throw new org.omg.CORBA.INTERNAL(msg);
}
}
return thisRef;
|
public void | rollback()Demands that the transaction represented by the Terminator object
be rolled back.
No heuristics are reported by this operation so if the root Coordinator
raises a heuristic exception, it is cleared before the operation
returns to the caller.
This operation is part of the OMG interface and must not return
any exceptions other than those defined in the OMG interface.
// for checked transaction behaviour (Ram J)
PreCompletionCheck();
// Roll the transaction back.
// If a Heuristic exception was raised, forget it.
// Any other exception that is raised is returned to the client.
try {
coordTerm.rollback();
} catch (HeuristicMixed exc) {
control.destroy(); // added (Ram J) for memory Leak fix
} catch (HeuristicHazard exc) {
control.destroy(); // added (Ram J) for memory Leak fix
} catch (TRANSACTION_ROLLEDBACK exc) {
control.destroy(); // added (Ram J) for memory Leak fix
throw exc;
} catch (LogicErrorException exc) {
control.destroy(); // added (Ram J) for memory Leak fix
INTERNAL ex2 = new INTERNAL(MinorCode.LogicError,
CompletionStatus.COMPLETED_NO);
throw ex2;
} catch (INTERNAL exc) { // added (Ram J) percolate up system excs
control.destroy();
throw (INTERNAL) exc;
}
control.destroy(); // added (Ram J) for memory Leak fix
|
void | setControl(ControlImpl control)sets the control object that points to this terminator.
/* This method has been newly added (Ram J) */
this.control = control;
|