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.
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...
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
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://
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 =
// access resources transactionally here
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.
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