Re: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Karel V Sedlacek
Thanks for this info,...

How do I implement this tip?

#18. Use the -server JVM option. This enables the server JVM, which JIT
compiles bytecode much earlier, and with stronger optimizations. Startup
and first calls will be slower due to JIT compilation taking more time,
but subsequent ones will be faster.

Karel

 In putting #1 into the JAVA_OPTS (which it appears that is the
 CATALINA_OPTS
 for our implementation), it doesn't appear to work, as Tomcat doesn't
 restart.  It could be our version -- which is currently 5.0.30.  please
 let
 me know if there are other steps we need to take here as well.

 thanks,
 Kim :-)

 On 8/21/07, Shane Witbeck [EMAIL PROTECTED] wrote:

 I thought my latest blog post would be of interest to the people on this
 list:


 http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat with 8 GB memory

2007-07-30 Thread Karel V Sedlacek
So,... if I have 100s of users planned to hit the same Essbase application
via Tomcat (5.0.28), do I need a 64 bit machine?

And for us dummies, how do we set the heap and/or other
performance-oriented settings?

Karel

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 David,

 David kerber wrote:
 Nelson, Tracy M. wrote:
 | From: Christopher Schultz [mailto:[EMAIL PROTECTED]
 | Sent: Friday, 27 July, 2007 18:25
 | | First of all, no home user ever bought an 8-bit machine.

 Oh, I'll bet there are a ton of former Apple ][, TRS-80 and Commodore

 Apologies, Tracy. I was thinking of Intel chips, since that was where
 this abysmal thread had been going. You're right. There were home users
 of 8-bit general-purpose microprocessors.

 I used my Tandy-1000 for many years, until I sold it after buying my
 super fast 16MHz 80286 with 16MB of RAM.

 The Tandy-1000 did not have an 8-bit microprocessor.

 - -chris

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.7 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

 iD8DBQFGrkZM9CaO5/Lv0PARAoY2AJ0etHOgjcxbu9vNg4Urjhsw5965UwCdFZ2d
 B8hgq1VBM4emfWenp7lTfDY=
 =jhAk
 -END PGP SIGNATURE-

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat with 8 GB memory

2007-07-30 Thread Karel V Sedlacek
Thanks Ben.

 Depends on what the users are doing when they hit your application. If
 the are storing lots of data in the session then you'll need enough
 ram to hold all the expected data. If they are uploading files, i
 would imagine that you will need to have enough ram to hold the
 uploaded file before you stream it to disk or database. Although
 Tomcat might be smart? and store the uploaded files to disk, the
 tomcat guru's will have an answer to this.

 Saying all that is the Essbase app an inhouse app or a 3rd party one,
 if its 3rd party one then maybe they can give you some min
 requirements.

 To set the virtual machines heap size you can uses the -Xms -Xmx
 params. Go here [1] for info on the vm.

 The bottom line is, you need to understand what your app is going to
 do to work out what hardware your going to need.

 [1] http://java.sun.com/javase/technologies/hotspot/index.jsp

 On 7/30/07, Karel V Sedlacek [EMAIL PROTECTED] wrote:
 So,... if I have 100s of users planned to hit the same Essbase
 application
 via Tomcat (5.0.28), do I need a 64 bit machine?

 And for us dummies, how do we set the heap and/or other
 performance-oriented settings?

 Karel

  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
  David,
 
  David kerber wrote:
  Nelson, Tracy M. wrote:
  | From: Christopher Schultz [mailto:[EMAIL PROTECTED]
  | Sent: Friday, 27 July, 2007 18:25
  | | First of all, no home user ever bought an 8-bit machine.
 
  Oh, I'll bet there are a ton of former Apple ][, TRS-80 and
 Commodore
 
  Apologies, Tracy. I was thinking of Intel chips, since that was where
  this abysmal thread had been going. You're right. There were home
 users
  of 8-bit general-purpose microprocessors.
 
  I used my Tandy-1000 for many years, until I sold it after buying my
  super fast 16MHz 80286 with 16MB of RAM.
 
  The Tandy-1000 did not have an 8-bit microprocessor.
 
  - -chris
 
  -BEGIN PGP SIGNATURE-
  Version: GnuPG v1.4.7 (MingW32)
  Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
  iD8DBQFGrkZM9CaO5/Lv0PARAoY2AJ0etHOgjcxbu9vNg4Urjhsw5965UwCdFZ2d
  B8hgq1VBM4emfWenp7lTfDY=
  =jhAk
  -END PGP SIGNATURE-
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat with 8 GB memory

2007-07-30 Thread Karel V Sedlacek
Point taken,... thanks Hassan

 On 7/30/07, ben short [EMAIL PROTECTED] wrote:

  If they are uploading files, i
 would imagine that you will need to have enough ram to hold the
 uploaded file before you stream it to disk or database. Although
 Tomcat might be smart? and store the uploaded files to disk

 Nothing to do with Tomcat -- this is the application's responsibility.
  (Commons FileUpload is nicely configurable in this area, FWIW.)

 --
 Hassan Schroeder  [EMAIL PROTECTED]

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Logging all data sent to client

2007-07-25 Thread Karel V Sedlacek
 IllegalStateException if codegetOutputStream/code has
  *   already been called for this response
  * @throws IOException   if an input/output error occurs
  */
 public PrintWriter getWriter() throws IOException
 {
 if (mWriter != null)
 return (mWriter);

 if (mStream != null)
 throw new IllegalStateException(getOutputStream() has
 already been called for this response);

 mStream = createOutputStream();

 mLogger.debug(mStream is set to  + mStream +  in
 getOutputStream);

 // HttpServletResponse.getCharacterEncoding() shouldn't return
 null
 // according the spec, so feel free to remove that if
 mWriter = new PrintWriter(mStream);

 return (mWriter);
 }

 }

 LoggingServletOutputStream.java

 class LoggingServletOutputStream extends ServletOutputStream
 {
 private Logger mLogger;
 private HttpServletResponse mResponse;
 private OutputStream mOutputStream;
 private ByteArrayOutputStream mByteArrayOutputStream = new
 ByteArrayOutputStream();

 public LoggingServletOutputStream(HttpServletResponse response,
 Logger logger) throws IOException
 {
 mResponse = response;
 mOutputStream = mResponse.getOutputStream();
 mLogger = logger;
 }

 public void write(int b) throws IOException
 {
 mByteArrayOutputStream.write(b);
 mOutputStream.write(b);
 }

 @Override
 public void write(byte b[]) throws IOException
 {
 mByteArrayOutputStream.write(b);
 mOutputStream.write(b);
 }

 @Override
 public void write(byte b[], int off, int len) throws IOException
 {
 mByteArrayOutputStream.write(b, off, len);
 mOutputStream.write(b, off, len);
 }

 @Override
 public void close() throws IOException
 {
 if ( mLogger.isDebugEnabled() )
 {
 float kBytes = mByteArrayOutputStream.size() / 1024f;

 mLogger.debug(Writing  + kBytes +  kb ( +
 mByteArrayOutputStream.size() + b) to the client.\n +
 mByteArrayOutputStream.toString());
 }

 mByteArrayOutputStream = null;
 mOutputStream.close();
 }

 @Override
 public void flush() throws IOException
 {
 mOutputStream.flush();
 }
 }

 web.xml Snippit..

 filter
 filter-nameLogging Filter/filter-name
 
 filter-classcom.nexusalpha.journeycheck.presentation.debug.HttpServletResponseLoggingFilter/filter-class
 /filter

 filter-mapping
   filter-nameLogging Filter/filter-name
   url-pattern/*/url-pattern
 /filter-mapping







 On 7/24/07, ben short [EMAIL PROTECTED] wrote:
 Yes sure.

 On 7/24/07, Karel V Sedlacek [EMAIL PROTECTED] wrote:
  Ben,
 
  When you succeed at this would you pass along your code?  We have
 issues
  with timeouts and it would be great to see what's being passed along
 to
  the client.
 
  Karel
  Cornell University
 
   Yes from the CompressionServletResponseWrapper example I can see the
   methods I need to override as you have pointed out.
  
   On 7/24/07, Tim Funk [EMAIL PROTECTED] wrote:
   Yes - but tomcat doesn't have that functionality out of the box -
 you'd
   need to write a filter which creates a HttpServletRequestWrapper
 which
   overrides getOutputStream() (or getWriter()) and then passes back a
   wrapped OutStream or Writer which also logs to wherever when
 print(int
   i) is called.
  
   -Tim
  
   ben short wrote:
Hi Tim,
   
Thanks for that, but it only seems to log out the
 request/response
headers. Is It possible to log everything sent to the client?
   
Ben
   
On 7/24/07, Tim Funk [EMAIL PROTECTED] wrote:
Look at the RequestDumperValve
   
-Tim
   
ben short wrote:
 Hi,

 I using Tomcat 6.0.13 and Spring 2.0.6. I have been involved
 in
 developing a website that products pages in various formats ,
 such
   as
 www, xml, wap and pda. We are having some issues with wap and
 pda,
   but
 cant ciew the html source thats being shown on the devices.
 We can view the html source in firefox using a wap and pda
 plugin,
   but
 the issues are not always the same or there at all.

 What I would like to do is log all the data sent to the
 client. I
   have
 been looking at encapsulating the HttpServletRequest and log
 out
   the
 data to a log file.
  
   -
   To start a new topic, e-mail: users@tomcat.apache.org
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
   -
   To start a new topic, e-mail: users@tomcat.apache.org
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL

Re: Logging all data sent to client

2007-07-24 Thread Karel V Sedlacek
Ben,

When you succeed at this would you pass along your code?  We have issues
with timeouts and it would be great to see what's being passed along to
the client.

Karel
Cornell University

 Yes from the CompressionServletResponseWrapper example I can see the
 methods I need to override as you have pointed out.

 On 7/24/07, Tim Funk [EMAIL PROTECTED] wrote:
 Yes - but tomcat doesn't have that functionality out of the box - you'd
 need to write a filter which creates a HttpServletRequestWrapper which
 overrides getOutputStream() (or getWriter()) and then passes back a
 wrapped OutStream or Writer which also logs to wherever when print(int
 i) is called.

 -Tim

 ben short wrote:
  Hi Tim,
 
  Thanks for that, but it only seems to log out the request/response
  headers. Is It possible to log everything sent to the client?
 
  Ben
 
  On 7/24/07, Tim Funk [EMAIL PROTECTED] wrote:
  Look at the RequestDumperValve
 
  -Tim
 
  ben short wrote:
   Hi,
  
   I using Tomcat 6.0.13 and Spring 2.0.6. I have been involved in
   developing a website that products pages in various formats , such
 as
   www, xml, wap and pda. We are having some issues with wap and pda,
 but
   cant ciew the html source thats being shown on the devices.
   We can view the html source in firefox using a wap and pda plugin,
 but
   the issues are not always the same or there at all.
  
   What I would like to do is log all the data sent to the client. I
 have
   been looking at encapsulating the HttpServletRequest and log out
 the
   data to a log file.

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]