Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

StringBuffer Factory?

Philipp Taprogge

2003-12-27

Replies:

Hi!

I was just working on a little project of mine when a thought sprang
to my mind...
In my servlets I often have to assemble Strings like SQL statements
and the like. I use StringBuffers for this as they offer much better
performance than concat. Now I was wondering: would it make any sense
at all to get my StringBuffers from a pool by using JNDI instead of
having each servlet create new ones? I am not sure of the runtime cost
involved in JNDI lookups. Any thoughts?

 Phil


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.