OpenSAML dependency on Velocity breaks application
Tom van den Berge
tom.vandenberge at gmail.com
Tue May 1 20:21:14 BST 2012
Hi,
After doing some research, I found that there is a way to use multiple
instances of Velocity. It's actually pretty simple. It is explained here:
http://velocity.apache.org/engine/releases/velocity-1.7/developer-guide.html#separate
I couldn't find an easy way to set up a jira account to log this issue, so
I hope that one of you can log this issue for v3.
Regards,
Tom
On Tue, May 1, 2012 at 12:00 PM, Tom van den Berge <
tom.vandenberge at gmail.com> wrote:
> Hi Brent,
>
> Unfortunately overriding initializeVelocity doesn't work since it is a
> static method, so the only option seems to be to override bootstrap() and
> leave out the initializeVelocity() method. Sadly, this also means that the
> static String[] xmlToolingsConfigs must be copied.
>
> I fully agree that initially, this is a Velocity problem, since it seems
> that it can only be initializes in a static way. However the same is true
> for OpenSAML, although there is a relatively simple workaround for it.
>
>
> Thanks,
> Tom
>
>
> On Fri, Apr 27, 2012 at 9:02 PM, Brent Putman <putmanb at georgetown.edu>wrote:
>
>>
>>
>> On 4/27/12 7:25 AM, Tom van den Berge wrote:
>> >
>> > I think it would be far better to have this optional in OpenSAML
>> > itself though. Duplicating code is a major sin ;)
>> >
>>
>> Note that you don't have to literally copy/duplicate code to do this.
>> You can just extend the DefaultBootstrap class and override the
>> initializeVelocity() method to be a no-op. Then invoke that bootstrap
>> subclass instead of ours.
>>
>> That said, I agree that it's not optimal for us to initialize Velocity
>> like that. We probably can't fix this for v2, since we aren't planning
>> on anything but patch releases for that going forward. But if you'd
>> like to file a Jira issue against v3, we can examine whether we can
>> rework how we use Velocity to avoid the static init. It would actually
>> be more crucial to fix it there, because the custom bootstrap workaround
>> won't be there in v3, the library init there is very different.
>>
>> Thanks,
>> Brent
>>
>>
>>
>> --
>> To unsubscribe from this list send an email to
>> dev-unsubscribe at shibboleth.net
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://shibboleth.net/pipermail/dev/attachments/20120501/7509e565/attachment.html
More information about the dev
mailing list