Concurrent ldap search in the same thread

Hi,
I try to send in parallel several ldap search request to an iDS5.0 SP1 ldap server. The ldap client is java coded using LDAP SDK.
To emphasis my problem, I wrote a very simple ldap client:
A first request is sent to the ldap server. 200 entries matches the search criteria;
searchListener = _ld.search("ou=city0, ou=region0, ou=LoadTest, o=surpass.com",1,"(cn=*)",attrs,false,null, searchConstraints);
I read the 5 first messages sent back by the ldap server:
while (true) {  
ldapMessage=searchListener.getResponse();      
nbEntries++;
if (nbEntries>5) break;
Without waiting for the resultCode message, I send a new ldap search:
ldapSearchResults = _ld.search("ou=city1, ou=region1, ou=LoadTest, o=surpass.com",1,"(cn=*)",attrs,false,searchConstraints);
This search locks the java process. A timeout message is generated in the ldap server logs:
[27/Jan/2003:14:13:35 +0100] conn=60660 op=2 fd=48 closed error 11 (Resource temporarily unavailable) - B4
Is it a bug? Or is it mandatory, in a single thread process, to wait for the resultCode message before sending any other search request?
Yannick

Thank's for answering
You'r right, there are many ways to overcome the problem in my very simple ldap client:
- Send an abandon
- Wait for the resultCode message
- Use the search constraint BATCHSIZE=0
But my question is: is it possible to run several concurrent ldap requets in the same thread (like a pool of ldap search) and check their results in a asynchronous way?
Any idea?

Similar Messages

  • Can use the same thread safe variable in the different processes?

    Hello,
    Can  use the same thread safe variable in the different processes?  my application has a log file used to record some event, the log file will be accessed by the different process, is there any synchronous method to access the log file with CVI ?
    David

    Limiting concurrent access to shared resources can be better obtained by using locks: once created, the lock can be get by one requester at a time by calling CmtGetLock, the other being blocked in the same call until the lock is free. If you do not want to lock a process you can use CmtTryToGtLock instead.
    Don't forget to discard locks when you have finished using them or at program end.
    Alternatively you can PostDeferredCall a unique function (executed in the main thread) to write the log passing the apprpriate data to it.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How can I use the same thread to display time in both JPanel & status bar

    Hi everyone!
    I'd like to ask for some assistance regarding the use of threads. I currently have an application that displays the current time, date & day on three separate JLabels on a JPanel by means of a thread class that I created and it's working fine.
    I wonder how would I be able to use the same thread in displaying the current time, date & day in the status bar of my JFrame. I'd like to be able to display the date & time in the JPanel and JFrame synchronously. I am developing my application in Netbeans 4.1 so I was able to add a status bar in just a few clicks and codes.
    I hope somebody would be able to help me on this one. A simple sample code would be greatly appreciated.
    Thanks in advance!

    As you're using Swing, using threads directly just for this kind of purpose would be silly. You might as well use javax.swing.Timer, which has done a lot of the work for you already.
    You would do it something like this...
        ActionListener timerUpdater = new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                // DateFormat would be better, but this is an example.
                String timeString = new Date().toString();
                statusBar.setText(timeString);
                someOtherLabel.setText(timeString);
        new Timer(1000, timerUpdater).start();That code will update the time once a second. If you aren't going to display seconds, you might as well increase the delay.
    The advantage of using a timer over using an explicit thread, is that multiple Swing timers will share a single thread. This way you don't blow out your thread count. :-)

  • Multiple threads but they are using the same thread ID

    I'm a newbie in Java programming. I have the following codes, please take a look and tell me what wrong with my codes: server side written in Java, client side written in C. Please help me out, thanks for your time.
    Here is my problem: why my server program assigns the same thread ID for both threads???
    .Server side: start server program
    .Client side: set auto startup in /etc/rc.local file in a different machine, so whenever this machine boots up, the client program will start automatically.
    ==> here is the result with 2 clients, why they always come up the same thread ID ????????
    Waiting for client ...
    Server thread 1024 running
    Waiting for client ...
    Server thread 1024 running
    But if I do like this, they all work fine:
    .Server side: start server program
    .Client side: telnet or ssh to each machine, start the client program
    ==> here is the result:
    Waiting for client ...
    Server thread 1024 running
    Waiting for client ...
    Server thread 1025 running
    server.java file:
    import java.io.*;
    import java.net.*;
    import java.awt.*;
    import java.util.Hashtable;
    import java.util.Enumeration;
    import java.util.regex.Pattern;
    import java.util.Date;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.text.*;
    public class Server extends Frame implements Runnable
    private ServerThread clients[] = new ServerThread[50];
    private ServerSocket server = null;
    private Thread thread = null;
    private int clientCount = 0;
    //some variables over here
    public Server(int port)
    //GUI stuffs here
    //network stuff
    try
    System.out.println("Binding to port " + port + ", please wait ...");
    server = new ServerSocket(port);
    System.out.println("Server started: " + server);
    start();
    catch(IOException ioe)
    System.out.println("Can not bind to port " + port + ": " + ioe.getMessage());
    public boolean action(Event e, Object arg)
    //do something
    return true;
    public synchronized void handle(int ID, String input)
    //do something
    public synchronized void remove(int ID)
    int pos = findClient(ID);
    if (pos >= 0)
    //remove a client
    ServerThread toTerminate = clients[pos];
    System.out.println("Removing client thread " + ID + " at " + pos);
    if (pos < clientCount-1)
    for (int i = pos+1; i < clientCount; i++)
    clients[i-1] = clients;
    clientCount--;
    try
    {  toTerminate.close(); }
    catch(IOException ioe)
    {  System.out.println("Error closing thread: " + ioe); }
    toTerminate.stop();
    private void addThread(Socket socket)
    if (clientCount < clients.length)
    clients[clientCount] = new ServerThread(this, socket);
    try
    clients[clientCount].open();
    clients[clientCount].start();
    clientCount++;
    catch(IOException ioe)
    System.out.println("Error opening thread: " + ioe);
    else
    System.out.println("Client refused: maximum " + clients.length + " reached.");
    public void run()
    while (thread != null)
    try
    {       System.out.println("Waiting for a client ...");
    addThread(server.accept());
    catch(IOException ioe)
    System.out.println("Server accept error: " + ioe); stop();
    public void start()
    if(thread == null)
    thread = new Thread(this);
    thread.start();
    public void stop()
    if(thread != null)
    thread.stop();
    thread = null;
    private int findClient(int ID)
    for (int i = 0; i < clientCount; i++)
    if (clients[i].getID() == ID)
    return i;
    return -1;
    public static void main(String args[])
    Frame server = new Server(1500);
    server.setSize(650,400);
    server.setLocation(100,100);
    server.setVisible(true);
    ServerThread.java file
    import java.net.*;
    import java.io.*;
    import java.lang.*;
    public class ServerThread extends Thread
    private Server server = null;
    private Socket socket = null;
    private int ID = -1;
    InputStreamReader objInStreamReader = null;
    BufferedReader objInBuffer = null;
    PrintWriter objOutStream = null;
    public ServerThread(Server server, Socket socket)
    super();
    server = _server;
    socket = _socket;
    ID = socket.getPort();
    public void send(String msg)
    objOutStream.write(msg);
    objOutStream.flush();
    public int getID()
    return ID;
    public void run()
    System.out.println("Server thread " + ID + " running");
    while(true)
    try{
    server.handle(ID,objInBuffer.readLine());
    catch(IOException ioe)
    System.out.println(ID + "Error reading: " + ioe.getMessage());
    //remove a thread ID
    server.remove(ID);
    stop();
    public void open() throws IOException
    //---Set up streams---
    objInStreamReader = new InputStreamReader(socket.getInputStream());
    objInBuffer = new BufferedReader(objInStreamReader);
    objOutStream = new PrintWriter(socket.getOutputStream(), true);
    public void close() throws IOException
    if(socket != null) socket.close();
    if(objInStreamReader != null) objInStreamReader.close();
    if(objOutStream !=null) objOutStream.close();
    if(objInBuffer !=null) objInBuffer.close();
    And client.c file
    #include <sys/types.h>
    #include <sys/socket.h>
    #include <netinet/in.h>
    #include <arpa/inet.h>
    #include <netdb.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <unistd.h> /* close */
    #include <time.h>
    #define SERVER_PORT 1500
    #define MAX_MSG 100
    //global variables
    long lines = 0;
    int sd = 0;
    char command[100];
    time_t t1,t2;
    double timetest = 0.00;
    int main (int argc, char *argv[])
    int rc, i = 0, j = 0;
    struct sockaddr_in localAddr, servAddr;
    struct hostent *h;
    char buf[100];
    FILE *fp;
    h = gethostbyname(argv[1]);
    if(h==NULL) {
    printf("unknown host '%s'\n",argv[1]);
    exit(1);
    servAddr.sin_family = h->h_addrtype;
    memcpy((char *) &servAddr.sin_addr.s_addr, h->h_addr_list[0], h->h_length);
    servAddr.sin_port = htons(SERVER_PORT);
    /* create socket */
    sd = socket(AF_INET, SOCK_STREAM, 0);
    if(sd<0) {
    perror("cannot open socket ");
    exit(1);
    /* bind any port number */
    localAddr.sin_family = AF_INET;
    localAddr.sin_addr.s_addr = htonl(INADDR_ANY);
    localAddr.sin_port = htons(0);
    rc = bind(sd, (struct sockaddr *) &localAddr, sizeof(localAddr));
    if(rc<0) {
    printf("%s: cannot bind port TCP %u\n",argv[1],SERVER_PORT);
    perror("error ");
    exit(1);
    /* connect to server */
    rc = connect(sd, (struct sockaddr *) &servAddr, sizeof(servAddr));
    if(rc<0) {
    perror("cannot connect ");
    exit(1);
    //send register message
    rc = send(sd, "register\n", strlen("register\n"), 0);
    //if can't send
    if(rc < 0)
    close(sd);
    exit(1);
    //wait here until get the flag from server
    while(1)
    buf[0] = '\0';
    rc = recv(sd,buf,MAX_MSG-1,0);
    if(rc < 0)
    perror("receive error\n");
    close(sd);
    exit(1);
    buf[rc] = '\0';
    if(strcmp(buf,"autoplay")==0)
    //do something here
    else if(strcmp(buf,"exit")==0)
    printf("exiting now ....\n");
    close(sd);
    exit(1);
    return 0;

    Yes......I do so all the time.

  • Hi I want to create a search form with drop down search criteria. This form should then search on the same site and display the search results. Is there HTML available for this? Or an oline site that I can use to build this form? I created a form in Jotfo

    Hi I want to create a search form with drop down search criteria. This form should then search on the same site and display the search results. Is there HTML available for this? Or an oline site that I can use to build this form? I created a form in Jotform.com, but this form doesn't search the site, instead it sends me an e-mail. Do you have a solution for me? Thanks.

    Hi I want to create a search form with drop down search criteria. This form should then search on the same site and display the search results. Is there HTML available for this? Or an oline site that I can use to build this form? I created a form in Jotform.com, but this form doesn't search the site, instead it sends me an e-mail. Do you have a solution for me? Thanks.

  • How is it possible to make sure that LV uses the same thread for several threadsafe DLL calls?

    Hello,
    i have a thread safe DLL and most functions are called from serveral threads from the LV apllication without problems.
    In case of an error i have to call an error handler function in this DLL (like WinAPI: GetLastError()) from the same thread which has called the function that failed before.
    I can't use the user interface execution because some functions need a long execution time and i don't want to balk the user interface.
    All other executions than the user interface execution have more than one thread and in most cases the DLL function calls were executed from different threads - so the error handling doesn't work...
    Any idea?
    Thanks for your help!

    Hmmm....
    How about wrapping all of your dll calls in a single VI (or an Action Engine ) and make sure the VI's thread is NOT set for "Same as caller".
    "Threadconfig.vi" (sp?) will also let you dictate the number of threads associated with an execution system. Set your target thread for "1".
    Not sure on the above.
    Please correct me if this is wrong!
    Ben
    Message Edited by Ben on 07-19-2007 08:26 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Mail sorting messages from different people in the same thread?

    I have this weird issue. It's happened before but I figured I might be able to figure this out.
    I got a response from somebody this morning and whats happening is, when I click on his response, the email shows up on the right like it should. However, ths email is from "Floyd" and shows as email "2". It shows another email below it in the "thread" from "Taryn" and has absolutely nothing to do with this email. The only similarities are the subject line which says "Poster". The "First" email from Taryn is from April. It seams as if it's sorting the emails by subject line. I don't want emails from different people in the same thread. Any thoughts on how to fix this issue? Image attached.
    OSX 10.8.4

    This question is about the same as mine.  I migrated all my data from old mac mini to new mac mini.  System screwed up and permission and owners were not setup.  Now I'm trying to salvage this mess.  I'm also trying to import mail, which I think should be on the computer but I don't know where.
    Same question where does the computer store Mail mail?
    Chuck

  • In OSB 10,3, a Java Callout runs in the same thread of the Proxy Service?

    Hello,
    a I have a Java Callout within the Proxy Service, request pipeline.
    Does it runs in the same thread of the Proxy?
    If NOT,
    which work manager is the Java Callout pinned to?
    can I set the work manager I want?
    Thank you,
    regards
    F.Costa

    Thanks a lot.
    Pointer to great info.
    However doesn't mention Java Callout threading, nor the documentation does.
    Anybody with a YES or NO, please...
    F.Costa

  • Is it possible to create multiple LDAP server in the same bi11g application

    Hi,
    they are 8 location users are acessing my report.now i am trying to implementing LDAP server for the user security in my obiee11g application. is it possible to configure/implement multiple LDAP server in the same BI server.
    Thanks
    Deva

    YES. refer http://total-bi.com/2011/07/multiple-ldap-authentication-providers-in-obiee-11-1-1-5/

  • How can I use the same thread pool implementation for different tasks?

    Dear java programmers,
    I have written a class which submits Callable tasks to a thread pool while illustrating the progress of the overall procedure in a JFrame with a progress bar and text area. I want to use this class for several applications in which the process and consequently the Callable object varies. I simplified my code and looks like this:
            threadPoolSize = 4;
            String[] chainArray = predock.PrepareDockEnvironment();
            int chainArrayLength = chainArray.length;
            String score = "null";
            ExecutorService executor = Executors.newFixedThreadPool(threadPoolSize);
            CompletionService<String> referee = new ExecutorCompletionService<String>(executor);
            for (int i = 0; i < threadPoolSize - 1; i++) {
                System.out.println("Submiting new thread for chain " + chainArray);
    referee.submit(new Parser(chainArray[i]));
    for (int chainIndex = threadPoolSize; chainIndex < chainArrayLength; chainIndex++) {
    try {
    System.out.println("Submiting new thread for chain " + chainArray[chainIndex]);
    referee.submit(new Parser(chainArray[i]));
    score = referee.poll(10, TimeUnit.MINUTES).get();
    System.out.println("The next score is " + score);
    executor.shutdown();
    int index = chainArrayLength - threadPoolSize;
    score = "null";
    while (!executor.isTerminated()) {
    score = referee.poll(10, TimeUnit.MINUTES).get();
    System.out.println("The next score is " + score);
    index++;
    My question is how can I replace Parser object with something changeable, so that I can set it accordingly whenever I call this method to conduct a different task?
    thanks,
    Tom                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    OK lets's start from the beginning with more details. I have that class called ProgressGUI which opens a small window with 2 buttons ("start" and "stop"), a progress bar and a text area. It also implements a thread pool to conducts the analysis of multiple files.
    My main GUI, which is much bigger that the latter, is in a class named GUI. There are 3 types of operations which implement the thread pool, each one encapsulated in a different class (SMAP, Dock, EP). The user can set the necessary parameters and when clicking on a button, opens the ProgressGUI window which depicts the progress of the respective operation at each time step.
    The code I posted is taken from ProgressGui.class and at the moment, in order to conduct one of the supported operations, I replace "new Parser(chainArray)" with either "new SMAP(chainArray[i])", "new Dock(chainArray[i])", "new EP(chainArray[i])". It would be redundant to have exactly the same thread pool implementation (shown in my first post) written 3 different times, when the only thing that needs to be changed is "new Parser(chainArray[i])".
    What I though at first was defining an abstract method named MainOperation and replace "new Parser(chainArray[i])" with:
    new Callable() {
      public void call() {
        MainOperation();
    });For instance when one wants to use SMAP.class, he would initialize MainOperation as:
    public abstract String MainOperation(){
        return new SMAP(chainArray));
    That's the most reasonable explanation I can give, but apparently an abstract method cannot be called anywhere else in the abstract class (ProgressGUI.class in my case).
    Firstly it should be Callable not Runnable.Can you explain why? You are just running a method and ignoring any result or exception. However, it makes little difference.ExecutorCompletionService takes Future objects as input, that's why it should be Callable and not Runnable. The returned value is a score (String).
    Secondly how can I change that runMyNewMethod() on demand, can I do it by defining it as abstract?How do you want to determine which method to run?The user will click on the appropriate button and the GUI will initialize (perhaps implicitly) the body of the abstract method MainOperation accordingly. Don't worry about that, this is not the point.
    Edited by: tevang2 on Dec 28, 2008 7:18 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Force DLLs to tun in the same thread (expect the UI Thread)

    Hi,
    I want that three different DLLs run in the same thread  but this thread must not be the "UI Thread". I there a way to force them to do so?
    Best regards
    Solved!
    Go to Solution.

    Jarrod S. wrote:
    Do the DLL calls really have to execute in the same thread? Or is it just required that they not execute at the same time? In the latter case, you could consider using a semaphore to protect your DLL calls, or perhaps putting all the DLL calls into a single subVI with a case structure to decide which call to make. This second option might become more complicated if all the calls have different sets of inputs or outputs.
    Using another Execution System other than the UI Thread won't work, because those Execution Systems each get 4-8 threads to run with.
    Ho about... 
    Putting all of the calls into an Action Engine configured to run in "other1" (for example) and then use "threadconfig" to configure that for only one thread.
    Write a wrapper for each call to the AE and ....
    Done?
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Finder search not the same as Spotlight

    When I use Spotlight, my word files (.doc) files show up
    under the "Documents" group. But when I do the same search in Finder, the
    word files show up under "Other," and the only file that shows up in
    the "Documents" is a txt file.
    This is a new computer and I only have two doc files, but I would think that word documents would be categorized as a "Document" group.

    Hi, jmoon —
    Please accept a warm welcome to Apple Discussions!
    As far as I know, what you're calling a "Finder search" (⌘-F)   is  a Spotlight tool ——> essentially, a more fine-tuned" version. So please forgive if I'm "answering" the "wrong question"   below —
    Are you using the (⌘-F) »» "other" (= "select a search attribute") »» "Creator" (= "Application used to create the document") &/or »» "Name extension" setting?
    I'm by no means "expert"  in the peccadilloes of Spotlight or (⌘-F) — so I did a quick < ">Spotlight forum in an effort to help.
    Rather than regurgitate, I'll link a few threads that seem promising:
     (1) odysseus's thread, "Spotlight won't index Word files w/o .doc extension-solved!" In it, he references a MacNN thread on the topic.
     (2) A discussion in Michael Hesson's thread, "Can't find .doc docs?" — where eventually using a smart folder seemed to help...
     (3) Laurie Leonard's thread, "Changing extensions so Spotlight works better." Francine Schwieder links to a helpful AppleScript for making batch-name-changes... Unfortunately, this approach apparently worked only for 1994 – 1998 Word files. (Duh?)
    Btw, if you don't mind —I'm curious about a couple of things. When you "Get Info" on one of your ".doc" files, is "Name & Extension" »» "Hide extension" selected? Also, does toggling "Document" — or dragging to modify its order — in the System Preferences »» Spotlight »»Search Results make any difference?
    Does this help?
    Looking forward to hearing back from you!
    Regards,
    Dean
          I edited this message...
    [1,965 ⊥ 3,355]

  • 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
              > > >
              > > >
              > >
              > >
              >
              >
              

  • Concurrency when inserting in the same table

    Hi,
    I have a report used by several users and in this record there is a sentence to insert in a z table. My question is, what happens whether two or more users are inserting records in that table at the same time?  There is a concurrency problem, isn't there?
    How does SAP manage this issue? or, what must I do in this case?
    Thanks in advance.
    Regards.

    Hi David,
    As SAP applications are accessed by many end users at same time, SAP has concept called LOCKING of particular tables involved in the transaction.
    You can achieve your requirement as below
    Go to t-code SE11, and create a lock object for your Ztable
    Now, system create 2 function modules - 1 for locking ENQUEUE_* & other for un-locking DEQUEUE_*  ( search for function module in SE37 )
    Before saving data to ZTABLE, call function module ENQUEUE_* to lock the table for writing data, if locking fails, means there is somebody already working on it, hence you can display error message
    After Save action, you can unlock the table by using FM ... DEQUEUE_*
    Note: you can lock and unlock event during DISPLAY/CHANGE mode if your requirement requires.
    Hope this helps you.
    Regards,
    Rama

  • Is possible search within the disscusions threads ?

    Hi.
    I need to configurate the Search Iview, in order to search within the discussion forums.  That is to say, to be able to look for within discussion threads, as makes the SDN with the thrid party software that uses, I know, but doing that same one with iview standard of discussion forums?
    Actually, with my standard configuration, only look for the title of the discussions.
    I have EP 60, SP2.
    anybody would help me?
    thanks a lot.
    Leandro

    Hi Leandro,
    you can create an index and do some configuration changes as described in SAPNote 564677 in order to can search discussion groups. This should not only search the discussion titles but also the text within discussion threads. Btw: What Patch release do you use?
    Just another thing: please get in common with the Contributor Recognition Program. I could see that you have opened more than one thread where you mentioned that your problem was solved but you did not reward any points!
    Check this link for more information: https://www.sdn.sap.com/sdn/index.sdn?page=crp_help.htm
    Best regards,
    Robert

Maybe you are looking for