[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Justification for

adrian@jboss.org do-not-reply at jboss.com
Thu Jul 27 12:14:27 EDT 2006


Resource allocation can generally be dealt with try/finally.
The "throws Throwable" is more for when you probably need
to perform some reversing operation in your state, e.g.


  | step1();
  | try
  | {
  |    step2();
  | }
  | catch (Throwable t)
  | {
  |    reverseStep1();
  |    handle(t);
  | }
  | 

Of course step2() doesn't need to explicitly declare "throws Throwable"
but it does help to make you think about! :-)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961341#3961341

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961341



More information about the jboss-dev-forums mailing list