Petals ESB Container

Improve the initialization of the registry context factory instance

Details

  • Type: Task Task
  • Status: Resolved Resolved
  • Priority: Trivial Trivial
  • Resolution: Fixed
  • Affects Version/s: 4.0.0
  • Fix Version/s: 4.1.0
  • Component/s: Registry
  • Security Level: Public
  • Description:
    Hide

    Obtaining the singleton instance of the class org.ow2.petals.registry.api.context.ContextFactory can be improved removing the modifier synchronized and using a static bloc to initialize the singleton:

    private final static ContextFactoryinstance = new ContextFactory();
    
    public static ContextFactory getInstance() {
        return instance;
    }
    Show
    Obtaining the singleton instance of the class org.ow2.petals.registry.api.context.ContextFactory can be improved removing the modifier synchronized and using a static bloc to initialize the singleton:
    private final static ContextFactoryinstance = new ContextFactory();
    
    public static ContextFactory getInstance() {
        return instance;
    }
  • Environment:
    -

People

Dates

  • Created:
    Tue, 6 Mar 2012 - 11:46:18 +0100
    Updated:
    Tue, 6 Mar 2012 - 15:04:00 +0100
    Resolved:
    Tue, 6 Mar 2012 - 15:04:00 +0100