Hi, all.
I have an application with JBoss 4.0.2 with Hibernate 3 and Jbpm 3. Also, the 
application has an EJB to give remote access to the application.
The issue is that my first intention was to have a CMT EJB.
In this way, my application didn't have any persistent code (no transaction was 
started , commited or rollbacked).
The method only gets a JbpmSession (a Jbpm object that wraps an Hibernate 
Session object) and closes it at its end.
On the other hand, the ejb-jar.xml has the next code

  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise 
JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd";>
  | 
  | <ejb-jar >
  | 
  |    <enterprise-beans>
  | 
  |       <!-- Session Beans -->
  |       <session >
  |          <description>EJB Gateway entre la aplicaciĆ³n stand-alone SWING de 
Savia y la interfaz de reglas de negocio de la Web del Funcionario</description>
  |          <display-name>WorkFlow</display-name>
  | 
  |          <ejb-name>WorkFlow</ejb-name>
  | 
  |          <home>org.ildefe.ejb.interfaces.WorkFlowHome</home>
  |          <remote>org.ildefe.ejb.interfaces.WorkFlow</remote>
  |          
<local-home>org.ildefe.ejb.interfaces.WorkFlowLocalHome</local-home>
  |          <local>org.ildefe.ejb.interfaces.WorkFlowLocal</local>
  |          <ejb-class>org.ildefe.ejb.impl.WorkFlowSession</ejb-class>
  |          <session-type>Stateless</session-type>
  |          <transaction-type>Container</transaction-type>
  |          
  |       </session>
  | 
  |    </enterprise-beans>
  |    
  |    <assembly-descriptor>
  |     <container-transaction>
  |             <method>
  |                     <ejb-name>WorkFlow</ejb-name>
  |                     <method-name>*</method-name>
  |             </method>
  |                     <trans-attribute>Required</trans-attribute>
  |             </container-transaction>
  |    </assembly-descriptor>
  | 
  | </ejb-jar>
  | 
But, when I executed a method that writes data in the DB, the method works well 
(no exception is thrown and the return value is correct), but NO COMMIT was 
executed by the container on the DB ,i.e., the data was not persisted in the DB.
So, I had to change to BMP instead CMP.
In the new EJB the data is persisted (in the code, I begin the transaction and 
commit the transaction).
Why doesn't CMP work well?
Thanks in advance to any comment.
Bye.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3891789#3891789

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3891789


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to