Hi,

I'm using CMP entity beans.

In my ejb-jar.xml I use:


  |     <assembly-descriptor> 
  |             <container-transaction>
  |                     <method>
  |                             <ejb-name>Initiaal</ejb-name>
  |                             <method-name>*</method-name> 
  |                     </method>
  |                     <trans-attribute>Required</trans-attribute> 
  |             </container-transaction> 
  |     </assembly-descriptor> 
  | 

in my bean I have the following code

  | 
  | 
  | public void update(.....) throws RemoteException, ActionException{
  |    if(lockindicator != getLockindicator()) throw new 
ActionException("data.changed.by.other.user");
  |    setLockindicator(lockindicator +1);
  |    setData(.....);
  | 
  | }
  | 
  | public void setData(...) throws ActionException{
  | 
  |  if("".equals(name)) throw new ActionException("name.requered");
  |  this.setName(...);
  |  this.setDate(...);
  | 
  | }
  | 

when I update a record from my servlet I use the update method, with some 
parameters.  When my name is empty I receive an exception.  But the problem is 
that my lockindicator isn't rolled back.  He increased with 1.


My question is if the transaction works only for one method.  Or is the 
transaction "multi-method".

Thx in adv.
Pieter


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

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


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to