Description of problem: When invoking EJB asynchronous in different deployments and returning a POJO object, which will be retrieved using future.get, we have ClassCastException error. Version-Release number of selected component (if applicable): 6.2 How reproducible: Always. Steps to Reproduce: 1. Deploy an EJB in an EAR that uses Asynchronous methods; 2. Deploy a Servlet in a WAR which will use this EJB; 3. Inject the EJB in a servlet and try to invoke it, then try to retrieve the result. Here's an example: @EJB(lookup="java:global/testejb/testejb-ejb/AsyncService!rh.test.AsyncEJB") private AsyncEJB asyncEJB; @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Future<ReturnObject> futro = asyncEJB.testAsync(); ReturnObject ro; try { // this line below should throw the CCE ro = futro.get(); } catch (InterruptedException e) { printResponse(resp, e.getMessage()); return; } catch (ExecutionException e) { printResponse(resp, e.getMessage()); return; } printResponse(resp, String.format("Servlet response: %s", ro.getMessage())); } Actual results: Error: JBWEB000236: Servlet.service() for servlet rh.test.AsyncServlet threw exception: java.lang.ClassCastException: rh.test.ReturnObject cannot be cast to rh.test.ReturnObject Expected results: Invocation without error Additional info: It will work if we create a custom module with the model objects and make both deployments dependents of this module. The configuration to force EAP to always use pass by value will not help in this issue.
Brad Maxwell <bmaxwell> updated the status of jira WFLY-4331 to Reopened
Brad Maxwell <bmaxwell> updated the status of jira WFLY-4331 to Resolved
Re-acking after "qa_ack flag reset for and jboss-eap-6.4.0 and jboss-eap-6.4.z items" cleanup.
verified
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.