JSP+RMI = socket leak (with tomcat 5)

Tried this in the RMI forum, no answer, so let's try here...
When I use RMI from a JSP servlet, I have a "socket leak" problem. When I create an RMI unicast remote object, the RMI library (of course) opens up a server/listening socket. In a normal application, I can unbind the remote object, but then the next object I create will re-use the same server socket, so the server socket never closes, but only one is ever created, so it's not a big deal.
Now for the problem: When I use the Tomcat manager to unload my webapp, the socket is still there. Sure, fine. But then when I reload the webapp, instead of re-using the same server socket, a new one is created! Furthermore, if I try to use explicit port numbers to force the server socket to be reused, I get "port already in use" errors. It seems that somehow tomcat won't let RMI recycle its entry points in between webapp restarts. Does anybody know how I can either:
a) Get RMI to re-use the same ports
b) Get RMI to completely shut down its ports when the webapp is unloaded (this would be even better)
Thanks. It's irritating to see 10 open but unused server sockets on my system if I have to restart the webapp.

Ah, I left out something: I construct the RMI object a servlet context listener in the contextInitialized() call, and I call UnicastRemoteObject.unexportObject() in the contextDestroyed() call. I added log messages, I am definitely correctly unbinding the object. The problem isn't that it is failing to be unbound - the problem is that the RMI system is refusing to reuse the same port after it is unbound. After unbinding, the port is still open, but it is never reused, each time I re-instantiate the remote object, it is making a new server socket and leaving the old one sitting open.
As for why I'm doing this, it is a bit like a homegrown EJB, but just so small that this was the simplest way. I have a largish non-web based application, then I have a few JSP pages that do database queries to provide information to browsers. The JSP pages are not at all central to the application though, and just show some database info. The JSP system caches some SQL data, and I use RMI to tell JSP when to flush cached data due to database changes. It's all very simple, and it works fantastic, except for the issue that every time I reload the webapp I leave these server sockets hanging open. Even that is just an irritation, I don't reload much except when I'm testing, but it's a big enough irritation that I would really like to fix it.

