How does continous running business logic fit into J2EE

Discussions

General J2EE: How does continous running business logic fit into J2EE

  1. I don't see how continous processing fits into the J2EE model. As the life-cycle of both servlets and EJBs is controlled by the container, how can a thread be guaranteed to run continously, e.g., a scheduler. Does this mean that this model is not suited for applications that need to control the execution of actions according to given schedules.
  2. Marcus Herzog
    I don't see how continous processing fits into the J2EE model. As the life-cycle of both servlets and EJBs is controlled by the container, how can a thread be guaranteed to run continously, e.g., a scheduler. Does this mean that this model is not suited for applications that need to control the execution of actions according to given schedules.

    It's suitable, but J2EE does not cover required functionality completely.

    You can develop J2EE application as a set of services implemented with SLSB (JDO / CMP behind to access data). Optionally you can expose them as WebServices with some kind of servlet-based framework. Or you can use just servlet and POJO for logic & data access exposed as WebService or smth. similar to REST model. JMS / MDB can be used for asynchronous communications. But it's just set of services; it's not a complete app.

    What you have to add is some engine that will orchestrate services to play your business scenario. And it's responsibility of this engine to "execute actions according to given schedules". Try to Google on "Java workflow schedule orchestration"

    VS