Stop or Reload a call to a JSP--what happens to a EJB running in the JSP?

I am calling repeatedly calling a method of an EJB bean from within a
          while-loop in a JSP. The EJB is handling some database processing.
          Unfortunately, the EJB's processing can take a lot of time within each
          iteration of the while-loop, which prompts some users to hit "Stop" or
          "Reload" from their browser.
          Therefore, the while-loop gets broken.
          My question is: what happens to the thread of execution within the EJB?
          Will an EJB that is called from a JSP continue to completion even if a user
          hits "Stop" or "Reload?"
          Any feedback will be appreciated. It appears to me that the EJB does not
          continue to completion.
          Dave Bine
          Software Engineer
          Flutter.com
          

What do you mean that the while loop gets broken? Stop just closes the
          socket from the client end, it does not affect threads that are processing
          on the server unless they explicitly check the state of the socket.
          Similarly, the EJB would not stop processing.
          Cameron Purdy
          "dbine" <[email protected]> wrote in message
          news:3978c327$[email protected]..
          > I am calling repeatedly calling a method of an EJB bean from within a
          > while-loop in a JSP. The EJB is handling some database processing.
          >
          > Unfortunately, the EJB's processing can take a lot of time within each
          > iteration of the while-loop, which prompts some users to hit "Stop" or
          > "Reload" from their browser.
          >
          > Therefore, the while-loop gets broken.
          >
          > My question is: what happens to the thread of execution within the EJB?
          > Will an EJB that is called from a JSP continue to completion even if a
          user
          > hits "Stop" or "Reload?"
          >
          > Any feedback will be appreciated. It appears to me that the EJB does not
          > continue to completion.
          >
          > Dave Bine
          > Software Engineer
          > Flutter.com
          >
          >
          

Similar Messages

  • Stop regenerating jsp servlet when there is no change to the jsp page

              Hi,
              I have a web app deployed in wls 6.1. The weblogic server is always regenerating
              the jsp servlet for the jsp page I am hitting the first time after a weblogic
              server restart even if I have not changed the jsp page. Is there a way to stop
              this. I want the welogic to regenerate jsp servlet only if I changed jsp page.
              

    If you have an alternate address listed and you want to change it to the primary, you should be able to edit it and change it. It's been a long time since I've done this. You may have to sign out of iCloud to do this.
    Have you tried the step listed here:
    Change your Apple ID - Apple Support

  • How to run/build the JSP file using Eclipse

    Hello,
    I want to build a new project for running the jsp file in eclipse.
    Can you help me in doing that?
    with some structure format?
    where to create web.xml file
    how to configure that fiel with our eclipse java poject?
    like that...
    Thanks,
    Soorya

    On New Project creation, choose 'Dynamic Web Project'. Then the structure will be created for you.

  • HT5868 What happens if you can't get the message to stop popping up?

    I click trust, 1 second later, the message is back.

    The Best Alternatives for Security Questions and Rescue Mail
        a. Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
        b. Call Apple Support in your country: Customer Service: Contact Apple support.
        c. Rescue email address and how to reset Apple ID security questions.

  • HT1349 Need help to solve an issue with itunes home sharing. It would started downloading my library from another laptop but would stop for no reason and not show me what still needed downloading or give me the choice to import the data in my library.

    please help me i would like to download all my music and movie to a new laptop and have before but for some reason it will not import from another library now. thank you. Kimberly Simmons

    please help me i would like to download all my music and movie to a new laptop and have before but for some reason it will not import from another library now. thank you. Kimberly Simmons

  • How to set the classpath and path from the jsp to call  java class function

    Hi Exprets,
    I have a requirement to call a java class function which returns a hashmap object from the jsp. The java class in present in one jar file and that jar file is location somewhere in unix path. So the requirement is to set the classpath for that jar file and then create the object of the java class and then call the function.
    If any one know how to achieve it, please reply as soon as possible.
    thanks in advance,
    swapna soni.

    It is never advisable to store large data sets in the session. But it will depend on a lot of factors:
    1. How costly is the query retrieving the data from the database?
    If it's a complex query with lots of joins and stuff, then it will be better to store it in the session as processing the query each time will take a lot of time and will decrease performance. On the other hand if the query is simple then it's advisable not to store it in the session, and fetch it each time.
    2. Are there chances for the data to become stale within a session?
    In this case storing the data is session will mean holding the stale data till the user session lasts which is not right.
    3. How many data sets does the session already holds?
    If there are large no. of data sets already present in the session, then it's strictly not advisable to store the data in the session.
    4. Does the server employ some kind of caching mechanism?
    Using session cache can definitely improve performance.
    You will have to figure out, what is the best way analyzing all the factors and which would be best in the situation. As per my knowledge, session is the only place where session specific data can be stored.
    Also, another thing, if the data set retrieved is some kind of data to be displayed in reports, then it would be better to use a pagination query, which will retrieve only the specific no. of rows at a time. A navigation provided in the UI will retrieve the next/previous data set to display.
    Thanks,
    Shakti

  • Error accessing JSp file from Tomcat4.1.27 at line:-1 in the jsp file: null

    Hi...when I tried to access my JSp file from tomcat 4.1.27 web server, I got the following error message. Can anyone help me out?
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: -1 in the jsp file: null
    Generated servlet error:
    [javac] Compiling 1 source file
    C:\Tomcat\work\Standalone\localhost\Tree\jspfiles\tree_jsp.java:8: '.' expected
    import java;
    ^
    C:\Tomcat\work\Standalone\localhost\Tree\jspfiles\tree_jsp.java:80: illegal start of expression
    private static java.util.Vector jspxincludes;
    ^
    C:\Tomcat\work\Standalone\localhost\Tree\jspfiles\tree_jsp.java:82: illegal start of expression
    public java.util.List getIncludes() {
    ^
    C:\Tomcat\work\Standalone\localhost\Tree\jspfiles\tree_jsp.java:280: '}' expected
    ^
    4 errors
         at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
         at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
         at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:534)

    You JSP has four compile errors:
    C:\Tomcat\work\Standalone\localhost\Tree\jspfiles\tree_jsp.java:8: '.' expected
    import java;Invalid import. You need to import a whole package (*) or single class.
    import java; is wrong
    import java.util.*; is right
    import java.util.List; is right
    C:\Tomcat\work\Standalone\localhost\Tree\jspfiles\tree_jsp.java:80: illegal start of expression
    private static java.util.Vector jspxincludes;
    C:\Tomcat\work\Standalone\localhost\Tree\jspfiles\tree_jsp.java:82: illegal start of expression
    public java.util.List getIncludes() {Check the lines before these to make sure you didn't leave off a semi-colon, parens (')') or bracket ('}').
    C:\Tomcat\work\Standalone\localhost\Tree\jspfiles\tree_jsp.java:280: '}' expectedYou are missing a closing bracket ('}') somewhere.
    The message about the "line -1" error is the standard message that is always given when there are compile errors in the JSP.

  • Wifi on my iPhone 5 just stopped working. It worked fine earlier. What can i do?

    Wifi on my iPhone 5 just stopped working. It worked fine earlier. What can i do?

    Hello Medz34,
    The following article provides troubleshooting steps that can help get your iPhone's WiFi working again.
    iOS: Troubleshooting Wi-Fi networks and connections
    http://support.apple.com/kb/TS1398
    Cheers,
    Allen

  • What do I need to compile and run Servlets and JSP?

    Hi there,
    What do I need to run Servlets and JSP? I am developing on a Windows platform.
    As far as I know, Tomcat and JDK is needed. My JDK (1.3rc1) cannot seem to compile servlet files (javax.servlet.* not found)
    Can anyone please advise?
    Thank you in advance.

    If you mean "in a month", then the answer is "afaik, no.", sorry.
    If you need something comfortable, you better should buy one of these heavy-weighters like Weblogic, or WebSphere. Cost some $$$$'s, though (between 2000-10000. I guess).
    For servlets (and ejb's too), there is no "easy and quick" solution. You probably should think about buying a freelancer or such, which already has the appropriate know-how.

  • What  kind of classes I can use with JSP in tomcat? Please Help

    Hi people, I tried use the classes that I did for others application and it throw this exception :
    "org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: -1 in the jsp file: null
    Generated servlet error:
    [javac] Compiling 1 source file
    D:\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\matriculaOnLine\valide_jsp.java:14: cannot access matriculaOnLine.Connect
    bad class file: D:\Apache Group\Tomcat 4.1\webapps\ROOT\WEB-INF\classes\matriculaOnLine\Connect.class
    class file contains wrong class: Conexao
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    private Connect conn = new Connect(driver,url,login,password);
    ^
    1 error"
    I used the Connect class with java apps and it work but with JSP on TomCat4.1.27
    Can someone help me, please?
    Tiago - [email protected]

    Hi Tiago,
    I have some problems in my mind.
    Which databse you are using? and Which database driver you are using for connecting database?
    Also can you please give a code snapet that you written for connecting databse?
    ----------Milind

  • The JSP Tag Exception

    I have a Struts V 1.1 application that uses Tiles Pluginn also. I have a layout file in which I have Header, Left Navigation Body, and footer. The body is tiles:insert page ="....". In the body I have a fmt:parseDate tag. If the date format in that tag is invalid the JSP somehow does not redirect to the error page. I do have the error page directive as <%@ page errorPage="/error.jsp" %>. It just shows ServletException right in the jsp text redered on a client browser. I have no clue why it would not process the error page JSP directive. Any help is appreciated

    It's complaining with a NoClassDefFoundError.
    Most likely you have something in your $CLASSPATH that depends on a
    class in your WEB-INF/lib. I'd start by removing anything you've added
    to the $CLASSPATH.
    Not sure why it's working when TwoPhase is false. There should not be
    any difference. Difficult to say without more info.
    You might find this eworld presentation helpful:
    https://www.bea-eworld2004.com/published/1144/1144_woollen_AG.pdf
    -- Rob
    Shyam wrote:
    Hi,
    I am seeing this strange problem - When I deploy an application using the weblogic
    console, it sets the attribute "TwoPhase" to "true" and I get a servlet exception
    which looks like one of the jsp tag classes isn't found in classpath.(I have tried
    putting the required jar in the web-inf/lib folder & had tried using the Manifest.mf
    classpath entry of the "war" file too). The same "ear" file gets deployed fine
    if I set this "TwoPhase" to "false". I will appreciate if anyone can explain what
    going on with this attribute and why weblogic doesn't seem to be able to find
    the class in one case but not in the other.
    The error message is something like this
    javax.servlet.ServletException: org/displaytag/tags/TableTag
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:452)
    Thanks,
    Shyam.

  • I cannot receive or make calls any suggestion of what to do?

    I cannot receive or make calls any suggestion of what to do?

    i am having the same problem with this new 4s. what did u do?

  • Taglib don't work!An error occurred at line: -1 in the jsp file: null?!

    Hi everyone:
    I write a simple jsp file with taglib to test whether it can work property.But it says"org.apache.jasper.JasperException: Unable to compile class for JSP
    "When I compile it with Tomcat4.1.The specific error information in the browser is ://////////////////////////error info///////////////////////////////////
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: -1 in the jsp file: null
    Generated servlet error:
    [javac] Since fork is true, ignoring compiler setting.
    [javac] Compiling 1 source file
    [javac] Since fork is true, ignoring compiler setting.
    [javac] E:\Tomcat4\work\Standalone\localhost\_\testtag_jsp.java:82: can't resolve the charactor [javac] charactor��class Tagtest
    [javac] location��class in org.apache.jsp.testtag_jsp
    [javac] Tagtest jspxth_lyotag_tag_0 = (Tagtest) jspxtagPool_lyotag_tag.get(Tagtest.class);
    [javac] ^
    [javac] E:\Tomcat4\work\Standalone\localhost\_\testtag_jsp.java:82: Can't resolve the character [javac] charactor��class Tagtest
    [javac] location��class in org.apache.jsp.testtag_jsp
    [javac] Tagtest jspxth_lyotag_tag_0 = (Tagtest) jspxtagPool_lyotag_tag.get(Tagtest.class);
    [javac] ^
    [javac] E:\Tomcat4\work\Standalone\localhost\_\testtag_jsp.java:82: can't resolve the charactor [javac] character��class Tagtest
    [javac] location��class in org.apache.jsp.testtag_jsp
    [javac] Tagtest jspxth_lyotag_tag_0 = (Tagtest) jspxtagPool_lyotag_tag.get(Tagtest.class);
    [javac] ^
    [javac] three error
    But I have include the package in my java file:
    ////////////////////////Tagtest.java///////////////////////////
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    import java.io.Writer;
    public class Tagtest extends TagSupport{
         public int doStartTag()throws JspException{
         try{
              JspWriter out=pageContext.getOut();
              out.println("hello Tag!");
         }catch(Exception e){
              return SKIP_BODY;
    //////////////////////////////Tagtest.tld//////////////////////////
    <tag>
    <name>tag</name>
    <tag-class>Tagtest</tag-class>
    <body-content>empty</body-content>
    <description>
    Perform a server side action; Log the message.
    </description>
    </tag>
    //////////////////////////testtag.jsp////////////////////////
    <%@ taglib uri="/taglib/Tagtest.tld" prefix="lyotag"%>
    <h6>Hi Lyo</h6>
    <lyotag:tag/>
    Why can't compile my jsp file?Where is it wrong?Please help me.Thank you!

    In the tomcat4 console:
    Compile failed; see the compiler error output for details.
    at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:842)
    at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682)
    at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:317)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContex
    .java:473)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrappe
    .java:190)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:
    95)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App
    icationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(Application
    ilterChain.java:193)
    It seems that tomcat can't find the javac in the classpath.But I set it in my win2000! And it could compile the java file using javac command!Why???

  • Monthly DPS Pro, what happens if you stop paying

    We need to buy DPS pro because a client wants to use android tablets at a trade show, however the folio will not go on the app store and will be distributed to the tablets using Adobe Content Viewer.
    What happens if we only pay for the subscription as and when we need it, ie for 2 months then stop for a few months then start it again?

    Can anyone confirm this, you can share to android devices via ACV without having a pro subscription, I think I tried to download content to ACV on iPhone and nothing showed up, so I assumed the same was true for Android

  • What happens to EJB transaction when user stops/reloads JSP?

    My JSP application uses container managed EJBs. Frequently, my stateless
              session beans manipulate entity beans.
              Does anyone have any documentation about whether or not a containter-managed
              EJB transaction will roll-back in the event that a user clicks "Stop" or
              "Reload" while the bean transaction is processing?
              Thanks in advance,
              DBine.
              http://www.flutter.com
              

    Clicking stop has no effect if the request has already left the browser. It
              just prevents the display of the result. There is nothing you can do about
              that.
              A real problem is if they get impatient and click your link or button
              repeatedly and the back end transaction is (for example) putting a charge
              repeatedly on their credit card. Best way to solve that is to id the
              transaction before it happens (build it in as part of the url or action) and
              only process that id once.
              Cameron Purdy
              [email protected]
              http://www.tangosol.com
              Consulting Services Available
              "dbine" <[email protected]> wrote in message
              news:39b6e29b$[email protected]..
              > My JSP application uses container managed EJBs. Frequently, my stateless
              > session beans manipulate entity beans.
              >
              > Does anyone have any documentation about whether or not a
              containter-managed
              > EJB transaction will roll-back in the event that a user clicks "Stop" or
              > "Reload" while the bean transaction is processing?
              >
              > Thanks in advance,
              >
              > DBine.
              > http://www.flutter.com
              >
              >
              >
              

Maybe you are looking for