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]

Reply via email to