On Wed, Jul 2, 2008 at 11:02 AM, David Jencks <[EMAIL PROTECTED]>
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 <[EMAIL PROTECTED]>
>> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to