Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311894 - SDO: Deserialize fails upon redeploy on JBoss EAP
Summary: SDO: Deserialize fails upon redeploy on JBoss EAP
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-06 10:18 EDT by David McCann CLA
Modified: 2022-06-09 10:18 EDT (History)
0 users

See Also:


Attachments
Proposed fix (30.93 KB, patch)
2010-05-06 11:16 EDT, David McCann CLA
no flags Details | Diff
Proposed fix v2 (30.35 KB, patch)
2010-05-06 15:25 EDT, David McCann CLA
no flags Details | Diff
Proposed fix v3 (30.78 KB, patch)
2010-05-12 11:40 EDT, David McCann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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