Bug 909804

Summary: Client Locally transmitted context data is not received by EJB
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Brad Maxwell <bmaxwell>
Component: EJBAssignee: Jaikiran Pai <jpai>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.0.1CC: cdewolf, chaowan, dimitris, jawilson, jmartisk, jpai, myarboro, rdickens, smumford
Target Milestone: ER3   
Target Release: EAP 6.1.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
In previous versions of Red Hat JBoss Enterprise Application Platform 6 a bug presented when an invocation was done on a remote EJB interface of a bean that was deployed on the same server instance as the calling client with the "LocalEJBReceiver" used to handle that invocation. If an EJB client interceptor was used in these instances to pass along certain invocation data that data was never propagated to the target EJB or any of the (server side) interceptors that are applicable for that EJB invocation. This release of the product includes a patch that resolves this issue and all data is now propagated correctly.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-16 20:29:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Brad Maxwell 2013-02-11 06:41:26 UTC
Description of problem:

ContextData attached to request is not transmitted when LocalEJBReceiver is used.

org.jboss.as.ejb3.remote.LocalEJBReceiver:177

context.setContextData(new HashMap<String, Object>());

see also https://issues.jboss.org/browse/AS7-5021


Version-Release number of selected component (if applicable):

JBoss EAP 6.0.1

How reproducible: always

Steps to Reproduce:

EJB Client side interceptor putting data into context map
    @Override
    public void handleInvocation(EJBClientInvocationContext context) throws Exception {
        context.getContextData().put("KEY", "Test");
        context.sendRequest();
    }

EJB Server side interceptor: 

    @AroundInvoke
    private Object aroundInvoke(final InvocationContext invocationContext) throws Exception {
        this.invocationData = invocationContext.getContextData();
        if(this.invocationData.get("KEY") == null)
           System.out.println("FAILED to receive data");
        return invocationContext.proceed();
    }

  
Actual results:

the "KEY" / "Test" is not passed, the server side will get null when it does invocationData.get("KEY")

Expected results:

invocationData.get("KEY") returns "Test"

Additional info:

Community jira: https://issues.jboss.org/browse/AS7-6356

Comment 1 JBoss JIRA Server 2013-02-11 06:58:26 UTC
jaikiran pai <jpai> updated the status of jira AS7-6356 to Coding In Progress

Comment 2 JBoss JIRA Server 2013-02-12 12:05:25 UTC
jaikiran pai <jpai> made a comment on jira AS7-6356

Pull request sent

Comment 3 Brad Maxwell 2013-02-19 16:12:10 UTC
Community fix marked AS7-6356 => 7.3.0.Alpha1, setting target for bz to EAP 6.2

Comment 5 Jan Martiska 2013-07-22 09:38:39 UTC
verified in EAP 6.1.1.ER3

Comment 6 Scott Mumford 2013-08-20 05:10:56 UTC
Jaikiran, can I get a confirmation on the exact nature of this issue?

As I understand it from reading AS7-5021, the data was put to context.getContextData and serialized normally, however, the data was deserialized incorrectly (put to priveData) which made it inaccessible to the expected 'get' request?

Any info you can offer will help to make the Release Notes the best document it can be.

Comment 8 Scott Mumford 2013-08-26 00:47:38 UTC
Setting for exclusion from 6.1.1 Release notes and removing NEEDINFO request.

Comment 10 Jaikiran Pai 2013-08-26 04:16:18 UTC
Sorry everyone, this issue and some other notifications got ignored due to the huge number of bugzilla mails (most of them useless) that keep ending up in the mailbox. 

Scott, to put in layman terms, the issue which is fixed in this bugzilla is that there used to be a bug where when an invocation was done on a remote EJB interface of a bean and the bean was deployed on the same server instance as the calling client and the "LocalEJBReceiver" was used to handle that invocation, then, if a EJB client interceptor was used to pass along certain invocation data, then that data was never propagated to the target EJB or any of the (server side) interceptors that are applicable for that EJB invocation. The commit associated with this bugzilla fixes that issue.

Sorry for the delay in responding.

Comment 11 Scott Mumford 2013-08-29 02:19:17 UTC
Added a release note based on Jaikiran's comment 10 and setting for inclusion to the 6.1.1 Release Notes document.

Comment 12 Jaikiran Pai 2013-08-29 02:29:33 UTC
Thanks Scott, that looks good.