Re: possible memory leak tomcat 6?

2010-02-28 Thread Pid

On 27/02/2010 20:26, Sander de Boer wrote:

Hi,

My tomcat server gives often a out of mem.
When dumping the heap I found much instances of these objects:

Class InstanceCount TotalSize
class org.apache.tomcat.util.buf.ByteChunk 439493 20656171
class org.apache.tomcat.util.buf.CharChunk 432383 16862937
class org.apache.tomcat.util.buf.MessageBytes 414753 24055674

My configuration:
Tomcat: 6.0.16
Java: 1.6.0_14
OS: Solaris 10

Can this be a memory leak in Tomcat?


Why do you think that and why select those three classes out of all of 
the other classes in the heap?



p




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: unified doXXX()

2010-02-28 Thread Pid

On 28/02/2010 02:00, Aryeh M. Friedman wrote:

I am refactoring a servlet we have used successfully for several years
now to accommodate input that does not amen itself to
HttpServletRequest.getParameter()... The only way it seems to be to
handle our particular input (the nature/format of the input is covered
by an NDA so I can not discuss it in any detail) read the raw
request in the old servlet HttpServletRequest.getParameter() had a
nice side effect that we where able to do something like this:


I don't understand, can you explain what you mean by a side effect?


public void doGet(HttpServletRequest request,HttpServletResponse response)
throws IOException
{
handleRequest(request,response);
}

public void doPost(HttpServletRequest request,HttpServletResponse response)
throws IOException
{
handleRequest(request,response);
}


private void handleRequest(HttpServletRequest
request,HttpServletResponse response)
{
String input=Request.getParameter(foo); // we are only interested in
this one param


Request or request - is this a typo?


process input
}

I want to preserve the single handler design but since getParameter
barfs on our new input format and there is no unified raw input reader
the only thing I can think of is make it so doGet and doPost use
request.getQueryString() and request.getReader() respectivally... is
there an easier way? (namely I want to keep doXXX as pure wrappers with
nothing but a dispatch to handleRequest()).


Why does request.getParameter() not work, or is that a secret?

Is request.getInputStream() not suitable?

As far as I can see, there's absolutely no reason that handleRequest 
won't continue to work, as long as the code inside actually does work.



p



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: possible memory leak tomcat 6?

2010-02-28 Thread Mark Thomas

On 27/02/2010 20:26, Sander de Boer wrote:

Hi,

My tomcat server gives often a out of mem.
When dumping the heap I found much instances of these objects:

Class InstanceCount TotalSize
class org.apache.tomcat.util.buf.ByteChunk 439493 20656171
class org.apache.tomcat.util.buf.CharChunk 432383 16862937
class org.apache.tomcat.util.buf.MessageBytes 414753 24055674


That is normal.


My configuration:
Tomcat: 6.0.16
Java: 1.6.0_14
OS: Solaris 10

Can this be a memory leak in Tomcat?


Unlikely.

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: IIS7 + ISAPI Redirector on 64Bit Server Platform

2010-02-28 Thread David Bolsover
Hi Mladen

I've just been doing some further testing with the 1.2.30 connector on a 32 bit 
machine...

Whilst the 1.2.30 64bit version solved a problem of broken links in the 64bit 
environment, the 32bit version has a problem when rendering dynamically 
generated images.

To explain: I'm currently working on a couple of different web applications, 
doing development on a Windows 7 32 bit machine using Netbeans and Tomcat. 
Deployment environment is 64bit Windows Server 2008 / Server 2008r2.  Both the 
applications uses the RichFaces 3.3.2 libraries. The particular issue I am now 
seeing is with a4j:mediaOutput/ tags where the content image (jpg) is 
delivered from a backing SQLServer database. Tomcat (8080) renders these images 
correctly but NOT when using the isapi redirector via IIS.

So far, I have only tested on 32bit machine - but 1.2.28, 1.2.29 and 1.2.30 all 
exhibit this behaviour.

This is a real show-stopper for this particular application.

I'll gladly provide any assistance possible in search for solution - but my 
skills are generally limited to Java coding.

Regards

DB

-Original Message-
From: Mladen Turk [mailto:mt...@apache.org] 
Sent: 27 February 2010 11:18
To: Tomcat Users List
Subject: Re: IIS7 + ISAPI Redirector on 64Bit Server Platform

On 02/27/2010 11:42 AM, Pid wrote:
 On 27/02/2010 01:00, David Bolsover wrote:

 At my wits end - same application performs flawlessly when run on
 Windows 7 IIS7 using 32bit redirector.

 Seeking inspiration on how to debug / solve this problem.

 1.2.30 will be released fairly rapidly, as a bug has been reported in
 connectors 1.2.29. You could try an earlier release until then.


