Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311894

Summary: SDO: Deserialize fails upon redeploy on JBoss EAP
Product: z_Archived Reporter: David McCann <david.mccann>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix
none
Proposed fix v2
none
Proposed fix v3 none

Description David McCann CLA 2010-05-06 10:18:42 EDT
Our method of caching global helper contexts for JBoss (and presumably WAS) via application name is not sufficient, as deserialization will fail after a redeployment has occurred.  This is due to the fact that the application name will be the same after a redeploy, but the class loader will not.  We perform the look up in the global context map using the application name, and find the one we stored during the previous deployment, with an invalid class loader.  Since the loaders are different exceptions will occur during deserialize.

We will need to be able to determine if a redeployment has occurred.
Comment 1 David McCann CLA 2010-05-06 11:16:45 EDT
Created attachment 167321 [details]
Proposed fix
Comment 2 David McCann CLA 2010-05-06 15:25:00 EDT
Created attachment 167374 [details]
Proposed fix v2

Includes minor changes based on the review.
Comment 3 David McCann CLA 2010-05-12 11:40:06 EDT
Created attachment 168175 [details]
Proposed fix v3

The last proposed fix was breaking WLS.  Since WLS has listener code in place to handle a redeployment, and OC4J will always cache on classloader, we should only get into the 'new' code block that checks for redeploy for WAS and JBOSS, and only then if keyed on application name.
Comment 4 David McCann CLA 2010-05-12 15:30:58 EDT
Reviewed by: matt.macivor@oracle.com; blaise.doughan@oracle.com
Tests: WAS, WLS and JBoss server tests pass (redeploy test on JBoss passes) and SDO Unit tests pass as expected
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:18:40 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink