storing scripts in the database?


General J2EE: storing scripts in the database?

  1. storing scripts in the database? (1 messages)

    Hello all,

    Sorry if this is a duplicate posting, I think the first time there was some error. My question is this.

    I'm planning to refactor an existing application and one of the requirements is
    to be able to add new functionality without restarting any server (tomcat + weblogic + oracle).

    I'm toying with the idea of writing the business logic in groovy or beanshell
    and storing the scripts in the database. They could be fetched from there by either weblogic or
    tomcat (via weblogic, ejbs) and executed in the middle tier.

    That way I could just change the script and invoke the hypothetical
    "LogicManager.reloadLogic()" -- or something like that.

    But I'm not sure about the pros and cons of the approach. I know I'm not the
    first one to think something like that, but you see, it looks so simple that
    smells like naive. :)

    So I ask the community: what do you think, do you think is going to fly?
    Any previous experience you can share?

  2. storing scripts in the database?[ Go to top ]

    I'm planning on doing something very similar with RoR. The popular alternative in the Java community would probably be to generate yet another XML configuration file and have some framework implement the business-logic from this.

    IMHO ...

    This additional complexity can get really annoying!

    Alternatively scripts will add great flexibility at very little cost. I'm just a bit worried about the security.

    Storing unit-tests for each script in the database would also be nice.