Author |
Message
|
agulowaty |
Posted: Fri Jan 24, 2014 3:02 am Post subject: MbGlobalMap transactionality (javadoc question) |
|
|
Newbie
Joined: 21 Aug 2013 Posts: 8
|
Hi guys,
Could someone briefly explain what is the semantic of relationship between get() and put() described in MbGlobalMap javadoc:
http://pic.dhe.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.etools.mft.plugin.doc/com/ibm/broker/plugin/MbGlobalMap.html#put(java.lang.Object,%20java.lang.Object) where they said:
Quote: |
public Object put(Object key, Object value) throws MbException
Fails if the key already exists within this map, unless preceded by a get() call on the same key within the same transaction. |
What's a transaction here ? Since we know each operation on cache has its own transaction ?
We're struggling with multi instance use case where we have multiple flows with JavaCompute bombarded with thousands of messages and need to decide, basing on map content, whether we should put some of these requests to MQ Queue.
Any advice would be greatly appreciated. |
|
Back to top |
|
 |
stoney |
Posted: Mon Jan 27, 2014 4:40 am Post subject: |
|
|
Centurion
Joined: 03 Apr 2013 Posts: 140
|
The Javadoc for MbGlobalMap is incorrect and needs to be updated. It should just read:
Quote: |
Fails if the key already exists within this map |
You should use put() to insert new values, and update() to update existing values. |
|
Back to top |
|
 |
agulowaty |
Posted: Mon Jan 27, 2014 5:29 am Post subject: |
|
|
Newbie
Joined: 21 Aug 2013 Posts: 8
|
That's what I suspected - Javadoc was thoughtlessly copied from fully-fledged from eXtreme Scale or something like that.
Thanks. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jan 27, 2014 5:59 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Have either of you used the Feedback button thoughtfully provided on the InfoCenter?
You both should. Votes get changes. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
stoney |
Posted: Mon Jan 27, 2014 9:09 am Post subject: |
|
|
Centurion
Joined: 03 Apr 2013 Posts: 140
|
I have not. I made a change to the Javadoc comment instead  |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jan 27, 2014 9:22 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
stoney wrote: |
I have not. I made a change to the Javadoc comment instead  |
Here I was guessing you'd have to throw a brickbat at someone sitting nearby, instead. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jan 27, 2014 9:23 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
stoney wrote: |
I have not. I made a change to the Javadoc comment instead  |
If the InfoCenter is wrong, you should request the InfoCenter be changed. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jan 27, 2014 9:27 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Vitor wrote: |
stoney wrote: |
I have not. I made a change to the Javadoc comment instead  |
If the InfoCenter is wrong, you should request the InfoCenter be changed. |
... unless you happen to be able to directly update it yourself. |
|
Back to top |
|
 |
|