Package org.dspace.core

Examples of org.dspace.core.Context.complete()


                        if (iitems != null)
                            iitems.close();
                       
                        // Make sure the database connection gets closed in all conditions.
                      try {
              context.complete();
            } catch (SQLException sqle) {
              context.abort();
            }
                    }
                }
View Full Code Here


            else
            {
                System.err.println(usage);
            }

            context.complete();

            System.exit(0);
        }
        catch (ArrayIndexOutOfBoundsException ae)
        {
View Full Code Here

                if (!isQuiet)
                System.out.println("Updating search index:");
                DSIndexer.updateIndex(c);
            }

            c.complete();
            c = null;
        }
        catch (Exception e)
        {
            status = 1;
View Full Code Here

                {
                    InstallItem.installItem(context, wi);
                    System.out.println("Created and installed item, handle="
                            + HandleManager.findHandle(context, wi.getItem()));
                }
                context.complete();
                System.exit(0);
            }
            catch (Exception e)
            {
                // abort all operations
View Full Code Here

                                        if (is != null)
                                            try { is.close(); } catch (IOException ioe) { }
                                    }

                                    contextl.complete();
                                   
                                    String encoding = new String(Base64.encodeBase64(buffer), "ASCII");
                                    metadata.append(encoding);
                                }
                                catch (Exception ex)
View Full Code Here

      if (context != null && context.isValid())
      {
         try
      {
        context.complete();
      }
      catch (SQLException e)
      {
        throw new ServletException(e);
      }
View Full Code Here

   * Start harvest scheduler.  
   */
  public static void startNewScheduler() throws SQLException, AuthorizeException {
    Context c = new Context();
    HarvestedCollection.exists(c);
    c.complete();
   
    if (mainHarvestThread != null && harvester != null) {
      stopScheduler();
    }
      harvester = new HarvestScheduler();
View Full Code Here

         
          long upperBound = Math.min(nextHarvest,maxHeartbeat);
          long delay = Math.max(upperBound, minHeartbeat) + 1000;
       
         
          tempContext.complete();
         
          status = HARVESTER_STATUS_SLEEPING;
          synchronized(lock) {
            lock.wait(delay);
          }
View Full Code Here

                    if (processOneItem(context, ii.next(), line, now))
                        status = 1;
                }
            }
            log.debug("Cache size at end = "+context.getCacheSize());
            context.complete();
            context = null;
        }
        catch (Exception e)
        {
            System.err.println("ERROR, got exception: "+e);
View Full Code Here

                            "propfind failed, no document returned.");
                }
               
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                outputPretty.output(outdoc, baos);
                context.complete();
                return baos.toString();
            }
        }
        catch (IOException ie)
        {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.