Forums Register Login

MDB related question

+Pie Number of slices to send: Send
Hello,

I am a newbie in EJB. I have a MDB related question where I have to add some funtionality to an existing application which process a XML input file using the JAXB API. Currently, the input xml file contains with the header information a single record content. The MDB starts with other class methods to parse this XML object. Now, I have to add the funtionality to process a xml file with the header will have multiple records. Wondering if I could parse this new XML input in the format applicable for the existing JAXB generated classes that gets called within the existing MDB's method? Also, like to understand what would be the best way to have some sort of parallel processing of these split XML messages? I guess implementing any sort of multithreading mechanism in EJB could be a no no. Or the MDB itself would take care of this? By the way, I am using JDK 1.3, EJB 2.0.

Thanking you all!
+Pie Number of slices to send: Send
Generally you don't parse the messages yourself, you use the generated tools for both the MDB client and server. You might want to consider a web service if parsing/handling the messages manually is more desirable since they tend to have easier to read and publicly available definitions. If you want to do parallel processing, for example, read the api's of the tools you are using to figure out how to do so.

Also keep in mind the classic debate between sax and dom parsers in xml. For example, if you want to load the entire file into memory and parse it in parallel, DOM would be the winner, but if the file is too big, you can set multiple sax parsers on it to handle each piece separately.
Anderson gave himself the promotion. So I gave myself this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 702 times.
Similar Threads
JAXB XPATH API
"Merging" XML files
Unable to parse xml by jaxb in ejb module
Java objects to XML, possibly using JAXB
Process multiple node occurences using JAXB
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 18:41:17.