1. /*
  2. * @(#)WrongTransaction.java 1.24 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package org.omg.CORBA;
  8. /**
  9. * The CORBA <code>WrongTransaction</code> user-defined exception.
  10. * This exception is thrown only by the methods
  11. * <code>Request.get_response</code>
  12. * and <code>ORB.get_next_response</code> when they are invoked
  13. * from a transaction scope that is different from the one in
  14. * which the client originally sent the request.
  15. * See the OMG Transaction Service Specification for details.
  16. *
  17. * @see <A href="../../../../guide/idl/jidlExceptions.html">documentation on
  18. * Java IDL exceptions</A>
  19. */
  20. public final class WrongTransaction extends UserException {
  21. /**
  22. * Constructs a WrongTransaction object with an empty detail message.
  23. */
  24. public WrongTransaction() {
  25. super(WrongTransactionHelper.id());
  26. }
  27. /**
  28. * Constructs a WrongTransaction object with the given detail message.
  29. * @param reason The detail message explaining what caused this exception to be thrown.
  30. */
  31. public WrongTransaction(String reason) {
  32. super(WrongTransactionHelper.id() + " " + reason);
  33. }
  34. }