You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "David Jencks (JIRA)" <ji...@apache.org> on 2010/10/29 02:41:19 UTC

[jira] Created: (OWB-487) Section 5.5.7 restrictions on injecting InjectionPoint not enforced

Section 5.5.7 restrictions on injecting InjectionPoint not enforced
-------------------------------------------------------------------

                 Key: OWB-487
                 URL: https://issues.apache.org/jira/browse/OWB-487
             Project: OpenWebBeans
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.1.0
            Reporter: David Jencks
            Assignee: Gurkan Erdogdu


Section 5.5.7 ends with a couple restrictions on injecting InjectionPoint.  Theres a tck test for one of them, an InjectionPoint in a servlet is not OK.

text:

f a bean that declares any scope other than @Dependent has an injection point of type InjectionPoint and qualifier @Default, the container automatically detects the problem and treats it as a definition error.
If a Java EE component class supporting injection that is not a bean has an injection point of type InjectionPoint and qualifier @Default, the container automatically detects the problem and treats it as a definition error.

test:
org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.not.bean.InjectionPointTest
org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.not.bean.TestServlet_Broken

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


Re: [jira] Created: (OWB-487) Section 5.5.7 restrictions on injecting InjectionPoint not enforced

Posted by Gurkan Erdogdu <gu...@yahoo.com>.
Hi David

Those tests are passed with our Tomcat7 integration. 

Look at BeansDeployer # defineManagedBean 

if(WebBeansUtil.supportsJavaEeComponentInjections(clazz)){

    ......
   
            //Checks that not contains @Inject InjectionPoint
            OWBInjector.checkInjectionPointForInjectInjectionPoint(clazz);
}

If you look at WebBeansUtil # supportsJavaEeComponentInjections method, it 
checks that whether the given class is a Java EE component or not. This 
method checks condition with looking registered OpenWebBeans plugins. Therefore, 
Geronimo plugin must implement "public boolean 
supportsJavaEeComponentInjections(Class)".

Look at  "webbeans-tomcat7" for an example.

Therefore issue is not a bug. I will change its status as "Wont fix."

Gurkan



----- Original Message ----
From: David Jencks (JIRA) <ji...@apache.org>
To: dev@openwebbeans.apache.org
Sent: Fri, October 29, 2010 3:41:19 AM
Subject: [jira] Created: (OWB-487) Section 5.5.7 restrictions on injecting 
InjectionPoint not enforced

Section 5.5.7 restrictions on injecting InjectionPoint not enforced
-------------------------------------------------------------------

                Key: OWB-487
                URL: https://issues.apache.org/jira/browse/OWB-487
            Project: OpenWebBeans
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.1.0
            Reporter: David Jencks
            Assignee: Gurkan Erdogdu


Section 5.5.7 ends with a couple restrictions on injecting InjectionPoint.  
Theres a tck test for one of them, an InjectionPoint in a servlet is not OK.

text:

f a bean that declares any scope other than @Dependent has an injection point of 
type InjectionPoint and qualifier @Default, the container automatically detects 
the problem and treats it as a definition error.
If a Java EE component class supporting injection that is not a bean has an 
injection point of type InjectionPoint and qualifier @Default, the container 
automatically detects the problem and treats it as a definition error.

test:
org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.not.bean.InjectionPointTest

org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.not.bean.TestServlet_Broken


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



[jira] Closed: (OWB-487) Section 5.5.7 restrictions on injecting InjectionPoint not enforced

Posted by "Gurkan Erdogdu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gurkan Erdogdu closed OWB-487.
------------------------------

    Resolution: Won't Fix

> Section 5.5.7 restrictions on injecting InjectionPoint not enforced
> -------------------------------------------------------------------
>
>                 Key: OWB-487
>                 URL: https://issues.apache.org/jira/browse/OWB-487
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.0
>            Reporter: David Jencks
>            Assignee: Gurkan Erdogdu
>         Attachments: OWB-487.patch
>
>
> Section 5.5.7 ends with a couple restrictions on injecting InjectionPoint.  Theres a tck test for one of them, an InjectionPoint in a servlet is not OK.
> text:
> f a bean that declares any scope other than @Dependent has an injection point of type InjectionPoint and qualifier @Default, the container automatically detects the problem and treats it as a definition error.
> If a Java EE component class supporting injection that is not a bean has an injection point of type InjectionPoint and qualifier @Default, the container automatically detects the problem and treats it as a definition error.
> test:
> org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.not.bean.InjectionPointTest
> org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.not.bean.TestServlet_Broken

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


[jira] Commented: (OWB-487) Section 5.5.7 restrictions on injecting InjectionPoint not enforced

Posted by "Gurkan Erdogdu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12926753#action_12926753 ] 

Gurkan Erdogdu commented on OWB-487:
------------------------------------

>>>Is the previous paragraph about plain beans of non-@Dependent scope enforced? 
I think it is checked on some other places in OWB.

