1. /*
  2. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  3. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  4. */
  5. package javax.jms;
  6. /**
  7. * <P> This exception is thrown when an
  8. * operation is invalid because a transaction is in progress.
  9. * For instance, an attempt to call <CODE>Session.commit</CODE> when a
  10. * session is part of a distributed transaction should throw a
  11. * <CODE>TransactionInProgressException</CODE>.
  12. *
  13. * @version 26 August 1998
  14. * @author Rahul Sharma
  15. **/
  16. public class TransactionInProgressException extends JMSException {
  17. /** Constructs a <CODE>TransactionInProgressException</CODE> with the
  18. * specified reason and error code.
  19. *
  20. * @param reason a description of the exception
  21. * @param errorCode a string specifying the vendor-specific
  22. * error code
  23. *
  24. **/
  25. public
  26. TransactionInProgressException(String reason, String errorCode) {
  27. super(reason, errorCode);
  28. }
  29. /** Constructs a <CODE>TransactionInProgressException</CODE> with the
  30. * specified reason. The error code defaults to null.
  31. *
  32. * @param reason a description of the exception
  33. **/
  34. public
  35. TransactionInProgressException(String reason) {
  36. super(reason);
  37. }
  38. }