ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Regarding Graphical mapping node Cache

Post new topic  Reply to topic
 Regarding Graphical mapping node Cache « View previous topic :: View next topic » 
Author Message
mrkumar
PostPosted: Sun Aug 07, 2016 10:23 am    Post subject: Regarding Graphical mapping node Cache Reply with quote

Novice

Joined: 02 Jul 2016
Posts: 18

I have ready the cache using graphical mapping node from the article

https://developer.ibm.com/integration/blog/2015/11/16/graphical-data-mapping-with-global-cache/

This is really helpful. however i found that the value of the cache can be only a primitive data type it seems. where as i want to cache an OBJECT like either XML/JSON type.

is this even feasible ? how can I cache an object in graphical mapping node ?

Please advice, I really appreciate your inputs
_________________
If you fail, call it as Version1.0
Back to top
View user's profile Send private message
timber
PostPosted: Sun Aug 07, 2016 2:48 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1290

A serialized Java object is a byte array. A byte array can be put into the global cache. Watch out for classloader issues.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Aug 08, 2016 3:56 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

A serialized message tree is a byte string...

I forget how to do ASBITSTREAM in a mapping node.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
mrkumar
PostPosted: Mon Aug 08, 2016 10:43 am    Post subject: Reply with quote

Novice

Joined: 02 Jul 2016
Posts: 18

timber wrote:
A serialized Java object is a byte array. A byte array can be put into the global cache. Watch out for classloader issues.


thanks timber,
would it be safer to go for an approach that is non graphical mapping node ?
can you please share your thoughts to overcome a cache strategy where I can specify the life time of the cache ?

i was reading about esql cache but i didnt find an option to specify the life time of the cache ? you know like once a day or once a month something like that since i get Feed of data once a day so far that I am aware of.
_________________
If you fail, call it as Version1.0
Back to top
View user's profile Send private message
mrkumar
PostPosted: Mon Aug 08, 2016 2:35 pm    Post subject: Reply with quote

Novice

Joined: 02 Jul 2016
Posts: 18

mqjeff wrote:
A serialized message tree is a byte string...

I forget how to do ASBITSTREAM in a mapping node.


you mean save the value of the cache as string by using ASBITSTREAM function ?
_________________
If you fail, call it as Version1.0
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Aug 09, 2016 3:46 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

mrkumar wrote:
mqjeff wrote:
A serialized message tree is a byte string...

I forget how to do ASBITSTREAM in a mapping node.


you mean save the value of the cache as string by using ASBITSTREAM function ?


No. I meant that you could save the message tree into the cache using ASBITSTREAM. Not saying you *should*, just that you *can*.

Also, there isn't really an "object" in the graphical mapping node. There's two message trees and a set of transformations between them. Some of those transformations could be Java procedures, which would have objects.

But without a Java transformation, you're only working with message trees (or portions thereof).

If you don't see features available in the global cache to do data management functions - like set a lifetime and expire data and/or reload it.... Then those functions aren't available.

You can file a Request For Enhancement. You can implement your own tools to do the data management functions. You can use some other solution than a cache.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
martinb
PostPosted: Wed Aug 10, 2016 11:22 pm    Post subject: Reply with quote

Master

Joined: 09 Nov 2006
Posts: 210
Location: UK

Hi

If you feel the lack of support for storing complex elements, sub trees etc into the Global Cache from a Graphical Mapping node is limiting, I'd suggest raising an RFE.

As noted another approach could be to store a serialized (String) representation of your complex type into the Cache. The advantage of using String rather than some custom Java object is that you don't have to be concerned about ensuring the object's class is resolvable.

One approach that is present here is based on using JAXB. That post is using the Java Compute node, but I guess you could provide a Java method that would be usable in a Mapper Custom Java Transform.

An approach I have used when only needing a few fields to be cache'd is to simply combine then with XPath "fn:concat" on the Put and use "fn:tokenize" in the Get.
Back to top
View user's profile Send private message
harish_td
PostPosted: Sat Aug 13, 2016 11:04 pm    Post subject: Reply with quote

Master

Joined: 13 Feb 2006
Posts: 236

mrkumar wrote:

can you please share your thoughts to overcome a cache strategy where I can specify the life time of the cache ?

https://www.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/bc23801_.htm
https://www.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.plugin.doc/com/ibm/broker/plugin/MbGlobalMap.html
https://www.ibm.com/support/knowledgecenter/en/SSMKHH_9.0.0/com.ibm.etools.mft.plugin.doc/com/ibm/broker/plugin/MbGlobalMapSessionPolicy.html
Back to top
View user's profile Send private message Yahoo Messenger
martinb
PostPosted: Mon Aug 15, 2016 1:16 am    Post subject: Reply with quote

Master

Joined: 09 Nov 2006
Posts: 210
Location: UK

The TimeToLive can also be set in the Graphical Data Map Cache Put transform
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Regarding Graphical mapping node Cache
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.