Changeset 6122


Ignore:
Timestamp:
03/31/15 15:54:41 (9 years ago)
Author:
Oliver Schonefeld
Message:
  • try to work around circular dependency that confuses Spring
File:
1 edited

Legend:

Unmodified
Added
Removed
  • VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/VirtualCollectionRegistryImpl.java

    r5653 r6122  
    4545    private PersistentIdentifierProvider pid_provider;
    4646    @Autowired
    47     private OAIProvider oaiProvider;
    48     @Autowired
    4947    @Qualifier("creation")
    5048    private VirtualCollectionValidator validator;
     
    9896        }
    9997
    100         logger.info("Shutting down OAI provider");
    101         oaiProvider.shutdown();
     98        final OAIProvider oaiProvider = OAIProvider.instance();
     99        if (oaiProvider != null) {
     100            logger.info("Shutting down OAI provider");
     101            oaiProvider.shutdown();
     102        }
    102103    }
    103104
     
    647648                     * TODO: if an error occurred while minting PID, the VCR
    648649                     * should handle this more gracefully and not stubbornly
    649                      * re-try ... 
     650                     * re-try ...
    650651                     */
    651652                    PersistentIdentifier pid = pid_provider.createIdentifier(vc);
     
    704705    private static ScheduledExecutorService createSingleThreadScheduledExecutor(final String threadName) {
    705706        return Executors.newSingleThreadScheduledExecutor(new ThreadFactory() {
    706             // decorate default thread factory so that we can provide a 
     707            // decorate default thread factory so that we can provide a
    707708            // custom thread name
    708709            final AtomicInteger i = new AtomicInteger(0);
Note: See TracChangeset for help on using the changeset viewer.