Similar Messages

  • Memory Leak with Tomcat version update 3.2 to 6.0

    Hi, I've been trying to update tomcat from 3.2 to 6.0. My issue is that I have a memory leak(s?) that make the web application unusable. Currently in my setup I am using these components:
    Tomcat 6.0, sun JDK 1.6.0_01, mssql 2005, Microsoft SQL Server 2005 JDBC Driver 1.2, xalan 2.7.0, log4j 1.0.4 (should be only out of date component)
    It is a fairly large application that uses xslt with xalan and java servlets to display web pages. There was no issue with memory leaks before the update from tomcat 3.2, sun jdk 1.4.2 and old xalan and jdbc (for mssql 2000) components.
    My question for the community is, where should I be looking for my memory leak. Are there known issues with my setup?
    thanks for your help,
    Matt

    Just in case someone goes down the same road as me, my problem was actually the one listed on the page below. My threads are not being released after a StandardContext reload. Which I'm not sure if this leak applies to tomcat version <4 or not.
    http://opensource.atlassian.com/confluence/spring/pages/viewpage.action?pageId=2669

  • Premature socket disconnect with Tomcat

    I'm seeing an intermittent problem with Java servlets, which I'm having real trouble tracking down... I wonder if anyone has seen something similar?
    I am POSTing a request to the servlet, with about 1Kb of data in the request. The servlet sends a response by calling sendRedirect(new URL). In some circumstances, however, tomcat appears to be aborting the TCP connection prematurely... causing the browser (IE6.0) to first resubmit the POST request, and then give up and say "The page cannot be displayed".
    The frequency of occurance seems to vary according to the network latency and the content length of the POST request. I also tried setting tomcat 3.3.1a's "socketCloseDelay" parameter on the Http10Connector - which does make the problem occur less, but doesn't make it go away completely. Using Coyote didn't help, either.
    I suspect that there's something wrong with my code! But I'm not sure how to track it down. I wonder if there is something that I should be flushing, perhaps?
    Any ideas very much appreciated!!
    Thanks
    Charlie

    Aha! I've discovered my problem (see previous post). Don't do this...
    public void doPost(HttpServletRequest aRequest,
    HttpServletResponse aResponse)
    PrintWriter lOutStream=aResponse.getWriter();
    aResponse.sendRedirect(some URL);
    It'll work most of the time, but if you get a request with about 1Kb of data, and a network latency of about 40ms, it'll confuse IE6.0 by untidily closing the TCP connection. Obviously.
    The answer, of course, is only to call getWriter if you're genuinely intending to write to it (in which case, you won't be allowed to call sendRedirect).
    I'll try and raise a bug somewhere.
    Charlie

  • Server Socket Leaks on stopping Java Processes

    I have a strange problem on Windows 2000 Advanced Server with JDK1.5.10. Our application runs on a Tomcat 5.5.12 and is opening 2 server sockets along with Tomcat's own 8080 port. Also we deployed a stand alone application that also opens a server socket. Whenever we stop Tomcat service or our Application service (Windows services) these server sockets are not getting closed. If we use "netstat" to check if any sockets are still open it is NOT showing any sockets.
    But when we use "netstat -a" command it is showing entries like
    TCP    10.40.1.162:8080    10.40.1.162:0  LISTENING
    TCP    10.40.1.162:22222    10.40.1.162:0  LISTENING
    TCP    10.40.1.162:33334    10.40.1.162:0  LISTENINGHere 8080 (tomcat), 22222, 33334 are the ports on which the server sockets are opened earlier. We check in Task Manager but there is no java process running. If we try to restart the same java process it is throwing JVM_Bind exception. If we reboot the box the we are able to restart the services. Similar behaviour we observed sometimes on Linux also. I guess some settings in the OS we need to tweak to fix this issue. Can somebody please help me what are those settings for Windows and Linux platforms which reclaims unused server sockets faster??

    The state is LISTENING not TIME_WAIT. There is a cleanly closure of sockets provided in the code. It happens to Tomcat's own ports also. If you telnet to these sockets from another box, it is connecting and staying instead of "Connection Failed" error. But in Task Manager or "Services.msc" Console no service or process running! One more observation is that there is heavy load of threads and a huge number of clients socktets were interacting with these sockets just before shutdown.

  • Need help with Tomcat and JSP

    Hi
    I'm a complete beginner with JSP, I have experience with Java, Dreamweaver and HTML, but I'm having alot difficulty understanding JSP.
    I tried doing out some of the tutorial examples but they don't seem to come out right on the browser.
    For Example the Code for Date
    <HTML>
    <BODY>
    <%
    // This is a scriptlet. Notice that the "date"
    // variable we declare here is available in the
    // embedded expression later on.
    System.out.println( "Evaluating date now" );
    java.util.Date date = new java.util.Date();
    %>
    Hello! The time is now <%= date %>
    </BODY>
    </HTML>
    Comes out as
    <% // This is a scriptlet. Notice that the "date" // variable we declare here is available in the // embedded expression later on. System.out.println( "Evaluating date now" ); java.util.Date date = new java.util.Date(); %> Hello! The time is now <%= date %>
    I know this probably really sounds like a stupid question but what could be the problem?

    Those it have to saved on the desktop, or in the Tomcat webapps folder or what?It has to be in a web application under tomcat. The easiest one to get up and running with basic jsp is the webapps/ROOT directory which is where the main index page is.
    [url http://www.coreservlets.com/Apache-Tomcat-Tutorial/]This one is a good basic guide to installing/getting it running.
    Also the tomcat documentation itself is reasonable good. Of specific relevance to you would be [url http://tomcat.apache.org/tomcat-5.5-doc/appdev/index.html]Application developers guide which explains the basic layout/structure of a web application.

  • Compiling jsp with tomcat 4

    HTTP 500 server error as follows:
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    An error occurred at line: 2 in the jsp file: /listStore.jsp
    *line#2 is the usebean statement in the jsp...
    NOTE: new machine, new configuration... this same servelt/jsp/bean work great on another machine with tomcat 3...
    so this will have something to do with tomcat configuation... believe that the configuration is set to not compile with deprecation.. would like to know where to change that...

    I guess the problem comes from jdk 1.4 ...deprecation of sun.tools.javac.Main prevents compilation in jasper...

  • JSP: work with TomCat 5.5.9 and NOT work with TomCat 6.0.16

    Hi all,
    I'm Antony and I have a problem with a .JSP page of my server.
    In my server there are 2 users: "u1" and "u2"; there are 2 TomCat, version 5.5.9 and version 6.0.16. There is Apache WebServer version 2. The 2 TomCat servers have the same configuration files: server.xml and web.xml (in the dir /conf of the main server's root). They not work simultaneously.
    When the user "root" launch the TomCat 5.5.9 all work fine: the server will show correctly the JSP pages of "u1" and the pages of "u2".
    When the user "root" launch the TomCat 6.0.16 the JSP pages of "u1" work fine but the JSP pages of "u2" not work: it seems that there are problems with the path where the server want to search the pages of u2.
    In the server.xml there is this code (for the handle of u2's site):
    <Host name="u2site.com" appBase="/home/u2/public_html/">
      <Alias>www.u2site.com</Alias>
      <Context path="" reloadable="false" docBase="/home/u2/public_html/" debug="0"/>
              <Context path="/manager" debug="0" privileged="true"
                  docBase="/usr/local/jakarta/tomcat/server/webapps/manager">
              </Context>
    </Host>and this code (for the u1's site)
    <Host name="u1site.com" appBase="/home/u1/public_html/">
      <Context path="" reloadable="false" docBase="/home/u1/public_html" debug="1"/>
              <Context path="/manager" debug="0" privileged="true"
                  docBase="/usr/local/jakarta/tomcat/server/webapps/manager">
              </Context>
    </Host>The problems with the JSP pages of u2 are one of the following:
    org.apache.jasper.JasperException: /login2.jsp(4,0) The value for the useBean class attribute com.u2.beans.access.Autenticator is invalid.and this one that appear with the pages that have the inclusion of another JSP page
    /u2page.jsp(3,0) File "/../support/_formatting.jsp" not foundI think that the TomCat know how to find the page that the browser request to Apache WebServer (and that the webserver request to Tomcat by the connector) 'cause for pages that haven't inclusion or call to method in packages all work fine...but the TomCat have problems to locate the pages included or the method located in a JAR (the jars are located in WEB-INF/lib/ of the u2's site).
    How I can resolve this problem with TomCat 6.0.16? I repeat that with TomCat 5.5.9 all work fine...same configuration!
    Any ideas?
    Thank you very much,
    Antony.

    Hi stevejluke, 'cause in the page "/supporto/_formatting.jsp" there are only the definition of some variables it's normal that the output at the browser it's a blank page.
    The problem it's that Tomcat 6.0.16 cannot know how "navigate" the pages beginning from one...it know where is the "x.jsp" page requested directly by Apache WebServer, where is "y.jsp" request directly by Apache, where is "z.jsp" requested directly by Apache but if "x.jsp" request, includes, "y.jsp" Tomcat cannot know where "y.jsp" is located. There is some file where I can "say" this to Tomcat?
    The page "/mostre/elenco_mostre.jsp" includes directly the "/supporto/_formatting.jsp".
    Another thing: in /mostre/elenco_mostre.jsp there is an inclusion directive for /supporto/_formatting.jsp that is so:
    <%@ include file="../supporto/_formatting.jsp"%>you can see that the included file is "../supporto/_formatting.jsp" and NOT "/../supporto/_formatting.jsp"...the "/" at the begin of the path is included by Tomcat!
    In the catalina.out there are this lines, when the page is called:
    Jul 6, 2008 3:15:00 AM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: /elenco_mostre.jsp(3,0) File "/../supporto/_formatting.jsp" not found
      In catalina.out before server start there are this lines:
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '1' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '1' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '1' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '1' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '1' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '1' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 358 ms
    Jul 6, 2008 1:43:49 AM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Jul 6, 2008 1:43:49 AM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/6.0.16
    Jul 6, 2008 1:43:52 AM org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/23  config=null
    Jul 6, 2008 1:43:52 AM org.apache.catalina.connector.MapperListener registerEngine
    WARNING: Unknown default host: localhost
    Jul 6, 2008 1:43:52 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 2512 msThe file "web.xml" is located in "$Tomcat_home/conf" and it's:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
        http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
      <servlet>
        <servlet-name>jsp</servlet-name>
        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
        <init-param>
          <param-name>fork</param-name>
          <param-value>false</param-value>
        </init-param>
        <init-param>
          <param-name>xpoweredBy</param-name>
          <param-value>false</param-value>
        </init-param>
        <load-on-startup>3</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>jsp</servlet-name>
        <url-pattern>*.jsp</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>jsp</servlet-name>
        <url-pattern>*.jspx</url-pattern>
      </servlet-mapping>
      <session-config>
        <session-timeout>30</session-timeout>
      </session-config>
      <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>
    </web-app>there are not web.xml file in /WEB-INF/ of the web application.
    Maybe the problem it's that Tomcat want the conf file in "Server/Service/Engine/Host/Context" ? I must move the block HOST of the server.xml file in this path?
    Good Sunday and thank you!
    Antony.

  • Problems with Tomcat 4.0 and jdk 1.3.1 (jsp:include) Help Gurus...

    Im running examples of the include:
    <jsp:include page="xxx.jsp" flush="true">
    and received error:
    org.apache.jasper.JasperException: No se puede compilar la clase para JSP
    An error occurred at line: 17 in the jsp file: /jsp/include/include.jsp
    Generated servlet error:
    /Programas/Tomcat4/work/localhost/examples/jsp/include/include$jsp.java:79: Method include(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, javax.servlet.jsp.JspWriter, boolean) not found in class org.apache.jasper.runtime.JspRuntimeLibrary.
    JspRuntimeLibrary.include(request, response, "/jsp/include/foo.html" + jspxqStr, out, true);
    ^
    Please Help me Im running this equal with:
    <%@ include file="xxx.jsp" %>
    and runnig fine....

    The two means of including files are different in their approach.
    Using <jsp:include .../> compilation of the included jsp is done at run -time not during compilation.
    Using <%@ include .../> compiles at compile time.
    Looking at the error it seems that the method JspRuntimeLibrary.include is not being found which suggests that you may have a classpath problem. Check that there is not a servlet.jar in the classpath that is from a earlier spec than the one provided with Tomcat.
    Dave

  • Strange thing with tomcat+jsp+javabean

    I use javabean in jsp with tomcat container.if I put the javabean file in a package,then it works well.But if I don't, I means,there are no package clause in my javabean file.then it complaint that org.apache.jsp. error:class not found.
    It is very strange.Of course place the class file I put is right.Do anyone encounter the same problem.I use tomcat4.0.4

    Did you import the classfile? Even if it is not there in a package, you need to import it.
    For example, if you have a Test.java (Test.class) in your web-inf\\classes with out any package statement, then you need to code this in your jsp,
    <%@ page import="Test" %> (I don't exactly remember whether you need to import 'Test' or 'Test.class'). Just give a try.
    Sudha

  • Servlet/JSP with Tomcat

    Where is the best place on the Web to learn Servlet/JSP with Tomcat for beginners?

    i also just started learning servlets a few days ago.
    here are some of the websites i've found
    there are some tutorials as well as general tips and stuff.
    http://java.sun.com/docs/books/tutorial/servlets/index.html
    http://www.javaworld.com/javaworld/javatips/jw-javatip94.html
    http://www.cetus-links.org/oo_javaserver_pages.html
    http://www-105.ibm.com/developerworks/education.nsf/dw/java-onlinecourse-bynewest?OpenDocument&Count=500&loc=j
    http://www.fawcette.com/javapro/2002_03/online/online_eprods/servlets_03_08/
    http://developer.java.sun.com/developer/onlineTraining/Servlets/Fundamentals/index.html
    http://developer.java.sun.com/developer/onlineTraining/JSPIntro/
    http://www.novocode.com/doc/servlet-essentials/
    http://hotwired.lycos.com/webmonkey/99/07/index3a.html?tw=programming
    http://www.jguru.com/faq/Servlets
    http://www.jguru.com/faq/JSP
    i haven't looked into all of these yet, but i'm sure they will help you.

  • HTTP2302 error  with tomcat and linux environment

    We are using Sun Java(TM) System Web Server 7.0 with Tomcat 6.0.14 in Linux environment. We are frequently facing "Service Unavailable error" in the frontend . while verifying the logs we found the details as below :
    could you guinde what could be issue here ?
    In Webserver log the following error thrown many times
    func_exec reports: HTTP2302: Function jk_service aborted the request without setting the status code
    We are using the tomcat connector nsapi_redirector-1.2.26-sjsws6.1sp11.so in our environment
    nsapi.log
    [Thu Nov 19 06:22:11.602 2009] [20843:4074314640] [debug] jk_open_socket::jk_connect.c (448): socket TCP_NODELAY set to On
    [Thu Nov 19 06:22:11.602 2009] [20843:4074314640] [debug] jk_open_socket::jk_connect.c (548): trying to connect socket 30 to 160.254.92.190:8051
    [Thu Nov 19 06:22:11.602 2009] [20843:4074314640] [info] jk_open_socket::jk_connect.c (566): connect to 160.254.92.190:8051 failed (errno=111)
    [Thu Nov 19 06:22:11.602 2009] [20843:4074314640] [info] ajp_connect_to_endpoint::jk_ajp_common.c (869): Failed opening socket to (160.254.92.190:8051) (errno=111)
    [Thu Nov 19 06:22:11.602 2009] [20843:4074314640] [error] ajp_send_request::jk_ajp_common.c (1359): (ajp13) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
    [Thu Nov 19 06:22:11.602 2009] [20843:4074314640] [info] ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2)
    [Thu Nov 19 06:22:11.602 2009] [20843:4074314640] [error] ajp_service::jk_ajp_common.c (2204): (ajp13) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
    [Thu Nov 19 06:22:11.602 2009] [20843:4074314640] [error] jk_service::jk_nsapi_plugin.c (398): service() failed with http error 503
    [Thu Nov 19 06:22:11.602 2009] [20843:4074314640] [debug] ajp_reset_endpoint::jk_ajp_common.c (691): (ajp13) resetting endpoint with sd = 4294967295 (socket shutdown)
    [Thu Nov 19 06:22:11.602 2009] [20843:4074314640] [debug] ajp_done::jk_ajp_common.c (2522): recycling connection pool slot=0 for worker ajp13
    h1. Obj.conf
    <Object name="default">
    AuthTrans fn="match-browser" browser="*MSIE*" ssl-unclean-shutdown="true"
    <If $uri =~ '^/$'>
    NameTrans fn="redirect" from="/" url="http://wikitest.pershing.com/confluence/" code="301"
    </If>
    NameTrans fn="assign-name" from="/confluence/*" name="servlet"
    PathCheck fn="uri-clean"
    PathCheck fn="check-acl" acl="default"
    PathCheck fn="find-pathinfo"
    PathCheck fn="find-index" index-names="index.html,home.html,index.jsp"
    ObjectType fn="type-by-extension"
    ObjectType fn="force-type" type="text/plain"
    Service method="(GET|HEAD|POST)" type="*~magnus-internal/*" fn="send-file"
    Service method="TRACE" fn="service-trace"
    AddLog fn="flex-log"
    </Object>
    <Object name="j2ee">
    Service fn="service-j2ee" method="*"
    </Object>
    <Object name="es-internal">
    PathCheck fn="check-acl" acl="es-internal"
    </Object>
    <Object name="cgi">
    ObjectType fn="force-type" type="magnus-internal/cgi"
    Service fn="send-cgi"
    </Object>
    <Object name="send-precompressed">
    PathCheck fn="find-compressed"
    </Object>
    <Object name="compress-on-demand">
    Output fn="insert-filter" filter="http-compression"
    </Object>
    <Object name="servlet">
    ObjectType fn="force-type" type="text/html"
    Service fn="jk_service" worker="ajp13"
    </Object>

    Hi, The reason tomcat had to be used is that the software is bundled with tomcat. Hence we are in the following configuration:
    -Sun Web Server 7.0 update 5
    -Tomcat 6, Using JRE1.6
    -The server runs Linux.
    -As for the tomcat web server plugin, the 32-bit tomcat connector is downloaded from http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/solaris/jk-1.2.26/sparc/
    With this configuration. seems when we refresh a page quickly, we get "service unavailable error". But if we only put web contents, the issue does not exist. Looks like the issue resides in the plugin....
    Any help is greatly appreciated

  • Problem with Tomcat 5.0

    Hi there,
    I have a .java file inside \WEB-INF\classes\ directory. This .java file has a "public static void main" method that calls al the other methods in the class.
    I want to know if its possible for me to create an JSP file to call this .java file. If so how can i do it?
    Thanks!!

    NerdVix wrote:
    Hi there,
    I have a .java file inside \WEB-INF\classes\ directory. Wrong. .java files do you no good in that directory. Only .class files belong there.
    This .java file has a "public static void main" method that calls al the other methods in the class.Fine - for testing on a command line.
    I want to know if its possible for me to create an JSP file to call this .java file. If so how can i do it?What part don't you understand? Writing JSPs? Calling methods? What is a person so ignorant doing with Tomcat anyway?
    It's possible to call main, but not a good idea.
    %

  • Running JSP 2.0 pages on Tomcat 4.1

    I have web-application written in JSP 2.0. I use custom tags in tag-files and EL.
    How can I run this application on hoster's Tomcat 4.1 server.

    But hoster do not have Tomcat 5 :( only Tomcat 4.1
    May I run JSP 2.0 app on Tomcat 4.1 with some tricks

  • Apache with Tomcat cluster

    Hi, I integrated Apache with Tomcat Cluster on Windows 2000. I instalated mod_jk2.dll, created workers2.properties and configurated server.xml in Tomcat instances. If I try to reach my .jsp file, e.g. http://localhost/root/main.jsp, I get follow message from Tomcat: source root/main.jsp is not available. What�s wrong? Can anybody help me? Apache version: 2.0.47, Tomcat: 1.4.27

    Well, the first order of business is to determine exactly where main.jsp is located. If it is at <CATALINA_HOME>/webapps/main.jsp, then it should be at http://localhost:8080/main.jsp. Bypass Apache and verify that you can get to the Tomcat specific pages first.
    Basically, we're trying to determine a) the correct URL and b) whether the problem is with Tomcat itself, or with the connections between Apache and Tomcat.
    Essentially, we can't tell you where your configuration is incorrect until you tell us what your configuration is. :)

  • RMI Performance Comp. with Forte

    Hi All,
    I know that this topic has been discussed on the list
    already, but I would like to find out whether the
    current state of Sun's RMI implementation is like
    I imagine it, and I want to compare with our Forte
    Service objects too. Basically, these seem to be
    issues that negatively affect performance,
    1. A thread is created on the server per request, and
    there is no way to change this easily (i.e. reuse
    threads from a pool)
    2. Each call opens a new socket.
    In particular, does it make sense to replace RMI with
    CORBA for increased performance and scalability? Can a
    PC-based server handle loads of about 1000 remote
    calls per second (considering the overhead imposed by
    RMI/other communication methods only)? or Shall we
    compare Forte against RMI.
    Thankx,
    Babu

    Okay,
    A method invocation (or function call or procedure call or whatever) is
    always a synchronous call. This means, you ask the service to do something
    and wait for the function to complete, optionally with return values. It is
    possible, that within the method, a separate thread is started, that
    continues after the method is completed, but that doesn't change the
    mechanism that a method invocation is a synchronous call.
    In Forte, it is possible to start a method as an asynchronous call, with the
    "start task" command. In that case, the caller does not wait for the method
    to complete and return values are not handled. If this method invocation
    happens across a network (making it a Remote Method Invocation) then a
    socket will be opened when the call is made and closed immediately after. It
    does solve the one-socket-per-caller problem, but not the
    one-thread-per-caller problem. Also, it does remove the possibility of
    receiving return values.
    If you want to keep using method invocations as synchronous calls with
    return values, but you also want to share resources like sockets and
    threads, then you have to use TP-monitoring concepts. You must have a two
    way, asynchronous call with an additional parameter. This means, the client
    does a single, brief call that re-uses an existing thread and immediately
    frees the socket it used. The client passes all required parameters and one
    additional parameter to identify itself. In Forte, this would be a reference
    to an anchored object on the client-partition. Then the client waits
    (possibly blocks). The server completes the request and locates the client
    that sent the request. The server invokes a method on the client, informing
    that the request was handled. The server now also passes all return values.
    The client exits its wait-state and continues.
    In Forte (even if you use other mechanisms to hook into Forte), every call
    still is a separete thread. If you wish to re-use existing threads, this
    must be done using events. So, a client invokes a method asynchronously
    (using "start task") and waits. The server start a new thread and posts an
    event. Each existing thread is either idle in an event loop or busy handling
    a previous event. The new event is added to the queue of all event loops and
    the original thread is terminated (the socket was already freed). One event
    loop of the thread-pool will be the first one to respond to the event, mark
    this somewhere (maybe using mutex) and start handling it. All the others
    will eventually respond to the event as well, but will be able to see that
    the event is already being handled and ignore it.
    This does introduce overhead and it makes your application more complex, but
    it also prevents you running out of resources.
    Now, the real issue is not the amount of calls per second, but a combination
    of calls per second and seconds to complete the call. Using these two
    numbers, you can calculate the amount of tasks the server has to be handling
    simultaneously at any given time (average). Using the above described
    technique you can handle intermittent, large loads, because if there are
    more requests than available resources (threads) at any given time, the
    requests will simply be put in a queue and handled later. However, if the
    over-load continues for a prolonged period of time, the queue will simply
    grow and grow and grow until the partition crashes and all queued items will
    be lost.
    Then it is time for load-balancing. You install several additional servers
    and run a serverprocess on each of these machines. And you use a router that
    distributes calls across the different serverprocesses. Forte has built-in
    mechanisms for that, that work reasonably well. However, if the amount of
    calls per second is so high, that even the short time it takes the router to
    relay the request still is too long, so that the router runs out of
    resources, then you have to use more complex models, for which Forte doesn't
    have any ready-to-use solutions. But neither does CORBA or Java I believe.
    One more thing. If you combine the above described mechanism to free sockets
    as quickly as possible and use Forte loadbalancing, you might solve all your
    problems. Just install 6 overloaded server processes. This results in 6
    processes times 256 threads per process equals 1536 simultaneous tasks. If
    each task is an asynchronous method invocation that immediately frees its
    socket, then you never block you're whole server by using all sockets and
    you're still able to do handle 1536 requests simultaneously.
    Remember, if you have such a large load of calls per second, that all pass
    through the same machine (router) then you'll run into hardware limitations
    and no software solution can fix that. You have to find a mechanism to
    distribute calls across different nodes without using a single router. For
    example, cluster clients and have a single server node per cluster.
    Pascal.
    -----Original Message-----
    From: Babu Raj [SMTP:ibcsmartboyyahoo.com]
    Sent: Friday, March 24, 2000 3:42 PM
    To: Rottier, Pascal
    Cc: kamranaminyahoo.com
    Subject: RE: (forte-users) RMI Performance Comp. with Forte
    Hi,
    I believe in CORBA, ORB maintains the same
    connection ( Same Socket) for multiple calls, on the
    same Servant object, unless otherwise its ONEWAY call.
    But RMI uses the same strategy as Forte, I'm not sure
    either on this. Thats the reason, i asked the previous
    question.
    Thankx,
    Babu
    --- "Rottier, Pascal" <Rottier.Pascalpmintl.ch>
    wrote:
    How are CORBA and RMI different then Forte (one
    socket and one thread per
    call)?
    -----Original Message-----
    From: Babu Raj [SMTP:ibcsmartboyyahoo.com]
    Sent: Friday, March 24, 2000 3:18 PM
    To: kamranaminyahoo.com
    Subject: (forte-users) RMI Performance Comp. withForte
    Hi All,
    I know that this topic has been discussed on thelist
    already, but I would like to find out whether the
    current state of Sun's RMI implementation is like
    I imagine it, and I want to compare with our Forte
    Service objects too. Basically, these seem to be
    issues that negatively affect performance,
    1. A thread is created on the server per request,and
    there is no way to change this easily (i.e. reuse
    threads from a pool)
    2. Each call opens a new socket.
    In particular, does it make sense to replace RMIwith
    CORBA for increased performance and scalability?Can a
    PC-based server handle loads of about 1000 remote
    calls per second (considering the overhead imposedby
    RMI/other communication methods only)? or Shall we
    compare Forte against RMI.
    Thankx,
    Babu
    For the archives, go to:
    http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. Tounsubscribe, send in a new
    email the word: 'Unsubscribe' to:forte-users-requestlists.xpedior.com
    For the archives, go to:
    http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To
    unsubscribe, send in a new
    email the word: 'Unsubscribe' to:
    forte-users-requestlists.xpedior.com
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

Maybe you are looking for

  • Location settings/GPS can't change the options - used to be able to!

    I've read another thread with the same problem and people are saying you must've been connected to something with GPS - I haven't, nobody in my house has a phone or anything else that connects to GPS so it's not possible. I was trying to get this new

  • Have a gap in detail of first page and not display group footer on each pag

    Please help me about Memo field in SubReport in CrystalReportXI. I have a SubReport that need to display pageheader, detail, page footer, and  in detail of subreport contains memo field and set the property of this text box to "Can Grow" = Yes .Howev

  • How do I find and remove hidden files

    For some reason, after the recent install of SL my 1TB drive is extremely bloated. I have deleted or moved just about everything possible from the disk (excluding system files and applications) and it still shows that I only have 94.08 GB of space av

  • Function module for creation of Payment Advice (Trans: FBE1)

    Hi, I need to create payment advice using function module. Transaction code is FBE1. Is there any function module or BAPI for the same? Thanks in advance, Regards, Umesh

  • Samsung tv LE32R86BD and mac mini: No Signal

    Hello dear mac users! Today i received my new mac mini (the new model) from the official Apple distributor here in Greece with all the adaptors needed to connect it to my Samsung LE32R86BD tv and that is a mini display port to HDMI adaptor and an HDM