Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326099 - Need public API to set TransactionalEditingDomain to org.eclipse.emf.transaction.Transaction
Summary: Need public API to set TransactionalEditingDomain to org.eclipse.emf.transact...
Status: CLOSED MOVED
Alias: None
Product: EMF Services
Classification: Modeling
Component: Transaction (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal
Target Milestone: ---   Edit
Assignee: EMF Services Transaction inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-23 16:26 EDT by Tao Weng CLA
Modified: 2022-09-04 12:15 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tao Weng CLA 2010-09-23 16:26:03 EDT
Build Identifier: all 

PROBLEM:

For org.eclipse.emf.transaction.Transaction interface, I need a public method there named "setEditingDomain(TransactionalEditingDomain domain)", so I can set a new editing domain to the transaction. 

Please add that method to the public interface. Thanks

Reproducible: Always
Comment 1 Tao Weng CLA 2010-09-30 11:20:24 EDT
In CompositeEMFOperation class, CompositeEMFOperation is associated with a given editing domain (Let's say ModelerEditingDomain).

When executing its children commands, if the child command is a transactional command, CompositeEMFOperation asks its editing domain (ModelerEditingDomain) to create a transaction (Let's say ModelerTransaction) and uses it to execute the command. However, if the child command is not a transactional command, CompositeEMFOperation creates a NonEMFTransaction and uses it to execute the command.

In the first case, CompositeEMFOperation delegates the transaction creation job to its editing domain (ModelerEditingDomain). The editing domain creates a transaction (ModelerTransaction) and associated an editing domain (ModelerEditingDomain::DELEGATE) to that transaction.

In the second case, CompositeEMFOperation creates a NonEMFTransaction and associated that transaction with CompositeEMFOperation editing domain (ModelerEditingDomain). NonEMFTransaction should be executed in the same editing domain as ModelerTransaction. Both of them should be executed in ModelerEditingDomain::DELEGATE. NonEMFTransaction shouldn't be executed in ModelerEditingDomain. This causes serious issues in our application. 

We have two ways to fix this, 
1) CompositeEMFOperation shouldn’t create NonEMFTransaction. CompositeEMFOperation should delegate transaction creation job to its editing domain as well. 

2) After creating NonEMFTransaction, there is an API to set proper editing domain to that NonEMFTransaction. This is probably easier fix…..

I think that both of these approaches would work, but they all require API changes from open source. As such log this defect.
Comment 2 Pierre-Charles David CLA 2022-05-14 09:51:38 EDT
Eclipse EMF Transaction is moving away from this bugs.eclipse.org issue tracker to https://github.com/eclipse/emf-transaction.

If this issue is relevant to you and still present in the latest release:

* Create a new issue at https://github.com/eclipse/emf-transaction/issues/.
  * Use as title in GitHub the title of this Bugzilla ticket (may include the bug number or not, at your own convenience)
  * In the GitHub description, start with a link to this bugzilla ticket
  * Optionally add new content to the description if it can helps towards resolution
* Update bugzilla ticket
  * Add to "See also" property (up right column) the link to the newly created GitHub issue
  * Add a comment "Migrated to <link-to-newly-created-GitHub-issue>"
  * Set status as CLOSED MOVED

All issues that remain open will be automatically closed next week or so. Then the Bugzilla component for EMF Transaction will be archived and made read-only.
Comment 3 Pierre-Charles David CLA 2022-09-04 12:15:56 EDT
Replaced with https://github.com/eclipse/emf-transaction/issues/15