Hi!
   I have a CMP Entity Bean which  requires a Transaction by default for all 
its methods. I have the following Xdoclet tag on the class definition:
* @ejb.transaction type = "Required"

    Than I have a getValueObject() which is defined as:

  /**
  * @ejb:interface-method view-type="both"
  * 
  * @ejb.transaction type = "Supports"
  **/
  public Xpto getValueObject() {
      Xpto xpto = new Xpto();
      xpto.setA(getA());
      return xpto;
  }
  
   ...

  /**
  * @ejb:persistent-field
  * @ejb:pk-field
  *
  * @jboss:column-name name="XPTO_A"
  **/
  public abstract int getA();
        
   /**
  **/
  public abstract void setA( int id);


  Method getA() is not defined on the bean interface. Will a transaction be 
created when I call getValueObject() (without being enrolled in a previous 
transaction)?
    I have Transaction required for all methods, except getValueObject() which 
is supports...

    The @ejb.transaction defined at class level applies only to the methods 
exposed on the Bean Interfaces, or does it apply even for non-exposed methods?

     Thanks in advance,
          Victor Batista
  

PS: The same applies for a session bean method (supports transaction) which 
calls a private method (the default for the bean transaction is Required).  
Will  a transaction be created on this case?

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

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


-------------------------------------------------------
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