-
1. Re: Remote EJBs
gavin.king Jul 26, 2006 1:09 PM (in response to texan)1. At least in CVS it is conceptually possible to have a remote Seam component. (I forget whether a nonbuggy implementation made it into 1.0.1.)
However, this feature requires that the implementation class for the remote bean is in the client classpath, which is not usually the case. (I'm not quite sure what I can do about that one .... I suppose I can support @Name on remote interfaces...?)
Alternatively, you can just call the remote EJB using normal EJB3 mechanisms, inject it using @EJB.
2. You need a dedicated remote interface, annotated @Remote.
3. You need to implement your own exception handling layer for this. Either deal with the exception in client code, or in a servlet filter or web.xml. Unfortunately JSF (amazingly) does not provide any good place to handle these kinds of exceptions :-( -
2. Re: Remote EJBs
gavin.king Jul 26, 2006 1:15 PM (in response to texan)"gavin.king@jboss.com" wrote:
3. You need to implement your own exception handling layer for this. Either deal with the exception in client code, or in a servlet filter or web.xml. Unfortunately JSF (amazingly) does not provide any good place to handle these kinds of exceptions :-(
Hmmmm. One thing I *could* do is have Seam provide a client-side interception layer for EJB components (a feature missing from the EJB spec). And then I could provide a built-in interceptor for handling the spec-defined exceptions (ConcurrentAccessException, RemoteException, etc). -
3. Re: Remote EJBs
gavin.king Jul 26, 2006 6:25 PM (in response to texan)OK, so I have implemented client-side interceptors for Seam. All you do is write a normal Seam interceptor (using @Interceptors as a meta-annotation),
and then annotate the actual interceptor class @Interceptor(type=CLIENT).
That is a good place to handle stuff like remote exceptions. -
4. Re: Remote EJBs
texan Jul 26, 2006 6:36 PM (in response to texan)That was fast! I found the section on interceptors in the Seam reference, but that section seems to be describing interceptors that happen before a particular action is executed.
I'm assuming this means that I need to read up on the EJB3 spec some more to find out about client-side interceptors.
Man, I have a lot of catching up to do after two years of maintaining a legacy app!