You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "John D. Ament (JIRA)" <ji...@apache.org> on 2012/11/12 13:07:13 UTC
[jira] [Created] (OWB-719) @Named qualifier is not adhering to CDI
spec default naming conventions
John D. Ament created OWB-719:
---------------------------------
Summary: @Named qualifier is not adhering to CDI spec default naming conventions
Key: OWB-719
URL: https://issues.apache.org/jira/browse/OWB-719
Project: OpenWebBeans
Issue Type: Bug
Components: Core
Affects Versions: 1.1.3
Reporter: John D. Ament
Using the following test case and producer methods, OWB cannot resolve this bean until the third producer method. All three work correctly in Weld. As noted from original poster:
See CDI Spec 1.0, section 3.3.8:
"The default name for a producer method is the method name, unless the
method follows the JavaBeans property getter naming convention, in
which case the default name is the JavaBeans property name."
@RunWith(Arquillian.class)
public class FooTest {
@Deployment
public static Archive<?> createTestArchive() {
return ShrinkWrap.create(JavaArchive.class).addClass(FooMaker.class)
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
}
@Inject @Named("foo")
private String foo;
@Test
public void testFoo() {
Assert.assertEquals("bobo", foo);
}
}
I tried the following producers, only the last worked (OWB not using method name or JavaBeans naming conventions)
@Produces @Named
public String getFoo() {
return "bobo";
}
@Produces @Named
public String foo() {
return "bobo";
}
@Produces @Named("foo")
public String foo() {
return "bobo";
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OWB-719) @Named qualifier is not adhering to CDI
spec default naming conventions
Posted by "Arne Limburg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OWB-719?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Arne Limburg updated OWB-719:
-----------------------------
Fix Version/s: 1.1.7
> @Named qualifier is not adhering to CDI spec default naming conventions
> -----------------------------------------------------------------------
>
> Key: OWB-719
> URL: https://issues.apache.org/jira/browse/OWB-719
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.1.3, 1.1.6
> Reporter: John D. Ament
> Assignee: Arne Limburg
> Fix For: 1.1.7
>
>
> Using the following test case and producer methods, OWB cannot resolve this bean until the third producer method. All three work correctly in Weld. As noted from original poster:
> See CDI Spec 1.0, section 3.3.8:
> "The default name for a producer method is the method name, unless the
> method follows the JavaBeans property getter naming convention, in
> which case the default name is the JavaBeans property name."
> @RunWith(Arquillian.class)
> public class FooTest {
> @Deployment
> public static Archive<?> createTestArchive() {
> return ShrinkWrap.create(JavaArchive.class).addClass(FooMaker.class)
> .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
> }
>
> @Inject @Named("foo")
> private String foo;
>
> @Test
> public void testFoo() {
> Assert.assertEquals("bobo", foo);
> }
> }
> I tried the following producers, only the last worked (OWB not using method name or JavaBeans naming conventions)
> @Produces @Named
> public String getFoo() {
> return "bobo";
> }
> @Produces @Named
> public String foo() {
> return "bobo";
> }
> @Produces @Named("foo")
> public String foo() {
> return "bobo";
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OWB-719) @Named qualifier is not adhering to
CDI spec default naming conventions
Posted by "Arne Limburg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OWB-719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13495244#comment-13495244 ]
Arne Limburg commented on OWB-719:
----------------------------------
Uhh, looking at it we seem to correctly determine the name of the beans for resolution in EL, but we don't set the qualifier correctly.
This does not only apply to producer methods.
@Named
public class MyBean {
}
...
@Inject
@Named("myBean")
will not work either...
> @Named qualifier is not adhering to CDI spec default naming conventions
> -----------------------------------------------------------------------
>
> Key: OWB-719
> URL: https://issues.apache.org/jira/browse/OWB-719
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.1.3
> Reporter: John D. Ament
>
> Using the following test case and producer methods, OWB cannot resolve this bean until the third producer method. All three work correctly in Weld. As noted from original poster:
> See CDI Spec 1.0, section 3.3.8:
> "The default name for a producer method is the method name, unless the
> method follows the JavaBeans property getter naming convention, in
> which case the default name is the JavaBeans property name."
> @RunWith(Arquillian.class)
> public class FooTest {
> @Deployment
> public static Archive<?> createTestArchive() {
> return ShrinkWrap.create(JavaArchive.class).addClass(FooMaker.class)
> .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
> }
>
> @Inject @Named("foo")
> private String foo;
>
> @Test
> public void testFoo() {
> Assert.assertEquals("bobo", foo);
> }
> }
> I tried the following producers, only the last worked (OWB not using method name or JavaBeans naming conventions)
> @Produces @Named
> public String getFoo() {
> return "bobo";
> }
> @Produces @Named
> public String foo() {
> return "bobo";
> }
> @Produces @Named("foo")
> public String foo() {
> return "bobo";
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OWB-719) @Named qualifier is not adhering to CDI
spec default naming conventions
Posted by "Harald Wellmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OWB-719?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Harald Wellmann updated OWB-719:
--------------------------------
Affects Version/s: 1.1.6
> @Named qualifier is not adhering to CDI spec default naming conventions
> -----------------------------------------------------------------------
>
> Key: OWB-719
> URL: https://issues.apache.org/jira/browse/OWB-719
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.1.3, 1.1.6
> Reporter: John D. Ament
> Assignee: Arne Limburg
>
> Using the following test case and producer methods, OWB cannot resolve this bean until the third producer method. All three work correctly in Weld. As noted from original poster:
> See CDI Spec 1.0, section 3.3.8:
> "The default name for a producer method is the method name, unless the
> method follows the JavaBeans property getter naming convention, in
> which case the default name is the JavaBeans property name."
> @RunWith(Arquillian.class)
> public class FooTest {
> @Deployment
> public static Archive<?> createTestArchive() {
> return ShrinkWrap.create(JavaArchive.class).addClass(FooMaker.class)
> .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
> }
>
> @Inject @Named("foo")
> private String foo;
>
> @Test
> public void testFoo() {
> Assert.assertEquals("bobo", foo);
> }
> }
> I tried the following producers, only the last worked (OWB not using method name or JavaBeans naming conventions)
> @Produces @Named
> public String getFoo() {
> return "bobo";
> }
> @Produces @Named
> public String foo() {
> return "bobo";
> }
> @Produces @Named("foo")
> public String foo() {
> return "bobo";
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (OWB-719) @Named qualifier is not adhering to CDI
spec default naming conventions
Posted by "Arne Limburg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OWB-719?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Arne Limburg resolved OWB-719.
------------------------------
Resolution: Fixed
> @Named qualifier is not adhering to CDI spec default naming conventions
> -----------------------------------------------------------------------
>
> Key: OWB-719
> URL: https://issues.apache.org/jira/browse/OWB-719
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.1.3, 1.1.6
> Reporter: John D. Ament
> Assignee: Arne Limburg
> Fix For: 1.1.7
>
>
> Using the following test case and producer methods, OWB cannot resolve this bean until the third producer method. All three work correctly in Weld. As noted from original poster:
> See CDI Spec 1.0, section 3.3.8:
> "The default name for a producer method is the method name, unless the
> method follows the JavaBeans property getter naming convention, in
> which case the default name is the JavaBeans property name."
> @RunWith(Arquillian.class)
> public class FooTest {
> @Deployment
> public static Archive<?> createTestArchive() {
> return ShrinkWrap.create(JavaArchive.class).addClass(FooMaker.class)
> .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
> }
>
> @Inject @Named("foo")
> private String foo;
>
> @Test
> public void testFoo() {
> Assert.assertEquals("bobo", foo);
> }
> }
> I tried the following producers, only the last worked (OWB not using method name or JavaBeans naming conventions)
> @Produces @Named
> public String getFoo() {
> return "bobo";
> }
> @Produces @Named
> public String foo() {
> return "bobo";
> }
> @Produces @Named("foo")
> public String foo() {
> return "bobo";
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OWB-719) @Named qualifier is not adhering to CDI
spec default naming conventions
Posted by "Arne Limburg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OWB-719?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Arne Limburg updated OWB-719:
-----------------------------
Affects Version/s: 1.1.7
> @Named qualifier is not adhering to CDI spec default naming conventions
> -----------------------------------------------------------------------
>
> Key: OWB-719
> URL: https://issues.apache.org/jira/browse/OWB-719
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.1.3, 1.1.6, 1.1.7
> Reporter: John D. Ament
> Assignee: Arne Limburg
>
> Using the following test case and producer methods, OWB cannot resolve this bean until the third producer method. All three work correctly in Weld. As noted from original poster:
> See CDI Spec 1.0, section 3.3.8:
> "The default name for a producer method is the method name, unless the
> method follows the JavaBeans property getter naming convention, in
> which case the default name is the JavaBeans property name."
> @RunWith(Arquillian.class)
> public class FooTest {
> @Deployment
> public static Archive<?> createTestArchive() {
> return ShrinkWrap.create(JavaArchive.class).addClass(FooMaker.class)
> .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
> }
>
> @Inject @Named("foo")
> private String foo;
>
> @Test
> public void testFoo() {
> Assert.assertEquals("bobo", foo);
> }
> }
> I tried the following producers, only the last worked (OWB not using method name or JavaBeans naming conventions)
> @Produces @Named
> public String getFoo() {
> return "bobo";
> }
> @Produces @Named
> public String foo() {
> return "bobo";
> }
> @Produces @Named("foo")
> public String foo() {
> return "bobo";
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OWB-719) @Named qualifier is not adhering to CDI
spec default naming conventions
Posted by "Arne Limburg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OWB-719?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Arne Limburg updated OWB-719:
-----------------------------
Affects Version/s: (was: 1.1.7)
> @Named qualifier is not adhering to CDI spec default naming conventions
> -----------------------------------------------------------------------
>
> Key: OWB-719
> URL: https://issues.apache.org/jira/browse/OWB-719
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.1.3, 1.1.6
> Reporter: John D. Ament
> Assignee: Arne Limburg
> Fix For: 1.1.7
>
>
> Using the following test case and producer methods, OWB cannot resolve this bean until the third producer method. All three work correctly in Weld. As noted from original poster:
> See CDI Spec 1.0, section 3.3.8:
> "The default name for a producer method is the method name, unless the
> method follows the JavaBeans property getter naming convention, in
> which case the default name is the JavaBeans property name."
> @RunWith(Arquillian.class)
> public class FooTest {
> @Deployment
> public static Archive<?> createTestArchive() {
> return ShrinkWrap.create(JavaArchive.class).addClass(FooMaker.class)
> .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
> }
>
> @Inject @Named("foo")
> private String foo;
>
> @Test
> public void testFoo() {
> Assert.assertEquals("bobo", foo);
> }
> }
> I tried the following producers, only the last worked (OWB not using method name or JavaBeans naming conventions)
> @Produces @Named
> public String getFoo() {
> return "bobo";
> }
> @Produces @Named
> public String foo() {
> return "bobo";
> }
> @Produces @Named("foo")
> public String foo() {
> return "bobo";
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OWB-719) @Named qualifier is not adhering to CDI
spec default naming conventions
Posted by "Arne Limburg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OWB-719?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Arne Limburg updated OWB-719:
-----------------------------
Assignee: Arne Limburg
> @Named qualifier is not adhering to CDI spec default naming conventions
> -----------------------------------------------------------------------
>
> Key: OWB-719
> URL: https://issues.apache.org/jira/browse/OWB-719
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.1.3
> Reporter: John D. Ament
> Assignee: Arne Limburg
>
> Using the following test case and producer methods, OWB cannot resolve this bean until the third producer method. All three work correctly in Weld. As noted from original poster:
> See CDI Spec 1.0, section 3.3.8:
> "The default name for a producer method is the method name, unless the
> method follows the JavaBeans property getter naming convention, in
> which case the default name is the JavaBeans property name."
> @RunWith(Arquillian.class)
> public class FooTest {
> @Deployment
> public static Archive<?> createTestArchive() {
> return ShrinkWrap.create(JavaArchive.class).addClass(FooMaker.class)
> .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
> }
>
> @Inject @Named("foo")
> private String foo;
>
> @Test
> public void testFoo() {
> Assert.assertEquals("bobo", foo);
> }
> }
> I tried the following producers, only the last worked (OWB not using method name or JavaBeans naming conventions)
> @Produces @Named
> public String getFoo() {
> return "bobo";
> }
> @Produces @Named
> public String foo() {
> return "bobo";
> }
> @Produces @Named("foo")
> public String foo() {
> return "bobo";
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira