You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Peter Locke <pl...@abebooks.com> on 2007/06/12 02:44:32 UTC

Upgrade to velocity 1.5 - a few questions

I would like to upgrade to velocity 1.5 from 1.4 and take advantage of the
fixes and improvements.   I have a few questions:
 
1) I would like to remove the now deprecated VelocityServlet, however the
size and scope of our webapp and the number of different servlets extending
VelocityServlet means it would be impossible to migrate everything to the
recommended structure of VelocityViewServlet.   Is it possible to extend
VelocityViewServlet instead of VelocityServlet with no (or minimal) ripple
impact to the subclasses?  If not what is the recommended approach?
 
2) Logging improvements - our webapp business level code logs to the
underlying log system via apache commons logging - is it possible to have
Velocity log to commons logging automatically also, or does this require a
custom implementation of LogChute?
 
3) I notice that JDOM 1.0 is a dependency now.  We are still on beta9 - what
would be the potential side effects of not upgrading?  Of course I'd like to
upgrade to 1.0 but that may not be an option.
 
thanks for your help.
 
--
Peter Locke
Senior Engineer / Dev Lead
www.abebooks.com <http://www.abebooks.com/> 
 
t: 250.412.3240
f: 250.475-6014
e: plocke@abebooks.com <ma...@abebooks.com> 
--
P.S. I'm currently reading Rainbow Six
<http://www.abebooks.com/servlet/SearchResults?bx=off&sts=t&ds=30&bi=0&an=Tom
+Clancy&tn=Rainbow+Six>  by Tom Clancy
 

RE: Upgrade to velocity 1.5 - a few questions

Posted by Peter Locke <pl...@abebooks.com>.
Thanks Nathan, good stuff.  I'll let you know if I have any questions about
the CommonsLogLogChute.  Anyone for the third question? ;)

> 3) I notice that JDOM 1.0 is a dependency now.  We are still on beta9 
> - what would be the potential side effects of not upgrading?  Of 
> course I'd like to upgrade to 1.0 but that may not be an option.


-----Original Message-----
From: Nathan Bubna [mailto:nbubna@gmail.com] 
Sent: Tuesday, June 12, 2007 9:02 AM
To: Velocity Users List
Subject: Re: Upgrade to velocity 1.5 - a few questions

On 6/11/07, Peter Locke <pl...@abebooks.com> wrote:
> I would like to upgrade to velocity 1.5 from 1.4 and take advantage of the
> fixes and improvements.   I have a few questions:
>
> 1) I would like to remove the now deprecated VelocityServlet, however 
> the size and scope of our webapp and the number of different servlets 
> extending VelocityServlet means it would be impossible to migrate
everything to the
> recommended structure of VelocityViewServlet.   Is it possible to extend
> VelocityViewServlet instead of VelocityServlet with no (or minimal) 
> ripple impact to the subclasses?  If not what is the recommended approach?

yeah, it should be pretty trivial.  ideally you should be able to just change
them from extending VelocityServlet to extending
VelocityViewServlet. (potentially just a two line change.   there have
been a few things deprecated internally in VelocityServlet that the
VelocityViewServlet doesn't support (like the old "properties"
init-param key instead of "org.apache.velocity.properties"), but even those
should be pretty easy to upgrade.

please let us know if you run into any trouble.  i'd like this switch to be
as painless as reasonable for users.

> 2) Logging improvements - our webapp business level code logs to the 
> underlying log system via apache commons logging - is it possible to 
> have Velocity log to commons logging automatically also, or does this 
> require a custom implementation of LogChute?

the CommonsLogLogChute will be in Velocity 1.6.  i just didn't think
to put it in 1.5, and no one else brought it up.   it should, however,
be fairly trivial for you to grab that class from the trunk (or i can grab it
for you), compile it in your app and use it with 1.5.  just a matter of
pointing to it in your velocity.properties.  and again, i'll be happy to
answer any questions about getting that done.

> 3) I notice that JDOM 1.0 is a dependency now.  We are still on beta9 
> - what would be the potential side effects of not upgrading?  Of 
> course I'd like to upgrade to 1.0 but that may not be an option.
>
> thanks for your help.
>
> --
> Peter Locke
> Senior Engineer / Dev Lead
> www.abebooks.com <http://www.abebooks.com/>
>
> t: 250.412.3240
> f: 250.475-6014
> e: plocke@abebooks.com <ma...@abebooks.com>
> --
> P.S. I'm currently reading Rainbow Six 
> <http://www.abebooks.com/servlet/SearchResults?bx=off&sts=t&ds=30&bi=0
> &an=Tom
> +Clancy&tn=Rainbow+Six>  by Tom Clancy
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Re: Upgrade to velocity 1.5 - a few questions

