1. /*
  2. * @(#)ContextNotEmptyException.java 1.6 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.naming;
  8. /**
  9. * This exception is thrown when attempting to destroy a context that
  10. * is not empty.
  11. *<p>
  12. * If the program wants to handle this exception in particular, it
  13. * should catch ContextNotEmptyException explicitly before attempting to
  14. * catch NamingException. For example, after catching ContextNotEmptyException,
  15. * the program might try to remove the contents of the context before
  16. * reattempting the destroy.
  17. * <p>
  18. * Synchronization and serialization issues that apply to NamingException
  19. * apply directly here.
  20. *
  21. * @author Rosanna Lee
  22. * @author Scott Seligman
  23. * @version 1.6 03/01/23
  24. *
  25. * @see Context#destroySubcontext
  26. * @since 1.3
  27. */
  28. public class ContextNotEmptyException extends NamingException {
  29. /**
  30. * Constructs a new instance of ContextNotEmptyException using an
  31. * explanation. All other fields default to null.
  32. *
  33. * @param explanation Possibly null string containing
  34. * additional detail about this exception.
  35. * @see java.lang.Throwable#getMessage
  36. */
  37. public ContextNotEmptyException(String explanation) {
  38. super(explanation);
  39. }
  40. /**
  41. * Constructs a new instance of ContextNotEmptyException with
  42. * all name resolution fields and explanation initialized to null.
  43. */
  44. public ContextNotEmptyException() {
  45. super();
  46. }
  47. /**
  48. * Use serialVersionUID from JNDI 1.1.1 for interoperability
  49. */
  50. private static final long serialVersionUID = 1090963683348219877L;
  51. }