-
1. Re: command iteration
kukeltje Aug 23, 2006 11:44 AM (in response to tom.baeyens)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
dmlloyd Aug 24, 2006 12:35 PM (in response to tom.baeyens)"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 Aug 28, 2006 2:55 AM (in response to tom.baeyens)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 Aug 28, 2006 2:57 AM (in response to tom.baeyens)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 Aug 28, 2006 10:13 AM (in response to tom.baeyens)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