James Cook <[EMAIL PROTECTED]> writes:
>It seems that it would be desirable to encapsulate any remote references to
>EJBObjects with some type of delegation object.

>This way, if an error occurs
>when referencing this remote object, a recovery process could be initiated,

Isn't this a feature your chosen EJB server should be providing?

Resilient network comms would seem to me to be a basic requirement of
any enterprise-class server product, which is what an EJB server is
supposed to be.

Yeah, I know all the usual gubbins about things like an IDEPORTMENT
flag, and the app server infrastructure having to take care two calls
don't get through to the server, etc, but surely that is exactly the
point - this sort of stuff usually cannot be handled completely reliably
at the "application" level - it usually requires "system" and
"infrastructure" involvement to get it completely right.

>or an email could be sent, or any number of pre- and post-call operations
>can take place.

OK, granted there may be other reasons you want to do this kind of
stuff, so here is what I would tend to do:

Can you not simplify the situation you have to deal with by adopting
some sort of "coding convention"
- e.g. have every business method declared as throwing a RemoteException
and a company/application specific exception, say InameAppException in
your case, with suitable sub-types for more fine-grained error reporting
- like "SalaryException extends InameAppException".

Then in your invoke method you only have to test for two checked
exceptions (RemoteException and InameAppException), and everything else
will just be a RuntimeException, which you may want to trap, or just
pass through.


<SNIP>


Trust this is of some use.

- Jorgen


----------------------------------------------------------------------
|  Orbware Ltd                              http://www.orbware.com/  |
|         --- Enterprise technology for the "real world" ---         |
|  Try the OrCAS EJB server -- Completely free for development use.  |
----------------------------------------------------------------------

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to