> Section 5.5.7 restrictions on injecting InjectionPoint not enforced
> -------------------------------------------------------------------
>
>                 Key: OWB-487
>                 URL: https://issues.apache.org/jira/browse/OWB-487
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.0
>            Reporter: David Jencks
>            Assignee: Gurkan Erdogdu
>         Attachments: OWB-487.patch
>
>
> Section 5.5.7 ends with a couple restrictions on injecting InjectionPoint.  Theres a tck test for one of them, an InjectionPoint in a servlet is not OK.
> text:
> f a bean that declares any scope other than @Dependent has an injection point of type InjectionPoint and qualifier @Default, the container automatically detects the problem and treats it as a definition error.
> If a Java EE component class supporting injection that is not a bean has an injection point of type InjectionPoint and qualifier @Default, the container automatically detects the problem and treats it as a definition error.
> test:
> org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.not.bean.InjectionPointTest
> org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.not.bean.TestServlet_Broken

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


[jira] Commented: (OWB-487) Section 5.5.7 restrictions on injecting InjectionPoint not enforced

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12926445#action_12926445 ] 

David Jencks commented on OWB-487:
----------------------------------

My patch is definitely a very bad idea, it causes a lot of other tck failures.

Gerkan pointed out on the dev list that the tck test can be made to pass by having an OWBPlugin identify Servlets as EE components.  I've modified the geronimo OWB plugin to do this and the test now passes.

Is the previous paragraph about plain beans of non-@Dependent scope enforced?  It looks like the OWBInjector.checkInjectionPointForInjectInjectionPoint method that enforces the check for ee components is only called for ee components.

> Section 5.5.7 restrictions on injecting InjectionPoint not enforced
> -------------------------------------------------------------------
>
>                 Key: OWB-487
>                 URL: https://issues.apache.org/jira/browse/OWB-487
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.0
>            Reporter: David Jencks
>            Assignee: Gurkan Erdogdu
>         Attachments: OWB-487.patch
>
>
> Section 5.5.7 ends with a couple restrictions on injecting InjectionPoint.  Theres a tck test for one of them, an InjectionPoint in a servlet is not OK.
> text:
> f a bean that declares any scope other than @Dependent has an injection point of type InjectionPoint and qualifier @Default, the container automatically detects the problem and treats it as a definition error.
> If a Java EE component class supporting injection that is not a bean has an injection point of type InjectionPoint and qualifier @Default, the container automatically detects the problem and treats it as a definition error.
> test:
> org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.not.bean.InjectionPointTest
> org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.not.bean.TestServlet_Broken

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


[jira] Commented: (OWB-487) Section 5.5.7 restrictions on injecting InjectionPoint not enforced

Posted by "Eric Covener (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12926028#action_12926028 ] 

Eric Covener commented on OWB-487:
----------------------------------

I think this is best read as "... qualifiers @Default, @Any, and no other qualifiers" which really means "when the dependency will be satisfied by the containers built-in injection point.

> Section 5.5.7 restrictions on injecting InjectionPoint not enforced
> -------------------------------------------------------------------
>
>                 Key: OWB-487
>                 URL: https://issues.apache.org/jira/browse/OWB-487
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.0
>            Reporter: David Jencks
>            Assignee: Gurkan Erdogdu
>         Attachments: OWB-487.patch
>
>
> Section 5.5.7 ends with a couple restrictions on injecting InjectionPoint.  Theres a tck test for one of them, an InjectionPoint in a servlet is not OK.
> text:
> f a bean that declares any scope other than @Dependent has an injection point of type InjectionPoint and qualifier @Default, the container automatically detects the problem and treats it as a definition error.
> If a Java EE component class supporting injection that is not a bean has an injection point of type InjectionPoint and qualifier @Default, the container automatically detects the problem and treats it as a definition error.
> test:
> org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.not.bean.InjectionPointTest
> org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.not.bean.TestServlet_Broken

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


[jira] Updated: (OWB-487) Section 5.5.7 restrictions on injecting InjectionPoint not enforced

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Jencks updated OWB-487:
-----------------------------

    Attachment: OWB-487.patch

I'm not sure I completely understand the spec but  this patch does get the test to pass in geronimo/owb.

What does "qualifier @Default" mean?  that @Default is one of the qualifiers (as my patch implements) or that it is the only qualifier (which wont work since in the tck test there's also @Any on the "MANAGED" bean)

> Section 5.5.7 restrictions on injecting InjectionPoint not enforced
> -------------------------------------------------------------------
>
>                 Key: OWB-487
>                 URL: https://issues.apache.org/jira/browse/OWB-487
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.0
>            Reporter: David Jencks
>            Assignee: Gurkan Erdogdu
>         Attachments: OWB-487.patch
>
>
> Section 5.5.7 ends with a couple restrictions on injecting InjectionPoint.  Theres a tck test for one of them, an InjectionPoint in a servlet is not OK.
> text:
> f a bean that declares any scope other than @Dependent has an injection point of type InjectionPoint and qualifier @Default, the container automatically detects the problem and treats it as a definition error.
> If a Java EE component class supporting injection that is not a bean has an injection point of type InjectionPoint and qualifier @Default, the container automatically detects the problem and treats it as a definition error.
> test:
> org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.not.bean.InjectionPointTest
> org.jboss.jsr299.tck.tests.lookup.injectionpoint.broken.not.bean.TestServlet_Broken

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