|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
IA91 from Java |
« View previous topic :: View next topic » |
Author |
Message
|
goffinf |
Posted: Thu Dec 04, 2008 12:06 pm Post subject: IA91 from Java |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
I have touched on this in another post, so sorry for the slight duplication, but I thought it would be more useful to separate this question out.
I want to use IA91 to load various pieces of data into an execution group level [named] cache.
However I want to do that at the point when the execution group is started.
I have a custom node that I can use to host this code in its constructor. It s good fit because this node is also the one that will use the cached data when messages arrive and evaluate is called. So what I'm doing here is pre-loading the cache during startup.
CachedShared.jar has two likely classes that I could use to call the appropriate 'put' methods :-
- com.goakes.Cache.Cache
- com.goakes.Cache.ESQL
the later is used when calling from eSQL and for putting into a named cache the method signature is :-
putIntoCache(String, MbElement, MbElement, Long, Boolean)
for Cache.Cache there is this (possibly equivalent) method :-
put(String, Object, Object, long)
I want to use a 'named' cache :-
Which of these is the one I should call from Java ?
In the constructor of a custom node, I don't have an MbElement and I can't figure a way of creating one (see my earlier post), so is there any way that I can create a compatible object type to pass in for the name and value args ?
Thanks
Fraser. |
|
Back to top |
|
 |
goffinf |
Posted: Thu Dec 04, 2008 1:52 pm Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
A bit of a breakthru
If I use the Cache.Cache class put method I can just pass in String types for the key and value args, therefore MbElement type are not required, as in :-
Cache IA91cache = Cache.getInstance();
String key = "myKey";
String val = "myValue";
IA91cache.put(egName, key, val, -1L);
The clue's are in the ESQL.java class provided in the CacheNodeEclipseV61.zip file provided with the download.
Hopefully this has resolved this one. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|