Yea, that was my thought. -----Original Message----- From: Luke Blanshard [mailto:[EMAIL PROTECTED]
How would you get at such a service? What would your code cast it to? It couldn't be the bean's actual class, because it would probably be a proxy or interceptor. But the interface is not accessible at compile time. I think the framework could support it, but I don't think it would be usable in real life. Luke ---- Original message ---- >Date: Wed, 16 Feb 2005 08:26:41 -0500 >From: Howard Lewis Ship <[EMAIL PROTECTED]> >Subject: Beans as services >To: hivemind-dev@jakarta.apache.org > >Just had an interesting thought to share. > >We need services to have an interface - for proxies and interceptors. > >We want beans that act just like services, but don't have an interface. > >What if: we fabricate the interface for a bean as needed? > >Analyze the the bean, any public method that is not inheritted from >java.lang.Object goes into the synthetic interface. The synthetic >interface extends any interfaces the class implements. > >Proxies and interceptors implement the synthetic interface. > >The core service implementation does not implement the interface (we >don't change existing code) ... BUT that should not matter due to the >way proxies/interceptors are constructed (using either Javassist or >JDK Proxies). > >Might mean that the class attribute of BuilderFactory's <construct> is >optional (if the "interface" for the service is really a class). Or >we just live with a little duplication there (not so bad with >abbreviated class names). There would be a few other kludges >scattered about. > >-- >Howard M. Lewis Ship >Independent J2EE / Open-Source Java Consultant >Creator, Jakarta Tapestry >Creator, Jakarta HiveMind > >Professional Tapestry training, mentoring, support >and project work. http://howardlewisship.com > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]