> -----Original Message-----
> From: Kenji Konaka [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 30, 2001 21:41
> To: [EMAIL PROTECTED]
> Subject: Proxy based Bean implementation ?
>
>
> hi!
>
> I'm wondering if it is possible to do something similar to
> java.lang.reflect.Proxy (dynamic proxy generation)
> but in the place of EJBBean Implementation class.
>
> that is,...
>
> my bean deployment descriptor file may looked like this (originally):
> <session>
> <ejb-name>Me.MyBean</ejb-name>
> <home>com.foo.bar.MyBeanHome</home>
> <remote>com.foo.bar.MyBean</remote>
> <ejb-class>com.foo.bar.MyBeanProxy</ejb-class>
> ...
> </session>
>
> and if the above MyBeanProxy was just a proxy to some other
> class (say MyBeanBody), and the call graph have looked like this:
>
> client -> (container stubs) -> MyBeanProxy -> MyBeanBody
>
> (ie.,MyBeanProxy delegates all the calls to MyBeanBody instance)
>
> doing this is not so difficult if I were to generate the code
> for MyBeanProxy statically (in form of .java source files) and
> then have declared explicitly all of the delegated methods in
> the MyBeanProxy code.
>
> but then if I'd wanted to do this dynamically so that the
> MyBeanProxy part of the code is formed on the fly like in the case of
> java.lang.reflect.Proxy.getProxyClass(...)
> what should I do? (also how should the ejb-jar.xml file
> should look like?)
>
> the motivation behind this, is that I may have not single MyBeanBody
> but many of these: MyBeanBody1,MyBeanBody2,MyBeanBodyN...
> and may want to serve these with single code in place of MyBeanProxy,
> without replicating similar code for each of
> MyBeanProxy1,MyBeanProxy2,MyBeanProxy3,...
>
Why no just duplicate the deployment descriptors and put MyBeanBodyX in
each?
Or you can have a single proxy and an ejb parameter pointing at the body.
- Avi
--
This signature intentionally left blank.
===========================================================================
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".