Folks,

<snipped from commons-dev>

Interestingly I went out a bought some fresher books today ( I have 
loads of Java book but mostly from the last millennia).  Whist I was 
there a C# book launched itself if its high shelf and hit this fellow on 
his shoulder.  He he, I hope it was not that sharp.

I now have the 2002 edition of  Ed Roman's "Mastering EJB II".  Page 49, 
Footnote : "For a while, the primary author of this book (Ed Roman) has 
been pushing Sun to adopt some kind of flag that enables you to switch 
between local and remote access to beans without changing code.  The 
idea is that the flag would determine whether the container-generated 
interceptor object would behave as a locally object or remote object. We 
think this is the best  approach because (in reality) many developers 
will misjudge whether to use remote or local interfaces when designing 
their object models, and will have to rewrite parts of their code later 
in their projects. <para> The response from Sun so far is that this 
approach would not work because the semantics of the application change 
when switching between local and remote interfaces, due to the 
differences in pass-by-value versus pass-by-reference. It would be error 
prone to allow developers to 'flip a switch' in this respect.  <para> 
Personally, we don't agree with Sun.  We think the developer is smart 
enough to avoid these mistakes, and the potential benefits outweigh the 
drawbacks.  Many EJB server vendors disagree as well.  They actually 
support this local/remote flag idea through proprietary container tools 
or vendor specific files that are separate from your bean.  Thus if you 
want to, you may be able to still take advantage of these flags without 
sacrificing portability"

There is also a big "opinion" style note on Exception handling on page 
60.  It is too big to type!  Excellent stuff.

I'm not the first to think that RemoteException (and it's implications 
for a local service that wants remote capability) smells.

AltRMI blurs the distinction between local and remote.  It it /nearly/ 
invisible in use.  Of course the developer should be aware of the 
application of the facade pattern for those interfaces they choose to 
publish.

- Paul




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to