Author |
Message
|
alphacentari |
Posted: Sat May 15, 2004 6:26 pm Post subject: Is it possible to cache file based data in java plug in node |
|
|
Novice
Joined: 15 May 2004 Posts: 12
|
Can the file based data is read and cached once broker starts running via a java plug in node in wmqi2.1 and above.?
Also which xml parser can be used to parse param data inside plug-in node. (it is not message parsing)
Any help is greatly appreciated
Thanks. |
|
Back to top |
|
 |
jefflowrey |
Posted: Sun May 16, 2004 3:16 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
In order to parse XML data inside a plug-in, you will either need to include your own parser with your plug-in, OR
use the SQL running API functions to run CREATE FIELD ... PARSE statements.
As for caching in memory, look at the Post-it plugin source code for some ideas. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
alphacentari |
Posted: Sun May 16, 2004 8:23 pm Post subject: |
|
|
Novice
Joined: 15 May 2004 Posts: 12
|
Jeff - Can you please elaborate more on "Your own parser" ?
Does that mean I can use any xml industry standard parser like xerces etc in side the java plug in code. ?
Thanks. |
|
Back to top |
|
 |
fitzcaraldo |
Posted: Sun May 16, 2004 8:51 pm Post subject: |
|
|
Voyager
Joined: 05 May 2003 Posts: 98
|
What he means is that if you want to parse XML inside a plugin, you will need to include a C or Java XML parser such as Xerces inside the code.
Alternatively, a plugin could read an XML file as a stream into the
Environment tree and then return to ESQL where you could parse the stream using the CREATE FIELD statement. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon May 17, 2004 2:53 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Fitzcaraldo has it right, mostly.
My other suggestion is to use the Database functions of the Plug-In API, which actually let you run ESQL, to run the Create Field statement.
This won't be necessarily very efficient. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
alphacentari |
Posted: Tue May 18, 2004 7:29 pm Post subject: |
|
|
Novice
Joined: 15 May 2004 Posts: 12
|
Thanks Jeff.
We are thinking of using normal xml parser in Java plug-in.
In our requirement, we have to do very intensive xml parsing on param data (and not on msg data). Using CREATE FIELD based esql run might be very costly wrt performance as you have mentioned. In this case, performance is our number one criteria.
Any feedback is appreciated.
Thanks. |
|
Back to top |
|
 |
|