You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Costin Manolache <co...@gmail.com> on 2008/06/28 19:26:59 UTC

InstanceManager javadoc

Hi,

Just one small 'feature' request:

Since InstanceManager in tomcat6 is in such a package ( org.apache - do we
even have permission to use this ??),
could we have some javadocs ?

What are the current plans for the annotation processing / dep injection ?
Is this class the 'root' of all future
annotation processing ?

Costin

Re: InstanceManager javadoc

Posted by Costin Manolache <co...@gmail.com>.
Thanks - my interest is not so much on history, more on what are the plans
for this, is it a 'stable/frozen' API,
and if so - some javadocs to clarify how to use/implement it.

My goal is to add annotations to tomcat-lite - and also just understand the
implementation.
For example the injection of non-annotated fields - what is the intention,
is it based on any spec -
or I'm just not understanding the code ?

I want to try a more pluggable mechanism ( in sandbox - no worry :-) - i.e.
callbacks when
 each 'object of interest' is created (which can also hook into JMX and
maybe other
frameworks like guice/spring/etc), more extensible annotation support, etc.

The package name is the other big question - I didn't know we ( or geronimo
) could use org.apache
for our classes. But moving it would probably break stuff outside of tomcat
- and I assume the intention
is to share it.

Costin

On Sun, Jun 29, 2008 at 10:45 AM, Filip Hanik - Dev Lists <
devlists@hanik.com> wrote:

> here's some history on package etc
>
> http://tomcat.markmail.org/search/?q=InstanceManager
>
> Filip
>
> Costin Manolache wrote:
>
>> Also, is there any documentation (or anyone who can explain)
>> DefaultInstanceManager.processAnnotations() ?
>>
>> Sorry, I'm a bit confused, lots of calls and structures.
>>
>> I'm interested in particular in the 'injectionMap' - from what I read, the
>> method takes the name of the
>> field ( say 'foo' ), and even if it has no annotations it'll still inject
>> it
>> if something named 'foo' is found.
>> The injectionMap would have something like "foo"->"jndiNameForFoo".
>>
>> This seems pretty dangerous - my understanding was that you need to have
>> an
>> annotation in order to
>> have the Resource injected.
>>
>> I'll try searching the mail archives - the comments in the submits don't
>> seem to have more info than the javadocs or
>> comments... Again, sorry if it's something obvious.
>>
>> Costin
>>
>>
>> On Sat, Jun 28, 2008 at 10:26 AM, Costin Manolache <co...@gmail.com>
>> wrote:
>>
>>
>>
>>> Hi,
>>>
>>> Just one small 'feature' request:
>>>
>>> Since InstanceManager in tomcat6 is in such a package ( org.apache - do
>>> we
>>> even have permission to use this ??),
>>> could we have some javadocs ?
>>>
>>> What are the current plans for the annotation processing / dep injection
>>> ?
>>> Is this class the 'root' of all future
>>> annotation processing ?
>>>
>>> Costin
>>>
>>>
>>>
>>
>>  ------------------------------------------------------------------------
>>
>> No virus found in this incoming message.
>> Checked by AVG. Version: 7.5.526 / Virus Database: 270.4.3/1524 - Release
>> Date: 6/28/2008 7:42 PM
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

Re: InstanceManager javadoc

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
here's some history on package etc

http://tomcat.markmail.org/search/?q=InstanceManager

Filip

Costin Manolache wrote:
> Also, is there any documentation (or anyone who can explain)
> DefaultInstanceManager.processAnnotations() ?
>
> Sorry, I'm a bit confused, lots of calls and structures.
>
> I'm interested in particular in the 'injectionMap' - from what I read, the
> method takes the name of the
> field ( say 'foo' ), and even if it has no annotations it'll still inject it
> if something named 'foo' is found.
> The injectionMap would have something like "foo"->"jndiNameForFoo".
>
> This seems pretty dangerous - my understanding was that you need to have an
> annotation in order to
> have the Resource injected.
>
> I'll try searching the mail archives - the comments in the submits don't
> seem to have more info than the javadocs or
> comments... Again, sorry if it's something obvious.
>
> Costin
>
>
> On Sat, Jun 28, 2008 at 10:26 AM, Costin Manolache <co...@gmail.com> wrote:
>
>   
>> Hi,
>>
>> Just one small 'feature' request:
>>
>> Since InstanceManager in tomcat6 is in such a package ( org.apache - do we
>> even have permission to use this ??),
>> could we have some javadocs ?
>>
>> What are the current plans for the annotation processing / dep injection ?
>> Is this class the 'root' of all future
>> annotation processing ?
>>
>> Costin
>>
>>     
>
>   
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG. 
> Version: 7.5.526 / Virus Database: 270.4.3/1524 - Release Date: 6/28/2008 7:42 PM
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: InstanceManager javadoc

Posted by Costin Manolache <co...@gmail.com>.
On Wed, Jul 2, 2008 at 11:02 AM, David Jencks <da...@yahoo.com>
wrote:

>
> On Jun 29, 2008, at 9:43 AM, Costin Manolache wrote:
>
>  Also, is there any documentation (or anyone who can explain)
>> DefaultInstanceManager.processAnnotations() ?
>>
>> Sorry, I'm a bit confused, lots of calls and structures.
>>
>> I'm interested in particular in the 'injectionMap' - from what I read, the
>> method takes the name of the
>> field ( say 'foo' ), and even if it has no annotations it'll still inject
>> it
>> if something named 'foo' is found.
>> The injectionMap would have something like "foo"->"jndiNameForFoo".
>>
>> This seems pretty dangerous - my understanding was that you need to have
>> an
>> annotation in order to
>> have the Resource injected.
>>
>
> you can also set up injections via web.xml.  Even without this how is this
> dangerous?  The injection map isn't supplied by user code but by server
> code.


