Concurrent processing of POST requests and automatic flushing of the servlet response buffer in WLS6.1.

          Hi all,
          I encountered the following 2 servlet problems in WLS 6.0/ 6.1:
          1. Processing concurrent POST requests
          WLS seems to disallow concurrent executions of any servlet's doPost servlet method.
          When two clients attempt to send a request to a servlet using POST, the socond
          one
          is blocked until the first customer is served. In essence, the servlet ends up
          operating in
          1-user mode. I just learned from Jervis Liu that the problem is solved in WLS6.0
          if you disable http-keepalive.
          For WLS 6.1 a partial workaround is to make the servlet work in a single-thread
          mode (by implementing the javax.servlet.SingleThreadModel interface). In this
          case,
          WLS dispatches concurrent requests to different instances of the servlet.
          This doesn't completely eliminate the problem - still only one customer can be
          connected at a time. The improvement is that once the first customer is disconnects,
          the second can be served even if the doPost method for the first has not finished
          yet.
          2. Flushing the response buffer in WLS 6.1
          The servlet response buffer is not flushed automatically until doPost ends, unless
          you
          explicitly call response.flushBuffer(). Closing the output stream doesn't flush
          the
          buffer as per the documentation.
          I see that other people are experiencing the same problems.
          Has anyone found any solutions/workarounds or at least an explanation.
          Any input would be highly appreciated.
          Thanks in advance.
          Samuel Kounev
          

Thanks for replying. Here my answers:
          > Did you mark your doPost as synchronized?
          No.
          > Also, try testing w/ native i/o vs not ... is there a difference?
          With native I/O turned off I get a little lower performance, but the
          difference is not too big.
          Best,
          Samuel Kounev
          > Peace,
          >
          > --
          > Cameron Purdy
          > Tangosol Inc.
          > << Tangosol Server: How Weblogic applications are customized >>
          > << Download now from http://www.tangosol.com/download.jsp >>
          >
          > "Samuel Kounev" <[email protected]> wrote in message
          > news:[email protected]...
          > >
          > > Hi all,
          > >
          > > I encountered the following 2 servlet problems in WLS 6.0/ 6.1:
          > >
          > > 1. Processing concurrent POST requests
          > >
          > > WLS seems to disallow concurrent executions of any servlet's doPost
          > servlet method.
          > >
          > > When two clients attempt to send a request to a servlet using POST, the
          > socond
          > > one
          > > is blocked until the first customer is served. In essence, the servlet
          > ends up
          > > operating in
          > > 1-user mode. I just learned from Jervis Liu that the problem is solved in
          > WLS6.0
          > >
          > > if you disable http-keepalive.
          > >
          > > For WLS 6.1 a partial workaround is to make the servlet work in a
          > single-thread
          > >
          > > mode (by implementing the javax.servlet.SingleThreadModel interface). In
          > this
          > > case,
          > > WLS dispatches concurrent requests to different instances of the servlet.
          > > This doesn't completely eliminate the problem - still only one customer
          > can be
          > >
          > > connected at a time. The improvement is that once the first customer is
          > disconnects,
          > > the second can be served even if the doPost method for the first has not
          > finished
          > > yet.
          > >
          > > 2. Flushing the response buffer in WLS 6.1
          > > The servlet response buffer is not flushed automatically until doPost
          > ends, unless
          > > you
          > > explicitly call response.flushBuffer(). Closing the output stream doesn't
          > flush
          > > the
          > > buffer as per the documentation.
          > >
          > > I see that other people are experiencing the same problems.
          > >
          > > Has anyone found any solutions/workarounds or at least an explanation.
          > > Any input would be highly appreciated.
          > >
          > > Thanks in advance.
          > >
          > > Samuel Kounev
          =====================================================
          Samuel D. Kounev
          Darmstadt University of Technology
          Department of Computer Science
          DVS1 - Databases & Distributed Systems Group
          Tel: +49 (6151) 16-6231
          Fax: +49 (6151) 16-6229
          E-mail: mailto:[email protected]
          http://www.dvs1.informatik.tu-darmstadt.de
          http://skounev.cjb.net
          =====================================================
          [att1.html]
          

