views:

104

answers:

3

Hi, I writing a dynamic HTML parsers functionality. I will want to modify existing parsers and also would want to add more parsers (I expect parsers will be modified as sites a remodified and new parsers will be needed for new sites). I started writing a generic functionality which use a XML with conditions and rules for each site but as this works fine for now, I'm pretty sure it will need constant modifications...

The parsers will parse and write the data to a DB.

My application runs on JBOSS 4.

Any known best practice for that?

Thanks, Rod

A: 

The design sounds convoluted to me, but IFF you prove to yourself there's not a much simpler way to accomplish the same task, you may want a rules engine like Drools...

jasonnerothin
A: 

Thanks for your answer. Maybe I was unclear. I realized that imm. from the rate my question got. What I am writing feature that manage parsers execution. Each parser will parse a different text document structure. Documents structure might change from time to time and more new structured document will be added to be parsed. I dont want to recompile build deploy my application for each arser change. I want to manage the execution of each parser as theymight be executed in parralel or according to execution rules. Does Using Java ScriptingEngine might be a good option?

Thanks, Rod

Rod
A: 

There are lots of ways to have some code that can be modified without redeploying. Using groovy scripts to do the parsing is one. Is is a rather simple matter to check to see if the script has been modified and automatically reload it.