[jboss-jira] [JBoss JIRA] (AS7-4119) Issue with using remote WAR application deployed not inside EAR application.

Appa Rao Nali (JIRA) jira-events at lists.jboss.org
Thu Mar 15 00:24:47 EDT 2012


    [ https://issues.jboss.org/browse/AS7-4119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12676939#comment-12676939 ] 

Appa Rao Nali commented on AS7-4119:
------------------------------------

Hi Stuart Douglas and All,
I am also getting the same issue. The injection is working for ApplicationScoped and Default Scope Dependent-Scope and is not working only for "RequestScope".

We need the fix as sson as possible hence I started debuuging the weld code (weld-core-1.1.5.AS71.Final), here are my observations. 
I am new to CDI/Weld and am trying to understand and debug the issue.

The issue is Right context "HttpRequestContextImpl" is not activated during the bean method invocation.

1. During initialization there are 2- therads creating 2 "HttpRequestContextImpl" contexts and the contexts are getting activateed during the bean invocation. In my Debug created objects are (org.jboss.weld.context.http.HttpRequestContextImpl at 523cc8, org.jboss.weld.context.http.HttpRequestContextImpl at 1149fdf)
2. Before bean invocation of the injected bean, it is activating the "HttpRequestContextImpl" by calling the "activate" methods.(In my debug actvated object is org.jboss.weld.context.http.HttpRequestContextImpl at 1149fdf)
3. After that it is getting the contexts list corresponding to scope and checking the active context, context list doesn't have activated context object "org.jboss.weld.context.http.HttpRequestContextImpl at 1149fdf". It has other http request context object(org.jboss.weld.context.http.HttpRequestContextImpl at 523cc8) hence it is throwing the exception.

Activation and bean invocation is not within the same theread?

If you can give me some pointers from here then I dig further to know the exact issue?
                
> Issue with using remote WAR application deployed not inside EAR application. 
> -----------------------------------------------------------------------------
>
>                 Key: AS7-4119
>                 URL: https://issues.jboss.org/browse/AS7-4119
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: CDI / Weld
>    Affects Versions: 7.1.0.Final
>         Environment: Windows 7, JBoss 7.1
>            Reporter: Lukasz Szymik
>            Assignee: Stuart Douglas
>         Attachments: RequestScopedFailTestCase.zip
>
>
> I have application(s) which are build with one EAR application and couple of external WAR applications. I could deploy EAR and WAR applications into JBoss7.1 Final. As soon as I am invoking session bean from WAR application I got: javax.ejb.EJBException: org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.enterprise.context.RequestScoped exception.
> The same issue does not occur if connection is done from remote desktop client (standard Java SE command line application.)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list