Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Invalidation Event (CSOSessionInvalidationEvent)
Invalidation Event (CSOSessionInvalidationEvent) [message #1693145] Wed, 22 April 2015 05:09 Go to next message
UmaShankar Subramani is currently offline UmaShankar SubramaniFriend
Messages: 194
Registered: December 2011
Location: SWEDEN
Senior Member
In the constructor of InvalidationEvent, I tried to get the newObjects, dirtyObjects and detatchedObjects maps.

But the map is always empty. How can I get those objects ?

public InvalidationEvent(InternalCDOTransaction sender, CDOCommitInfo commitInfo)
{
super(CDOSessionImpl.this);
this.sender = sender;
this.sender.getNewObjects(); //Always empty
this.commitInfo = commitInfo;

}
Re: Invalidation Event (CSOSessionInvalidationEvent) [message #1693168 is a reply to message #1693145] Wed, 22 April 2015 08:27 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6441
Registered: July 2009
Senior Member
Am 22.04.2015 um 07:09 schrieb UmaShankar Subramani:
> In the constructor of InvalidationEvent, I tried to get the newObjects, dirtyObjects and detatchedObjects maps.
>
> But the map is always empty. How can I get those objects ?
>
> public InvalidationEvent(InternalCDOTransaction sender, CDOCommitInfo commitInfo)
> {
> super(CDOSessionImpl.this);
> this.sender = sender;
> this.sender.getNewObjects(); //Always empty this.commitInfo = commitInfo;
> }

Why do you write code into CDO's event constructor? Don't use the sender; it's null unless the sender is a *local*
transaction.

The event's getNewObjects() method delegates to the internal commitInfo object.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: Invalidation Event (CSOSessionInvalidationEvent) [message #1693175 is a reply to message #1693168] Wed, 22 April 2015 09:05 Go to previous messageGo to next message
UmaShankar Subramani is currently offline UmaShankar SubramaniFriend
Messages: 194
Registered: December 2011
Location: SWEDEN
Senior Member
Hi Eike,

During the commit "transaction.commit();" , I need to use the newObjects, dirtyObjects and detatchedObjects to generate a text file.
This file is sent to all clients. I am sending this file as CDORemoteMessage to all the clients.

I thought it is not a good to use the CDOTransactionImpl for this purpose. So I tried using InvalidationEvent. Could you please give me
more idea on this ?


/Uma
Re: Invalidation Event (CSOSessionInvalidationEvent) [message #1693176 is a reply to message #1693168] Wed, 22 April 2015 09:05 Go to previous messageGo to next message
UmaShankar Subramani is currently offline UmaShankar SubramaniFriend
Messages: 194
Registered: December 2011
Location: SWEDEN
Senior Member
No Message Body

[Updated on: Wed, 22 April 2015 09:10]

Report message to a moderator

Re: Invalidation Event (CSOSessionInvalidationEvent) [message #1693177 is a reply to message #1693168] Wed, 22 April 2015 09:05 Go to previous messageGo to next message
UmaShankar Subramani is currently offline UmaShankar SubramaniFriend
Messages: 194
Registered: December 2011
Location: SWEDEN
Senior Member
No Message Body

[Updated on: Wed, 22 April 2015 09:09]

Report message to a moderator

Re: Invalidation Event (CSOSessionInvalidationEvent) [message #1693178 is a reply to message #1693175] Wed, 22 April 2015 09:13 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6441
Registered: July 2009
Senior Member
Am 22.04.2015 um 11:06 schrieb UmaShankar Subramani:
> Hi Eike,
> During the commit "transaction.commit();" , I need to use the newObjects, dirtyObjects and detatchedObjects to
> generate a text file.
> This file is sent to all clients. I am sending this file as CDORemoteMessage to all the clients.
> I thought it is not a good to use the CDOTransactionImpl for this purpose. So I tried using InvalidationEvent. Could
> you please give me more idea on this ?
You only want to do this on the committing side, not on all receiving sides, right? Then you may want to register a
CDOTransactionHandler3 with your local transaction.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: Invalidation Event (CSOSessionInvalidationEvent) [message #1693179 is a reply to message #1693178] Wed, 22 April 2015 09:19 Go to previous messageGo to next message
UmaShankar Subramani is currently offline UmaShankar SubramaniFriend
Messages: 194
Registered: December 2011
Location: SWEDEN
Senior Member
Hi Eike,

I also want to do this on the receiving side (to receive the file and associate it with the respective model). How can I do that?


/Uma
Re: Invalidation Event (CSOSessionInvalidationEvent) [message #1693184 is a reply to message #1693179] Wed, 22 April 2015 09:57 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6441
Registered: July 2009
Senior Member
Am 22.04.2015 um 11:19 schrieb UmaShankar Subramani:
> Hi Eike,
>
> I also want to do this on the receiving side (to receive the file and associate it with the respective model). How
> can I do that?
With "receiving side" I meant the other CDO clients that eventually receive an invalidation event. You want to make
those send additional files, too?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: Invalidation Event (CSOSessionInvalidationEvent) [message #1693192 is a reply to message #1693184] Wed, 22 April 2015 10:39 Go to previous messageGo to next message
UmaShankar Subramani is currently offline UmaShankar SubramaniFriend
Messages: 194
Registered: December 2011
Location: SWEDEN
Senior Member
Yes.

I want to send the additional file too, to all the clients.

How can I achieve this?

/Uma
Re: Invalidation Event (CSOSessionInvalidationEvent) [message #1693193 is a reply to message #1693192] Wed, 22 April 2015 10:42 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6441
Registered: July 2009
Senior Member
Am 22.04.2015 um 12:39 schrieb UmaShankar Subramani:
> Yes.
>
> I want to send the additional file too, to all the clients.
>
> How can I achieve this?
To be sure that I understand your problem, when client A commits something you want to send a file from client A to all
other clients, right?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: Invalidation Event (CSOSessionInvalidationEvent) [message #1693198 is a reply to message #1693193] Wed, 22 April 2015 11:07 Go to previous messageGo to next message
UmaShankar Subramani is currently offline UmaShankar SubramaniFriend
Messages: 194
Registered: December 2011
Location: SWEDEN
Senior Member
Yes. Exactly.



thanks,
Uma
Re: Invalidation Event (CSOSessionInvalidationEvent) [message #1693199 is a reply to message #1693198] Wed, 22 April 2015 11:11 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6441
Registered: July 2009
Senior Member
Am 22.04.2015 um 13:07 schrieb UmaShankar Subramani:
> Yes. Exactly.
Then you don't want to send that file in response to invalidation events, which occur on all clients.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: Invalidation Event (CSOSessionInvalidationEvent) [message #1693200 is a reply to message #1693199] Wed, 22 April 2015 11:32 Go to previous messageGo to next message
UmaShankar Subramani is currently offline UmaShankar SubramaniFriend
Messages: 194
Registered: December 2011
Location: SWEDEN
Senior Member
Yes. I do not want to send any other file. I just want to send only my file (which i generate).



/Uma
Re: Invalidation Event (CSOSessionInvalidationEvent) [message #1693202 is a reply to message #1693200] Wed, 22 April 2015 11:41 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6441
Registered: July 2009
Senior Member
Am 22.04.2015 um 13:32 schrieb UmaShankar Subramani:
> Yes. I do not want to send any other file. I just want to send only my file (which i generate).
See, that's why I suggested to implement and register a CDOTransactionHandler3.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Previous Topic:[CDO] Resolving merge conflicts
Next Topic:EMF usability improvement
Goto Forum:
  


Current Time: Sat Aug 24 06:47:52 GMT 2019

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

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

Back to the top