|
From: <jue...@we...> - 2004-03-01 13:56:24
|
Good point - I've just made initVelocityEngine synchronized. = initVelocityEngine forces (re)initialization of the engine, without the = need to access it; it's typically invoked in startup code. = getVelocityEngine returns the engine, lazily initializing it if not = already initialized. I see value in both methods; I don't like code that = forces initialization through calling a getter, without needing the = returned instance. =20 BTW, RC2 is gonna get uploaded to SourceForge any minute now... =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von Darren Davison Gesendet: Mo 01.03.2004 14:16 An: spr...@li... Betreff: [Springframework-developer] VelocityEngineFactory -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 VelocityEngineFactory.initVelocityEngine is a public unsynchronized = method.=20 It's scope was widened in 1.0-m3. It seems to have been made public so that VelocityConfigurer can call it.=20 If it's ok to leave it public and unsynchronized,then it looks odd that = the VelocityEngineFactory.getVelocityEngine() method is synchronized. It returns the initialized VelocityEngine instance or calls initVelocityEngine() before returning the instance. Should VelocityConfigurer call VelocityEngineFactory.getVelocityEngine() instead so that initVelocityEngine() can be protected? Or am I missing something else (as usual)? - -- Darren Davison Public Key: http://www.davison.uk.net/key.jsp -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAQze1KLMLAN01aw0RAlQRAJ4vY6cTubGcpHUXFXmmqUQNr5q7fQCgnWgM wwz8DGKkMulwA90hH6ZtpvI=3D =3DV4Ys -----END PGP SIGNATURE----- ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id438&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |