Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.beasys.commerce.foundation.exception
Class SystemException

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              java.lang.RuntimeException
                  javax.ejb.EJBException
                      com.beasys.commerce.foundation.exception.SystemException

All Implemented Interfaces
  MessageCatalogException, Serializable

Direct Known Subclasses:
  CreateSystemException, DeploymentException, DiscountSystemException, FatalWorkflowTransitionException, FinderSystemException, NamingSystemException, PipelineException, RemoteSystemException, UnimplementedException, WebflowException, WorkflowInstantiationException

Deprecated

    @Deprecated
    public class SystemException

extends javax.ejb.EJBException
implements MessageCatalogException

The `SystemException` class is used to signal system-level exceptions to a caller. It is the base system exception class. A system-level exception is a severe exception that prevents a thread of execution from proceeding in a normal manner.

The `SystemException` class is closely tied to the `MessageCatalog`. An `SystemException` contains a log and user message that is constructed using the `MessageCatalog`. In fact, each `SystemException` derivative should have at least one user and log catalog message.

In the case of an EJB, the following guidelines should be followed:

If an enterprise bean method encounters a system-level exception or error that does not allow the method to successfully complete, the method should throw a suitable system exception compatible with the method's throw clause:

- If the bean method encounters a `RuntimeException` or error, it should simply propagate the error from the bean method to the Container.
- If the bean method encounters a checked exception that the bean cannot recover from, the bean method should throw a `SystemException` or derivative that wraps the original exception.
- Any other fatal error should be reported using a `SystemException` or `EJBException`.

A bean provider is responsible for using the standard EJB system exceptions (`EJBException` and `NoSuchEntityException`) where appropriate.

Since the practice of throwing a `RemoteException` has been deprecated in the EJB 1.1 specification, all such occurrences must be replaced with an instance of `SystemException`. In the case of a bean method that calls another bean method, all `RemoteException`s should simply be propagated from the bean method.

If an EJB method throws a `SystemException`, any existing transaction will be rolled back by the Container and the bean's state will be set to "does not exists".

See Also
  `EJBException`, `MessageCatalog`, `MessageCatalogException`, Serialized Form

Field Summary
`protected Stack` | `logMessages` Deprecated The log messages.
`protected Stack` | `userMessages` Deprecated The user messages.

Constructor Summary
`SystemException()` Deprecated Constructs an `SystemException` with no associated message.
`SystemException(String namespace, String messageKey)` Deprecated Class constructor taking the namespace and key of the associated catalog message.
`SystemException(String namespace, String messageKey, Exception exception)` Deprecated Class constructor taking the namespace and key of the associated catalog message and an embedded exception.
`SystemException(String namespace, String messageKey, Object argument)` Deprecated Class constructor taking the namespace and key of the associated catalog message and a message parameter substitution argument.
`SystemException(String namespace, String messageKey, Object[] arguments)` Deprecated Class constructor taking the namespace and key of the associated catalog message and message parameter substitution arguments.
`SystemException(String namespace, String messageKey, Object[] arguments, Exception exception)` Deprecated Class constructor taking the namespace and key of the associated catalog message, message parameter substitution arguments, and an embedded exception.
`SystemException(String namespace, String messageKey, Object argument, Exception exception)` Deprecated Class constructor taking the namespace and key of the associated catalog message, message parameter substitution argument, and an embedded exception.
`SystemException(SystemException topException, SystemException bottomException)` Deprecated Constructs an `SystemException` from two source `SystemException`s by concatinating the screen and log messages of the two source `SystemException`s.

Method Summary
`void` | `addLogMessage(String namespace, String messageKey)` Deprecated Adds a new log catalog message to the stack of associated messages.
`void` | `addLogMessage(String namespace, String messageKey, Object argument)` Deprecated Adds a new log catalog message to the stack of associated messages.
`void` | `addLogMessage(String namespace, String messageKey, Object[] arguments)` Deprecated Adds a new log catalog message to the stack of associated messages.
`void` | `addMessage(String namespace, String messageKey)` Deprecated Adds a new user and log catalog message to the stack of associated messages.
`void` | `addMessage(String namespace, String messageKey, Object argument)` Deprecated Adds a new user catalog message to the stack of associated messages.
`void` | `addMessage(String namespace, String messageKey, Object[] arguments)` Deprecated Adds a new user catalog message to the stack of associated messages.
`void` | `addUserMessage(String namespace, String messageKey)` Deprecated Adds a new user catalog message to the stack of associated messages.
`void` | `addUserMessage(String namespace, String messageKey, Object argument)` Deprecated Adds a new user catalog message to the stack of associated messages.
`void` | `addUserMessage(String namespace, String messageKey, Object[] arguments)` Deprecated Adds a new user catalog message to the stack of associated messages.
`Exception` | `getEmbeddedException()` Deprecated Gets the embedded exception associated with this exception.
`String` | `getLocalizedMessage()` Deprecated Returns the user message associated with this exception.
`String` | `getLogMessage()` Deprecated Returns the first log catalog message associated with this exception.
`Iterator` | `getLogMessages()` Deprecated Returns an iterator over all the log catalog messages associated with this exception.
`String` | `getMessage()` Deprecated Returns the user message associated with this exception.
`String` | `getUserMessage()` Deprecated Returns the first user catalog message associated with this exception.
`Iterator` | `getUserMessages()` Deprecated Returns an iterator over all the user catalog messages associated with this exception.
`String` | `toString()` Deprecated Returns a string representation of this exception.

