Announcement Announcement Module
Collapse
No announcement yet.
Why Propagation.REQUIRES_NEW on persist() Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why Propagation.REQUIRES_NEW on persist()

    Using Spring Roo 1.1.1 I created a new project and an entity. The commands entered were...
    Code:
    project --topLevelPackage org.sotest.sscce --projectName Test2 --java 6
    persistence setup --database GOOGLE_APP_ENGINE --provider DATANUCLEUS
    entity --class ~.data.account
    I noticed that the persist() method in Account_Roo_Entity.aj is...

    Code:
        
        @Transactional(propagation = Propagation.REQUIRES_NEW)
        public void Account.persist() {
            if (this.entityManager == null) this.entityManager = entityManager();
            this.entityManager.persist(this);
        }
    Why does the persist method have Propagation.REQUIRES_NEW instead of the default propogation?
Working...
X