0 Replies Latest reply on Feb 24, 2011 12:19 PM by Andres

    Is Transaction Demarcation recommended?

    Andres Newbie

      Hi, while using Seam I found that is a common practice to mix the model and the controller of the MVC pattern in a single EJB3 component, then the EJB3 contains business methods but also methods for managing ajax events, and so on.

      Its hard to change that in my current project (lot of code) but I'm worried about the performance of the application, because all the methods belongs to an EJB and has the transaction policy by default (REQUIRED), my Question is... should we set the transaction to NOT SUPPORTED when the method has nothing to do with de database, for example a getter or setter:

      public String getValue() { return value; }
      public void setValue(String value) { this value = value }

      Or when the method doesn't affect the records of the tables, for example, the method doesn't excecute persist, merge, remove or another class that do it.

      Thanks in advance.