geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jarek Gawor (JIRA)" <>
Subject [jira] Resolved: (GERONIMO-4361) Resource injection of simple env. entry types
Date Wed, 15 Oct 2008 18:08:44 GMT


Jarek Gawor resolved GERONIMO-4361.

       Resolution: Fixed
    Fix Version/s: 2.2

Committed fixes for these issues to trunk (revision 704968) and branches/2.1 (revision 704978).

> Resource injection of simple env. entry types
> ---------------------------------------------
>                 Key: GERONIMO-4361
>                 URL:
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: deployment
>    Affects Versions: 2.1.3, 2.2
>            Reporter: Jarek Gawor
>            Assignee: Jarek Gawor
>             Fix For: 2.1.4, 2.2
> There are a couple problems with @Resource injection of simple env. types:
> 1) If @Resource.mappedName attribute is specified, it becomes the env-entry value. For
example, if we have @Resource(mappedName = "java:comp/env/bar") String foo, the injected value
of "foo" will be "java:comp/env/bar". That's incorrect.
> 2) Right now, @Resource String foo = "bar". without a corresponding env-entry in the
DD will cause a deployment (injection) exception (since there is no entry for it in the JNDI
context). However, according to the Java EE 5 spec, section EE., "... the container
must only inject a value for this resource if the deployer has specified a value to override
the default value" and since the generated DD entry for this resource will have no env-entry-value
element, the injection should not happen (and so the application should deploy without an

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message