Women in Technology

Hear us Roar



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


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

Full Threads Newest First

Showing messages 1 through 1 of 1.

  • J2EE and RuntimeException
    2003-11-20 07:54:41  anonymous2 [View]

    Check this article on IBM developerWorks for Best practices on handling EJB exceptions

    http://www-106.ibm.com/developerworks/java/library/j-ejbexcept.html

    Cheers