Socket and multithreading problem (flow control)

This code is heavily influenced by the KKMultiServerThread. I am having problems controlling the thread flow.
             login = new MultiServerThreadLogin(serverSocket.accept(), serverSocket);
        login.start();     
          while(true){
             System.out.println(login.getAuthen());
             while(login.getAuthen()){
                  System.out.println("doing hello");
                  hello = new KKMultiServerThread(serverSocket.accept(), serverSocket);
                  hello.start();
                  if(hello.getFlag())
                  break;
          }here, you can see that i am trying to start a thread to login the user and then recieve files from the cilent. When my GUI runs, there is no problem whatsoever that is for the 1st time, however when i try running the 2nd time, the code as u can see, doesnt allow that... so is there anyway to break away from the inner loop?

hey thanks for replying... i'm sorry but in a rush here...
this snippet resides in the server. There are 2 classes, namely MultiServerLoginThread and KKMultiServerThread, both extends Thread.
The function of the MultiServerLoginThread is to read in bytes of Secretkey, username(encrypted) and password(encrypted). This should only take place once.
The function of theother thread, KKMultiServerThread is to read in the file name to be transferred and the contents. This is based on the KKMultiServerThread which can be found somewhere in this forum... i hope...
The KKMultiServerThread is started over and over because the client is sending multiple files. Hence the while loop. However after sending the last file, it should go to the MultiServerLoginThread....
One thing i don't really get it is that if i were to do this(put the creation of the login thread within the while loop):
while(true){
             System.out.println(login.getAuthen());
             login = new MultiServerThreadLogin(serverSocket.accept(), serverSocket);
        login.start();
             while(login.getAuthen()){
                  System.out.println("doing hello");
                  hello = new KKMultiServerThread(serverSocket.accept(), serverSocket);
                  hello.start();
                  if(hello.getFlag())
                  break;
          }The GUI totally hangs.
More explanation...
hello.getFlag() returns the flag when the client has finished sending all the files
login.getAuthen() returns whether the user has successfully logged in with correct creditials

Similar Messages

  • Chatserver socket and port problem

    hi,all.
    i write a chat server use java socket. now is more than 2000 users connect to my server. but too many user make the chat message speed slow. now my server is open one port to listen the client connection. who can tell me if i change my server to open multi port to listen the client connection will rather than open one port. or it is same effect.
    please give me some advice. thanks.
    my homepage is:http://www.easyfad.com

    my server system resource is no problem. Have you timed the bus on your machine?
    18% of memory means physical or total. If total is that 18% hitting the hard drive?
    What is your actual network speed? A 100m ethernet has a theoretical speed of about 12 meg per second, in practice you will never get even close to that. A normal ftp transfer might only get 500k per second. And networks can be significantly overloaded.
    What are the configuration parameters for your IP stack? It might be configured incorrectly for the type of traffic and quality of traffic that you are getting.
    The above are all possible things that can affect performance. And there are probably more. Standard OS tools are NOT the best way to measure platform performance. They can often provide misleading numbers, even when one knows what the numbers really mean.
    if i use multi port to create socket connection,
    if it will help to increase message sending speed ? Like I said I can't see how. Something is causing a slowdown. Your NIC can only process so much traffic. If your NIC was the bottle neck and you had two NICs then that would help. But if it was me I really wouldn't try a two NIC solution until I had exhausted every other possibility. First because it is unlikely to the be bottleneck and two because setting up a 2 NIC (or more) server is not plug and go solution.

  • Socket and PORT problem

    I am new to socket programming. Is there a command in UNIX to see which ports are not occupied?
    Since I have problem right now in my program to close the sockets, will they be closed automatically after I interrupt the program, should I close it manually from the command line?
    TIA.
    mmc

    When you create a Socket, you can either bind to port 0 (which binds to the first available port) or to any other valid Port number. There is no Java-based method for geting the port numbers in-use or available. When your program terminates, the sockets will terminate as well, but the port may not be available for use for a few seconds. This allows for the system to be reset.

  • Socket and Thread Problem

    When reading an Inputstream received after a connection has been established (throught a Socke connect) between a Server ands a Client , messages are being lost when a wait method is call. A client sents message which have to be processed and response sent back to the client . The message are encoded and as the code below shows each message ends with a '":" .Not only one message is sent at a time. and when messages are sent the client sometimes expect replies. This means that when a message is read , it be being processed by a Processor and until the reply has be sent this the thread reading the messages has to wait. when a reply is sent and the thread is waken up, the remaining the messages in the Input stream gets lost but the loop is not also exited since the end of the file is never reached.
    Solution:
    1. read a command message. if you find end of message, process the message and wait until you are notify and continue with the next command line
    public class Sender extends Thread {
         private Socket socket;
         private Processor processor = newProcessor();
         private boolean DEBUG = false;
         public Sender (Socket socket) {
              super();
              this.socket = socket;
              start();
         public void run() {
              while (true) {
                   if (processor .getStateOfProcess()&& socket != null) {
                        InputStream input = null;
                        try {
                             input = socket.getInputStream();
                             if (processor .dispatchMessage() != null) {
                                  socket.getOutputStream().write(
                                            CacheManager.dispatchMessage());
                                  processor .ClearMessage();
                        } catch (IOException ex) {
                        int i = 0;
                        char oldChar = ' ';
                        char c = ' ';
                        StringBuffer buffer = new StringBuffer();
                        try {
                             while ((i = input .read()) != -1) {
                                  c = (char) i;
                                  buffer.append(c);
                                                    if (c == ':' && oldChar != '\\') {
                                       processor .process(buffer.toString());
                                       buffer = new StringBuffer();
                                       c = ' ';
                                                              try {
                                            synchronized (this) {
                                                 wait();                         
                                       } catch (InterruptedException e1) {
                                                       if (processor.dispatchMessage() != null) {
                                            socket.getOutputStream().write(
                                                      CacheManager.dispatchMessage());
                                            processor.ClearMessage();
                                  oldChar = c;
                                    } catch (IOException e) {
       public void wakeup() {
              synchronized (this) {
                   notify();
    } This thread leaves that wait when the wakeup method is called in the Processor class.
    Question
    can some one help me figure out way and where the messages are being lost after the first message has been processed. why can the other message not be seen even other messages are still sent.
    What can be a possible solution
    thanks

    I didn't follow all of that, but I can see one serious error in your concurrent. You should always test the condition you're waiting for inside the synchronized block - otherwise you can't be certain that wait() is called before the corresponding notify() / notifyAll() call.

  • About socket and port problem

    hi,all.
    i write a chat server use java socket. now is more than 2000 users connect to my server. but too many user make the chat message speed slow. now my server is open one port to listen the client connection. who can tell me if i change my server to open multi port to listen the client connection will rather than open one port. or it is same effect.
    please give me some advice. thanks.

    Maybe your machine is not strong enough to serve that many users at a time anyway. In that case using several ports won't help.

  • WL 8.1 - JMS Flow Control: How does it work

    I have been reading the documenattion on the way weblogic has its Flow
              Control setup. However I still have a few doubts. It would be great
              if some one can help.
              Background: I have a J2EE application deployed on the weblogic server
              (8.1 sp5) which connects as a Consumer to a Topic. On the other side I
              have a plain java application that acts as a producer and sends lots
              of small messages (about 300 bytes) out to the topic using
              MessageProducer.send() method.
              I would like to restrict the flow from this producer so that it waits
              if the consumers are unable to collect all messages from the topic.
              When I enable flow control, I can see log entries in my weblogic
              application that shows that it has beocme armed but it clears off the
              same second. However, I don't see any exceptions being raised at the
              producer side. How can I ensure that the producer is waiting x ms to
              send further messages across. I can't see anything at the producer
              side that would lead me to believe that the flow control is working. I
              also checked the properties for each of teh Session, Connection and
              COnnectionFactory attributes but could not come across any way where I
              could see that the producer knows about the quotas being implemented
              on the queue.
              Can someone throw some light?
              Thanks
              Vikash

    Hi,
              Except for the threshold log messages you mention, flow control is silent: no exceptions are thrown when a producer is flow controlled. Flow control simply slows down "send()" calls. You can control how long a flow controlled send() call will take via the connection factory settings. I suppose you can instrument your code to time the send() calls.
              Your statement "When I enable flow control, I can see log entries in my weblogic application that shows that it has beocme armed but it clears off the same second." is likely an indicator that flow control is working. You need to configure your thresholds to be farther apart if you want the flow control condition to last longer, and if you want to reduce the number of transitions in and out of flow-control.
              Tom
              P.S. The threshold settings in 8.1 also control paging. If you upgrade to a new version, then the threshold settings will only control flow-control. You will also likely get much much higher messaging performance - which can reduce the need for flow control.

  • Problems with parity and flow control using visa serial

    I am trying to create a basic user interface with the options that my
    company uses most often for a force indicator.  You can configure
    the indicator over serial, as well as read the values off the
    indicator.  I am trying to create the user interface so that using
    producer/consumer loops with events, once you change a value, it will
    write that new value to the serial port, ie the device. 
    The problem I am having is transfering the parity and flow control
    values for the serial config to the Basic read write VI.  The
    problem is that once the consumer loop executes, it will write the
    values correctly to the VI, but then the outer loop executes 200 ms
    later and clears the values.  I know that this is normal behavior
    and that in order to keep the values stored, normally you would use a
    shift register.  I tried to use this and had some issues with
    correct data types/array mis-mtaches, ets, so I created an indicator
    and had a local vaible read the indicator, which seems to be working
    for the stop bits, read bits, baud rate, etc, but not the parity anf
    flow control.  I always get "blank" outputs for theses values (if
    you enable the digital display you can see that they are outputing the
    value 0 which correspondes to None in both cases, which is
    correct).  Even though it appears that it is outputting the
    correct value, I get an error that says the VISA property is
    invalid.  I initally did a search and found that my stop bit
    control was wrong (outputting double instead of integer), but I could
    not find anything on the parity/flow control issue.  I even tried
    to copy the serial config controls from the basic serial read/write to
    my dialog box and that did not work either.
    I would be grateful for any suggestions.
    Thanks
    Kenny
    Kenny
    Attachments:
    BGI_main pandc.zip ‏232 KB

    I should add that I am using LV 8.0 and that the serial config
    indicator in the consumer loop will be off the frontpanel in the final
    VI so that it is not visible to the user.
    Kenny

  • Problems with breadcrumbs in TP4 be bounded and unbounded Task-Flows

    Project scope
      JDev 11g TP4
      jspx - template
      jsff - breadcrumbs
      jspx - forms (using the template)
      bound and unbound task-flow
    .) all forms (and template) are in the unbound task-flow (adfc-confi.xml)
    .) one form can be called with an parameter from another form - problem solved with an bound task-flow (task-flow-definition.xml) - it works very good
    With "Create ADF Menu" (on adfc-confi.xml) the JDev create
      root_menu.xml
      <control-flow-rule> entries in adf-config.xml
      <managed-bean> entrie in adf-config.xml
    The code from the breadcrumbs.jsff looks like
      <af:breadCrumbs value="#{root_menu}" var="rootMenuNode"
                      id="BreadCrumbs">
        <f:facet name="nodeStamp">
          <af:commandNavigationItem text="#{rootMenuNode.label}"
                                    action="#{rootMenuNode.doAction}"
                                    icon="#{rootMenuNode.icon}"
                                    destination="#{rootMenuNode.destination}"
                                    rendered="#{rootMenuNode.rendered}"/>
        </f:facet>
      </af:breadCrumbs>
    I have now two problems:
    1.) by navigation between the pages(in the definition of the unbound task-flow (adfc-confi.xml)) the breadcrumb displayed only the current page but not the history way.
    2.) after call the form with an parameter (need bound task-flow (task-folw-definition.xml)) all breadcrumb informations are cleared - nothing is displayed
    can anybody help?

    Hi,
    the generated menu model only works for unbound flows. You can call a bound flow from such a menu, but this doesn't show breadcrumbs within the bound taskflow. For this you need to specify that the bound taskflow creates a breadcrumb model and then it will only show what is within. Have a look at the taskflow section in the developer guide.
    Frank

  • Printer flow control problem

    I have a Time Capsule with a Canon MP780 printer attached. Everything works normally when I print a short document. When I try to print a document longer than about 2 pages, the printer hangs about halfway through the second page. There are no errors indicated on the printer and no error flagged back to the software; it just continues to indicate "printing". The same document prints fine if I connect the printer directly to the laptop.
    Since it's related to the length of the document, I conclude that there is an issue with flow control between the Time Capsule and the printer, but I cannot find any option to tweak, hardware or software.

    Continue from above posting, my actual problem lies with the Hardware flow control,
    in the above snipplet, you might see that I've put
    while(!serialPort.isCTS()) // while it's Clear To Send
    as to ensure i've finished read all the available data (incoming sms) before writing another command
    into the sms gateway. But the problem is serialPort.isCTS() returns true, even though there are still
    more data to be read
    putting thread.sleep(3000) does the trick, but I dont think it's not a so ellegant solution
    if my available data keeps growing (in terms of bytes)
    regards,
    Honggo

  • Problem with socket and object writing

    Hi,
    I programm this client/server app, the client has a point (graphic ) , the server has a point and when the mouse is moving it moves the point and the new position is send via the socket.
    The probleme is that i don't receive the good thing.
    When i display the coord of the point before sending it's good , but when receiving from the socket the coords are always the same ...
    i don't understand .
    Well , try and tell me ...
    Thx.

    oups, the program can be usefull ...
    import java.applet.*;
    import java.awt.*;
    import java.util.*;
    import java.awt.event.*;
    public class server_JFrame extends javax.swing.JFrame implements MouseListener,MouseMotionListener{
    point p1,p2;
    server s;
    public server_JFrame()
    this.setSize(600,400);
    addMouseListener(this);
    addMouseMotionListener(this);
    p2=new point(50,50,new Color(0,0,255));
    p1=new point(200,200,new Color(255,0,0));
    s = new server(p2,this);
    public void paint(Graphics g)
    super.paint(g);
    g.setColor(p1.get_color());
    g.fillOval(p1.get_x(), p1.get_y(),10,10);
    g.setColor(p2.get_color());
    g.fillOval(p2.get_x(), p2.get_y(),10,10);
    public void mouseClicked(MouseEvent e) { }
    public void mouseEntered(MouseEvent e) {}
    public void mouseExited(MouseEvent e) {}
    public void mousePressed(MouseEvent e) {}
    public void mouseReleased(MouseEvent e) {}
    public void mouseDragged(MouseEvent e) {}
    public void mouseMoved(MouseEvent e)
    p1.set_x(e.getX());
    p1.set_y(e.getY());
    s.write_point(p1);
    repaint();
    public static void main(String args[])
         server_JFrame sjf = new server_JFrame();
    sjf.setDefaultCloseOperation(EXIT_ON_CLOSE);
         sjf.setTitle("server");
    sjf.show();
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.awt.*;
    public class server {
    point p_;
    Container c_;
    ObjectInputStream Istream_;
    ObjectOutputStream Ostream_;
    public server(point p,Container c)
    p_=p;
    c_=c;
    try
    ServerSocket server = new java.net.ServerSocket(80);
    System.out.println("attente d'un client");
    java.net.Socket client = server.accept();
    System.out.println("client accept�");
    Istream_ = new ObjectInputStream(client.getInputStream());
    Ostream_ = new ObjectOutputStream(client.getOutputStream());
    ThreadRead tr = new ThreadRead(Istream_,p_,c_);
    catch (Exception exception) { exception.printStackTrace(); }
    public void write_point(point p)
    try
    System.out.print("x="+p.get_x());
    System.out.println(" y="+p.get_y());
    Ostream_.flush();
    Ostream_.writeObject(p);
    Ostream_.flush();
    catch (Exception exception) {exception.printStackTrace();}
    import java.applet.*;
    import java.awt.*;
    import java.util.*;
    import java.awt.event.*;
    public class client_JFrame extends javax.swing.JFrame implements MouseListener,MouseMotionListener{
    point p1,p2;
    client c;
    public client_JFrame()
    this.setSize(600,400);
    addMouseListener(this);
    addMouseMotionListener(this);
    p1=new point(50,50,new Color(0,0,255));
    p2=new point(200,200,new Color(255,0,0));
    c = new client(p2,this);
    public void paint(Graphics g)
    super.paint(g);
    g.setColor(p1.get_color());
    g.fillOval(p1.get_x(), p1.get_y(),10,10);
    g.setColor(p2.get_color());
    g.fillOval(p2.get_x(), p2.get_y(),10,10);
    public void mouseClicked(MouseEvent e) { }
    public void mouseEntered(MouseEvent e) {}
    public void mouseExited(MouseEvent e) {}
    public void mousePressed(MouseEvent e) {}
    public void mouseReleased(MouseEvent e) {}
    public void mouseDragged(MouseEvent e) {}
    public void mouseMoved(MouseEvent e)
    p1.set_x(e.getX());
    p1.set_y(e.getY());
    c.write_point(p1);
    repaint();
    public static void main(String args[])
         client_JFrame cjf = new client_JFrame();
    cjf.setDefaultCloseOperation(EXIT_ON_CLOSE);
         cjf.setTitle("client");
    cjf.show();
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.awt.*;
    public class client {
    point p_;
    Container c_;
    ObjectInputStream Istream_;
    ObjectOutputStream Ostream_;
    public client(point p,Container c)
    p_=p;
    c_=c;
    try
    ipJDialog ipjd = new ipJDialog();
    String ip = ipjd.getvalue();
    Socket socket = new Socket(ip,80);
    System.out.println("connection avec serveur reussi");
    Ostream_ = new ObjectOutputStream(socket.getOutputStream());
    Istream_ = new ObjectInputStream(socket.getInputStream());
    ThreadRead tr = new ThreadRead(Istream_,p_,c_);
    catch (Exception exception) {*exception.printStackTrace();*/System.out.println("connection avec serveur echou�");}
    public void write_point(point p)
    try
    System.out.print("x="+p.get_x());
    System.out.println(" y="+p.get_y());
    Ostream_.flush();
    Ostream_.writeObject(p);
    Ostream_.flush();
    catch (Exception exception) {exception.printStackTrace();}
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.awt.*;
    public class client {
    point p_;
    Container c_;
    ObjectInputStream Istream_;
    ObjectOutputStream Ostream_;
    public client(point p,Container c)
    p_=p;
    c_=c;
    try
    ipJDialog ipjd = new ipJDialog();
    String ip = ipjd.getvalue();
    Socket socket = new Socket(ip,80);
    System.out.println("connection avec serveur reussi");
    Ostream_ = new ObjectOutputStream(socket.getOutputStream());
    Istream_ = new ObjectInputStream(socket.getInputStream());
    ThreadRead tr = new ThreadRead(Istream_,p_,c_);
    catch (Exception exception) {*exception.printStackTrace();*/System.out.println("connection avec serveur echou�");}
    public void write_point(point p)
    try
    System.out.print("x="+p.get_x());
    System.out.println(" y="+p.get_y());
    Ostream_.flush();
    Ostream_.writeObject(p);
    Ostream_.flush();
    catch (Exception exception) {exception.printStackTrace();}
    import java.io.Serializable;
    import java.awt.*;
    public class point implements Serializable{
    private int x_;
    private int y_;
    private Color c_;
    public point(int x, int y, Color c) {
    x_=x;
    y_=y;
    c_=c;
    public int get_x() { return x_ ; }
    public int get_y() { return y_ ; }
    public void set_x(int x) { x_=x ; }
    public void set_y(int y) { y_=y ; }
    public Color get_color() { return c_ ; }
    }

  • Problem with the socket and the standard output stream

    Hy, I have a little problem with a socket program. It has the server and the client. The problem is that the client at one point in the program, cannot print messages in the console.
    My program does the next: the server waits connections, when a client connects to it, the server gets outputstream to the socket and writes two strings on it. Meanwhile, the client gets the inputstream to the socket and reads on it with a loop the two strings written by the server . The strings are printed by the client in the console. The problem starts here; once the read strings are printed ,I mean, after the loop, there are other System.out.println in the client but the console doesnt print anything . It curious that only when I comment on the server code the line that says: "br.readLine()" just before the catch, the client prints all the System.out.println after the loop but why?
    Here is the code:
    Server code:
    public class MyServerSocket {
    public MyServerSocket() {
    try{
    ServerSocket server= new ServerSocket(2000);
    System.out.println("servidor iniciado");
    Socket client=server.accept();
    System.out.println("Client connected");
    OutputStream os=client.getOutputStream();
    PrintWriter pw= new PrintWriter(os);
    String cadena1="cadena1";
    String cadena2="cadena2";
    pw.println(cadena1);
    pw.println(cadena2);
    pw.flush();
    InputStream is=client.getInputStream();
    InputStreamReader isr= new InputStreamReader(is);
    BufferedReader br= new BufferedReader(isr);
    br.readLine(); //If a comment this line, the client prints after the loop, all the System.out....
    catch (IOException e) {
    // TODO: handle exception
    public static void main(String[] args) {
    new MyServerSocket
    Client code:
    public class MyClientSocket {
    public MyClientSocket () {
    try{
    Socket client= new Socket("localhost",2000);
    InputStream is=client.getInputStream();
    InputStreamReader isr= new InputStreamReader(is);
    BufferedReader br= new BufferedReader(isr);
    String read;
    while((read=br.readLine())!=null){
    System.out.println(read);
    //These messages are not printed unless I comment the line I talked about in the server code
    System.out.println("leido");
    System.out.println("hola");
    }catch (IOException e) {
    public static void main(String[] args) {
    new MyClientSocket
    }

    You are right but with this program the loop ends. As you see, the first class, the Server, writes to the socket one text file. The second class, the client, reads the text file in his socket written by the server and writes it to a file in his machine.
    NOTE: The loop in the client ends and the server doesnt make any close() socket or shutdownOutput() .
    public class ServidorSocketFicheromio {
         public ServidorSocketFicheromio() {
    try{
         ServerSocket servidor= new ServerSocket(2000);
         System.out.println("servidor iniciado");
         Socket cliente=servidor.accept();
         System.out.println("cliente conectado");
         OutputStream os=cliente.getOutputStream();
         PrintWriter pw= new PrintWriter(os);
         File f = new File("c:\\curso java\\DUDAS.TXT");
         FileReader fr= new FileReader(f);
         BufferedReader br= new BufferedReader(fr);
         String leido;
         while((leido=br.readLine())!=null){
              pw.println(leido);
         pw.flush();
         }catch (IOException e) {
         * @param args
         public static void main(String[] args) {
              new ServidorSocketFicheromio();
    public class ClienteSocketFicheromio {
         public ClienteSocketFicheromio() {
    try{
         Socket cliente= new Socket("localhost",2000);
         File f = new File("G:\\pepe.txt");
         FileWriter fw= new FileWriter(f);
         PrintWriter pw= new PrintWriter(fw);
         InputStream is=cliente.getInputStream();
         InputStreamReader isr= new InputStreamReader(is);
         BufferedReader br= new BufferedReader(isr);
         String leido;
         while((leido=br.readLine())!=null){
              pw.println(leido);
              System.out.println(leido);
              System.out.println("leido");
              System.out.println("hola");
              pw.flush();
         }catch (IOException e) {
         public static void main(String[] args) {
         new ClienteSocketFicheromio();/
    }

  • Problems with sockets and InputsStreams

    Hi,
    I ve this code:
    InputStream is = null;
    boolean ok=true;
    while(ok){
    //sc is an object instance of socketConnection
    is = sc.openInputStream();
    return this.parse(is);
    //is.close();
    return "";
    and this exception is produced:
    java.io.IOException: no more Input Streams available.
    This exception is produced in the line:
    is = sc.openInputStream();
    I m connecting to a server and this server sends data throw a socket... but the problem is that when i m reading from this socket and this socket doesn t have data in it...
    how could i solve this problem...?
    Thanks,
    Diego

    That would be the "real" code:
    public String process()throws IOException{
    InputStream is = null;
    is = sc.openInputStream();
    String result= this.parse(is);
    is.close();
    any suggestions?
    Thanks,
    Diego

  • Introduction of flow control and synchronization steps in Test Description

    Hi ALL,
              I am working on developing of Test Scripts in ATML standards. Can any one inform me how to introduce flow control (if, else, end, for, while, break etc)  and synchronization (wait etc) steps into the Test scripts. Thanks in advance.
    With Best Regards,
    Kalyan 

    I had a similar issue in a project I am working on. I'm not sure if I did this the "Best Practices" way or not, but it works perfectly.
    In the head area of my JSP I include the following:
    <f:view>
        <h:outputText id="refresher1" rendered="#{queryHandler.queryRunning}">
            <f:verbatim escape="false">
                <meta http-equiv="refresh"
                      content="5,<%=response.encodeURL(request.getContextPath()+
                              "/queryStatus.jsf")%>">
            </f:verbatim>
        </h:outputText>
        <h:outputText id="refresher1" rendered="#{queryHandler.queryFinishedRunning}">
            <f:verbatim escape="false">
                <meta http-equiv="refresh"
                      content="5,<%=response.encodeURL(request.getContextPath()+
                              "/queryResults.jsf")%>">
            </f:verbatim>
        </h:outputText>This puts a 5 second refresh meta in the header to direct the browser to the correct page based on the status of the query thread.
    There are many ways to accomplish the effect you want. I suggest putting all the controls into the JSP and making use of the rendered attributes instead of the JSTL conditionals to show the controls you want for the state of the application.
    -jeffhoward

  • XSQL and basic flow control

    Hello again,
    Is there any mean to execute more that one time the same XSQL action-element, like this (future XSQL version?):
    <xsql:for-each test="{@selectedITEMS}">
    <xsql:dml>
    DELETE FROM ITEMS
    WHERE ItemID = {.}
    </xsql:dml>
    </xsql:for-each>
    Yes the duty can still be transferred outside XSQL, in the form of a DB proc or a custom action-element, but if some form of basic flow control exists/ed here inside XSQL, this would certainly come in handy!
    Thanks
    JRoch

    A simple way to do this would be to write an action handler that processes the value of the "selectedITEMS" parameter and sets a page-private parameter to the equivalent value with commas between them, then do:
    <xsql:dml>
    delete from items
    where ItemId IN ({@ListOfLitems})
    </xsql:dml>
    then you do it all in one trip to the database.

  • Difference between STATIC and FLOW CONTROL in IKM

    Hello,
    Can someone explain the difference between STATIC and FLOW control in IKM ? What is the best situation to use them with some example ?
    Can we have more than one ODI Constraint at the target table.
    Thanks
    Edited by: cdmnagaraj on 19-Oct-2008 21:59

    Hi Nagaraj,
    Suppose your Lookup table -> column "VALUE" is 101.
    How many rows in your source table (column) have "Balance" = 101 ??
    I hope only One.
    From your Source table all the recors will be moved to your I$ . then from your I$ it will check for the condition
    and all the violated records will be moved to your E$
    please check your "Insert CK Errors" from your operator
    it will be like this....
    insert into E$_TargetTable
         ERR_TYPE,
         ERR_MESS,
         CHECK_DATE,
         ORIGIN,
         CONS_NAME,
         CONS_TYPE,
         col1,
         col2,
         balance
    select
         'F',
         sysdate,
         '(3367100)TESTPROJECTS.TestTable',
         'conditionTest',
         'CK',     
         col1,
         col2,
         balance
    from     I$_TargetTable CHI
    where     not      (
              Balance = (Select value from LOOKUP)
    So in your case it will check for balance not equal to 101 . and it will push those records into your E$ table
    Rathish

Maybe you are looking for

  • Palm! Where can I find a fully-functional Pre Plus????

    Yes, I've posted this in a sub-topic and now I'm creating a new thread because I've had enough!  I once considered myself a big time Palm supporter - but I do not know how much more I can keep my head up with this Pre Plus. I'm spending WAY too much

  • How to Increase my retention period using RMAN

    I believe 7 days of backup is enough for me in case of emergency. Can I do this? CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS; For now, it is: RMAN> show all 2> ; RMAN configuration parameters are: CONFIGURE RETENTION POLICY TO REDUNDANCY

  • What type of DVD burns on a Mac  r or -r?

    Need to know what type of DVD to purchase to burn a movie.  DVD+R or DVD-R for a Mac.

  • I've set up iCloud and now have got guest user - what is that and why

    I have set up my iCloud account and now have got a guest user on my iMac - what is that and why have I got it? What happens if I find a way of taking that off the 'introduction screen'? Any help or advice most welcome. Rodney

  • Advanced Lightning Bug?

    Hi guys, Anyone else having this trouble with the Advanced Lightning effect? I understand the Direction property is contextual based on the Lightning type selected, so its name could be 'Direction' or 'Outer Radius' depending on which you select. How