Posted by Nathan Bubna <nb...@gmail.com>.
On 6/11/07, Peter Locke <pl...@abebooks.com> wrote:
> I would like to upgrade to velocity 1.5 from 1.4 and take advantage of the
> fixes and improvements.   I have a few questions:
>
> 1) I would like to remove the now deprecated VelocityServlet, however the
> size and scope of our webapp and the number of different servlets extending
> VelocityServlet means it would be impossible to migrate everything to the
> recommended structure of VelocityViewServlet.   Is it possible to extend
> VelocityViewServlet instead of VelocityServlet with no (or minimal) ripple
> impact to the subclasses?  If not what is the recommended approach?

yeah, it should be pretty trivial.  ideally you should be able to just
change them from extending VelocityServlet to extending
VelocityViewServlet. (potentially just a two line change.   there have
been a few things deprecated internally in VelocityServlet that the
VelocityViewServlet doesn't support (like the old "properties"
init-param key instead of "org.apache.velocity.properties"), but even
those should be pretty easy to upgrade.

please let us know if you run into any trouble.  i'd like this switch
to be as painless as reasonable for users.

> 2) Logging improvements - our webapp business level code logs to the
> underlying log system via apache commons logging - is it possible to have
> Velocity log to commons logging automatically also, or does this require a
> custom implementation of LogChute?

the CommonsLogLogChute will be in Velocity 1.6.  i just didn't think
to put it in 1.5, and no one else brought it up.   it should, however,
be fairly trivial for you to grab that class from the trunk (or i can
grab it for you), compile it in your app and use it with 1.5.  just a
matter of pointing to it in your velocity.properties.  and again, i'll
be happy to answer any questions about getting that done.

> 3) I notice that JDOM 1.0 is a dependency now.  We are still on beta9 - what
> would be the potential side effects of not upgrading?  Of course I'd like to
> upgrade to 1.0 but that may not be an option.
>
> thanks for your help.
>
> --
> Peter Locke
> Senior Engineer / Dev Lead
> www.abebooks.com <http://www.abebooks.com/>
>
> t: 250.412.3240
> f: 250.475-6014
> e: plocke@abebooks.com <ma...@abebooks.com>
> --
> P.S. I'm currently reading Rainbow Six
> <http://www.abebooks.com/servlet/SearchResults?bx=off&sts=t&ds=30&bi=0&an=Tom
> +Clancy&tn=Rainbow+Six>  by Tom Clancy
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Re: Upgrade to velocity 1.5 - a few questions

Posted by Will Glass-Husain <wg...@gmail.com>.
Hi Peter,

I'll let others answer #1 and #2, though my impression is that it won't be
difficult.

JDOM 1.0 is a requirement for Anakia.  There was a change to the API
(blanking out on the specific).  If you don't use Anakia, it doesn't matter.

WILL

On 6/11/07, Peter Locke <pl...@abebooks.com> wrote:
>
> I would like to upgrade to velocity 1.5 from 1.4 and take advantage of the
> fixes and improvements.   I have a few questions:
>
> 1) I would like to remove the now deprecated VelocityServlet, however the
> size and scope of our webapp and the number of different servlets
> extending
> VelocityServlet means it would be impossible to migrate everything to the
> recommended structure of VelocityViewServlet.   Is it possible to extend
> VelocityViewServlet instead of VelocityServlet with no (or minimal) ripple
> impact to the subclasses?  If not what is the recommended approach?
>
> 2) Logging improvements - our webapp business level code logs to the
> underlying log system via apache commons logging - is it possible to have
> Velocity log to commons logging automatically also, or does this require a
> custom implementation of LogChute?
>
> 3) I notice that JDOM 1.0 is a dependency now.  We are still on beta9 -
> what
> would be the potential side effects of not upgrading?  Of course I'd like
> to
> upgrade to 1.0 but that may not be an option.
>
> thanks for your help.
>
> --
> Peter Locke
> Senior Engineer / Dev Lead
> www.abebooks.com <http://www.abebooks.com/>
>
> t: 250.412.3240
> f: 250.475-6014
> e: plocke@abebooks.com <ma...@abebooks.com>
> --
> P.S. I'm currently reading Rainbow Six
> <
> http://www.abebooks.com/servlet/SearchResults?bx=off&sts=t&ds=30&bi=0&an=Tom
> +Clancy&tn=Rainbow+Six>  by Tom Clancy
>
>


-- 
Forio Business Simulations

Will Glass-Husain
wglass@forio.com
www.forio.com