Methods inherited from class javax.ejb.EJBException
`getCausedByException, printStackTrace, printStackTrace, printStackTrace`

Methods inherited from class java.lang.Throwable
`fillInStackTrace, getCause, getStackTrace, initCause, setStackTrace`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### logMessages

    protected Stack logMessages

  Deprecated
  The log messages.

### userMessages

    protected Stack userMessages

  Deprecated
  The user messages.

Constructor Detail

### SystemException

    public SystemException()

  Deprecated
  Constructs an `SystemException` with no associated message.

### SystemException

    public SystemException(SystemException topException,
                           SystemException bottomException)

  Deprecated
  Constructs an `SystemException` from two source `SystemException`s by concatinating the screen and log messages of the two source `SystemException`s. The messages of the first `SystemException` will preceed those of the second in the constructed `SystemException`. Furthermore, the new `SystemException` will have the embedded exception of the first `SystemException` associated with it.

  Parameters
    `SystemException` - topException
    `SystemException` - bottomException

### SystemException

    public SystemException(String namespace,
                           String messageKey)

  Deprecated
  Class constructor taking the namespace and key of the associated catalog message.

  Parameters
    `namespace` - The associated catalog message namespace.
    `messageKey` - The associated catalog message key.

### SystemException

    public SystemException(String namespace,
                           String messageKey,
                           Exception exception)

  Deprecated
  Class constructor taking the namespace and key of the associated catalog message and an embedded exception.

  Parameters
    `namespace` - The associated catalog message namespace.
    `messageKey` - The associated catalog message key.
    `exception` - The embedded exception.

### SystemException

    public SystemException(String namespace,
                           String messageKey,
                           Object argument)

  Deprecated
  Class constructor taking the namespace and key of the associated catalog message and a message parameter substitution argument.

  Parameters
    `namespace` - The associated catalog message namespace.
    `messageKey` - The associated catalog message key.
    `argument` - The message parameter substitution argument.

### SystemException

    public SystemException(String namespace,
                           String messageKey,
                           Object argument,
                           Exception exception)

  Deprecated
  Class constructor taking the namespace and key of the associated catalog message, message parameter substitution argument, and an embedded exception.

  Parameters
    `namespace` - The associated catalog message namespace.
    `messageKey` - The associated catalog message key.
    `argument` - The message parameter substitution argument.
    `exception` - The embedded exception.

### SystemException

    public SystemException(String namespace,
                           String messageKey,
                           Object[] arguments)

  Deprecated
  Class constructor taking the namespace and key of the associated catalog message and message parameter substitution arguments.

  Parameters
    `namespace` - The associated catalog message namespace.
    `messageKey` - The associated catalog message key.
    `arguments` - The message parameter substitution arguments.

### SystemException

    public SystemException(String namespace,
                           String messageKey,
                           Object[] arguments,
                           Exception exception)

  Deprecated
  Class constructor taking the namespace and key of the associated catalog message, message parameter substitution arguments, and an embedded exception.

  Parameters
    `namespace` - The associated catalog message namespace.
    `messageKey` - The associated catalog message key.
    `arguments` - The message parameter substitution arguments.
    `exception` - The embedded exception.

Method Detail

### getEmbeddedException

    public Exception getEmbeddedException()

  Deprecated
  Description copied from interface: `MessageCatalogException`
  Gets the embedded exception associated with this exception.

  Specified by:
    `getEmbeddedException` in interface `MessageCatalogException`
  Returns
    The embedded exception.

### getLogMessage

    public String getLogMessage()

  Deprecated
  Description copied from interface: `MessageCatalogException`
  Returns the first log catalog message associated with this exception.

  Specified by:
    `getLogMessage` in interface `MessageCatalogException`
  Returns
    The first log catalog message associated with this exception.

### getLogMessages

    public Iterator getLogMessages()

  Deprecated
  Description copied from interface: `MessageCatalogException`
  Returns an iterator over all the log catalog messages associated with this exception.

  Specified by:
    `getLogMessages` in interface `MessageCatalogException`
  Returns
    An iterator over all log catalog messages.

