On Mar 24, 2007, at 10:42 PM, David Jencks wrote:
On Mar 24, 2007, at 6:18 PM, Bill Barker wrote:
"Filip Hanik - Dev Lists" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
yo,
I've been in touch with the folks at Geronimo.
They use dependency injection, and have a suggestion on how they
would
like the annotation processor to be able to be injected into tomcat
Here is the email
http://marc.info/?l=geronimo-dev&m=117467149802844&w=2
Here is the proposed patch:
https://issues.apache.org/jira/secure/attachment/12354097/
GERONIMO-3010-1.patch
A big huge -1 to the patch. It doesn't really provide anything to
Tomcat
that it isn't doing already. And to the extent that it is doing
things
differently, it is only adding complexity resulting in doing a
much worse
job.
You might consider the idea of an object creation and destruction
service rather than the current state of the patch which was not
really intended for presentation as something to be applied as is
to tomcat but as a demonstration that tomcat could be made to work
with such a service. I figured that the first step was to
investigate whether this was practical with minimal code changes in
tomcat, and then think about how to further clean up the tomcat
code. I've demonstrated to my own satisfaction that the idea can
work, but the code could be simplified a lot. In its current state
there is essentially no code that isn't already present in tomcat,
although it's arranged slightly differently and is considerably
more uniform.
However, introducing a catalina dependancy into Jasper is a really
huge
no-no. Jasper is useful, and used without Tomcat. To break this
would
require a very good reason, which this patch certainly doesn't
provide.
How does this differ from the current
org.apache.AnnotationProcessor? The only difference I can see is
that I used the project namespace. I can't say I understand the
thinking behind the package for org.apache.AnnotationProcessor.
I'd take out the word LifecycleProvider, and replace it with
something
else as it conflicts with our own idea of Lifecycle.
Ya, I don't much like the name either but those postConstruct and
preDestroy methods are often called lifecycle methods..... I had to
call it something. Any better ideas? ManagedObjectFactory?
I might suggest something like InstanceManager. IIUC, you'd have
these two methods on it:
createInstance(..)
destroyInstance(..)
Assuming I understand the proposal, the default Tomcat implementation
would call through to the AnnotationProcessor and all would stay the
same in that regard. Above that though, I could easily imagine
someone using that interface in Tomcat to provide an implementation
that did instance counting for the Tomcat management console and
maybe even sending out JMX notifications on create/destroy.
I'm not sure I understand the bits about dependencies between Jasper
and Catalina. I grok that Jasper is not to be dependent on Catalina,
but I wonder if there are any shared libraries between the two that
might be a good home for the proposed interface. Are there any
shared "Tomcat project" libs between Jasper and Catalina or does
Jasper pretty much only use third-party libs (libs outside the tomcat
project itself)?
-David
I'd like to get your feedback, this is a chance step for our two
communities to work together.
There's certainly interest on the geronimo side.
Many thanks
david jencks
Filip
---------------------------------------------------------------------
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]