| Summary: | Protect closed sessions and their views against illegal usage | ||
|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Eike Stepper <stepper> |
| Component: | cdo.core | Assignee: | Eike Stepper <stepper> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | adietish, mtaal, smcduff |
| Version: | 2.0 | Flags: | stepper:
galileo+
|
| Target Milestone: | M3 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | Lighter, Faster and Better | ||
|
Description
Eike Stepper
Hmm, the more I think about it the more concerns about performance arise: Even if we protect each API method of CDOSession, CDOView, CDOTransaction and CDOAUdit, what would happen with CDOObject itself?? Should we really protect each method on CDOStore like this? Simon, what do you think? In my view checking for a closed session is the nicest approach (so protect each method). I don't know cdo that well but maybe there is somewhere in the lower layers where this can be checked. Or the otherway around if a session gets closed then maybe it can set a flag in the related objects (transaction, etc. and maybe even cdoobject) that the underlying session is closed. Then the performance for checking it not that large (only check a local flag). gr. Martin (In reply to comment #1) > Hmm, the more I think about it the more concerns about performance arise: Even > if we protect each API method of CDOSession, CDOView, CDOTransaction and > CDOAUdit, what would happen with CDOObject itself?? > > Should we really protect each method on CDOStore like this? > Simon, what do you think? > If we put a check for each API method of CDOSession and CDOView etc... CDOStore would use the one in CDOView.. right ? I don't like the approach of flagging every objects to tell them they are invalid. I would say that we should simply uses a strategy for CDOSession and CDOView. CDOStore should access the strategy using CDOView. It should be fast enough. Right ? I completely agree! Reminder for me: Add CDOSession.isClosed() and CDOView.isClosed() Maybe in common... I added the following API: - CDOProtocolSession.close() - CDOProtocolSession.isClosed() - CDOProtocolView.isClosed() Then I added checks in: - CDOSessionImpl, Session - CDOViewImpl, View - CDOTransactionImpl, Transaction - CDOAudit, Audit - FSMUtil.adapt() to catch all object access Committed to HEAD. Fix available in CDO 2.0.0 I200810091534 Generally available. |