John Smith

Greenhorn
+ Follow
since Aug 21, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by John Smith

Hi, Joe, Could you elaborate a little bit more? Or is there any place I can find a simple example?

Thank you very much.
17 years ago
Is it possible to allow user to change their password in security realm? How to config weblogic to do that?
17 years ago
modify /conf/server.xml
17 years ago
My understanding is that it is used to keep connection between tomcat/IIS or tomcat/Apache open if they reside on different machines, it is not used to keep the browser/IIS or browser/Apache connection. And It cannot be used in Tomcat standalone server. Am I right?

My situation is:

Our company firewall/proxy server have a timeout limit, it will kill any idle connection of more than 5 minutes. Unfortunately some of the request take a long time to process, so the client-server connection will be dropped before the server can present the page. What I want is to configure Tomcat or Apache so that it can send out keep-alive packet while processing the long request, so the connection won't be killed by proxy.

The only thing I can find is socket_keepalive, but it doesn't solve the problem. Does anybody know if I can configure Apache or IIS to do the same thing?

I need to point out the keepalive I am talking here is not persistent connection, that is for multiple requests to share a same connection.

Thanks! BTW, we mainly use JSP, we cannot rewrite or redesign our code now since it is heavily depened on a third party package, so that is not an option.
17 years ago
Lin, I think I figured out why socket_keepalive doesn't work. It is used to keep connection between tomcat/IIS or tomcat/Apache open if they reside on different machines. It is not used to keep the browser/IIS or browser/Apache connection. That's my understanding.

Unfortunately I don't know how to configure IIS or Apache to do the same thing.
17 years ago
sorry, out.flush(" ") is actually

out.println(" ");
out.flush();
17 years ago
Lin, thanks for your input, that's very helpful!

I think I will give up trying SO_KEPPALIVE, even I set up everything right, the firewall or proxy still kills the connection at 5 minutes, so I guess keep-alive doesn't work in my case.

I don't have the freedom to change my page to async or refresh itself due to many reasons.

Howerver, I found in my test jsp page, if I do out.flush(" ") at 1 or 2 minutes interval, it will keep my connection going, so I guess that could be a solution.

suppose my JSP code is like this,
<%
...
Obj.heavyProcess();
...
%>

How can I start a new thread to do out.flush(" ") while the heavyProcess is going on? If I can do that, I think the problem could be solved.

Thanks!
17 years ago
In JSP, is there anyway method I can use to get the current Socket from request, response, page, etc. ?

Thanks!
17 years ago
Thanks, Lin, you are very helpful!

I changed the KeepAliveTime on the server side, so the server can now send keep-alive packets at a shorter interval.

But I think more still need to be done. It says on another website: "A specific application can request that keep-alive packets be sent", so I guess the TCP/IP connection will not automatically be kept alive unless the application request it. I guess that's what socket_keepalive setting in TOMCAT is all about.
17 years ago
SO_KEEPALIVE, that is what I am talking about. Too bad if Weblogic doesn't support this. The socket_keepalive in Tomcat will trigger the operating system to send keep-alive packet, interval depend on SO_KEEPALIVE setting, generally 120mn, that still is too long.

Does anybody know how to permanently change the SO_KEEPALIVE value in the operating system (windows)?
17 years ago
I think the one you talked about is not what I want.

The keepalive setting in Weblogic --> protocol --> http is for the server to keep the server-client connection alive for certain time after a request is finished, so the following request from the same client can use the connection without creating a new one.

Our company firewall/proxy server have a timeout limit, it will kill any idle connection of more than 5 minutes. Unfortunately some of my Weblogic request take a long time to process, so the client-server connection will be dropped before the server can present the page. What I want is to configure Weblogic so that it can send out keep-alive packet while processing the long request, so the connection won't be killed by proxy.
17 years ago
I know tomcat has it. I got a firewall between my WebServer and my users, connections will be dropped after certain time. How to configure Weblogic to send out keepalive packets?

Thanks!
17 years ago