This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 269213 - SessionBroker handling of ExceptionHandler broken because stale copy/paste
Summary: SessionBroker handling of ExceptionHandler broken because stale copy/paste
Status: CLOSED DUPLICATE of bug 328404
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-18 11:19 EDT by Sebastien Tardif CLA
Modified: 2022-06-09 10:28 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastien Tardif CLA 2009-03-18 11:19:41 EDT
TopLink/EclipseLink ExceptionHandler broken in SessionBroker because the code copy/paste initialization instead of delegating, and forget to handle ExceptionHandler in the copy/paste.

The bug exist since existance of SessionBroker so TopLink 9.x or before.

Workbench make it clear that ExceptionHandler is expected to be set at SessionBroker level, then will be attached to children sessions. In other words, Workbench allow only to set ExceptionHandler to the SessionBroker.

Code extract from SessionBroker.java:
 public SessionBroker acquireClientSessionBroker() {
        log(SessionLog.FINER, SessionLog.CONNECTION, "acquire_client_session_broker");
        SessionBroker clientBroker = copySessionBroker();
        clientBroker.parent = this;
        clientBroker.getIdentityMapAccessorInstance().setIdentityMapManager(getIdentityMapAccessorInstance().getIdentityMapManager());
        clientBroker.commitManager = getCommitManager();
        clientBroker.commandManager = getCommandManager();
        clientBroker.externalTransactionController = getExternalTransactionController();
        clientBroker.setServerPlatform(getServerPlatform());
...

and
  protected SessionBroker copySessionBroker() {
        SessionBroker broker = new SessionBroker(this.getSessionNamesByClass());

        broker.accessor = getAccessor();
        broker.name = getName();
        broker.sessionLog = getSessionLog();
        broker.project = project;
        broker.eventManager = getEventManager().clone(broker);
        broker.shouldPropagateChanges = shouldPropagateChanges;
	
        return broker;
    }

Other bugs because of the copy/paste:
MetaLink SR 6686868.993  DATABASE PLATFORM SETTINGS IGNORED WHEN USING SESSIONBROKER  
Oracle Bug 6864505 READ QUERIES EXECUTED ON A UOW USE DEFAULT DB PLATFORM INSTEAD OF THE PARENT'S
Oracle Bug 6620329 QUERYEXCEPTION (INVALID PLATFORM OPERATOR) ENCOUNTERED WHEN USING SESSIONBROKE
MetaLink SR 6737909.992 SESSIONBROKER COPY IS NOT UPTODATE SO CLUSTER INVALIDATION BROKEN 
Oracle Bug 6815366 SESSIONBROKER COPY IS NOT UPTODATE SO CLUSTER INVALIDATION BROKEN 

Related but different design issues with SessionBroker:
MetaLink SR 6773959.992 SESSIONBROKER IS NOT COMPATIBLE WITH SESSIONEVENTLISTENER.OUTPUTPARAMETERSDETECT
Oracle Bug 6844598 SESSIONBROKER IS NOT COMPATIBLE WITH SESSIONEVENTLISTENER.OUTPUTPARAMETERSDETECT 
MetaLink SR 6842452.992 SESSIONBROKER EVENT HANDLING MAKE USELESS EVENT DB SPECIFIC 
Oracle Bug 7001303 SessionBROKER EVENT HANDLING MAKE USELESS EVENT DB SPECIFIC
Comment 1 Tom Ware CLA 2009-04-01 13:48:04 EDT
Targetting for 1.1.x so this bug will be a candidate for future patch releases.
Comment 2 Peter Krogh CLA 2009-11-27 13:55:01 EST
 This bug is being moved to Future where we can properly sort them all together based on community votes and severity. We will then assign them accordingly to future patch sets and releases.
Comment 3 Peter Krogh CLA 2009-11-30 11:38:38 EST
Changing the priority of the bugs that have been recently triaged to future.  Targetting them to P2 will differentiate them from the P3s that have been triaged into future earlier.
Comment 4 Andrei Ilitchev CLA 2011-05-16 11:47:15 EDT

*** This bug has been marked as a duplicate of bug 328404 ***
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:28:39 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink