Does creation of velocity properties need to be in a synchronized static method?

From: Mike Kienenberger (mkienen..mail.com)
Date: Fri Oct 14 2005 - 11:29:18 EDT

  • Next message: Mike Kienenberger: "Deprecating protected methods?"

    I'm in the process of changing ClassGenerator to use VelocityEngine
    instances instead of the Velocity singleton. I'm looking at
    org.objectstyle.cayenne.gen.ClassGenerator.bootstrapVelocity(), which
    now only creates the velocity property list after moving the VE
    initialization into the constructor.

    Is there a reason why this should remain a synchronized static method
    rather than being moved into the constructor as well? Is calling
    ResourceLocator.classBaseUrl(cl) an expensive operation?

    For the purposes of calling cgen, I'm thinking it can all be executed
    by the constructor.



    This archive was generated by hypermail 2.0.0 : Fri Oct 14 2005 - 11:29:19 EDT