Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Hibernate flush causes transactional domain error
Hibernate flush causes transactional domain error [message #126180] Mon, 23 June 2008 20:18 Go to next message
Manfred Hahn is currently offline Manfred HahnFriend
Messages: 64
Registered: July 2009
Member
Hi Martin,

I use the Eclipse 3.3 with the teneo version 0.8.0.v200805200858.
My actual problem in a GMF application is the auto flush of hibernate.
During a HibernatePersistabeElist.doLoad() a session is opened. With the
close of this session a hibernate flush occures. The database creates a
new key for a new persisted object. This key should be set into the model
but there is no actual transaction open in the Transactional Editing
Domain.
So I get the following exception:

java.lang.IllegalStateException: Cannot modify resource set without a
write transaction
at
org.eclipse.emf.transaction.impl.TransactionChangeRecorder.a ssertWriting(TransactionChangeRecorder.java:322)
at
org.eclipse.emf.transaction.impl.TransactionChangeRecorder.a ppendNotification(TransactionChangeRecorder.java:284)
at
org.eclipse.emf.transaction.impl.TransactionChangeRecorder.p rocessObjectNotification(TransactionChangeRecorder.java:266)
at
org.eclipse.emf.transaction.impl.TransactionChangeRecorder.n otifyChanged(TransactionChangeRecorder.java:222)
at
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify (BasicNotifierImpl.java:247)
at
de.edvchl.clic.workflow.datenabfrage.impl.DatabaseSyncObject Impl.setLogicKey(DatabaseSyncObjectImpl.java:172)
at
de.edvchl.clic.workflow.datenabfrage.impl.DatabaseSyncObject Impl.eSet(DatabaseSyncObjectImpl.java:290)
at
de.edvchl.clic.workflow.ausdruck.impl.AusdruckImpl.eSet(Ausd ruckImpl.java:189)
at
de.edvchl.clic.workflow.ausdruck.impl.KomplexerAusdruckImpl. eSet(KomplexerAusdruckImpl.java:364)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1061)
at
org.eclipse.emf.teneo.hibernate.mapping.property.EAttributeP ropertyHandler.set(EAttributePropertyHandler.java:187)
at
org.hibernate.tuple.entity.AbstractEntityTuplizer.setIdentif ier(AbstractEntityTuplizer.java:211)
at
org.eclipse.emf.teneo.hibernate.tuplizer.EMFTuplizer.setIden tifier(EMFTuplizer.java:116)
at
org.hibernate.persister.entity.AbstractEntityPersister.setId entifier(AbstractEntityPersister.java:3596)
at
org.hibernate.event.def.AbstractSaveEventListener.performSav e(AbstractSaveEventListener.java:171)
at
org.hibernate.event.def.AbstractSaveEventListener.saveWithGe neratedId(AbstractSaveEventListener.java:121)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.sav eWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener .java:187)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.ent ityIsTransient(DefaultSaveOrUpdateEventListener.java:172)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.per formSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:94)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onS aveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl. java:507)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java :499)
at
org.hibernate.engine.CascadingAction$5.cascade(CascadingActi on.java:218)
at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:268)
at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java :216)
at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:16 9)
at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
at
org.hibernate.event.def.AbstractFlushingEventListener.cascad eOnFlush(AbstractFlushingEventListener.java:131)
at
org.hibernate.event.def.AbstractFlushingEventListener.prepar eEntityFlushes(AbstractFlushingEventListener.java:122)
at
org.hibernate.event.def.AbstractFlushingEventListener.flushE verythingToExecutions(AbstractFlushingEventListener.java:65)
at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(De faultFlushEventListener.java:26)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java :338)
at
org.hibernate.transaction.JDBCTransaction.commit(JDBCTransac tion.java:106)
at
org.eclipse.emf.teneo.hibernate.HbSessionWrapper.commitTrans action(HbSessionWrapper.java:82)
at
org.eclipse.emf.teneo.hibernate.mapping.elist.HibernatePersi stableEList.doLoad(HibernatePersistableEList.java:181)
at
org.eclipse.emf.teneo.mapping.elist.PersistableEList.load(Pe rsistableEList.java:207)
at
org.eclipse.emf.teneo.mapping.elist.PersistableEList.delegat eSize(PersistableEList.java:443)
at
org.eclipse.emf.common.util.DelegatingEList.size(DelegatingE List.java:222)
at
org.eclipse.emf.common.util.DelegatingEList$EIterator.hasNex t(DelegatingEList.java:1048)
at
org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator.ge tText(AdapterFactoryItemDelegator.java:69)
at
org.eclipse.emf.edit.provider.ItemPropertyDescriptor$ItemDel egator.getText(ItemPropertyDescriptor.java:201)
at
org.eclipse.emf.edit.ui.provider.PropertyDescriptor$1.getTex t(PropertyDescriptor.java:123)
at
org.eclipse.gmf.runtime.emf.ui.properties.sections.PropertyS heetEntry.getValueAsString(PropertySheetEntry.java:457)
at
org.eclipse.ui.views.properties.PropertySheetViewer.updateEn try(PropertySheetViewer.java:1335)
at
org.eclipse.ui.views.properties.PropertySheetViewer.access$4 (PropertySheetViewer.java:1326)
at
org.eclipse.ui.views.properties.PropertySheetViewer$3.valueC hanged(PropertySheetViewer.java:335)
at
org.eclipse.gmf.runtime.emf.ui.properties.sections.PropertyS heetEntry.fireValueChanged(PropertySheetEntry.java:316)
at
org.eclipse.gmf.runtime.emf.ui.properties.sections.PropertyS heetEntry.setValues(PropertySheetEntry.java:730)
....

