Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » Deleting objects
| |
Re: Deleting objects [message #116475 is a reply to message #116462] |
Tue, 01 April 2008 08:39 |
Manfred Hahn Messages: 64 Registered: July 2009 |
Member |
|
|
Hi Martin,
I am working with the newest teneo version I200803310559.
I've debugged the validateContents() and the StoreResource and found some
strange things:
1. in validateContents() the object I deleted is found in the
newObjects-list - but it was loaded from the database
2. during the loading process the object is attached to the container
after the StoreResource.load() is in the finally block and so
isLoading=false
I add a stack that shows the situation when StoreResource.addedEObject()
is called during the StoreResource.load() with the eNotify method. Perhaps
the isLoading=false is too early?
gr. Manfred
HibernateResource(StoreResource).addedEObject(EObject) line: 491
HibernateResource(StoreResource).attachedHelper(EObject) line: 572
HibernateResource(StoreResource).attached(EObject) line: 523
AktivitaetImpl(BasicEObjectImpl).eBasicSetContainer(Internal EObject, int,
NotificationChain) line: 1316
AktivitaetImpl(ProzessElementImpl).basicSetProzess(Prozess,
NotificationChain) line: 176
AktivitaetImpl(ProzessElementImpl).eInverseAdd(InternalEObje ct, int,
NotificationChain) line: 224
AktivitaetImpl(KnotenElementImpl).eInverseAdd(InternalEObjec t, int,
NotificationChain) line: 250
AktivitaetImpl(BasicEObjectImpl).eInverseAdd(InternalEObject , int,
Class<?>, NotificationChain) line: 1389
EReferencePropertyHandler.set(Object, Object, SessionFactoryImplementor)
line: 129
EMFTuplizer(AbstractEntityTuplizer).setPropertyValues(Object , Object[])
line: 337
SingleTableEntityPersister(AbstractEntityPersister).setPrope rtyValues(Object,
Object[], EntityMode) line: 3566
TwoPhaseLoad.initializeEntity(Object, boolean, SessionImplementor,
PreLoadEvent, PostLoadEvent) line: 129
OneToManyLoader(Loader).initializeEntitiesAndCollections(Lis t, Object,
SessionImplementor, boolean) line: 854
OneToManyLoader(Loader).doQuery(SessionImplementor, QueryParameters,
boolean) line: 729
OneToManyLoader(Loader).doQueryAndInitializeNonLazyCollectio ns(SessionImplementor,
QueryParameters, boolean) line: 236
OneToManyLoader(Loader).loadCollection(SessionImplementor, Serializable,
Type) line: 1994
OneToManyLoader(CollectionLoader).initialize(Serializable,
SessionImplementor) line: 36
OneToManyPersister(AbstractCollectionPersister).initialize(S erializable,
SessionImplementor) line: 565
EMFInitializeCollectionEventListener(DefaultInitializeCollec tionEventListener).onInitializeCollection(InitializeCollecti onEvent)
line: 60
EMFInitializeCollectionEventListener.onInitializeCollection( InitializeCollectionEvent)
line: 61
SessionImpl.initializeCollection(PersistentCollection, boolean) line: 1716
PersistentList(AbstractPersistentCollection).initialize(bool ean) line: 344
PersistentList(AbstractPersistentCollection).read() line: 86
PersistentList.toArray() line: 123
HibernatePersistableEList<E>.doLoad() line: 137
HibernatePersistableEList<E>(PersistableEList<E>).load() line: 205
HibernatePersistableEList<E>(PersistableEList<E>).delegateIsEmpty() line: 376
HibernatePersistableEList<E>(DelegatingEList<E>).isEmpty() line: 241
ProzessImpl.eIsSet(int) line: 334
ProzessImpl(BasicEObjectImpl).eIsSet(EStructuralFeature) line: 1225
EContentsEList$FeatureIteratorImpl<E>.hasNext() line: 427
TransactionChangeRecorder.setTarget(Notifier) line: 145
BasicNotifierImpl$EAdapterList<E>.didAdd(int, E) line: 77
BasicNotifierImpl$EAdapterList<E>(BasicEList<E>).addUnique(E) line: 646
BasicNotifierImpl$EAdapterList<E>(BasicEList<E>).add(E) line: 626
BasicNotifierImpl$EAdapterList<E>.add(E) line: 129
TransactionChangeRecorder(ChangeRecorder).addAdapter(Notifie r) line: 631
TransactionChangeRecorder(ChangeRecorder).notifyChanged(Noti fication)
line: 266
TransactionChangeRecorder.notifyChanged(Notification) line: 206
HibernateResource(BasicNotifierImpl).eNotify(Notification) line: 247
HibernateResource(StoreResource).load(Map<?,?>) line: 301
|
|
|
Re: Deleting objects [message #116481 is a reply to message #116475] |
Tue, 01 April 2008 09:08 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Manfred,
I can see that the TransactionChangeRecorder also loads unloaded lists by doing isEmpty. So it
results in eager fetching of all containment data.
So afaics your remark is correct that the isLoading = false should happen later. Also because I did
not think about containment many-to-one proxies which can be resolved in the finally block.
However, even when the object is loaded in the finally block (and put in the newobjects list) then
the delete action should remove it from the newObjects (see the StoreResource.removedEObject
method), can you check if the object is present in the newEObjectSet?
Regarding the transactionchangerecorder reading all objects, is this fine in your case? Maybe all
contained data needs to be read anyway to display all the information in the gmf diagram.
gr. Martin
Manfred Hahn wrote:
> Hi Martin,
>
> I am working with the newest teneo version I200803310559.
>
> I've debugged the validateContents() and the StoreResource and found
> some strange things:
> 1. in validateContents() the object I deleted is found in the
> newObjects-list - but it was loaded from the database
> 2. during the loading process the object is attached to the container
> after the StoreResource.load() is in the finally block and so
> isLoading=false
>
> I add a stack that shows the situation when StoreResource.addedEObject()
> is called during the StoreResource.load() with the eNotify method.
> Perhaps the isLoading=false is too early?
>
> gr. Manfred
>
> HibernateResource(StoreResource).addedEObject(EObject) line: 491
> HibernateResource(StoreResource).attachedHelper(EObject) line: 572
> HibernateResource(StoreResource).attached(EObject) line: 523
> AktivitaetImpl(BasicEObjectImpl).eBasicSetContainer(Internal EObject,
> int, NotificationChain) line: 1316
> AktivitaetImpl(ProzessElementImpl).basicSetProzess(Prozess,
> NotificationChain) line: 176
> AktivitaetImpl(ProzessElementImpl).eInverseAdd(InternalEObje ct, int,
> NotificationChain) line: 224
> AktivitaetImpl(KnotenElementImpl).eInverseAdd(InternalEObjec t, int,
> NotificationChain) line: 250
> AktivitaetImpl(BasicEObjectImpl).eInverseAdd(InternalEObject , int,
> Class<?>, NotificationChain) line: 1389
> EReferencePropertyHandler.set(Object, Object, SessionFactoryImplementor)
> line: 129
> EMFTuplizer(AbstractEntityTuplizer).setPropertyValues(Object , Object[])
> line: 337
> SingleTableEntityPersister(AbstractEntityPersister).setPrope rtyValues(Object,
> Object[], EntityMode) line: 3566
> TwoPhaseLoad.initializeEntity(Object, boolean, SessionImplementor,
> PreLoadEvent, PostLoadEvent) line: 129
> OneToManyLoader(Loader).initializeEntitiesAndCollections(Lis t, Object,
> SessionImplementor, boolean) line: 854
> OneToManyLoader(Loader).doQuery(SessionImplementor, QueryParameters,
> boolean) line: 729
> OneToManyLoader(Loader).doQueryAndInitializeNonLazyCollectio ns(SessionImplementor,
> QueryParameters, boolean) line: 236
> OneToManyLoader(Loader).loadCollection(SessionImplementor, Serializable,
> Type) line: 1994
> OneToManyLoader(CollectionLoader).initialize(Serializable,
> SessionImplementor) line: 36
> OneToManyPersister(AbstractCollectionPersister).initialize(S erializable,
> SessionImplementor) line: 565
> EMFInitializeCollectionEventListener(DefaultInitializeCollec tionEventListener).onInitializeCollection(InitializeCollecti onEvent)
> line: 60
> EMFInitializeCollectionEventListener.onInitializeCollection( InitializeCollectionEvent)
> line: 61
> SessionImpl.initializeCollection(PersistentCollection, boolean) line:
> 1716
> PersistentList(AbstractPersistentCollection).initialize(bool ean) line:
> 344
> PersistentList(AbstractPersistentCollection).read() line: 86
> PersistentList.toArray() line: 123
> HibernatePersistableEList<E>.doLoad() line: 137
> HibernatePersistableEList<E>(PersistableEList<E>).load() line: 205
> HibernatePersistableEList<E>(PersistableEList<E>).delegateIsEmpty()
> line: 376
> HibernatePersistableEList<E>(DelegatingEList<E>).isEmpty() line: 241
> ProzessImpl.eIsSet(int) line: 334
> ProzessImpl(BasicEObjectImpl).eIsSet(EStructuralFeature) line: 1225
> EContentsEList$FeatureIteratorImpl<E>.hasNext() line: 427
> TransactionChangeRecorder.setTarget(Notifier) line: 145
> BasicNotifierImpl$EAdapterList<E>.didAdd(int, E) line: 77
> BasicNotifierImpl$EAdapterList<E>(BasicEList<E>).addUnique(E) line: 646
> BasicNotifierImpl$EAdapterList<E>(BasicEList<E>).add(E) line: 626
> BasicNotifierImpl$EAdapterList<E>.add(E) line: 129
> TransactionChangeRecorder(ChangeRecorder).addAdapter(Notifie r) line: 631
> TransactionChangeRecorder(ChangeRecorder).notifyChanged(Noti fication)
> line: 266
> TransactionChangeRecorder.notifyChanged(Notification) line: 206
> HibernateResource(BasicNotifierImpl).eNotify(Notification) line: 247
> HibernateResource(StoreResource).load(Map<?,?>) line: 301
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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: Deleting objects [message #616044 is a reply to message #116462] |
Tue, 01 April 2008 08:39 |
Manfred Hahn Messages: 64 Registered: July 2009 |
Member |
|
|
Hi Martin,
I am working with the newest teneo version I200803310559.
I've debugged the validateContents() and the StoreResource and found some
strange things:
1. in validateContents() the object I deleted is found in the
newObjects-list - but it was loaded from the database
2. during the loading process the object is attached to the container
after the StoreResource.load() is in the finally block and so
isLoading=false
I add a stack that shows the situation when StoreResource.addedEObject()
is called during the StoreResource.load() with the eNotify method. Perhaps
the isLoading=false is too early?
gr. Manfred
HibernateResource(StoreResource).addedEObject(EObject) line: 491
HibernateResource(StoreResource).attachedHelper(EObject) line: 572
HibernateResource(StoreResource).attached(EObject) line: 523
AktivitaetImpl(BasicEObjectImpl).eBasicSetContainer(Internal EObject, int,
NotificationChain) line: 1316
AktivitaetImpl(ProzessElementImpl).basicSetProzess(Prozess,
NotificationChain) line: 176
AktivitaetImpl(ProzessElementImpl).eInverseAdd(InternalEObje ct, int,
NotificationChain) line: 224
AktivitaetImpl(KnotenElementImpl).eInverseAdd(InternalEObjec t, int,
NotificationChain) line: 250
AktivitaetImpl(BasicEObjectImpl).eInverseAdd(InternalEObject , int,
Class<?>, NotificationChain) line: 1389
EReferencePropertyHandler.set(Object, Object, SessionFactoryImplementor)
line: 129
EMFTuplizer(AbstractEntityTuplizer).setPropertyValues(Object , Object[])
line: 337
SingleTableEntityPersister(AbstractEntityPersister).setPrope rtyValues(Object,
Object[], EntityMode) line: 3566
TwoPhaseLoad.initializeEntity(Object, boolean, SessionImplementor,
PreLoadEvent, PostLoadEvent) line: 129
OneToManyLoader(Loader).initializeEntitiesAndCollections(Lis t, Object,
SessionImplementor, boolean) line: 854
OneToManyLoader(Loader).doQuery(SessionImplementor, QueryParameters,
boolean) line: 729
OneToManyLoader(Loader).doQueryAndInitializeNonLazyCollectio ns(SessionImplementor,
QueryParameters, boolean) line: 236
OneToManyLoader(Loader).loadCollection(SessionImplementor, Serializable,
Type) line: 1994
OneToManyLoader(CollectionLoader).initialize(Serializable,
SessionImplementor) line: 36
OneToManyPersister(AbstractCollectionPersister).initialize(S erializable,
SessionImplementor) line: 565
EMFInitializeCollectionEventListener(DefaultInitializeCollec tionEventListener).onInitializeCollection(InitializeCollecti onEvent)
line: 60
EMFInitializeCollectionEventListener.onInitializeCollection( InitializeCollectionEvent)
line: 61
SessionImpl.initializeCollection(PersistentCollection, boolean) line: 1716
PersistentList(AbstractPersistentCollection).initialize(bool ean) line: 344
PersistentList(AbstractPersistentCollection).read() line: 86
PersistentList.toArray() line: 123
HibernatePersistableEList<E>.doLoad() line: 137
HibernatePersistableEList<E>(PersistableEList<E>).load() line: 205
HibernatePersistableEList<E>(PersistableEList<E>).delegateIsEmpty() line: 376
HibernatePersistableEList<E>(DelegatingEList<E>).isEmpty() line: 241
ProzessImpl.eIsSet(int) line: 334
ProzessImpl(BasicEObjectImpl).eIsSet(EStructuralFeature) line: 1225
EContentsEList$FeatureIteratorImpl<E>.hasNext() line: 427
TransactionChangeRecorder.setTarget(Notifier) line: 145
BasicNotifierImpl$EAdapterList<E>.didAdd(int, E) line: 77
BasicNotifierImpl$EAdapterList<E>(BasicEList<E>).addUnique(E) line: 646
BasicNotifierImpl$EAdapterList<E>(BasicEList<E>).add(E) line: 626
BasicNotifierImpl$EAdapterList<E>.add(E) line: 129
TransactionChangeRecorder(ChangeRecorder).addAdapter(Notifie r) line: 631
TransactionChangeRecorder(ChangeRecorder).notifyChanged(Noti fication)
line: 266
TransactionChangeRecorder.notifyChanged(Notification) line: 206
HibernateResource(BasicNotifierImpl).eNotify(Notification) line: 247
HibernateResource(StoreResource).load(Map<?,?>) line: 301
|
|
|
Re: Deleting objects [message #616045 is a reply to message #116475] |
Tue, 01 April 2008 09:08 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Manfred,
I can see that the TransactionChangeRecorder also loads unloaded lists by doing isEmpty. So it
results in eager fetching of all containment data.
So afaics your remark is correct that the isLoading = false should happen later. Also because I did
not think about containment many-to-one proxies which can be resolved in the finally block.
However, even when the object is loaded in the finally block (and put in the newobjects list) then
the delete action should remove it from the newObjects (see the StoreResource.removedEObject
method), can you check if the object is present in the newEObjectSet?
Regarding the transactionchangerecorder reading all objects, is this fine in your case? Maybe all
contained data needs to be read anyway to display all the information in the gmf diagram.
gr. Martin
Manfred Hahn wrote:
> Hi Martin,
>
> I am working with the newest teneo version I200803310559.
>
> I've debugged the validateContents() and the StoreResource and found
> some strange things:
> 1. in validateContents() the object I deleted is found in the
> newObjects-list - but it was loaded from the database
> 2. during the loading process the object is attached to the container
> after the StoreResource.load() is in the finally block and so
> isLoading=false
>
> I add a stack that shows the situation when StoreResource.addedEObject()
> is called during the StoreResource.load() with the eNotify method.
> Perhaps the isLoading=false is too early?
>
> gr. Manfred
>
> HibernateResource(StoreResource).addedEObject(EObject) line: 491
> HibernateResource(StoreResource).attachedHelper(EObject) line: 572
> HibernateResource(StoreResource).attached(EObject) line: 523
> AktivitaetImpl(BasicEObjectImpl).eBasicSetContainer(Internal EObject,
> int, NotificationChain) line: 1316
> AktivitaetImpl(ProzessElementImpl).basicSetProzess(Prozess,
> NotificationChain) line: 176
> AktivitaetImpl(ProzessElementImpl).eInverseAdd(InternalEObje ct, int,
> NotificationChain) line: 224
> AktivitaetImpl(KnotenElementImpl).eInverseAdd(InternalEObjec t, int,
> NotificationChain) line: 250
> AktivitaetImpl(BasicEObjectImpl).eInverseAdd(InternalEObject , int,
> Class<?>, NotificationChain) line: 1389
> EReferencePropertyHandler.set(Object, Object, SessionFactoryImplementor)
> line: 129
> EMFTuplizer(AbstractEntityTuplizer).setPropertyValues(Object , Object[])
> line: 337
> SingleTableEntityPersister(AbstractEntityPersister).setPrope rtyValues(Object,
> Object[], EntityMode) line: 3566
> TwoPhaseLoad.initializeEntity(Object, boolean, SessionImplementor,
> PreLoadEvent, PostLoadEvent) line: 129
> OneToManyLoader(Loader).initializeEntitiesAndCollections(Lis t, Object,
> SessionImplementor, boolean) line: 854
> OneToManyLoader(Loader).doQuery(SessionImplementor, QueryParameters,
> boolean) line: 729
> OneToManyLoader(Loader).doQueryAndInitializeNonLazyCollectio ns(SessionImplementor,
> QueryParameters, boolean) line: 236
> OneToManyLoader(Loader).loadCollection(SessionImplementor, Serializable,
> Type) line: 1994
> OneToManyLoader(CollectionLoader).initialize(Serializable,
> SessionImplementor) line: 36
> OneToManyPersister(AbstractCollectionPersister).initialize(S erializable,
> SessionImplementor) line: 565
> EMFInitializeCollectionEventListener(DefaultInitializeCollec tionEventListener).onInitializeCollection(InitializeCollecti onEvent)
> line: 60
> EMFInitializeCollectionEventListener.onInitializeCollection( InitializeCollectionEvent)
> line: 61
> SessionImpl.initializeCollection(PersistentCollection, boolean) line:
> 1716
> PersistentList(AbstractPersistentCollection).initialize(bool ean) line:
> 344
> PersistentList(AbstractPersistentCollection).read() line: 86
> PersistentList.toArray() line: 123
> HibernatePersistableEList<E>.doLoad() line: 137
> HibernatePersistableEList<E>(PersistableEList<E>).load() line: 205
> HibernatePersistableEList<E>(PersistableEList<E>).delegateIsEmpty()
> line: 376
> HibernatePersistableEList<E>(DelegatingEList<E>).isEmpty() line: 241
> ProzessImpl.eIsSet(int) line: 334
> ProzessImpl(BasicEObjectImpl).eIsSet(EStructuralFeature) line: 1225
> EContentsEList$FeatureIteratorImpl<E>.hasNext() line: 427
> TransactionChangeRecorder.setTarget(Notifier) line: 145
> BasicNotifierImpl$EAdapterList<E>.didAdd(int, E) line: 77
> BasicNotifierImpl$EAdapterList<E>(BasicEList<E>).addUnique(E) line: 646
> BasicNotifierImpl$EAdapterList<E>(BasicEList<E>).add(E) line: 626
> BasicNotifierImpl$EAdapterList<E>.add(E) line: 129
> TransactionChangeRecorder(ChangeRecorder).addAdapter(Notifie r) line: 631
> TransactionChangeRecorder(ChangeRecorder).notifyChanged(Noti fication)
> line: 266
> TransactionChangeRecorder.notifyChanged(Notification) line: 206
> HibernateResource(BasicNotifierImpl).eNotify(Notification) line: 247
> HibernateResource(StoreResource).load(Map<?,?>) line: 301
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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
|
|
| | |
Goto Forum:
Current Time: Thu Dec 26 23:07:11 GMT 2024
Powered by FUDForum. Page generated in 0.04784 seconds
|