Changeset 6328


Ignore:
Timestamp:
Jun 14, 2021, 1:26:17 PM (12 months ago)
Author:
Nicklas Nordborg
Message:

References #1320: Named transactions

Fixed in the installation wizard, all auto-confirm handlers and all job completed handlers.

Location:
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/autoconfirm/AutoConfirmManager.java

    r6021 r6328  
    9191        // Use a separate DbControl for each items since if one
    9292        // fails it should not block the others
    93         dc = sc.newDbControl();
     93        dc = sc.newDbControl(":Auto-confirm");
    9494        logger.debug("Auto-confirming: " + ac);
    9595        boolean passed = ac.autoConfirm(dc, this);
     
    117117    try
    118118    {
    119       dc = sc.newDbControl();
     119      dc = sc.newDbControl(":Auto-confirm");
    120120     
    121121      for (Map.Entry<AutoConfirmer<?>, Boolean> entry : autoConfirmers.entrySet())
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/autoconfirm/AutoConfirmService.java

    r6184 r6328  
    196196    try
    197197    {
    198       dc = sc.newDbControl();
     198      dc = sc.newDbControl(":Auto-confirm");
    199199     
    200200      // Load auto-confirmable types
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/autoconfirm/CufflinksAutoConfirmer.java

    r6023 r6328  
    133133    try
    134134    {
    135       dc = sc.newDbControl();
     135      dc = sc.newDbControl(":Auto-confirm Cufflinks - start reports");
    136136      RawBioAssay cufflinks = item(dc);
    137137     
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/autoconfirm/DemuxAutoConfirmer.java

    r6184 r6328  
    207207    try
    208208    {
    209       dc = sc.newDbControl();
     209      dc = sc.newDbControl(":Auto-confirm demux");
    210210     
    211211      Job job = item(dc);
     
    251251        try
    252252        {
    253           dc = sc.newDbControl();
     253          dc = sc.newDbControl(":Auto-confirm demux - start Legacy pipeline");
    254254          jobs.addAll(submitLegacyJobs(dc, mergedSequences, cluster, debug, priority));
    255255          dc.commit();
     
    266266        try
    267267        {
    268           dc = sc.newDbControl();
     268          dc = sc.newDbControl(":Auto-confirm demux - start Hisat pipeline");
    269269          jobs.addAll(submitHisatJobs(dc, mergedSequences, cluster, debug, priority));
    270270          dc.commit();
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/autoconfirm/FastqImportAutoConfirmer.java

    r6185 r6328  
    103103    try
    104104    {
    105       dc = sc.newDbControl();
     105      dc = sc.newDbControl(":Auto-confirm FASTQ import");
    106106 
    107107      DerivedBioAssay merged = item(dc);
     
    137137        try
    138138        {
    139           dc = sc.newDbControl();
     139          dc = sc.newDbControl(":Auto-confirm FASTQ import - start Legacy pipeline");
    140140          jobs.addAll(DemuxAutoConfirmer.submitLegacyJobs(dc, mergedSequences, cluster, debug, priority));
    141141          dc.commit();
     
    152152        try
    153153        {
    154           dc = sc.newDbControl();
     154          dc = sc.newDbControl(":Auto-confirm FASTQ import - start Hisat pipeline");
    155155          jobs.addAll(DemuxAutoConfirmer.submitHisatJobs(dc, mergedSequences, cluster, debug, priority));
    156156          dc.commit();
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/autoconfirm/HisatAlignAutoConfirmer.java

    r5818 r6328  
    171171    try
    172172    {
    173       dc = sc.newDbControl();
     173      dc = sc.newDbControl(":Auto-confirm Hisat");
    174174 
    175175      DerivedBioAssay aligned = item(dc);
     
    205205        try
    206206        {
    207           dc = sc.newDbControl();
     207          dc = sc.newDbControl(":Auto-confirm Hisat - start StringTie");
    208208 
    209209          Filter<Annotatable> stringtieFilter = Annotationtype.EXPRESSION_TYPE.createFilter("StringTie");
     
    241241        try
    242242        {
    243           dc = sc.newDbControl();
     243          dc = sc.newDbControl(":Auto-confirm Hisat - start mBAF analysis");
    244244 
    245245          Filter<Annotatable> mBafFilter = Annotationtype.VARIANT_CALL_TYPE.createFilter("mBAF");
     
    272272        try
    273273        {
    274           dc = sc.newDbControl();
     274          dc = sc.newDbControl(":Auto-confirm Hisat - start Variant calling");
    275275         
    276276          Filter<Annotatable> filter = Annotationtype.VARIANT_CALL_TYPE.createFilter("VariantCall");
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/autoconfirm/SequencingRunAutoConfirmer.java

    r6280 r6328  
    147147    try
    148148    {
    149       dc = sc.newDbControl();
     149      dc = sc.newDbControl(":Auto-confirm sequencing - start demux");
    150150     
    151151      // Load items
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/autoconfirm/SspAutoConfirmer.java

    r6040 r6328  
    7878    try
    7979    {
    80       dc = sc.newDbControl();
     80      dc = sc.newDbControl(":Auto-confirm SSP - start report");
    8181      Job job = job(dc);
    8282
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/autoconfirm/StringTieAutoConfirmer.java

    r6025 r6328  
    8181    try
    8282    {
    83       dc = sc.newDbControl();
     83      dc = sc.newDbControl(":Auto-confirm StringTie - start SSP");
    8484      RawBioAssay raw = item(dc);
    8585
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/counter/CounterService.java

    r6215 r6328  
    311311    try
    312312    {
    313       dc = sc.newDbControl();
     313      dc = sc.newDbControl(":Counter service");
    314314      isCounting = true;
    315315      JSONObject json = new JSONObject();
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid/CufflinksJobCreator.java

    r5930 r6328  
    639639      try
    640640      {
    641         dc = sc.newDbControl();
     641        dc = sc.newDbControl(":Cufflinks completed handler");
    642642       
    643643        Rawbioassay rawCufflinks = Rawbioassay.getByJob(dc, job);
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid/HisatAlignJobCreator.java

    r6186 r6328  
    566566      try
    567567      {
    568         dc = sc.newDbControl();
     568        dc = sc.newDbControl(":Hisat alignment completed handler");
    569569       
    570570        AlignedSequences alignedSequences = AlignedSequences.getByJob(dc, job);
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid/ImportFastqJobCreator.java

    r6215 r6328  
    456456      try
    457457      {
    458         dc = sc.newDbControl();
     458        dc = sc.newDbControl(":FASTQ import completed handler");
    459459
    460460        MergedSequences mergedSequences = MergedSequences.getByJob(dc, job);
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid/JobCompletionHandlerFactory.java

    r6181 r6328  
    6767      try
    6868      {
    69         dc = cc.getSessionControl().newDbControl();
     69        dc = cc.getSessionControl().newDbControl(":Completed job handler");
    7070        if (jobType.equals(Subtype.SEQUENCING_RUN_JOB.get(dc)))
    7171        {
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid/MBafJobCreator.java

    r6022 r6328  
    295295      try
    296296      {
    297         dc = sc.newDbControl();
     297        dc = sc.newDbControl(":mBAF analysis completed handler");
    298298       
    299299        DerivedBioAssay aligned = (DerivedBioAssay)job.getParameterValue("alignment");
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid/MipsAlignJobCreator.java

    r5930 r6328  
    515515      try
    516516      {
    517         dc = sc.newDbControl();
     517        dc = sc.newDbControl(":MIPS alignment completed handler");
    518518       
    519519        AlignedSequences alignedSequences = AlignedSequences.getByJob(dc, job);
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid/MipsDemuxJobCreator.java

    r5930 r6328  
    631631      try
    632632      {
    633         dc = sc.newDbControl();
     633        dc = sc.newDbControl(":MIPS demux completed handler");
    634634        // Save metric file to BASE
    635635        Directory metricsDir = Directory.getNew(dc, new Path(DEMULTIPLEX_METRICS_DIR, Path.Type.DIRECTORY));
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid/RnaSeqDemuxJobCreator.java

    r5936 r6328  
    822822      try
    823823      {
    824         dc = sc.newDbControl();
     824        dc = sc.newDbControl(":Demux completed handler");
    825825        // Save metric file to BASE
    826826        Directory metricsDir = Directory.getNew(dc, new Path(DEMULTIPLEX_METRICS_DIR, Path.Type.DIRECTORY));
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid/StringTieJobCreator.java

    r6010 r6328  
    408408      try
    409409      {
    410         dc = sc.newDbControl();
     410        dc = sc.newDbControl(":StringTie completed handler");
    411411       
    412412        Rawbioassay rawStringTie = Rawbioassay.getByJob(dc, job);
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid/VariantCallingJobCreator.java

    r6022 r6328  
    560560      try
    561561      {
    562         dc = sc.newDbControl();
     562        dc = sc.newDbControl(":Variant calling completed handler");
    563563       
    564564        DerivedBioAssay aligned = (DerivedBioAssay)job.getParameterValue("alignment");
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/projectarchive/ProjectArchiveService.java

    r4574 r6328  
    196196    try
    197197    {
    198       dc = sc.newDbControl();
     198      dc = sc.newDbControl(":Project archive service");
    199199     
    200200      // Load all specimen with parent case that has with Consent=Yes
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java

    r6326 r6328  
    141141      if ("Validate".equals(cmd) || "Install".equals(cmd))
    142142      {
    143         dc = sc.newDbControl();
     143        dc = sc.newDbControl(":Installation wizard");
    144144       
    145145        ReggieRole.checkPermission(dc, "'Installation wizard'", ReggieRole.ADMINISTRATOR);
     
    12741274      else if ("GetPermissions".equals(cmd))
    12751275      {
    1276         dc = sc.newDbControl();
     1276        dc = sc.newDbControl(":Installation wizard");
    12771277        json.put("permissions", JsonUtil.getPermissions(dc));
    12781278        json.put("experimentalFeatures", JsonUtil.getExperimentalFeatures());
     
    14101410  {
    14111411    AnnotationType at = null;
    1412     DbControl dc = sc.newDbControl();
     1412    DbControl dc = sc.newDbControl(":Installation wizard");
    14131413    try
    14141414    {
     
    16661666  {
    16671667    T r = null;
    1668     DbControl dc = sc.newDbControl();
     1668    DbControl dc = sc.newDbControl(":Installation wizard");
    16691669    try
    16701670    {
     
    17901790  {
    17911791    ItemSubtype subtype = null;
    1792     DbControl dc = sc.newDbControl();
     1792    DbControl dc = sc.newDbControl(":Installation wizard");
    17931793    try
    17941794    {
     
    19591959  {
    19601960    Client c = null;
    1961     DbControl dc = sc.newDbControl();
     1961    DbControl dc = sc.newDbControl(":Installation wizard");
    19621962    try
    19631963    {
     
    20512051  {
    20522052    Tag tag = null;
    2053     DbControl dc = sc.newDbControl();
     2053    DbControl dc = sc.newDbControl(":Installation wizard");
    20542054    try
    20552055    {
     
    22412241  {
    22422242    AnnotationTypeCategory cat = null;
    2243     DbControl dc = sc.newDbControl();
     2243    DbControl dc = sc.newDbControl(":Installation wizard");
    22442244    try
    22452245    {
     
    23702370  {
    23712371    BioPlateEventType eventType = null;
    2372     DbControl dc = sc.newDbControl();
     2372    DbControl dc = sc.newDbControl(":Installation wizard");
    23732373    try
    23742374    {
     
    24522452  {
    24532453    BioPlateType plateType = null;
    2454     DbControl dc = sc.newDbControl();
     2454    DbControl dc = sc.newDbControl(":Installation wizard");
    24552455    try
    24562456    {
     
    25672567  {
    25682568    ItemList list = null;
    2569     DbControl dc = sc.newDbControl();
     2569    DbControl dc = sc.newDbControl(":Installation wizard");
    25702570    try
    25712571    {
     
    27222722  {
    27232723    MimeType type = null;
    2724     DbControl dc = sc.newDbControl();
     2724    DbControl dc = sc.newDbControl(":Installation wizard");
    27252725    try
    27262726    {
     
    28202820  {
    28212821    FileServer fs = null;
    2822     DbControl dc = sc.newDbControl();
     2822    DbControl dc = sc.newDbControl(":Installation wizard");
    28232823    try
    28242824    {
     
    30033003  {
    30043004    Directory d = null;
    3005     DbControl dc = sc.newDbControl();
     3005    DbControl dc = sc.newDbControl(":Installation wizard");
    30063006    try
    30073007    {
     
    31193119  {
    31203120    DataFileType type = null;
    3121     DbControl dc = sc.newDbControl();
     3121    DbControl dc = sc.newDbControl(":Installation wizard");
    31223122    try
    31233123    {
     
    32353235  {
    32363236    PlatformVariant pv = null;
    3237     DbControl dc = sc.newDbControl();
     3237    DbControl dc = sc.newDbControl(":Installation wizard");
    32383238    try
    32393239    {
     
    33633363  {
    33643364    Extract extract = null;
    3365     DbControl dc = sc.newDbControl();
     3365    DbControl dc = sc.newDbControl(":Installation wizard");
    33663366    try
    33673367    {
     
    34733473  {
    34743474    PlateGeometry g = null;
    3475     DbControl dc = sc.newDbControl();
     3475    DbControl dc = sc.newDbControl(":Installation wizard");
    34763476    try
    34773477    {
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/SequencingRunServlet.java

    r6196 r6328  
    12961296        XmlConfig runParameters = new XmlConfig(dom.getRootElement(), "");
    12971297
    1298         dc = sc.newDbControl();
     1298        dc = sc.newDbControl(":Sequencing run completed handler");
    12991299       
    13001300        SequencingRun sr = SequencingRun.getByJob(dc, job);
Note: See TracChangeset for help on using the changeset viewer.