Right, 1.2.30 is in the release process already
Candidate is available from:
http://tomcat.apache.org/dev/dist/tomcat-connectors/jk/binaries/

It'll be visible in couple of hours after web server sync.

Regards
-- 
^TM

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Java programm to Shutdwon the tomcat server

2010-02-28 Thread dBenjamin

Thanks for helping...
Can you please find my scenario?
1.  I am using windows Environment.
2.  I am using tomcat 6 binary distribution versions here we cannot get pid
from the windows.
3.  For my requirement before starting the tomcat server I need to verify 
the
port availability if any other application using then I have change both
shutdown port and http port.  I facing problem to change the port address, I
am validating shutdown port using socket and http port using java.net
package. When I change the port I am getting invalid request received error
WARNING: StandardServer.await: Invalid command '' received.  Because of this
error I am not able to shutdown the server. So I would like to shutdown the
server using java program. 

command prompt when we type CTRL –C server getting shutdown I would like to
know can we possible to send CTRL-C through java program. 
Runtime.getRuntime().exec(command to shut down tomcat); here we can call
shutdown bat file to stop the server but let me know if any other way I can
stop instead calling bat file through Runtime.getRuntime().exe(“”);
Please help me to shutdown the server through java program? If possible let
me know the procedure?

-- 
View this message in context: 
http://old.nabble.com/Java-programm-to-Shutdwon-the-tomcat-server-tp27714568p27740049.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat SSO JSESSIONIDSSO value can't be reset by browser

2010-02-28 Thread Xiaojun Deng
On Fri, Feb 26, 2010 at 03:28:50PM +, Pid wrote:
On 26/02/2010 14:58, Xiaojun Deng wrote:
On Fri, Feb 26, 2010 at 8:51 PM, Pidp...@pidster.com  wrote:
On 26/02/2010 09:59, Xiaojun Deng wrote:

On Fri, Feb 26, 2010 at 09:57:46AM +, Pid wrote:

On 26/02/2010 04:15, Xiaojun Deng wrote:

Hello,

I use the Tomcat SSO function, and I found that when I restart my tomcat
or the
session timeout, I refresh the page, the cookie JSESSIONIDSSO keep the
old value,
so I can't login my application.

And the web application's JSESSIONID works well, they can reset the
cookie value.

Is there a way to configure for the JSESSIONIDSSO?

server.xml content
Host name=localhost  appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false

Realm  className=org.apache.catalina.realm.SSOMultipleDSRealm /
!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html --
Valve className=org.apache.catalina.authenticator.SingleSignOn
requireReauthentication=false/
/Host

Thanks.

What are your exact Tomcat, JVM, OS versions?


CentOS release 5.2 (Final) kernel 2.6.18-92.el5
Tomcat 6.0.20
JVM jdk_1.6.0_14


How many applications do you have deployed, and what is the session timeout
for each one?


I deployed 3 applications, and two session timeout are 60min, and the
rest is 5min for testing,

OK - so if you're using the SSO valve, then the longer session
timeout should mean that the users of the app with the shorter one is
automatically logged in again.

yes, thanks for your comments 

All the applications' JSESSIONID can be reset when the session timeout
(5min) or server restart (I checked the Firefox cookies manager),
but the JSESSIONIDSSO value can't be reset, it keep the old cookie
value, and when login into the server again, it failed caused by using
a old
cookie value, but the server have created a new session cookie.

I'm not entirely sure I understand what you mean here.  The value of
JSESSIONID may change, but the session itself should remain intact.

What is failing, exactly, and what symptoms are you seeing?  The user
is logged out, or an error page?


I'm sorry for the descriptions, maybe it's a complex problem for me...
Because I used the JSESSIONIDSSO value to validate, and I just want to the
value will change when the session timout or server restart, but when session 
timeouted,
the firefox cookie still keeped the old value, I don't know what happened.


Actually, I don't know who manages the JSESSIONIDSSO, I think the
JSESSIONID managed by each application, and it can refresh when
session timeout, but why the JSESSIONIDSSO can't work well?

Thanks.

The %CATALINA_HOME%/conf/context.xml file contains a documented
setting which allows the session to be persisted during restarts.  If
it is enabled then the session will be restored to each user, after
restart.

I don't enable it.
A session(JSESSIONID) is managed by the web application, like
webapps/app1
webapps/app2
But who manages the JSESSIONIDSSO?


Now I resolved this problem via deleting the JSESSIONIDSSO cookie value, and it
will create a new value, and work well.

Thanks.

p


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org