Static reference to handler in factory
Closed this issue · 2 comments
gbehrmann commented
You got the following code
private static AtlasAuthorizationHandler AAH = null;
public AtlasAuthorizationFactory(Properties properties) {
rucio = new RucioN2N(properties);
AAH = new AtlasAuthorizationHandler(rucio, properties);
}
The field should not be static: You reinitialize it for every instance of the factory, so it should not be shared between multiple factory instances. This is important if you have two xrootd doors, each with a slightly different setup of your plugin. The static field would cause one of the configurations to be used for both doors.
gbehrmann commented
The same is true in the handler:
private static RucioN2N rucio = null;
Should be non-static and final.
ivukotic commented
fixed.