Author |
Message
|
DP1234 |
Posted: Wed Jun 25, 2014 3:53 am Post subject: Is it possible to store a Arraylist in Global cache.? |
|
|
Apprentice
Joined: 25 May 2014 Posts: 40
|
I was working in an upgradation of Routing Framework which currently used java HashMap's for the purpose...where i am working on in replacing HashMap's by the global Cache...I jus wanted to know is it possible to store Arraylist in the Global cache..??
And also heard its not possible to use Xpath's in ESQL after reading in couple of other threads...Jus asking is thr any alternate solution to work on Xpath's except calling java
thanks in advance |
|
Back to top |
|
 |
Esa |
Posted: Thu Jun 26, 2014 2:49 am Post subject: Re: Is it possible to store a Arraylist in Global cache.? |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
DP1234 wrote: |
I jus wanted to know is it possible to store Arraylist in the Global cache..?? |
Yes, but how you should do it depends on your Broker/IIB version |
|
Back to top |
|
 |
DP1234 |
Posted: Thu Jun 26, 2014 3:43 am Post subject: Re: Is it possible to store a Arraylist in Global cache.? |
|
|
Apprentice
Joined: 25 May 2014 Posts: 40
|
Esa wrote: |
DP1234 wrote: |
I jus wanted to know is it possible to store Arraylist in the Global cache..?? |
Yes, but how you should do it depends on your Broker/IIB version |
Am using IIB 9.0 for doing this |
|
Back to top |
|
 |
iShakir |
Posted: Thu Jun 26, 2014 6:33 am Post subject: |
|
|
Apprentice
Joined: 07 Mar 2013 Posts: 47
|
Have you tried it? The cache should accept Java serializable objects. |
|
Back to top |
|
 |
DP1234 |
Posted: Thu Jun 26, 2014 7:16 am Post subject: |
|
|
Apprentice
Joined: 25 May 2014 Posts: 40
|
Can anybody confirm this...is it possible to store arraylist directly in Globalcache without serializing...Does cache lets this??? |
|
Back to top |
|
 |
iShakir |
Posted: Thu Jun 26, 2014 7:48 am Post subject: |
|
|
Apprentice
Joined: 07 Mar 2013 Posts: 47
|
Try:
MbGlobalMap map = MbGlobalMap.getGlobalMap("test_map");
map.put("test_key", new ArrayList<String>());
This should work. |
|
Back to top |
|
 |
Esa |
Posted: Thu Jun 26, 2014 10:17 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
DP1234 wrote: |
Can anybody confirm this...is it possible to store arraylist directly in Globalcache without serializing...Does cache lets this??? |
Yes, on V 9 you don't need to serialize the object, but the class must support a couple of interfaces for serializing. Check the Infocent.. Knowledge thing. |
|
Back to top |
|
 |
|