### addLogMessage

    public void addLogMessage(String namespace,
                              String messageKey)

  Deprecated
  Description copied from interface: `MessageCatalogException`
  Adds a new log catalog message to the stack of associated messages.

  Specified by:
    `addLogMessage` in interface `MessageCatalogException`
  Parameters
    `namespace` - Log catalog message namespace.
    `messageKey` - Log catalog message key.

### addLogMessage

    public void addLogMessage(String namespace,
                              String messageKey,
                              Object argument)

  Deprecated
  Description copied from interface: `MessageCatalogException`
  Adds a new log catalog message to the stack of associated messages.

  Specified by:
    `addLogMessage` in interface `MessageCatalogException`
  Parameters
    `namespace` - Log catalog message namespace.
    `messageKey` - Log catalog message key.
    `argument` - Message parameter substitution argument.

### addLogMessage

    public void addLogMessage(String namespace,
                              String messageKey,
                              Object[] arguments)

  Deprecated
  Description copied from interface: `MessageCatalogException`
  Adds a new log catalog message to the stack of associated messages.

  Specified by:
    `addLogMessage` in interface `MessageCatalogException`
  Parameters
    `namespace` - Log catalog message namespace.
    `messageKey` - Log catalog message key.

### getUserMessage

    public String getUserMessage()

  Deprecated
  Description copied from interface: `MessageCatalogException`
  Returns the first user catalog message associated with this exception.

  Specified by:
    `getUserMessage` in interface `MessageCatalogException`
  Returns
    The user catalog message associated with this exception.

### getUserMessages

    public Iterator getUserMessages()

  Deprecated
  Description copied from interface: `MessageCatalogException`
  Returns an iterator over all the user catalog messages associated with this exception.

  Specified by:
    `getUserMessages` in interface `MessageCatalogException`
  Returns
    An iterator over all user catalog messages.

### addUserMessage

    public void addUserMessage(String namespace,
                               String messageKey)

  Deprecated
  Description copied from interface: `MessageCatalogException`
  Adds a new user catalog message to the stack of associated messages.

  Specified by:
    `addUserMessage` in interface `MessageCatalogException`
  Parameters
    `namespace` - User catalog message namespace.
    `messageKey` - User catalog message key.

### addUserMessage

    public void addUserMessage(String namespace,
                               String messageKey,
                               Object argument)

  Deprecated
  Description copied from interface: `MessageCatalogException`
  Adds a new user catalog message to the stack of associated messages.

  Specified by:
    `addUserMessage` in interface `MessageCatalogException`
  Parameters
    `namespace` - User catalog message namespace.
    `messageKey` - User catalog message key.
    `argument` - Message parameter substitution argument.

### addUserMessage

    public void addUserMessage(String namespace,
                               String messageKey,
                               Object[] arguments)

  Deprecated
  Description copied from interface: `MessageCatalogException`
  Adds a new user catalog message to the stack of associated messages.

  Specified by:
    `addUserMessage` in interface `MessageCatalogException`
  Parameters
    `namespace` - User catalog message namespace.
    `messageKey` - User catalog message key.

### addMessage

    public void addMessage(String namespace,
                           String messageKey)

  Deprecated
  Description copied from interface: `MessageCatalogException`
  Adds a new user and log catalog message to the stack of associated messages.

  Specified by:
    `addMessage` in interface `MessageCatalogException`
  Parameters
    `namespace` - User and log catalog message namespace.
    `messageKey` - User and log catalog message key.

### addMessage

    public void addMessage(String namespace,
                           String messageKey,
                           Object argument)

  Deprecated
  Description copied from interface: `MessageCatalogException`
  Adds a new user catalog message to the stack of associated messages.

  Specified by:
    `addMessage` in interface `MessageCatalogException`
  Parameters
    `namespace` - User and log catalog message namespace.
    `messageKey` - User and log catalog message key.
    `argument` - Message parameter substitution argument.

### addMessage

    public void addMessage(String namespace,
                           String messageKey,
                           Object[] arguments)

  Deprecated
  Description copied from interface: `MessageCatalogException`
  Adds a new user catalog message to the stack of associated messages.

  Specified by:
    `addMessage` in interface `MessageCatalogException`
  Parameters
    `namespace` - User and log catalog message namespace.
    `messageKey` - User and log catalog message key.

### getMessage

    public String getMessage()

  Deprecated
  Returns the user message associated with this exception.

  Overrides:
    `getMessage` in class `javax.ejb.EJBException`
  Returns
    The user message associated with this exception.

### getLocalizedMessage

    public String getLocalizedMessage()

  Deprecated
  Returns the user message associated with this exception.

  Overrides:
    `getLocalizedMessage` in class `Throwable`
  Returns
    The user message associated with this exception.

### toString

    public String toString()

  Deprecated
  Returns a string representation of this exception.

  Overrides:
    `toString` in class `Throwable`
  Returns
    A string representation of this exception.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.