Project

General

Profile

Revision 923fd553

ID923fd553bae64c91455eebd4f8346fe0e183c570
Parent 4d18f3c4
Child b9ee0c73

Added by Andreas Kohlbecker 9 months ago

ref #7900 reverting : read-only transactions in DTO service with Propagation.REQUIRES_NEW

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/registration/RegistrationWorkingSetService.java
23 23
import org.springframework.beans.factory.annotation.Autowired;
24 24
import org.springframework.beans.factory.annotation.Qualifier;
25 25
import org.springframework.stereotype.Service;
26
import org.springframework.transaction.annotation.Propagation;
27 26
import org.springframework.transaction.annotation.Transactional;
28 27

  
29 28
import eu.etaxonomy.cdm.api.application.CdmRepository;
......
58 57
 *
59 58
 */
60 59
@Service("registrationWorkingSetService")
61
@Transactional(readOnly=true, propagation=Propagation.REQUIRES_NEW)
60
@Transactional(readOnly=true)
62 61
public class RegistrationWorkingSetService implements IRegistrationWorkingSetService {
63 62

  
64 63
    public static final List<String> REGISTRATION_DTO_INIT_STRATEGY = Arrays.asList(new String []{
......
87 86
            }
88 87
    );
89 88

  
90
   /**
91
    *
92
    */
93 89
    public  List<String> DERIVEDUNIT_INIT_STRATEGY = Arrays.asList(new String[]{
94 90
           "*", // initialize all related entities to allow DerivedUnit conversion, see DerivedUnitConverter.copyPropertiesTo()
95 91
           "derivedFrom.$",
......
99 95
           "mediaSpecimen.sources"
100 96
   });
101 97

  
102
   /**
103
   *
104
   */
105 98
   public List<String> FIELDUNIT_INIT_STRATEGY = Arrays.asList(new String[]{
106 99
          "$",
107 100
          "annotations.*", // * is needed as log as we are using a table in FilterableAnnotationsField
......
368 361
    /**
369 362
     * @param regs
370 363
     */
371
    private void initializeSpecimens(List<Registration> regs) {
364
    public void initializeSpecimens(List<Registration> regs) {
372 365
        for(Registration reg : regs){
373 366
            inititializeSpecimen(reg);
374 367
        }
......
379 372
    /**
380 373
     * @param reg
381 374
     */
382
    private void inititializeSpecimen(Registration reg) {
375
    public void inititializeSpecimen(Registration reg) {
383 376

  
384 377
        for(TypeDesignationBase<?> td : reg.getTypeDesignations()){
385 378
            if(td instanceof SpecimenTypeDesignation){

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)