Similar Messages

  • Weblogic POST requests and foreign characters

    We have Ajax post requests that work correctly in the Tomcat/Eclpse development environment. When moving them to the Weblogic environmnent, the POST requests no longer correctly send the data.
    A request object is created with a URL. The foreign character string is encoded using the Javascript encodeURIComponent.
    The request is sent to the servlet.
    When the servletbase class starts the parameter is printed and shows ????.
    On the Tomcat environment the servletbase (which extends HttpServlet) class shows the parameter as what looks like a UTF-8 string.

    Have you tried seeing what ServletRequest.getCharacterEncoding() returns on both Tomcat / WebLogic?
    http://download.oracle.com/docs/cd/E17410_01/javaee/6/api/javax/servlet/ServletRequest.html#getCharacterEncoding()

  • Process on Help request and Process on value request events examples

    HI All,
               Can anybody please give me some examples of Process on Help request and Process on value request events.
    Thanks in advance

    HI,
    Check programs
    <b>demo_selection_screen_f1</b>.
    <b>demo_selection_screen_f4.</b>
    Regards,
    Sesh

  • Macbook pro keeps saying connection timeout, and it used to connect to the internet fine. what's up, why can't it find and automatically connect to the internet anymore???

    Macbook Pro keeps saying connection timeout and it used to connect to the internet fine. What's up, why can't it find and automatically connect to the internet anymore???

    Like this: https://discussions.apple.com/thread/2775868?tstart=0  ?

  • When iwanna buy som thing in game they said contact with itunes support to complete your request and i went to the support and here i am :)

    When iwanna buy some thing in game they said contact with itunes support to complete your request and i went to the support and here i am :)

    Well you are in the iPad support forum of the Apple Support Communiteis, but that message means that you need to contact iTunes Support and you cannot do that here.
    Try here.
    https://expresslane.apple.com/Issues.action
    You can change your country if you need to and click or tap on Purchases, billing and redemption and follow the prompts from there.

  • How to generate pdf report and automatically save in the folder?

    Hi all,
    I want to ask, how to generate pdf report and automatically save in the folder?
    Actually, if i run pdf report and show to screen. Now do not need to show to the screen but save the pdf file in the folder.
    If anyone know, please share to me.
    Thanks and regards,
    Iwan

    Hi all,
    Thanks for the reply.
    when i run pdf report, and i got this URL to show the pdf report.
    http://190.180.55.73:7778/reports/rwservlet/getjobid3828?server=sitcnrepsvr
    Do any body know where can i get this pdf report that i have run in application server report folder ?
    Thanks and regards,
    Iwan

  • How can i upload file using ajax post request and jsp

    Hi
    this is my code files
    addPhoto.jsp
    <html>
    <head>
    <title>Add Photo</title>
    <script>
    var optionNo = 0;
    var i=1;
    var val=0;
    var file = 0;
    var exten = new Array(".jpg",".jpeg",".gif");
    function addValues()
         for(var i=0;i<5;i++)
              optionNo += 1;
              oNewOption = new Option();
              oNewOption.text = optionNo;
              oNewOption.value = optionNo;
              addSelect.add(oNewOption);
    function addBoxes()
         var str = "";
         var j=0;
         val = document.getElementById('addSelect').value;
         for(j=1; j<= val; j++)
              str = str + '<font size=3>file:' + j + '</font>';
              str = str + '<input type="file" id=filepath'+ j +' name=file'+ j + ' onchange="uploadFile(hidden'+ j + '.value)"><div id="result'+ j +'"></div>
              str = str + '<input type="hidden" name="hidden' + j + '" value=' + j +'>';
         document.getElementById('addPhoto').innerHTML = str;
    function uploadFile(value)
    var str = "filepath" + value;
    file = value;
    var param = document.getElementById(str).value;
    var parameter = "filepath=" + param;
    alert(parameter.length);
    if(checkValidity(param))
    var url = "uploadFile.jsp";
    if (window.XMLHttpRequest) {
    req = new XMLHttpRequest();
    } else if (window.ActiveXObject) {
    req = new ActiveXObject("Microsoft.XMLHTTP");
    req.open("POST", url, true);
    req.setRequestHeader("Content-type", "multipart/form-data");
    //req.setRequestHeader("Content-length", parameter.length);
    req.setRequestHeader("Connection", "close");
    req.onreadystatechange = callback;
    req.send(null);
         else
              document.getElementById("result" + file).innerHTML = "upload .jpeg,.jpg,.gif Files Only";
    function callback() {
    if (req.readyState == 4) {
    updatepage(req.responseText);
    function updatepage(str){
         document.getElementById("result" + file).innerHTML = str;
    function checkValidity(str)
         var i=0;
         var j=0;
         var str1 = str.substring(str.lastIndexOf("."),str.length);
         alert(str1);
         for(i=0;i<exten.length;i++)
         if(str1.search(exten) != -1)
              j++;
              break;
         if(j>0)
              return true;
         else
              return false;
    </script>
    </head>
    <body onload="addValues()">
    <h5>Add Photo(s)</h5>
    <select id="addSelect" name="addSelect" onchange="addBoxes()">
    <option id="select" selected>Select</option>
    </select>
    <div id="addPhoto"></div>
    </body>
    </html>
    uploadFile.jsp
    <%@page import="java.io.*"%>
    <%
    /*try
    String contentType = request.getContentType();
         System.out.println(request.getMethod());
         System.out.println("Content type is :: " +contentType); 
         if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0))
              DataInputStream in = new DataInputStream(request.getInputStream());
              DataInputStream in1 = in;
              int formDataLength = request.getContentLength();
    System.out.println(formDataLength);
              byte dataBytes[] = new byte[formDataLength];
              int byteRead = 0;
              int totalBytesRead = 0;
              while (totalBytesRead < formDataLength)
                   byteRead = in1.read(dataBytes, totalBytesRead, formDataLength);
                   totalBytesRead += byteRead;
              out.println("<br>totalBytesRead : " + totalBytesRead + " : formDataLength = " + formDataLength);
         } catch(Exception e) {
              e.printStackTrace();
         try
         String filePath = request.getParameter("filepath");
         System.out.println(filePath);
         File f= new File(filePath);
         String path = f.getName();
         String contentType = request.getContentType();
         System.out.println(contentType);
         //InputStream in = new FileInputStream(filePath);
         DataInputStream in = new DataInputStream(request.getInputStream());
         int formDataLength = request.getContentLength();
         System.out.println(formDataLength);
    byte[] buf = new byte[1024];
    OutputStream out1 = new FileOutputStream("c:/docs/" + path);
    int len;
    while ((len = in.read(buf)) > 0) {
    out1.write(buf, 0, len);
    in.close();
    out1.close();
         out.write("File Uploaded SucssesFully");
    catch(Exception e)
         e.printStackTrace();
         out.write("error while Writing File");
    %>
    the above code in request.getContentType() i am getting 0. I am not passing the content length. for the same application with out using Ajax i am
    getting the size of file... it is very very urgent for me.. pls help me out on this...
    Any one having the code on this pls mail me the code...
    my mail id ... [email protected]
    Regards
    Ashok Kumar

    Sure, you can upload a file, using a form input element of type file. You pick this up with a servlet, though you need a special request wrapper to sort out the multi-part request you get back that way (there's a suitable package on jakarta.apache.org/commons)
    The servlet decrypts the file and can pass the results to a JSP for display.
    Don't try to do the complicated stuff in a JSP, it all gets incredibly messy, and that's not what JSPs are for.

  • Plain HTTP sending Post Requests and Multipart Uploads

    Hi,
    I have a scenaio where I need to send an normal POST request
    to the server. This request needs to have not the XML payload but
    the same data in the form of a POST request.
    Is there a way to transform the data out of the XML format into
    the plain POST format prior to sending it?
    Also, another scenario requires an file upload via HTTP (like a
    file submitted by a web-form). Is this possible with PI and how?
    Thanks for any pointers
    Best regrads

    Hi,
    If you do not send any payload in the http request you are going to get a http error.
    For your second requirement, There is no any problem, You can use any existent tool, or maybe develop you own program.
    Http client.
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417600)ID1536482550DB10501227175138097442End?blog=/pub/wlg/15296
    Regards
    Ivan

  • How do i set up and automatic out of the office message while I am away on vacation?

    How do I set up an automatic out of the office reply while I'm on vacation?

    Firefox doesn't do email, it's a web browser.
    If you are using Firefox to access web mail, you need to seek support from your service provider or a forum for that service.
    If your problem is with Thunderbird, see this forum for support.
    [http://www.mozillamessaging.com/en-US/support/]
    or this one
    [http://forums.mozillazine.org/viewforum.php?f=39]

  • Process Order does Confirmations and GR even after the Process order is CNF

    Not Sure why the Formatting is lost.
    Hi Gurus,                                                                               
    I am a beginner in this area and request your help.                                                                               
    We are implementing a project where the process order Confirmation in SAP ECC 5.0 in SAP PPPI module is done using xMII which call the BAPI_PROCORD_CREATE_TT     RFC.
    The customer wants to (certain times) do a final confirmation without actually completing the order e.g if the Order Qty is 100 then, they want to just manufacture 25 and then do a final confirmation, after which SAP GUI screen does not allow any Process order Confirmations against that process order.
    We are using the BAPI_PROCORDCONF_CREATE_TTRFC to do multiple PO Confirmations and GR for particular Process order. Below is a scenario
    Case 1:
    1. Order Qty =100  ( Unlimited Delivery is not checked and tolerance is Zero).
         Which means only 100 is accepted.
    2. 100 Quantities are produced and confirmed using the BAPI_PROCORDCONF_CREATE_TT (with Final confirmation value as 1 , which mean auto confirmation)
    3. Next when the BAPI confirms & GR's against the same order, the Complete qty is not visible in the COR3 status. And is visible only in the COGI transaction.
    That is expected behavior. and i am ok with that.
    Case 2: (The one with the problem)
    1.  Order Qty =100  ( Unlimited Delivery is not checked and tolerance is Zero).
         Which means only the 100 is accepted.
    2.  25 Quantities are produced and confirmed using BAPI_PROCORDCONF_CREATE_TT (with Final Confirmation value as X , which mean Final confirmation)
    3. The Confirmation and GR go through and the status of the process order now changed is CNF and the Deliverd qty is 25.
    At this point , if you logon to SAP GUI and try to make a process order confirmation you get an error messages which says the Process Order is already confirmed and no more confirmations or GR can be done against this Process order.
    4. But when you Again Run the BAPI_PROCORDCONF_CREATE_TT, it goes ahead and confirms and makes the GR for that Process order.
    The Expected Behavior should have been that this quantity is now in the COGI transaction.
    5. The Process order  allows any number of Further confirmations till the Ordered Qty and Delivered quantity are  same .
    so dear gurus I know i have written a very long doubt but would be very happy to get a response from you. I would ideally not like to enhance or change the BAPI and want to understand if I have missed some setting or parameter that I have to pass in the BAPI for the final confirmation so that once the Status of the Process order is CNF , no more Confirmations are allowed even from the BAPI.
    Thanks in Advance.
    Regards
    Suraj

    Hi Suraj,
    I am not positive, but I suspectt the problem lies in the BAPI.  It might be how you have the data set in MII, but it sounded like you are doing it correctly. 
    However there are a number of things you can do to troubleshoot your situation.
    First create a few process orders to test with. 
    Record the confirmation numbers and counters for each of the following:
    1) Do a final confirmation (for quantity of 25 instead of the 100) in CORK (or whichever transaction you are using). 
    2) Do a final confirmation (for quantitiy of 25 instead of the 100) in SE37 or BAPI in ERP using the BAPI_PROCORDCONF_CREATE_TT.
    3) Do a final confirmation (for quantitiy of 25 instead of the 100) from MII using your current transaction. 
    Review the confirmations in ERP to see if there are any differences.
    Review the confirmaitons in MII to see if there are any non visible differences (use a Tracer to retrieve the response segment from an execution of BAPI_PROCORDCONF_GETDETAIL using the recorded confirmation numbers and counters) 
    Case 1) If there are differences in the results, that should tell you how to modify your transaction to include or change the appropriate values in your inputs. 
    Case 2) If there are no differences, then it is most likely that there is something not working properly in the BAPI you are using.  It may not completely replicate the functionality in CORK (or whichever transaction you are using in ERP).  Then open a ticket, because the BAPI is not working as it should.
    Good luck,
    Mike
    Edited by: Michael Appleby on Aug 17, 2009 8:20 PM

  • Why having displayed both generic icons for the PDF and JPEG files and automatic preview of the JPEG files in an ordinary folder are mutually exclusive in Win7?

    In Win7 Pro all my:
    PDF documents, with the 'Large Icons' option chosen in the View tab, display contents of their first page with a tiny thumbnail in the icon's lower right corner, instead of a generic PDF icon.
    JPEG files show Icon size photos, instead of a generic Nero 9 PhotoSnap Essentials icon.
    Folders containing the JPEG photos, however, automatically show preview, when opened, which is desirable feature.
    I found that the Win7 option "Always show icons never thumbnails" in the View tab: Windows Explorer -> Tools -> Folder Options, (where ironically the present 'thumbnails' have nothing to do with 'Thumbnails' from the View option in WinXP), causes the unwanted effects described in points 1 & 2, when unchecked.
    Checking this option solves the problem of the PDF and Nero icons. This time, however, I can only see a Nero 9 PhotoSnap Essentials icons, instead of photos preview on opening of any standard folder with the JPEG photos.
    Did I make a mistake somewhere or maybe Microsoft made changes in Win7 with respect to WinXP, which make it impossible to have both the features working at the same time?

    Hi,
    You can install the Win 8.1 software drivers using this link.
    http://h10025.www1.hp.com/ewfrf/wc/softwareCategory?cc=us&dlc=en&lc=en&product=4323648&task=&
    Once installed, it should have the same features as the Win 7 drivers for scanning.
    Please click the “Kudos Thumbs up” on the left if this has helped you and “Accept as solution” if this has helped solved your problem.

  • How to procession session in foreground and errore mode from the program.

    hi ALL
    i have a requirement in wich i had to create a session and procession the sesion in foreground or back ground from the program it self (with out going to SM35)
    argent can any body answer to my question, please
    reward gauranty.
    thanks in advance
    sindu.

    refer to this link....
    Running a session from the zprogram
    regds,
    kiran

  • Process Chain got struck and not showing all the variants in the log view

    Hi,
    We have some process chains which are running daily.The problem here is that one of the process chains got struck at some point
    and it is not showing all the variants in the log view but able to see in planning view.
    Could any one please let me know why this is occuring.

    Hi Ramanjaneyulu,
    Thanks for the reply.
    As you said,i clicked on the 'display message' but it is not showing any errors.It is showing
    that the process completed successfully.
    Thanks.

  • HT4528 I am trying to download free apps on my iphone4 and it keeps telling me that username or password is incorrect. I have gone through the process of changing password and I still get the message.

    I am trying to download free apps on my iphone4 and it keeps telling me that forgot username or password. I have reset password and I still keep getting that message.

    Try to take a look at the top right corner on iTunes. Does it say "Sign In" or "Apple ID" like [email protected]

  • HT4061 The phone exhausted power.  I plugged in my charger and I am getting the following response:  Power on and the apple icon is visible, it is quickly replaced by a blue screen for about 1 second andf then black screen with no other activity.  What is

    The power was exhausted on my Iphone 5S.  I plugged it into my charger and turned it on.  The apple icon comes on briefly followed by a blue screen for about 1.5 seconds andf then goes black.  What has happened?

    Leave the device connected to power for about 30 minutes.
    Then, disconnect from power, and turn the device on.  If no response, then press and hold both the Home button and Sleep/Wake button down for about 15-20 seconds.  Make sure it is not plugged in while doing this.
    See what happens.

Maybe you are looking for

  • Adust feature not working follow up Question/ lost album folders!

    I tried trashing my iphoto plist from preferences and now have lost all my album folders which have very important projects sets I'm working on. I didn't empty the trash so I still have the folder but putting it back didn't seem to work. Is there a w

  • Connect mac book pro to tv

    What additional cables are neccessary in order to connect a macbook pro to a television?

  • How to sort taxonomy with Java api?  Please Help

    Can someone please help me out?  I understand and can display the contents of a taxonomy. But I need it to be displayed in alphabetical order.  Manual ordering does not exist for taxonomies.  How do you sort a taxonomy in java? The following snip of

  • Migration key error

    I have a R/3 4.71 system, on AIX 5.1, oracle 9.2.0.3.    I bought a new IBM SERVER pP 550. I need to migrate R/3 to this new server.    I used system copy to export all data.  but when I import it , Migration key always error,   why ? I got key from

  • PSE7 on Vista 64-bit

    Does PSE7 work on a Vista 64-bit system? I've had it working fine on my existing 32-bit XP system, but just ordered a new computer with Vista.