You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "David Blevins (JIRA)" <ji...@apache.org> on 2011/09/18 02:35:09 UTC
[jira] [Updated] (OPENEJB-1678) Missing more easily
matched
[ https://issues.apache.org/jira/browse/OPENEJB-1678?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Blevins updated OPENEJB-1678:
-----------------------------------
Description:
If the expected exact name is not found, a second attempt using the variable alone will be attempted.
Given:
singletonBean.getEnvEntry().add(new EnvEntry().name("one").type(String.class).value("hello"));
singletonBean.getEnvEntry().add(new EnvEntry().name("two").type(String.class).value("false"));
singletonBean.getEnvEntry().add(new EnvEntry().name(Blue.class.getName() + "/two").type(String.class).value("true"));
And a class like so:
public static class Blue {
@Resource
private String one;
@Resource
private String two;
//...
}
The injected values will be:
assertEquals("hello", blue.getOne());
assertEquals("true", blue.getTwo());
was:
If the expected exact name is not found, a second attempt using the variable alone will be attempted.
Given:
singletonBean.getEnvEntry().add(new EnvEntry().name("one").type(String.class).value("hello"));
singletonBean.getEnvEntry().add(new EnvEntry().name("two").type(String.class).value("false"));
singletonBean.getEnvEntry().add(new EnvEntry().name(Blue.class.getName() + "/two").type(String.class).value("true"));
The injected values will be:
assertEquals("hello", blue.getOne());
assertEquals("true", blue.getTwo());
> Missing <env-entry> more easily matched
> ---------------------------------------
>
> Key: OPENEJB-1678
> URL: https://issues.apache.org/jira/browse/OPENEJB-1678
> Project: OpenEJB
> Issue Type: Improvement
> Components: deployment
> Reporter: David Blevins
> Assignee: David Blevins
> Fix For: 4.0-beta-1
>
>
> If the expected exact name is not found, a second attempt using the variable alone will be attempted.
> Given:
> singletonBean.getEnvEntry().add(new EnvEntry().name("one").type(String.class).value("hello"));
> singletonBean.getEnvEntry().add(new EnvEntry().name("two").type(String.class).value("false"));
> singletonBean.getEnvEntry().add(new EnvEntry().name(Blue.class.getName() + "/two").type(String.class).value("true"));
> And a class like so:
> public static class Blue {
> @Resource
> private String one;
> @Resource
> private String two;
>
> //...
> }
> The injected values will be:
> assertEquals("hello", blue.getOne());
> assertEquals("true", blue.getTwo());
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira