1 Reply Latest reply on Jul 22, 2005 7:34 AM by Ryan McDonough

    Remote EJB and Mixins

    Albert Bachand Newbie

      Hello,

      Is it possible to apply mixins to EJBs that are used remotely?

      I have a bean FooBean that I want to add features to using a mixin. So I wrote IBarBean and BarBean to implement these features and using an introduction I apply the mixin to FooBean.

      Now, my problem is that the client accesses FooBean remotely through a Proxy (ClientContainer?) and, even though FooBean implements IBarBean, it seems like the remote proxy doesn't. So when I try to cast the remote proxy into an IBarBean, I get a ClassCastException.

      I tried to make IFooBean (the interface generated from FooBean by XDoclet, which is implemented by the remote proxy) extend IBarBean but it doesnt't work.

      So, is it possible to make an interface extend another one using introduction? Or more generally, is it possible to apply a mixin to an EJB that is used remotely?

      Thanks!

        • 1. Re: Remote EJB and Mixins
          Ryan McDonough Newbie

           

          So, is it possible to make an interface extend another one using introduction?


          I'm sure you can, but that won't fix your problem. Tthe real issue you have is that your underlying implemetation of that interface must be able to perform the behavior you need to execute. By themselves, interfaces don't do much. I think You'd need to find a way to do something to the proxy.

          One question though, do you have the aspects working on both side of the equation? Meaning both client and server are using AOP?

          Ryan-