<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
On 5/2/12 3:29 AM, Tom van den Berge wrote:
<blockquote
cite="mid:CA+eYckyb=GEj7HdW5-miuzEzPbRoi72VmN+ftS+ybA=JSsZU7g@mail.gmail.com"
type="cite">
<div class="gmail_quote"><br>
<div>You are using the singleton model in DefaultBootstrap:
"Velocity.init();". Maybe you are using the separate instances
model when you are using velocity templates, but not when
initializing.</div>
</div>
</blockquote>
<br>
Yes, that's what I meant. Other than in the DefaultBootstrap, we
use the separate instance model exclusively.<br>
<br>
<br>
<blockquote
cite="mid:CA+eYckyb=GEj7HdW5-miuzEzPbRoi72VmN+ftS+ybA=JSsZU7g@mail.gmail.com"
type="cite">
<div class="gmail_quote">
<div> </div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">It might be that newly created
VelocityEngine instances just<br>
inherit the properties from the global Velocity singleton if
they are<br>
otherwise unspecified, so maybe that is the (not very good)
reason. </blockquote>
</div>
</blockquote>
<br>
<br>
Turns out that this is not true. Properties from the singleton are
not inherited by the VelocityEngine instances. The Velocity
singleton and any VelocityEngine instances are completely
unconnected and unrelated.<br>
<br>
Long ago, before the code was even released, we were using the
Velocity singleton model. When during development we switched to
the separate instance model, the singleton init stuff in
DefaultBootstrap was apparently just not removed. It was actually
not doing anything useful at all (effectively) in our codebase, so
it's now been removed:<br>
<br>
<a class="moz-txt-link-freetext" href="https://issues.shibboleth.net/jira/browse/JOST-188">https://issues.shibboleth.net/jira/browse/JOST-188</a><br>
<br>
So that would be in the next patch release, although I'm not certain
when that will be. You can always pull the latest branch from svn
and do a source build if you like.<br>
<br>
<br>
<blockquote
cite="mid:CA+eYckyb=GEj7HdW5-miuzEzPbRoi72VmN+ftS+ybA=JSsZU7g@mail.gmail.com"
type="cite">
<div class="gmail_quote">
<div>I'm not sure what you mean with you last phrase, but that's
probably because I'm not very familiar with OpenSAML. I would
say if OpenSAML needs Velocity, it needs to take care of its
own initialization, and obviously not break any application or
library that is using OpenSAML. <br>
</div>
</div>
</blockquote>
<br>
We use a dependency injection model, so the things that use Velocity
have the VelocityEngine instance injected into them by the calling
code. So it's up to that code (e.g. the Shibboleth IdP) to
configure and initialize the instance before use.<br>
<br>
Thanks,<br>
Brent<br>
<br>
<br>
<br>
</body>
</html>