|
Re: Exception handling in receivers and listeners: msg#00060java.javagroups.general
Tim Fox wrote: > > > Bela Ban wrote: >> JGroups has callbacks for system events, like views and merging. If >> you through an exception in such a callback, JGroups will catch it >> and log it, but not propagate it. >> >> The other type of callbacks are methods which can be invoked as a >> result of a cluster wide method call. You can throw any type of >> exception, and JGroups will propagate them back to the caller > > Just to clarify. So if I throw an exception in a > RequestHandler::handle() method or Receiver::receive() method then it > will get propagated back to the thread that either invoked > MessageDispatcher::castMessage() or Channel::send()? Yes and no. An exception thrown in handle() will be returned as part of the RspList for MessageDispatcher.castMessage(), but it will *not* be thrown. An exception in receive() will *not* be returned to the caller, but simply logged. > Bela, you say I can throw any exception but the signature of the > methods are not declared to throw any exceptions, so I assume you mean > I can throw any *unchecked* exception? Yes -- Bela Ban Lead JGroups / Manager JBoss Clustering Group JBoss - a division of Red Hat ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | JGroups 2.2.9 SP4, Bela Ban |
|---|---|
| Next by Date: | Re: [ERROR] NAKACK.handleXmitReq(), Bela Ban |
| Previous by Thread: | Re: Exception handling in receivers and listeners, Tim Fox |
| Next by Thread: | [jgroups-dev] Delay of 2.4, Bela Ban |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |