You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Andreas Wikberger <an...@blink.se> on 2001/06/15 10:28:19 UTC

re-initialize velocity.

Hello,

We are using velocity as a template-engine in a publishing system with a
lots of different components. Velocity is one of many services in our
system.

What we want to do is to re-initialize/restart velocity without having to
restart the hole system, that is to be able to use the system with the
other services as they are configured and only restart the velocity
service with a new configuration. From what I have seen/tested it seems
impossible to do this because that Runtime.init() always checks the initialized
boolean if it is to be initialized or not. And I have not found any way to
set that boolean so the Runtime.init() will initialize.

Is there any possibilities to make a re-initialize of velocity?

Andreas Wikberger
S p i r o   k o m m u n i k a t i o n   A B

Stena Center 1C
412 92  Göteborg
phone +46 (0)31 - 772 80 73
mobile +46 (0)705 - 18 77 48
andreas@spiro.se
www.spiro.se



Re: re-initialize velocity.

Posted by Nick Bauman <ni...@cortexity.com>.
We have an init() method for our component-based system to reload its
components and reread it's config. You can trigger it from a secure XML-RPC
call. One of our components uses Velocity and it would be nice to be able to
reconfigure the Velocity engine in that component this way. Without the
reset(), we have to bring down the system and bring it back up again.

> On Fri, 15 Jun 2001, Geir Magnusson Jr. wrote:
> 
>> Andreas Wikberger wrote:
>> >
>> > Hello,
>> >
>> > We are using velocity as a template-engine in a publishing system
>> > with a lots of different components. Velocity is one of many
>> > services in our system.
>> >
>> > What we want to do is to re-initialize/restart velocity without
>> > having to restart the hole system, that is to be able to use the
>> > system with the other services as they are configured and only
>> > restart the velocity service with a new configuration. From what I
>> > have seen/tested it seems impossible to do this because that
>> > Runtime.init() always checks the initialized boolean if it is to be
>> > initialized or not. And I have not found any way to set that boolean
>> > so the Runtime.init() will initialize.
>> >
>> > Is there any possibilities to make a re-initialize of velocity?
>>
>> It's possible.   We could add a reset() method that tosses everything,
>> and then you do the whole init cycle over.
>>
>> geir
> 
> Sounds good. In a future release then?
> 
> Andreas Wikberger
> S p i r o   k o m m u n i k a t i o n   A B
> 
> Stena Center 1C
> 412 92  Göteborg
> phone +46 (0)31 - 772 80 73
> mobile +46 (0)705 - 18 77 48
> andreas@spiro.se
> www.spiro.se


-- 
Nick Bauman
Software Engineer
3600 Dupont
Minneapolis, MN
55412
Mobile Phone: (612) 810-7406
Home Phone: (612) 522-0165


Re: re-initialize velocity.

Posted by Andreas Wikberger <an...@blink.se>.
On Fri, 15 Jun 2001, Geir Magnusson Jr. wrote:

> Andreas Wikberger wrote:
> >
> > Hello,
> >
> > We are using velocity as a template-engine in a publishing system with a
> > lots of different components. Velocity is one of many services in our
> > system.
> >
> > What we want to do is to re-initialize/restart velocity without having to
> > restart the hole system, that is to be able to use the system with the
> > other services as they are configured and only restart the velocity
> > service with a new configuration. From what I have seen/tested it seems
> > impossible to do this because that Runtime.init() always checks the initialized
> > boolean if it is to be initialized or not. And I have not found any way to
> > set that boolean so the Runtime.init() will initialize.
> >
> > Is there any possibilities to make a re-initialize of velocity?
>
> It's possible.   We could add a reset() method that tosses everything,
> and then you do the whole init cycle over.
>
> geir

Sounds good. In a future release then?

Andreas Wikberger
S p i r o   k o m m u n i k a t i o n   A B

Stena Center 1C
412 92  Göteborg
phone +46 (0)31 - 772 80 73
mobile +46 (0)705 - 18 77 48
andreas@spiro.se
www.spiro.se



Re: re-initialize velocity.

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Andreas Wikberger wrote:
> 
> Hello,
> 
> We are using velocity as a template-engine in a publishing system with a
> lots of different components. Velocity is one of many services in our
> system.
> 
> What we want to do is to re-initialize/restart velocity without having to
> restart the hole system, that is to be able to use the system with the
> other services as they are configured and only restart the velocity
> service with a new configuration. From what I have seen/tested it seems
> impossible to do this because that Runtime.init() always checks the initialized
> boolean if it is to be initialized or not. And I have not found any way to
> set that boolean so the Runtime.init() will initialize.
> 
> Is there any possibilities to make a re-initialize of velocity?

It's possible.   We could add a reset() method that tosses everything,
and then you do the whole init cycle over.

geir

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
You have a genius for suggesting things I've come a cropper with!