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:
    -

Activity

Christophe DENEUX made changes - Tue, 6 Mar 2012 - 11:46:48 +0100
Field Original Value New Value
Priority Trivial [ 5 ]
Description 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:
{code}
private final static ContextFactoryinstance = new ContextFactory();

public static ContextFactory getInstance() {
    return instance;
}
{code}

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:
{code}
private final static ContextFactoryinstance = new ContextFactory();

public static ContextFactory getInstance() {
    return instance;
}
{code}

Christophe DENEUX made changes - Tue, 6 Mar 2012 - 14:22:36 +0100
Status New [ 10000 ] Open [ 10002 ]
Christophe DENEUX made changes - Tue, 6 Mar 2012 - 14:23:45 +0100
Issue Type Improvement Request [ 4 ] Task [ 3 ]
Christophe DENEUX made changes - Tue, 6 Mar 2012 - 15:00:13 +0100
Status Open [ 10002 ] In Progress [ 10003 ]
Christophe DENEUX made changes - Tue, 6 Mar 2012 - 15:04:00 +0100
Status In Progress [ 10003 ] Resolved [ 10004 ]
Fix Version/s 4.0.1 [ 10334 ]
Resolution Fixed [ 1 ]
Transition Status Change Time Execution Times Last Executer Last Execution Date
New New Open Open
2h 36m
1
Christophe DENEUX
Tue, 6 Mar 2012 - 14:22:36 +0100
Open Open In Progress In Progress
37m 37s
1
Christophe DENEUX
Tue, 6 Mar 2012 - 15:00:13 +0100
In Progress In Progress Resolved Resolved
3m 47s
1
Christophe DENEUX
Tue, 6 Mar 2012 - 15:04:00 +0100



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