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 » Accessing WMBv8 Global Cache

Post new topic  Reply to topic
 Accessing WMBv8 Global Cache « View previous topic :: View next topic » 
Author Message
16legal
PostPosted: Wed Jun 05, 2013 5:25 am    Post subject: Accessing global Reply with quote

Novice

Joined: 05 Jun 2013
Posts: 21

How do i access global cache through ESQL?I have gone through many documents which provides information on accessing global cache through Java compute node but none with ESQL.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Wed Jun 05, 2013 5:46 am    Post subject: Re: Accessing global Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

16legal wrote:
How do i access global cache through ESQL?I have gone through many documents which provides information on accessing global cache through Java compute node but none with ESQL.


You create various functions in your Java jar that is included in your project when you create JCNs. You access the global cache from these user-written functions. Your ESQL code calls your user-written functions just like any other ESQL access to any other Java function.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Wed Jun 05, 2013 6:05 am    Post subject: Re: Accessing global Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

16legal wrote:
How do i access global cache through ESQL?I have gone through many documents which provides information on accessing global cache through Java compute node but none with ESQL.

You need to call java from ESQL in order to access the cache...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
16legal
PostPosted: Wed Jun 05, 2013 7:16 am    Post subject: Reply with quote

Novice

Joined: 05 Jun 2013
Posts: 21

Thanks guys for the help !!
Back to top
View user's profile Send private message
scravr
PostPosted: Wed Jun 05, 2013 11:17 am    Post subject: Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 391
Location: NY NY USA 10021

I think cache can keep/hold java primitives (int, string, etc.) only.
if you have other user types (java objects) you need to serialize to string.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
lancelotlinc
PostPosted: Wed Jun 05, 2013 11:23 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

scravr wrote:
I think cache can keep/hold java primitives (int, string, etc.) only.
if you have other user types (java objects) you need to serialize to string.


This is not true. The cache, being a Singleton implemented in Java and network aware, can hold any type of serializable object, not just strings.

See here:

http://docs.oracle.com/javase/6/docs/api/java/util/HashMap.html
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
scravr
PostPosted: Wed Jun 05, 2013 11:34 am    Post subject: Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 391
Location: NY NY USA 10021

if the question was about wmb cache implementation: it hold java primitives only.
if you have java object you need to create Hashtable (like Hashtable,String,String> ) from it and save.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
lancelotlinc
PostPosted: Thu Jun 06, 2013 3:25 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

scravr wrote:
if the question was about wmb cache implementation: it hold java primitives only.
if you have java object you need to create Hashtable (like Hashtable,String,String> ) from it and save.


Your statement is very confusing, I don't know what you are talking about. Global cache can store any kind of serialized object. This includes more than just strings, as you alluded to above.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
iShakir
PostPosted: Thu Jun 06, 2013 6:08 am    Post subject: Reply with quote

Apprentice

Joined: 07 Mar 2013
Posts: 47

lancelotlinc wrote:
scravr wrote:
I think cache can keep/hold java primitives (int, string, etc.) only.
if you have other user types (java objects) you need to serialize to string.


This is not true. The cache, being a Singleton implemented in Java and network aware, can hold any type of serializable object, not just strings.

See here:

http://docs.oracle.com/javase/6/docs/api/java/util/HashMap.html


http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.plugin.doc%2Fcom%2Fibm%2Fbroker%2Fplugin%2FMbGlobalMap.html

MbGlobalMap doesn't implement Map. "put" and "get" accept Objects as parameters but I wouldn't use this to assume that any object can be put to the cache!

EDIT: In fact the documentation specifically specifies that it must be a java primitive type or a String!
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 » Accessing WMBv8 Global 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.