shuttj
shuttj

Reputation: 217

What technology/methodology can I use to hot deploy changes in a J2EE environment?

I work on a piece of software that includes a payroll system and payroll rules have a tendency to change, especially when it comes to taxes. My company has branches all across the U.S.A. and almost every state has their own rules for state (and sometimes local) taxes. As such, I need to be able to update the logic for each state at a moments notice. I need to be able to do this without having to push a new version of the whole application. I also need to be able to access a database and we are using JBoss as our AS. Currently we are using an older version of Drools and it is has been working but it feels like a hack to solve this problem.

I have been reading a little bit about OSGI but it sounds like it might be overkill.

What other options are available?

Upvotes: 2

Views: 1027

Answers (3)

Bogo
Bogo

Reputation: 688

Liverebel 2.0 is your product - see http://liverebel.com

Upvotes: 1

Edson Tirelli
Edson Tirelli

Reputation: 3901

Not sure why you say that the implementation with Drools you use "feels like a hack". Drools is designed from the ground up to allow hot (re)deployment of business rules. You can store your business rules in a rules repository (like Guvnor), in a database, in the filesystem or generate the rules on the fly. You can access the rules using your own code or you can use one of the knowledge agents Drools ships with.

At runtime, when rules are redeployed, Drools automatically handles the knowledge base update and hot deploy them. The changes are visible and safely propagated on any existing session, meaning no need to recreate sessions or reload existing facts (data).

Maybe if you can detail what feels wrong about it, we can point you in the right direction. Also, you mentioned you are using an older version of Drools. Which version is that?

Upvotes: 2

mrembisz
mrembisz

Reputation: 12870

It depends a lot on what kind of logic needs to be deployed without restart. If it's just business rules, drools sound like a reasonable choice to me.

If it's more than that, and including some technical level logic you could try a scripting language like groovy. Its GroovyScriptEngine is able to monitor file changes and recompile code when needed.

Finally there are tools like LiveRebel which allow smooth redeployment of basically any Java application. This is a commercial tool

Upvotes: 3

Related Questions