Best Practices for Exception Handling
Subject:   J2EE and RuntimeException
Date:   2003-11-19 22:30:54
From:   schaefera

As much as I think that converting a checked exception to an unchecked exception is good if the user cannot do anything about it you have to CAREFUL when using it in J2EE.
In an EJB throwing a system exception (RemoteException, RuntimeException or Error) does discard the EJB instance and rolls back the transaction no matter what. This can lead to a serious bottleneck and can cause the system to trash when the failure persists.
Therefore I would only suggest that converting a checked exception into an unchecked exception is only done on the real client side and not in a library or helper classes because you never know where you are used.

Have fun - Andy

1 to 1 of 1
  1. J2EE and RuntimeException
    2003-11-20 07:54:41  anonymous2 [View]

1 to 1 of 1