ServletResponse - multiple requests from the same cl

If a user clicks a link in an HTML page which is directed to a servlet, and then clicks again (one or more times) before the servlet has fully written its response, I believe a thread with the same Session is created for each instance.
How do I know which thread gets to send its response ? It appears that all the threads that are created after the response writing has started, but before the writer is closed fall into a black hole ?
Is there a way to check immediately in doPost that the instance is going to fail ? I've looked at isCommited(), but I dont seem to be able to find an implementation of it to use in my IDE - I've looked in 2.3?
I was hoping that each request would use the same HttpServletresponse, but it doesn't - any ideas ?
The problem is that shared objects in the session are causing problems - perhaps a solution lies with the session object itself by writing a parameter to it ?
Thanks

I just tried setting a parameter in the session and returning from the doPost method when it is set, but this just generates a blank page on the second request, which arrives before the first has finished.
I notice however that the second request can 'takeover' from the first (if i hit a different link as the second click - I get that response not the first link's)
My question therefore is what determines this supercession, and can I control it in any way ?
Also can the request know it wins/loses as soon as I hit doPost ?
Thanks
Chris

Similar Messages

  • How do I receive multiple texts from the same sender, each individually?

    How do I receive multiple texts from the same sender, each individually?

    So I receive automated reminders from my job & I want them to come individually. For example, one text -- time stamped 10:14 pm, then another 11:12 am, coming as separate msgs.

  • Does af:commandButton submit multiple requests at the same time?

    Hi experts,
    I have a question about af:commandButton behavior.
    I have two commandButtons in a page. They are button1 and button2.
    Button1 takes a few seconds to complete its request process.
    So when I click button1, I can click button2 although button1 request is still being processed.
    I checked how ADF faces handled this situation with servlet filter.
    And I saw that button2 request was always submitted after button1 request was completed.
    Due to this behavior, I would assume that commandButton is designed not to submit multiple requests at the same time and guarantees click order.
    However I couldn't found any documents specifying this feature of commandButton.
    If anyone knows it, could you share?
    I know ADF Faces has busyStateListener to prevent user inputs during request round trip.
    But I'd like to make it sure that I don't need to use busyStateListener if I just want to keep processing order.
    Regards,
    Atsushi

    Hi,
    Does anyone know the document specifying the behavior of af:commandButton in case I click two buttons in a page almost simultaneously?
    Any help will be much appreciated.
    Thanks in advance,
    Atsushi

  • How Can I delete multiple messages from the same address in Mac Mail

    Hope this is in the correct Community.  Hope someone can help me to delete multiple email messages from the same email address.
    At the moment I can do it by holding down the Command key and highlighting each email, but that can be difficult with many messages
    to delete.  Is there a quicker way?
    Thanks for any help on this.

    Thanks for the reply, appreciate your input.  I did find another way of doing it and that is to highlight the first e-mail, hold down the shift key and click on the last one.  That highlights them all and then they can all be deleted.  Your ideas also work of course and I thank you for that.  Cheers.

  • Multiple ResultSets from the same connection occuring at the same time

    Is it possible to have the following code? The issue is that you are iterating through two result sets created from the same connection at the same time.
    try {
    Connection conn=createConnection();
    Statement s=conn.createStatement();
    ResultSet rs=s.executeQuery(someSQL);
    while (rs.next()) {
         Statement s2=conn.createStatement();
          ResultSet rs2=s2.executeQuery(someOtherSQL);
          while (rs2.next()) {
               //do something
    } catch (SQLException sqle) {
    } finally {
    freeConnection(conn);

    Joel,
    The code compiles, but I have not tried running it. It is a question I need to know, designing a program.
    The question is whether some error would come up or the first ResultSet would be corrupted because a second were created before the first one was closed.
    --Gabe                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Can I combine multiple threads from the same contact in iMessage?

    iMessage displays multiple threads for the same contact.  Its very confusing and has resulted in lost messages.  I've tried changing a number of settings but to no avail.  Seems to require everyone in my contact list to eliminate all their email addresses in iMessage.
    Begs the question why does iMessage even need this information?  Worse, why does it suck it into its settings by default.  The directory server should only require a valid Apple ID (associated with the users' devices)  in order to direct an iMessage between two contacts.

    Thanks for the reply, appreciate your input.  I did find another way of doing it and that is to highlight the first e-mail, hold down the shift key and click on the last one.  That highlights them all and then they can all be deleted.  Your ideas also work of course and I thank you for that.  Cheers.

  • Connect one JAVA ADS instance to multiple clients from the same ABAP system

    Hi,
    Does anyone know whether it is possible to connect multplie clients from the same ABAP system to a JAVA instance running ADS?
    If so how do you setup the java destinations in Visual Admin and SM59 RFC connections?
    Any help is appreciated,
    Sander

    Dear Sander,
    this is always the case if you arrange the ADS connection.
    You have to set up the RFC connection 'ADS' in ABAP side and this connection/destination is client independent. So you can use this from all clients of your abap system.
    On Java side you have to arrange the already mentioned FP_ICF_DATA_<SID> destination. On the ABAP system and client (you specify in this destination) you have to maintain the user ADS_AGENT and your templates should also exist on this client. If there is no client defined, the default client will be used.
    Regards
    Istvan

  • Problems sorting multiple releases from the same year

    Hello,
    I have just discovered how to arrange my iTunes library in chronological order by artist using 'Album by Year', i.e. All an artists albums are in order of release, Artist > Year > Disc # > Track #
    However,
    I have now encountered a new (minor) problem where there are several releases from the same year.
    For example, I have some artists who have released several singles, EPs and albums all in the same year (those busy people) and so all releases from any one year are filed alphabetically, not technically in chronological order, but close.
    It would require an exact release date in the 'Year'/'File Info' fields. Is this possible?
    Am I just being too picky?
    Thanks people. My head hurts.

    Hello,
    I have just discovered how to arrange my iTunes library in chronological order by artist using 'Album by Year', i.e. All an artists albums are in order of release, Artist > Year > Disc # > Track #
    However,
    I have now encountered a new (minor) problem where there are several releases from the same year.
    For example, I have some artists who have released several singles, EPs and albums all in the same year (those busy people) and so all releases from any one year are filed alphabetically, not technically in chronological order, but close.
    It would require an exact release date in the 'Year'/'File Info' fields. Is this possible?
    Am I just being too picky?
    Thanks people. My head hurts.

  • *** Receiving multiple emails from the same person

    This is a new issue that started happening today and I'm wondering if someone can help.
    When receiving emails today, they are duplicating as they are coming into my inbox. The wierd thing is, the amount of duplicate emails is inconsistent. All emails are coming in as duplicates, but some messages duplicate up to 7 times for each sender. Other times, the message is in my inbox 4 times. Same message from the same sender.
    Is there a way I can tell my MacMail to stop this from happening???
    Thanks in advance.

    People keep reporting this problem from time to time, and almost always it is some sort of Yahoo account and there is nothing the user can do to fix it. The problem usually fixes itself after some time for no apparent reason, just as it started.
    Try using a different mail client, such as Thunderbird, and see whether the problem happens there as well. If so, then you know Mail has no bearing on it and there is nothing you can do other than complaining to your ISP or whoever is responsible for that account.

  • Connecting to multiple clusters from the same client

    We have a scenario where our cache client (extend client) should be able to connect to multiple clusters. All the clusters use the exact same configuration (same caches, same services etc) but running in different geographical locations. I know that the <remote-addresses> can be used to add multiple addresses but I'm assuming this is provided solely for fault tolerance. So, does the client actually support connecting to multiple clusters at the same time?
    Thanks
    Sijo Mathew

    Hi Sijo,
    Normally to connect a client to multiple clusters you would just define multiple <proxy-scheme> settings in your client configuration file, each one having a different name and pointing to a different cluster. You then map caches to the proxy-scheme for the cluster those caches live on.
    What may confuse things in your case is that you say the different clusters are identical and contain the same caches and services so you may have problems mapping caches on the client to different clusters.
    What are you trying to achieve by doing this if the clusters are all identical?
    JK

  • Multiple edits from the same clip.

    Hi guys,
    I have a project which requires a lot of different edits from the same clip.
    Is there any way to do this without having to duplicate the same clip each time and then making my new edit?
    For instance -
    Clip 1 is 20 minutes long.
    My first edit is from 1:10 to 1:35.
    I then duplicate Clip 1 and make another edit from 2:40 to 3:55.
    I'm using Premier CS5.
    Thanks,
    Dave.

    Sub clips are not a general edit way of doing things efficiently.
    They are more of a way of creating a bin full of "selects" ( selected clips in a Selects Folder for easy and quick access and review). That is a time consuming process but works  well in some situations.
    Standard general  edit practice is to edit from Source Monitor.
    drop Clip into Source Monitor
    Mark In and Out point and drop that to the Time line. (many ways to do that Insert/ overlay/ shortcuts etc..)
    Next...Move thru and create new In and Out and do the same
    continue thru the Source Clip till complete...
    Then on the Timeline ( sequence) Tim and work the clips.
    Now ...some "learners" edit the source clip in the timeline  using Razor Tool...hacking and chopping and deleting and dragging bits of stuff all over the show.   Thats in efficient and clunky .

  • Multiple Contacts From The Same Company

    Is there a way to "clone" a contact entry to avoid re-entering all of the information for a new contact from the same company?

        Let's figure this out mrucci! I want to ensure I fully understand so I may assist accordingly. Are you creating several contacts with different numbers from the same company and want to know if there is a quick option to auto generate the company contact details? Please confirm so I may further assist. Thank you.
    TominqueBo_VZW
    Please follow us on Twitter @VZWSupport   

  • Concurrent multiple requests to the same servlet from same client

              We are using weblogic as our web and app. server. We are using the weblogic oracle pool for database connections. We have jsp and servlets in the second tier with EJB on the third tier.
              We have a problem like this. We have set the oracle pool max size to 40. Some of our database searches takes about 30 seconds. If a user submit a request for such a search, it takes about 30 seconds to respond to the client.
              In the mean time if the user submits the same request again and again (by clicking the URL link in the HTML page continuosly for 50 times), the servlet takes each request, creates new thread for each request, and each thread uses a connection. So our pool runs out of connections and further to that, we get 'resource unavailabe exception' or 'pool connection failed' etc.
              All the users hang. Some times it recover back, but most of the times the server crashes.
              We have not set any time out for pool connection waiting time. By default weblogic keeps the threads waiting for connection indefinitely.
              So, now if somebody want to crash our site, simply they can go and hit a database search link (which takes about 30 secs) 50 to 100 times, and out site will go down.
              What is the good solution for this. I think this is a common problem which many people should have solved. One way is to find and block the user who is hitting many times.
              Any better solutions pl.?
              regards
              sathish
              

              "Cameron Purdy" <[email protected]> wrote in message
              news:[email protected]...
              > There are other ways to do the processing besides JMS, but the main idea
              is
              > this: DO NOT DO IT ON A WL EXECUTE THREAD IN YOUR WEB SERVER -- those are
              > for your HTTP requests and you don't want to use them up. You can use RMI
              > and have your RMI object spin off a thread.
              Now we're going in circles. I've heard it repeatedly argued here that you
              don't
              ever want to do anything in the server that is not within a server execute
              thread.
              My "big process" needs to run on the server, since it manipulates EJB's
              etc.,
              in the same sense that JavaBeans launched from a JSP page run in the server.
              So, I just don't understand why now it's not ok to use execute threads, when
              I'm going to be initiating a thread of control in the server anyway.
              >
              > Here's the second issue: idempotency. Make sure you pre-assign an ID to
              > the task, and have that ID accompany the task as it runs, use that ID to
              > update a shared resource (perhaps db) to show the progress of the task,
              and
              > keep that ID in the shared resource afterwards so that the task is not
              > repeated unnecessarily (refresh) and so the user's request now shows that
              > the task is complete.
              >
              My solution associates an AsynchTask to object to a session scope JavaBean.
              So, for a given session, there can be only 1 task object, etc. Will this
              work?
              Thanks,
              Jason
              > --
              >
              > Cameron Purdy
              > [email protected]
              > http://www.tangosol.com
              > WebLogic Consulting Available
              >
              >
              > "Jason Rosenberg" <[email protected]> wrote in message
              > news:[email protected]...
              > > Cameron,
              > >
              > > A few questions....
              > >
              > > Is JMS the only way to "kick off the big process". Is there a way to
              > > launch another servlet, or god forbid, another thread, etc.?
              > >
              > > I'd rather not have to use JMS right now, due to time constraints
              > > (it's another thing to have to figure out...).
              > >
              > > Is it necessary to use javascript to redirect? Can't we just use
              > > a simple meta refresh tag, which causes the same jsp to be
              > > hit repeatedly, and which will keep resending the html with
              > > the meta-refresh until the "big process" has completed?
              > >
              > > Also, if we have a jsp which uses a bean with session scope,
              > > don't we then get built in "uid" tracking? The bean instantiated
              > > will necessarily be of the current session, it seems, as long as the
              > > user keeps the same browser window open (or does resending
              > > cause a new session to be started--I didn't think so....).
              > >
              > > Can you elaborate on how the completed process information can
              > > be shared back to the session, and then returned to the browser, etc.?
              > >
              > > Jason
              > >
              > >
              > >
              > >
              > >
              > > "Cameron Purdy" <[email protected]> wrote in message
              > > news:[email protected]...
              > > > This cut & paste feature is getting handy ..
              > > >
              > > > --
              > > >
              > > > 1) The work to be done is assigned a uid or something similar to
              > prevent
              > > it
              > > > from being done twice
              > > > 2) The user presses the button which passes the uid in a hidden field
              > > (for
              > > > example)
              > > > 3) The serlvet responds by kicking off the big process with jms and
              > sends
              > > > back a page that displays a "processing..." message and uses
              javascript
              > to
              > > > redirect (with a place to click just in case javascript is turned off)
              > > > 4) The url redirected to includes the uid to identify the process for
              > > which
              > > > the result is desired
              > > > 5) When the process is completed, the information is placed in some
              > known
              > > > location (e.g. HttpSession or database) and the pending request to
              find
              > > the
              > > > result can return the result
              > > >
              > > > --
              > > >
              > > > Cameron Purdy
              > > > [email protected]
              > > > http://www.tangosol.com
              > > > WebLogic Consulting Available
              > > >
              > > >
              > > > "sathish kumar" <[email protected]> wrote in message
              > > > news:[email protected]...
              > > > >
              > > > > We are using weblogic as our web and app. server. We are using the
              > > > weblogic oracle pool for database connections. We have jsp and
              servlets
              > in
              > > > the second tier with EJB on the third tier.
              > > > >
              > > > > We have a problem like this. We have set the oracle pool max size to
              > 40.
              > > > Some of our database searches takes about 30 seconds. If a user submit
              a
              > > > request for such a search, it takes about 30 seconds to respond to the
              > > > client.
              > > > > In the mean time if the user submits the same request again and
              again
              > > (by
              > > > clicking the URL link in the HTML page continuosly for 50 times), the
              > > > servlet takes each request, creates new thread for each request, and
              > each
              > > > thread uses a connection. So our pool runs out of connections and
              > further
              > > to
              > > > that, we get 'resource unavailabe exception' or 'pool connection
              failed'
              > > > etc.
              > > > > All the users hang. Some times it recover back, but most of the
              times
              > > the
              > > > server crashes.
              > > > > We have not set any time out for pool connection waiting time. By
              > > default
              > > > weblogic keeps the threads waiting for connection indefinitely.
              > > > > So, now if somebody want to crash our site, simply they can go and
              hit
              > a
              > > > database search link (which takes about 30 secs) 50 to 100 times, and
              > out
              > > > site will go down.
              > > > > What is the good solution for this. I think this is a common problem
              > > which
              > > > many people should have solved. One way is to find and block the user
              > who
              > > is
              > > > hitting many times.
              > > > > Any better solutions pl.?
              > > > > regards
              > > > > sathish
              > > >
              > > >
              > >
              > >
              >
              >
              

  • Multiple columns from the same dimension table as row labels performing slowly

    (Working with SSAS tabular)
    I'm trying to figure out what the approach should be for the following scenario:
    Lets say we have a Customer table. The table has columns such as account number, department number, name, salesperson, account manager, number of customers, delivery route, etc
    A user of the model could want to see any permutation of that information as the row labels. How should that be handled?
    What we've been doing so far is that the user adds each column they want into the "ROWS" section in Excel. This works fine with smaller tables (for example, "Department" table with a "Department Code" and "Department Name",
    but on large tables this quickly chokes. I understand why this is happening, I just haven't found a better way to accomplish the same thing.
    I can add a calculated column to the model through VS, but obviously this is unsupportable and unscalable when each person needs their own permutations of the data. Can something similar be done in Excel? 
    This question seems to be what I need:
    http://social.msdn.microsoft.com/Forums/en-US/97d1157a-1402-4227-b96a-79524401ddcd/mdx-query-performance-when-selecting-multiple-attributes-from-same-dimension?forum=sqlanalysisservices
    However I can't find any information on how to add those properties (is it a multidimensional-only thing?)

    Thanks for the help. Sorry but i'm a self-taught developer, and i may be missing some basics :)
    Anyway i've done what you suggested but i get this error:
    [nQSError: 15011]The dimension table source Dimension Services.DM_D_SERVIZI_SRV has an aggregate content specification that specifies the level Product. But the source mapping contains column COD_PRODUCT with a functional dependency association on a more detailed level .
    where:
    - DM_D_SERVIZI_SRV is the physical alias for the Service Dimension (and the name of the LTS too)
    - COD_PRODUCT is the leaf of the hierarchy, the physical primary key, but it hasnt to be included in the hierarchy
    Do i have to add another level with the primary key and hide it to the users?
    I tried to solve this going to the logical tables source properties, on the tab contents, setting "logical level" to null for the hierarchy, but i don't know if this is correct.
    Thanks

  • Send a message to multiple receivers from the same service

    Hi all,
    I registered on SAP community several months ago, I found many good hints and solutions to some of the problems encountered in XI and for which I thank you, but this is the first time I address a question to a common issue, written already about.
    I have a scenario with 1 File FTP sender adapter and 2 Receiver adapters:1 FTP adapter and 1 MAIL adapter. The input message is sent to one of these receiver adapters based on the value taken by a specific field from the input message.The receiver adapters are using the same party and service.
    The requirement is to solve this without using BPM.
    I have read "multiple receiver" issue related blogs and tried to use the standard receiver determination. Thus, I have 1 Sender Agreement, 2 Receiver agreements (one for FTP and one for MAIL), 1 Interface Determinations (with the 2 inbound interfaces and interface mappings corresponding to FTP and MAIL output) and 1 standard Receiver Determination where I added the party and service twice and specified for both the condition. The condition is based on XPath, is correct.
    In sxmb_moni, I get the error: "No receiver could be determined". If I remove one of the conditions, then the output is sent on both receiver adapters, instead of only the one that fulfills the condition.
    Can you please give me some feedback on how to solve this problem? It is rather urgent.
    I have also tried to create 2 Interface Determinations and have 2 Receiver Determinations, each one with the right condition. But I get the same error message.
    Is the problem due to the fact that I don't use 2 different services ?
    If you know how this can be solved without using BPM, please reply.
    Thanks a lot,
    Alina hudea

    > In sxmb_moni, I get the error: "No receiver could be determined". If I remove one of the conditions, then the output is sent on both receiver adapters, instead of only the one that fulfills the condition.
    Hi,
    I think the problem in Receive Determination. As you mentioned when you remove one of the condition then it works..
    What I concluded is, I think while creating your Receiver Determination for multiple receivers you added the receivers by pressing the plus sign and that means you are using mulitiple receivers with "AND" condition, so in this condition when both the condition will be true then only you will get success.
    What you can do is, Just remove one of the receivers and then add it by pressing the "OR" symbol i.e. by pressing this ( [ ] ) symbol and put your conditions as you like.
    I hope what I have concluded is correct.. 
    Regards,
    Sarvesh

Maybe you are looking for