4 Replies Latest reply on May 13, 2008 3:14 PM by Tom Baeyens

    organization of the enterprise module

    Alejandro Guizar Master

      While working on the jBPM 3 enterprise module I found several items that seem out of place.
      There are two entity-based implementations of the scheduler service, one in org.jbpm.scheduler.ejbtimer and the other in org.jbpm.ejb. The descriptor points to the former; the latter is probably the remains of an earlier refactoring.
      The EjbSchedulerService class, introduced in earlier 3.2.x versions, invokes the entity bean, whereas the new EntitySchedulerService class invokes the timer session bean.
      The command service interface, home interface and session bean are placed in the org.jbpm.ejb package, whereas the timer entity artifacts are located in org.jbpm.scheduler.ejbtimer.
      Any reason for this odd arrangement? If not, I want to rearrange as follows.
      Remove the timer entity in org.jbpm.ejb. Move the timer entity in org.jbpm.scheduler.ejbtimer to org.jbpm.ejb.
      For backwards compatibility, have EjbSchedulerService invoke the timer session bean. Have EntitySchedulerService invoke the timer entity bean, which better matches its name.

        • 1. Re: organization of the enterprise module
          Tom Baeyens Master

           

          "alex.guizar@jboss.com" wrote:
          There are two entity-based implementations of the scheduler service, one in org.jbpm.scheduler.ejbtimer and the other in org.jbpm.ejb. The descriptor points to the former; the latter is probably the remains of an earlier refactoring.


          Up to the last release 3.2.2 the ejb timer service uses an SLSB: one bean on which all the timers are registered. This can become a scalability issue.

          That's why we (Me and then Fady) implemented the timer entity bean: one bean per timer.

          "alex.guizar@jboss.com" wrote:

          The EjbSchedulerService class, introduced in earlier 3.2.x versions, invokes the entity bean, whereas the new EntitySchedulerService class invokes the timer <em>session</em> bean.


          I believe the coding of the timer entity bean has been done. I don't know to what extend the timer entity work is finished:
          * QA-ed
          * Configurtation in the enteprise ear deployment package
          * Documentation

          Alejandro can you verify which of these are done ?


          "alex.guizar@jboss.com" wrote:

          The command service interface, home interface and session bean are placed in the org.jbpm.ejb package, whereas the timer entity artifacts are located in org.jbpm.scheduler.ejbtimer.
          Any reason for this odd arrangement? If not, I want to rearrange as follows.
          <ul><li>Remove the timer entity in org.jbpm.ejb. Move the timer entity in org.jbpm.scheduler.ejbtimer to org.jbpm.ejb.</li>
          <li>For backwards compatibility, have EjbSchedulerService invoke the timer session bean. Have EntitySchedulerService invoke the timer entity bean, which better matches its name.</li></ul>


          The only thing you can take into account is the architectural picture. The services are used inside of the JbpmContext-block. The timer entity bean is only an implementation detail of the EntitySchedulerService.

          If you take that into account, you can rearrange as you want (as long as it works :-)

          • 2. Re: organization of the enterprise module
            Tom Baeyens Master

            i forgot one item in the list

            I believe the coding of the timer entity bean has been done. I don't know to what extend the timer entity work is finished:
            * QA-ed
            * Configurtation in the enteprise ear deployment package
            * Documentation
            * Migration

            • 3. Re: organization of the enterprise module
              Alejandro Guizar Master

              The current status:

              * QA: currently there are two tests, one for a one-shot timer and one for a repeating timer. No tests exist for JTA synchronization in the case of either success or failure. I will backport those from the PVM enteprise tests.
              * Configuration: seems done, pending the result of the additional tests.
              * Documentation: absent.
              * Migration: you mean, from the session bean approach? Please give me more details.

              • 4. Re: organization of the enterprise module
                Tom Baeyens Master

                 

                "alex.guizar@jboss.com" wrote:
                The current status:

                * QA: currently there are two tests, one for a one-shot timer and one for a repeating timer. No tests exist for JTA synchronization in the case of either success or failure. I will backport those from the PVM enteprise tests.


                that is a good start, indeed.

                this reminds me: what is the status on describing the existing and missing scenarios on the pvm enterprise test cases ?

                "alex.guizar@jboss.com" wrote:

                * Configuration: seems done, pending the result of the additional tests.


                ok

                "alex.guizar@jboss.com" wrote:

                * Documentation: absent.


                make sure that at least the docs don't contain any references to the old stuff. either the parts in the config files. or if there is a description of the SLSB timer thing, make sure it's replaced with the entity explanation.

                "alex.guizar@jboss.com" wrote:

                * Migration: you mean, from the session bean approach? Please give me more details.


                if people are migrating from jbpm 3.2.2 to 3.2.3 and using the enterprise scheduler service, is there anything that they should do for this ?
                updates to the db ?
                making sure the queues are empty ?
                all such things (even if it is nothing) should be documented in the release.notes.html