You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Viktor Szathmary <ph...@imapmail.org> on 2003/06/18 00:03:57 UTC

RE: About EJB code in Vlib

hi,

On Tue, 17 Jun 2003 08:22:07 -0400, "Howard M. Lewis Ship"
<hl...@attbi.com> said:

> > I've found the "retrying attempt" fragment in many places in 
> > Vlib app. Is it a common practice on EJB coding in Tapestry 
> > or because of something else ?
> 
> All code I write for an EJB environment has this kind of logic.  
> I would consider EJB code that doesn't include retry loops to be
> dangerously fragile ... any little hickup will be displayed as an error to the end
> user: unacceptible.  Most books gloss over this because they don't want to
> get sidetracked.

i agree that the retry logic is necessary, however this is the
container's responsibility. better containers take care of the
appropriate retry in the remote stubs, so putting this in your
application logic is redundant.

retries are only safe if
 a) the error occured before the remote side got the invocation
 b) the error occured later, but your method is idempotent

in case a) containers usually retry automatically (eg. can't connect ->
find another machine in the cluster).. in case b) you have to give hints
to the container that you methods are indeed safe to invoke potentially
more than once (eg. -methodsAreIdempotent in WebLogic rmic)...

regards,
   viktor



-- 
http://www.fastmail.fm - Send your email first class