It can lead to confusing behavior - depending on how the annotation map is
constructed.
Having a similar field name in 2 servlets for example.
If you use it to inject arbitrary fields in a specific class - and the
injection map is specific to that class - then it works.
But I guess this brings me back to the original question - javadoc on how is
this supposed to work :-)



>
>
> I'm not sure if the standalone tomcat annotation support actually does
> anything.  I wrote it to mimic the functionality of the original standalone
> support (which again IIRC didn't appear to connect to anything useful) when
> getting annotation/injection support to work in a way useful to geronimo.
>  Geronimo uses xbean-reflect to handle object creation and configuration
> which is a very elegant solution IMO.


Sure - this class could be used to replace some of the server.xml-based
object creation ( i.e. xml attributes to setter ), and probably
could be used to replace some of the JMX objection creation.
And of course - it needs to be used to support @Resource.

My point was that it looks like a very useful class - so having docs would
be very nice.

Costin




>
>
> I'll try to find some time to remind myself of how this works and comment
> on it.... but it may be a while.
>
> thanks
> david jencks
>
>>
>>
>> I'll try searching the mail archives - the comments in the submits don't
>> seem to have more info than the javadocs or
>> comments... Again, sorry if it's something obvious.
>>
>> Costin
>>
>>
>> On Sat, Jun 28, 2008 at 10:26 AM, Costin Manolache <co...@gmail.com>
>> wrote:
>>
>>  Hi,
>>>
>>> Just one small 'feature' request:
>>>
>>> Since InstanceManager in tomcat6 is in such a package ( org.apache - do
>>> we
>>> even have permission to use this ??),
>>> could we have some javadocs ?
>>>
>>> What are the current plans for the annotation processing / dep injection
>>> ?
>>> Is this class the 'root' of all future
>>> annotation processing ?
>>>
>>> Costin
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

Re: InstanceManager javadoc

Posted by David Jencks <da...@yahoo.com>.
On Jun 29, 2008, at 9:43 AM, Costin Manolache wrote:

> Also, is there any documentation (or anyone who can explain)
> DefaultInstanceManager.processAnnotations() ?
>
> Sorry, I'm a bit confused, lots of calls and structures.
>
> I'm interested in particular in the 'injectionMap' - from what I  
> read, the
> method takes the name of the
> field ( say 'foo' ), and even if it has no annotations it'll still  
> inject it
> if something named 'foo' is found.
> The injectionMap would have something like "foo"->"jndiNameForFoo".
>
> This seems pretty dangerous - my understanding was that you need to  
> have an
> annotation in order to
> have the Resource injected.

you can also set up injections via web.xml.  Even without this how is  
this dangerous?  The injection map isn't supplied by user code but by  
server code.

I'm not sure if the standalone tomcat annotation support actually does  
anything.  I wrote it to mimic the functionality of the original  
standalone support (which again IIRC didn't appear to connect to  
anything useful) when getting annotation/injection support to work in  
a way useful to geronimo.  Geronimo uses xbean-reflect to handle  
object creation and configuration which is a very elegant solution IMO.

I'll try to find some time to remind myself of how this works and  
comment on it.... but it may be a while.

thanks
david jencks
>
>
> I'll try searching the mail archives - the comments in the submits  
> don't
> seem to have more info than the javadocs or
> comments... Again, sorry if it's something obvious.
>
> Costin
>
>
> On Sat, Jun 28, 2008 at 10:26 AM, Costin Manolache  
> <co...@gmail.com> wrote:
>
>> Hi,
>>
>> Just one small 'feature' request:
>>
>> Since InstanceManager in tomcat6 is in such a package ( org.apache  
>> - do we
>> even have permission to use this ??),
>> could we have some javadocs ?
>>
>> What are the current plans for the annotation processing / dep  
>> injection ?
>> Is this class the 'root' of all future
>> annotation processing ?
>>
>> Costin
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: InstanceManager javadoc

Posted by Costin Manolache <co...@gmail.com>.
Also, is there any documentation (or anyone who can explain)
DefaultInstanceManager.processAnnotations() ?

Sorry, I'm a bit confused, lots of calls and structures.

I'm interested in particular in the 'injectionMap' - from what I read, the
method takes the name of the
field ( say 'foo' ), and even if it has no annotations it'll still inject it
if something named 'foo' is found.
The injectionMap would have something like "foo"->"jndiNameForFoo".

This seems pretty dangerous - my understanding was that you need to have an
annotation in order to
have the Resource injected.

I'll try searching the mail archives - the comments in the submits don't
seem to have more info than the javadocs or
comments... Again, sorry if it's something obvious.

Costin


On Sat, Jun 28, 2008 at 10:26 AM, Costin Manolache <co...@gmail.com> wrote:

> Hi,
>
> Just one small 'feature' request:
>
> Since InstanceManager in tomcat6 is in such a package ( org.apache - do we
> even have permission to use this ??),
> could we have some javadocs ?
>
> What are the current plans for the annotation processing / dep injection ?
> Is this class the 'root' of all future
> annotation processing ?
>
> Costin
>