I know that I can change the default behavior of the hibernate flush with
the FlushMode, but this time I do not have control over the session, it is
managed by teneo. And since the auto flush occures on the backstage I
don't know where to set the Editing Domain Transaction.
Do you have any advice how to handle this situation?

greetings from
Manfred
Re: Hibernate flush causes transactional domain error [message #126194 is a reply to message #126180] Tue, 24 June 2008 05:10 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Manfred,
Are you using a sessioncontroller?
Because if not then hibernateresource sets the flush mode on manual as a default (at least in my
version). Then the flush should only occur in resource.save.
Can you check if you version has this, see the HibernateResource.getSessionWrapper method, there
should be a call to sessionwrapper.setFlushModeManual.

gr. Martin

Manfred Hahn wrote:
> Hi Martin,
>
> I use the Eclipse 3.3 with the teneo version 0.8.0.v200805200858. My
> actual problem in a GMF application is the auto flush of hibernate.
> During a HibernatePersistabeElist.doLoad() a session is opened. With the
> close of this session a hibernate flush occures. The database creates a
> new key for a new persisted object. This key should be set into the
> model but there is no actual transaction open in the Transactional
> Editing Domain. So I get the following exception:
>
> java.lang.IllegalStateException: Cannot modify resource set without a
> write transaction
> at
> org.eclipse.emf.transaction.impl.TransactionChangeRecorder.a ssertWriting(TransactionChangeRecorder.java:322)
>
> at
> org.eclipse.emf.transaction.impl.TransactionChangeRecorder.a ppendNotification(TransactionChangeRecorder.java:284)
>
> at
> org.eclipse.emf.transaction.impl.TransactionChangeRecorder.p rocessObjectNotification(TransactionChangeRecorder.java:266)
>
> at
> org.eclipse.emf.transaction.impl.TransactionChangeRecorder.n otifyChanged(TransactionChangeRecorder.java:222)
>
> at
> org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify (BasicNotifierImpl.java:247)
>
> at
> de.edvchl.clic.workflow.datenabfrage.impl.DatabaseSyncObject Impl.setLogicKey(DatabaseSyncObjectImpl.java:172)
>
> at
> de.edvchl.clic.workflow.datenabfrage.impl.DatabaseSyncObject Impl.eSet(DatabaseSyncObjectImpl.java:290)
>
> at
> de.edvchl.clic.workflow.ausdruck.impl.AusdruckImpl.eSet(Ausd ruckImpl.java:189)
>
> at
> de.edvchl.clic.workflow.ausdruck.impl.KomplexerAusdruckImpl. eSet(KomplexerAusdruckImpl.java:364)
>
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1061)
>
> at
> org.eclipse.emf.teneo.hibernate.mapping.property.EAttributeP ropertyHandler.set(EAttributePropertyHandler.java:187)
>
> at
> org.hibernate.tuple.entity.AbstractEntityTuplizer.setIdentif ier(AbstractEntityTuplizer.java:211)
>
> at
> org.eclipse.emf.teneo.hibernate.tuplizer.EMFTuplizer.setIden tifier(EMFTuplizer.java:116)
>
> at
> org.hibernate.persister.entity.AbstractEntityPersister.setId entifier(AbstractEntityPersister.java:3596)
>
> at
> org.hibernate.event.def.AbstractSaveEventListener.performSav e(AbstractSaveEventListener.java:171)
>
> at
> org.hibernate.event.def.AbstractSaveEventListener.saveWithGe neratedId(AbstractSaveEventListener.java:121)
>
> at
> org.hibernate.event.def.DefaultSaveOrUpdateEventListener.sav eWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener .java:187)
>
> at
> org.hibernate.event.def.DefaultSaveOrUpdateEventListener.ent ityIsTransient(DefaultSaveOrUpdateEventListener.java:172)
>
> at
> org.hibernate.event.def.DefaultSaveOrUpdateEventListener.per formSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:94)
>
> at
> org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onS aveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
>
> at
> org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl. java:507)
> at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java :499)
> at
> org.hibernate.engine.CascadingAction$5.cascade(CascadingActi on.java:218)
> at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:268)
> at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java :216)
> at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:16 9)
> at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
> at
> org.hibernate.event.def.AbstractFlushingEventListener.cascad eOnFlush(AbstractFlushingEventListener.java:131)
>
> at
> org.hibernate.event.def.AbstractFlushingEventListener.prepar eEntityFlushes(AbstractFlushingEventListener.java:122)
>
> at
> org.hibernate.event.def.AbstractFlushingEventListener.flushE verythingToExecutions(AbstractFlushingEventListener.java:65)
>
> at
> org.hibernate.event.def.DefaultFlushEventListener.onFlush(De faultFlushEventListener.java:26)
>
> at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
> at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java :338)
> at
> org.hibernate.transaction.JDBCTransaction.commit(JDBCTransac tion.java:106)
> at
> org.eclipse.emf.teneo.hibernate.HbSessionWrapper.commitTrans action(HbSessionWrapper.java:82)
>
> at
> org.eclipse.emf.teneo.hibernate.mapping.elist.HibernatePersi stableEList.doLoad(HibernatePersistableEList.java:181)
>
> at
> org.eclipse.emf.teneo.mapping.elist.PersistableEList.load(Pe rsistableEList.java:207)
>
> at
> org.eclipse.emf.teneo.mapping.elist.PersistableEList.delegat eSize(PersistableEList.java:443)
>
> at
> org.eclipse.emf.common.util.DelegatingEList.size(DelegatingE List.java:222)
> at
> org.eclipse.emf.common.util.DelegatingEList$EIterator.hasNex t(DelegatingEList.java:1048)
>
> at
> org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator.ge tText(AdapterFactoryItemDelegator.java:69)
>
> at
> org.eclipse.emf.edit.provider.ItemPropertyDescriptor$ItemDel egator.getText(ItemPropertyDescriptor.java:201)
>
> at
> org.eclipse.emf.edit.ui.provider.PropertyDescriptor$1.getTex t(PropertyDescriptor.java:123)
>
> at
> org.eclipse.gmf.runtime.emf.ui.properties.sections.PropertyS heetEntry.getValueAsString(PropertySheetEntry.java:457)
>
> at
> org.eclipse.ui.views.properties.PropertySheetViewer.updateEn try(PropertySheetViewer.java:1335)
>
> at
> org.eclipse.ui.views.properties.PropertySheetViewer.access$4 (PropertySheetViewer.java:1326)
>
> at
> org.eclipse.ui.views.properties.PropertySheetViewer$3.valueC hanged(PropertySheetViewer.java:335)
>
> at
> org.eclipse.gmf.runtime.emf.ui.properties.sections.PropertyS heetEntry.fireValueChanged(PropertySheetEntry.java:316)
>
> at
> org.eclipse.gmf.runtime.emf.ui.properties.sections.PropertyS heetEntry.setValues(PropertySheetEntry.java:730)
>
> ....
> I know that I can change the default behavior of the hibernate flush
> with the FlushMode, but this time I do not have control over the
> session, it is managed by teneo. And since the auto flush occures on the
> backstage I don't know where to set the Editing Domain Transaction.
> Do you have any advice how to handle this situation?
> greetings from
> Manfred
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Hibernate flush causes transactional domain error [message #126206 is a reply to message #126194] Tue, 24 June 2008 06:43 Go to previous messageGo to next message
Manfred Hahn is currently offline Manfred HahnFriend
Messages: 64
Registered: July 2009
Member
Hi Martin,

Thanks for your immediate response. (I believe you don't sleep ever!)

yes, the setFlushModeManual() call is in my version. But unfortunately I
am using a session controller.
Should I overwrite the getSessionWrapper method or is there another better
place to call setFlushModeManual() for my session (e.g. in the
SessionWrapper itself)?

gr. Manfred
Re: Hibernate flush causes transactional domain error [message #126246 is a reply to message #126206] Tue, 24 June 2008 12:39 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Manfred,
Yes you can directly call the sessionwrapper.setFlushModeManual. Also then what you have to remember
is to do flush yourselve (sessionWrapper.flush()), for example after all resources have been saved
just before you commit the transaction.
If you have time can you enter a bugzilla for this so I can update the documentation?

btw, I cross-posted to the emf newsgroup because teneo is graduating so support is now given there.

gr. Martin

Manfred Hahn wrote:
> Hi Martin,
>
> Thanks for your immediate response. (I believe you don't sleep ever!)
>
> yes, the setFlushModeManual() call is in my version. But unfortunately I
> am using a session controller.
> Should I overwrite the getSessionWrapper method or is there another
> better place to call setFlushModeManual() for my session (e.g. in the
> SessionWrapper itself)?
>
> gr. Manfred
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Hibernate flush causes transactional domain error [message #619282 is a reply to message #126180] Tue, 24 June 2008 05:10 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Manfred,
Are you using a sessioncontroller?
Because if not then hibernateresource sets the flush mode on manual as a default (at least in my
version). Then the flush should only occur in resource.save.
Can you check if you version has this, see the HibernateResource.getSessionWrapper method, there
should be a call to sessionwrapper.setFlushModeManual.

gr. Martin

Manfred Hahn wrote:
> Hi Martin,
>
> I use the Eclipse 3.3 with the teneo version 0.8.0.v200805200858. My
> actual problem in a GMF application is the auto flush of hibernate.
> During a HibernatePersistabeElist.doLoad() a session is opened. With the
> close of this session a hibernate flush occures. The database creates a
> new key for a new persisted object. This key should be set into the
> model but there is no actual transaction open in the Transactional
> Editing Domain. So I get the following exception:
>
> java.lang.IllegalStateException: Cannot modify resource set without a
> write transaction
> at
> org.eclipse.emf.transaction.impl.TransactionChangeRecorder.a ssertWriting(TransactionChangeRecorder.java:322)
>
> at
> org.eclipse.emf.transaction.impl.TransactionChangeRecorder.a ppendNotification(TransactionChangeRecorder.java:284)
>
> at
> org.eclipse.emf.transaction.impl.TransactionChangeRecorder.p rocessObjectNotification(TransactionChangeRecorder.java:266)
>
> at
> org.eclipse.emf.transaction.impl.TransactionChangeRecorder.n otifyChanged(TransactionChangeRecorder.java:222)
>
> at
> org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify (BasicNotifierImpl.java:247)
>
> at
> de.edvchl.clic.workflow.datenabfrage.impl.DatabaseSyncObject Impl.setLogicKey(DatabaseSyncObjectImpl.java:172)
>
> at
> de.edvchl.clic.workflow.datenabfrage.impl.DatabaseSyncObject Impl.eSet(DatabaseSyncObjectImpl.java:290)
>
> at
> de.edvchl.clic.workflow.ausdruck.impl.AusdruckImpl.eSet(Ausd ruckImpl.java:189)
>
> at
> de.edvchl.clic.workflow.ausdruck.impl.KomplexerAusdruckImpl. eSet(KomplexerAusdruckImpl.java:364)
>
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1061)
>
> at
> org.eclipse.emf.teneo.hibernate.mapping.property.EAttributeP ropertyHandler.set(EAttributePropertyHandler.java:187)
>
> at
> org.hibernate.tuple.entity.AbstractEntityTuplizer.setIdentif ier(AbstractEntityTuplizer.java:211)
>
> at
> org.eclipse.emf.teneo.hibernate.tuplizer.EMFTuplizer.setIden tifier(EMFTuplizer.java:116)
>
> at
> org.hibernate.persister.entity.AbstractEntityPersister.setId entifier(AbstractEntityPersister.java:3596)
>
> at
> org.hibernate.event.def.AbstractSaveEventListener.performSav e(AbstractSaveEventListener.java:171)
>
> at
> org.hibernate.event.def.AbstractSaveEventListener.saveWithGe neratedId(AbstractSaveEventListener.java:121)
>
> at
> org.hibernate.event.def.DefaultSaveOrUpdateEventListener.sav eWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener .java:187)
>
> at
> org.hibernate.event.def.DefaultSaveOrUpdateEventListener.ent ityIsTransient(DefaultSaveOrUpdateEventListener.java:172)
>
> at
> org.hibernate.event.def.DefaultSaveOrUpdateEventListener.per formSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:94)
>
> at
> org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onS aveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
>
> at
> org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl. java:507)
> at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java :499)
> at
> org.hibernate.engine.CascadingAction$5.cascade(CascadingActi on.java:218)
> at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:268)
> at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java :216)
> at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:16 9)
> at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
> at
> org.hibernate.event.def.AbstractFlushingEventListener.cascad eOnFlush(AbstractFlushingEventListener.java:131)
>
> at
> org.hibernate.event.def.AbstractFlushingEventListener.prepar eEntityFlushes(AbstractFlushingEventListener.java:122)
>
> at
> org.hibernate.event.def.AbstractFlushingEventListener.flushE verythingToExecutions(AbstractFlushingEventListener.java:65)
>
> at
> org.hibernate.event.def.DefaultFlushEventListener.onFlush(De faultFlushEventListener.java:26)
>
> at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
> at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java :338)
> at
> org.hibernate.transaction.JDBCTransaction.commit(JDBCTransac tion.java:106)
> at
> org.eclipse.emf.teneo.hibernate.HbSessionWrapper.commitTrans action(HbSessionWrapper.java:82)
>
> at
> org.eclipse.emf.teneo.hibernate.mapping.elist.HibernatePersi stableEList.doLoad(HibernatePersistableEList.java:181)
>
> at
> org.eclipse.emf.teneo.mapping.elist.PersistableEList.load(Pe rsistableEList.java:207)
>
> at
> org.eclipse.emf.teneo.mapping.elist.PersistableEList.delegat eSize(PersistableEList.java:443)
>
> at
> org.eclipse.emf.common.util.DelegatingEList.size(DelegatingE List.java:222)
> at
> org.eclipse.emf.common.util.DelegatingEList$EIterator.hasNex t(DelegatingEList.java:1048)
>
> at
> org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator.ge tText(AdapterFactoryItemDelegator.java:69)
>
> at
> org.eclipse.emf.edit.provider.ItemPropertyDescriptor$ItemDel egator.getText(ItemPropertyDescriptor.java:201)
>
> at
> org.eclipse.emf.edit.ui.provider.PropertyDescriptor$1.getTex t(PropertyDescriptor.java:123)
>
> at
> org.eclipse.gmf.runtime.emf.ui.properties.sections.PropertyS heetEntry.getValueAsString(PropertySheetEntry.java:457)
>
> at
> org.eclipse.ui.views.properties.PropertySheetViewer.updateEn try(PropertySheetViewer.java:1335)
>
> at
> org.eclipse.ui.views.properties.PropertySheetViewer.access$4 (PropertySheetViewer.java:1326)
>
> at
> org.eclipse.ui.views.properties.PropertySheetViewer$3.valueC hanged(PropertySheetViewer.java:335)
>
> at
> org.eclipse.gmf.runtime.emf.ui.properties.sections.PropertyS heetEntry.fireValueChanged(PropertySheetEntry.java:316)
>
> at
> org.eclipse.gmf.runtime.emf.ui.properties.sections.PropertyS heetEntry.setValues(PropertySheetEntry.java:730)
>
> ....
> I know that I can change the default behavior of the hibernate flush
> with the FlushMode, but this time I do not have control over the
> session, it is managed by teneo. And since the auto flush occures on the
> backstage I don't know where to set the Editing Domain Transaction.
> Do you have any advice how to handle this situation?
> greetings from
> Manfred
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Hibernate flush causes transactional domain error [message #619287 is a reply to message #126194] Tue, 24 June 2008 06:43 Go to previous message
Manfred Hahn is currently offline Manfred HahnFriend
Messages: 64
Registered: July 2009
Member
Hi Martin,

Thanks for your immediate response. (I believe you don't sleep ever!)

yes, the setFlushModeManual() call is in my version. But unfortunately I
am using a session controller.
Should I overwrite the getSessionWrapper method or is there another better
place to call setFlushModeManual() for my session (e.g. in the
SessionWrapper itself)?

gr. Manfred
Re: Hibernate flush causes transactional domain error [message #619300 is a reply to message #126206] Tue, 24 June 2008 12:39 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Manfred,
Yes you can directly call the sessionwrapper.setFlushModeManual. Also then what you have to remember
is to do flush yourselve (sessionWrapper.flush()), for example after all resources have been saved
just before you commit the transaction.
If you have time can you enter a bugzilla for this so I can update the documentation?

btw, I cross-posted to the emf newsgroup because teneo is graduating so support is now given there.

gr. Martin

Manfred Hahn wrote:
> Hi Martin,
>
> Thanks for your immediate response. (I believe you don't sleep ever!)
>
> yes, the setFlushModeManual() call is in my version. But unfortunately I
> am using a session controller.
> Should I overwrite the getSessionWrapper method or is there another
> better place to call setFlushModeManual() for my session (e.g. in the
> SessionWrapper itself)?
>
> gr. Manfred
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:[CDO/Hibernate] Multiple issues
Next Topic:[EMF Compare] Selecting a matching engine
Goto Forum:
  


Current Time: Sun Mar 29 07:00:56 GMT 2020

Powered by FUDForum. Page generated in 0.01857 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top