5 Replies Latest reply on Aug 28, 2006 10:13 AM by Tom Baeyens

    command iteration

    Tom Baeyens Master

      i'm going over the commands and trying to shape them as i had in mind. i barely made it to check it in. had to uncomment quite a few things to get it working again. all messaging and async stuff is currently broken. majority of the tests should still work. (i got 17 errors)

      some enterprise things that were in the making are currently not compiling because this was based on commands that have been refactored. should be not too big of a problem since those enterprise thingies were still under development.

      i still want to check in so that mainly camunda can take a peek at what i have in mind.

      please feel free to look at the commands and give feedback.

      more development on this next week as i'll be busy for the rest of the week. i should be able to discuss this topic in between.

      David, i plan to see if we can establish the command service inbetween the JSF backed beans in the webapp and the jbpm engine. It would be good if you try to go through the command pattern and see if you have remarks/objections.

      It would be nice if we could base both the web console, the camunda swing client and the JON stuff all on the same CommandService...

        • 1. Re: command iteration
          Ronald van Kuijk Master

          my intention is to also use the command service from the webservice. So if the WEBUI, JMS, WS al use them we at least have consistency.

          • 2. Re: command iteration
            David Lloyd Master

             

            "tom.baeyens@jboss.com" wrote:

            David, i plan to see if we can establish the command service inbetween the JSF backed beans in the webapp and the jbpm engine. It would be good if you try to go through the command pattern and see if you have remarks/objections.

            It would be nice if we could base both the web console, the camunda swing client and the JON stuff all on the same CommandService...


            Sounds good to me...

            • 3. Re: command iteration
              Tom Baeyens Master

              what a way to start your monday mornin!

              the J2EE 1.4 spec says:
              "
              J2EE.6.7 Java? Transaction API (JTA) 1.0 Requirements
              JTA defines the UserTransaction interface that is used by applications to start, and
              commit or abort transactions. Enterprise beans are expected to get UserTransaction
              objects through the EJBContext?s getUserTransaction method. Other application
              components get a UserTransaction object through a JNDI lookup using the name
              java:comp/UserTransaction.

              JTA also defines a number of interfaces that are used by an application server
              to communicate with a transaction manager, and for a transaction manager to
              interact with a resource manager. These interfaces must be supported as described
              in the Connector specification. In addition, support for other transaction facilities
              may be provided transparently to the application by a J2EE product.
              The latest JTA 1.0 specification is version 1.0.1B and is available at http://
              java.sun.com/products/jta.
              "

              and sun's blueprints stuff says:

              "
              8.5 Web Tier Transaction Guidelines

              Servlets and JSP pages in a two-tier application can access enterprise information systems within the scope of a JTA transaction. Servlets and JSP pages support only programmatic transaction demarcation. A servlet or JSP page can use JNDI to look up a UserTransaction object (using the standard defined name java:comp/UserTransaction), and then use the UserTransaction interface to demarcate transactions.

              Code Example 8.1 illustrates the use of the JTA UserTransaction interface to demarcate transactions within a Servlet:

              Context ic = new InitialContext();
              UserTransaction ut =
              (UserTransaction) ic.lookup("java:comp/UserTransaction");
              ut.begin();
              // access resources transactionally here
              ut.commit();
              "

              • 4. Re: command iteration
                Tom Baeyens Master

                so we can just use a JSF phase listener and control the global transactions from our servlet based JSF application. cool. i was afraid that we could only do this from inside enterprise beans.

                • 5. Re: command iteration
                  Tom Baeyens Master

                  today, i have been looking into the combination of commands and the web console.

                  it seems that there is not much of a combination there.

                  the model proposed by JSF doesn't really match onto a command based approach. at least not on how we envisioned the command execution service as being a transaction provider around the commands.

                  the mismatch is mainly due to a different transaction lifecycle. more on transactions in a separate topic