Threads as Socket Readers

What does mean by Socket Readers?
How it improves the performance of Application by configuring percentage of threads as socket readers?
Can someone please answer my questions?

Hi Achhi,
Socket Reader Threads are the Threads which are responsible for reading the incoming request data. We can divide the Socket reader threads in two categories:
Pure Java Socket Reqders: The pure-Java socket reader implementation, where the socket reader threads continually poll all opened sockets to determine whether they contain data to be read, even if the sockets have no data to read. (From Performance Point This is Not Good that the Sockets will be in Opened Mode even if there is no Data to read)
Native Socket Readers: (These are the Dafault Socket Readers) The native IP socket reader provided by the host machine's operating system, where the socket reader threads target only active sockets that contain data to be read. Native socket readers never poll sockets because they are immediately notified when a socket needs to be serviced. For Better Performance You should always prefer using Native Socket Readers.
To Enable Native Socket Readers You can Login to AdminConsole--->Servers ---><SERVER_NAME>--->configuration (Tab)--->Tuning (SubTab)---> "Enable Native IO" (This checkbox must be checked)
Still If you want to use the Java Socket Readers .... still you can improve the performance of socket communication by configuring the proper number of socket reader threads for each server instance. For best performance, the number of socket reader threads in WebLogic Server should equal the potential maximum number of opened sockets.
Thanks
Jay SenSharma
http://weblogic-wonders.com/weblogic (WebLogic Wonders Are here)

Similar Messages

  • Identifying Execute Queue Threads as Socket Readers

    Hi All,
    Preface: I am trying to identify at any given instance the percentage of
    socket reader threads that are in use - this will help me to identify when
    all threads are in use and unable to service user requests. Thus my goal is
    to identify threads that are socket readers and whether they are active or
    idle.
    Through JMX I can obtain an instance of each
    weblogic.management.runtime.ExecuteThread, which lists the same information
    that you see in the console if you drill down to the thread level, for
    example:
    mydomain> Servers> myserver> Active Execute Queues> default> Execute Threads
    That information includes:
    - thread number
    - total requests
    - last request
    - current request
    - transaction
    - user
    - is the thread idle?
    Now my question is from this information can you identify which of these
    threads are being used as socket readers?
    Here are some excerpts from my JMX calls:
    Name: ExecuteThread: '0' for queue: 'default'
    Execute Queue Runtime Name: default
    Current Request: null
    Last Request: Http Request: /bookstore/en/authors/showauthors.jsp
    User: null
    Is Idle?: true
    Name: ExecuteThread: '15' for queue: 'default'
    Execute Queue Runtime Name:default
    Current Request: null
    Last Request: Scheduled Trigger
    User: null
    Is Idle?: true
    Name: ExecuteThread: '26' for queue: 'default'
    Execute Queue Runtime Name:default
    Current Request: null
    Last Request: ListenRequest for a new connection on: 'Socket
    addr=127.0.0.1,port=2061,localport=7001]'
    User: null
    Is Idle?: true
    Name: ExecuteThread: '59' for queue: 'default'
    Execute Queue Runtime Name:default
    Current Request: Socket Reader Request
    Last Request:
    weblogic.transaction.internal.ServerCoordinatorDescriptor$2@138786
    User: null
    Is Idle?: false
    It would appear that the "ListenRequest" last request would identify a
    socket reader, only I have 60 threads in my default execute queue with 70%
    dedicated to socket readers and the number of threads that say their last
    request was "ListenRequest ..." is only 5.. Furthermore there is only one
    "Socket Reader Request" identified thread.
    Are threads identified as socket readers permanently or constantly reused
    for whatever purpose is required (with a cap of use based off of the socket
    reader perspective)?
    Thanks in advance for your help!
    Steve

    Hi Achhi,
    Socket Reader Threads are the Threads which are responsible for reading the incoming request data. We can divide the Socket reader threads in two categories:
    Pure Java Socket Reqders: The pure-Java socket reader implementation, where the socket reader threads continually poll all opened sockets to determine whether they contain data to be read, even if the sockets have no data to read. (From Performance Point This is Not Good that the Sockets will be in Opened Mode even if there is no Data to read)
    Native Socket Readers: (These are the Dafault Socket Readers) The native IP socket reader provided by the host machine's operating system, where the socket reader threads target only active sockets that contain data to be read. Native socket readers never poll sockets because they are immediately notified when a socket needs to be serviced. For Better Performance You should always prefer using Native Socket Readers.
    To Enable Native Socket Readers You can Login to AdminConsole--->Servers ---><SERVER_NAME>--->configuration (Tab)--->Tuning (SubTab)---> "Enable Native IO" (This checkbox must be checked)
    Still If you want to use the Java Socket Readers .... still you can improve the performance of socket communication by configuring the proper number of socket reader threads for each server instance. For best performance, the number of socket reader threads in WebLogic Server should equal the potential maximum number of opened sockets.
    Thanks
    Jay SenSharma
    http://weblogic-wonders.com/weblogic (WebLogic Wonders Are here)

  • Identifying Execute Threads as Socket Readers

    Hi All,
    Preface: I am trying to identify at any given instance the percentage of
    socket reader threads that are in use - this will help me to identify when
    all threads are in use and unable to service user requests. Thus my goal is
    to identify threads that are socket readers and whether they are active or
    idle.
    Through JMX I can obtain an instance of each
    weblogic.management.runtime.ExecuteThread, which lists the same information
    that you see in the console if you drill down to the thread level, for
    example:
    mydomain> Servers> myserver> Active Execute Queues> default> Execute Threads
    That information includes:
    - thread number
    - total requests
    - last request
    - current request
    - transaction
    - user
    - is the thread idle?
    Now my question is from this information can you identify which of these
    threads are being used as socket readers?
    Here are some excerpts from my JMX calls:
    Name: ExecuteThread: '0' for queue: 'default'
    Execute Queue Runtime Name: default
    Current Request: null
    Last Request: Http Request: /bookstore/en/authors/showauthors.jsp
    User: null
    Is Idle?: true
    Name: ExecuteThread: '15' for queue: 'default'
    Execute Queue Runtime Name:default
    Current Request: null
    Last Request: Scheduled Trigger
    User: null
    Is Idle?: true
    Name: ExecuteThread: '26' for queue: 'default'
    Execute Queue Runtime Name:default
    Current Request: null
    Last Request: ListenRequest for a new connection on: 'Socket
    addr=127.0.0.1,port=2061,localport=7001]'
    User: null
    Is Idle?: true
    Name: ExecuteThread: '59' for queue: 'default'
    Execute Queue Runtime Name:default
    Current Request: Socket Reader Request
    Last Request:
    weblogic.transaction.internal.ServerCoordinatorDescriptor$2@138786
    User: null
    Is Idle?: false
    It would appear that the "ListenRequest" last request would identify a
    socket reader, only I have 60 threads in my default execute queue with 70%
    dedicated to socket readers and the number of threads that say their last
    request was "ListenRequest ..." is only 5.. Furthermore there is only one
    "Socket Reader Request" identified thread.
    Are threads identified as socket readers permanently or constantly reused
    for whatever purpose is required (with a cap of use based off of the socket
    reader perspective)?
    Thanks in advance for your help!
    Steve

    Hi Achhi,
    Socket Reader Threads are the Threads which are responsible for reading the incoming request data. We can divide the Socket reader threads in two categories:
    Pure Java Socket Reqders: The pure-Java socket reader implementation, where the socket reader threads continually poll all opened sockets to determine whether they contain data to be read, even if the sockets have no data to read. (From Performance Point This is Not Good that the Sockets will be in Opened Mode even if there is no Data to read)
    Native Socket Readers: (These are the Dafault Socket Readers) The native IP socket reader provided by the host machine's operating system, where the socket reader threads target only active sockets that contain data to be read. Native socket readers never poll sockets because they are immediately notified when a socket needs to be serviced. For Better Performance You should always prefer using Native Socket Readers.
    To Enable Native Socket Readers You can Login to AdminConsole--->Servers ---><SERVER_NAME>--->configuration (Tab)--->Tuning (SubTab)---> "Enable Native IO" (This checkbox must be checked)
    Still If you want to use the Java Socket Readers .... still you can improve the performance of socket communication by configuring the proper number of socket reader threads for each server instance. For best performance, the number of socket reader threads in WebLogic Server should equal the potential maximum number of opened sockets.
    Thanks
    Jay SenSharma
    http://weblogic-wonders.com/weblogic (WebLogic Wonders Are here)

  • Error message when access WLS: active sockets and socket readers configuration

    Hi,
    I got the following error when I tried to access the WLS using a program to get
    the mbeans data.
    This error happens when I have 3 or more servers running ( 1 admin server, 2 or
    more managed servers). With cluster with more than 2 servers running, this error
    also occurs.
    <Sep 10, 2001 8:35:01 PM CDT> <Warning> <JavaSocketMuxer> <There are: '3' active
    sockets, but the maximum number of socket readers allowed by theconfiguration
    is: '2', you may want alter your configuration.>
    I creased the socket readers from 33% to 66%, but I still got the same error.
    I'm using WLS version 6.0 sp2
    My configuration is:
    Execute Threads = 15,
    Socket Readers = 33% or 66%
    Does anyone know how to fix this ? I am really appreciate for any suggestions.
    thanks,
    Kieu

    thank you, I just found out about setting those sockets using command line options
    an hour ago. But thanks a lot.
    -Kieu
    Kaye Wilcox <[email protected]> wrote:
    Kieu,
    You could try increasing the number of execute threads, you can do this
    via
    the admin console on the <server> --> Tuning tab.
    See http://edocs.bea.com/wls/docs60/perform/WLSTuning.html#1104317 for
    guidelines on setting the thread pool size and the number of socket readers.
    Here is a link that talks about socket communication in a cluster
    http://edocs.bea.com/wls/docs60/cluster/features.html#1007001.

  • Error message on active sockets & socket readers configuration

     

    hi Kieu,
    I am having the same problem. Were you able to figure out why you had that
    problem and how you resolved that issue. I am seeing slow performance on client
    as well. I am assuming this could be the reason for slow performance.
    thanks,
    Zeeshan.
    "Kieu Tram" <[email protected]> wrote:
    >
    Hi,
    I got the following error when I tried to access the WLS using a program
    to get
    the mbeans data.
    This error happens when I have 3 or more servers running ( 1 admin server,
    2 or
    more managed servers). With cluster with more than 2 servers running,
    this error
    also occurs.
    <Sep 10, 2001 8:35:01 PM CDT> <Warning> <JavaSocketMuxer> <There are:
    '3' active
    sockets, but the maximum number of socket readers allowed by theconfiguration
    is: '2', you may want alter your configuration.>
    I creased the socket readers from 33% to 66%, but I still got the same
    error.
    I'm using WLS version 6.0 sp2
    My configuration is:
    Execute Threads = 15,
    Socket Readers = 33% or 66%
    Does anyone know how to fix this ? I am really appreciate for any suggestions.
    thanks,
    Kieu

  • Increasing Weblogic client Socket Readers etc

    How can you increase the number of socket readers on a client
    application which
    uses JMS, EJB and talks to multiple WLAS servers.
    I get the following message
    Muxer> <There are: '3' active sockets, but the maximum number of socket
    readers allowed by theconfiguration is: '2', you may want alter your
    configuration.>
    But I cant find out how to increase the socket readers or better yet can
    I use the native IO for Solaris and NT clients??

    Hi,
    You can control the number of threads and the precent of socket readers
    through the properties: weblogic.ThreadPoolSize and
    weblogic.ThreadPoolPercentSocketReaders. You would have to pass them to the
    jvm machine at startup for example:
    -Dweblogic.ThreadPoolSize=10 -Dweblogic.ThreadPoolPercentSocketReaders=50
    Guy
    "Larry Presswood" <[email protected]> wrote in message
    news:[email protected]..
    How can you increase the number of socket readers on a client
    application which
    uses JMS, EJB and talks to multiple WLAS servers.
    I get the following message
    Muxer> <There are: '3' active sockets, but the maximum number of socket
    readers allowed by theconfiguration is: '2', you may want alter your
    configuration.>
    But I cant find out how to increase the socket readers or better yet can
    I use the native IO for Solaris and NT clients??

  • Java client socket readers

              I'm running a cluster of 3 WL 6.0 servers and when I do a JNDI lookup to run methods
              on a remote interface stub on the client side it gives me the following:
              <Apr 26, 2001 2:16:34 PM MST> <Warning> <JavaSocketMuxer> <There are: '3' active
              sockets, but the maximum number of socket readers allowed by theconfiguration
              i
              s: '2', you may want alter your configuration.>
              I re-ran my client with the two following properties:
              -Dweblogic.system.executeThreadCount=5
              -Dweblogic.system.percentSocketReaders=60
              it still gives me the exception. How do I get this to work properly so I have
              as many socket readers as servers?
              Thanks in advance.
              

    Thanks,
              I had understood this wrong, I was configuring on the server, not the client
              application,
              it's all working well now.
              Cheers
              Sioux
              "Kumar Allamraju" <[email protected]> wrote in message
              news:[email protected]...
              > i.e. if percentSocketReaders = 50, and execute Threadcount is 20, 50% of
              20 = x?
              >
              > you will get x percentSocketReaders. You might want to tune this value ,
              > according to the above
              > formula.
              >
              >
              > Sioux France wrote:
              >
              > > Hi,
              > > I'm getting these errors too. I've enabled native IO, upped the number
              of
              > > Threads to 20 and the percentage of readers to 50% but I still get the
              error
              > > about 3 active sockets when I am only allowed 2 in a cluster of 3
              servers.
              > > Did you resolve this?
              > > Thanks
              > > Sioux
              > >
              > > "Kumar Allamraju" <[email protected]> wrote in message
              > > news:[email protected]...
              > > > The following syntax was correct in 510. , not in 60 anymore.
              > > > I would suggest you to increase the execute Thread count & percent
              socket
              > > readers from
              > > > console.
              > > >
              > > > or else set the following from the command line.
              > > > -Dweblogic.ThreadPoolPercentSocketReaders
              & -Dweblogic.ThreadPoolSize..
              > > (i'm not 100%
              > > > sure)
              > > > --
              > > > Kumar
              > > >
              > > > "W. Wen" wrote:
              > > >
              > > > > I'm running a cluster of 3 WL 6.0 servers and when I do a JNDI
              lookup to
              > > run methods
              > > > > on a remote interface stub on the client side it gives me the
              following:
              > > > >
              > > > > <Apr 26, 2001 2:16:34 PM MST> <Warning> <JavaSocketMuxer> <There
              are:
              > > '3' active
              > > > > sockets, but the maximum number of socket readers allowed by
              > > theconfiguration
              > > > > i
              > > > > s: '2', you may want alter your configuration.>
              > > > >
              > > > > I re-ran my client with the two following properties:
              > > > >
              > > > > -Dweblogic.system.executeThreadCount=5
              > > > > -Dweblogic.system.percentSocketReaders=60
              > > > >
              > > > > it still gives me the exception. How do I get this to work properly
              so I
              > > have
              > > > > as many socket readers as servers?
              > > > >
              > > > > Thanks in advance.
              > > >
              >
              

  • Socket Readers

    Currently using WebLogic 6.1 SP2 on Win NT 4.0 with jdk 1.3.1. 2 servers in a cluster.
    The following message is seen.
    <ExecuteThread: '10' for queue: 'default'> <> <> <000000> <There are: '7' active
    sockets, but the maximum number of socket readers allowed by the configuration
    is: '6', you may want to alter your configuration.>
    How do we ensure our configuration is correct? Whenever this message is seen and
    the servers need to start. If we do not restart them, after a while they will
    hang and we need to restart them. Is there any way to resolve this issue? Thanks.

    Hi,
    Thanks for your info on Native IO.
    There is a JVM error message thrown when we are trying to do the thread dump.
    From the JDK website, we realise it is a bug for jdk 1.3.1. Thanks.
    Regards,
    Ai Ling
    Arunabh Hazarika <[email protected]> wrote:
    When native i/o is used, there are a fixed number of threads that are
    dedicated to reading
    incoming requests from clients. These threads are non-blocking i.e. they
    do not block
    waiting for data to arrive at a socket. When using Java i/o, the threads
    block waiting for
    data to arrive at a socket. In this case, if the number of sockets opened
    is greater than
    the number of threads available to read them, data on the remaining sockets
    will remain
    unread, until a thread becomes available to read it and response time
    will increase. This is
    basically what the message means.
    It is not surprising that performance has degraded by turning off native
    i/o. The message is
    not the problem - turning off native i/o is.
    I do not recall there being a problem with taking thread dumps with JDK
    1.3.1 - what
    indicates that the thread dump is not complete?
    Arunabh
    apple wrote:
    Hi Arunabh,
    Is this message critical? As we encounter this message, the server'sperformance
    is very slow. Without this message, the access to the server is muchfaster. We
    will like to know whether we can ignore this message or this messagehas any implication
    to our servers.
    As for your proposal to enable the native io and take thread dump,we have already
    done that. But due to our jdk version used, we are not able to getthe full thread
    dump.
    Thanks.
    Regards,
    apple
    Arunabh Hazarika <[email protected]> wrote:
    To answer your second message first, yes, this message comes when
    native
    i/o is
    disabled. For the first problem, I am not sure how disabling nativeio
    would help
    resolve a server hang - Please take a thread dump when the serverhangs
    with native
    i/o enabled and post it here.
    Thanks,
    Arunabh
    apple wrote:
    Hi Arunabh,
    Our application server will use up the threads very fast and not
    releasing
    them
    after usage, causing our servers to hang once we enable native io.Thus we have
    no choice but to disable the native io. Is there any resolution
    for
    this? Is it
    due to we disable native io which cause the following message to
    appear?
    <ExecuteThread: '10' for queue: 'default'> <> <> <000000> <Thereare:
    '7' active
    sockets, but the maximum number of socket readers allowed by the
    configuration
    is: '6', you may want to alter your configuration.>
    Thanks for your prompt reply.
    Regards,
    Apple
    Arunabh Hazarika <[email protected]> wrote:
    It looks like you have native io disabled. Is there a reason why?
    Arunabh
    apple wrote:
    Currently using WebLogic 6.1 SP2 on Win NT 4.0 with jdk 1.3.1.
    2
    servers
    in a cluster.
    The following message is seen.
    <ExecuteThread: '10' for queue: 'default'> <> <> <000000> <There
    are:
    '7' active
    sockets, but the maximum number of socket readers allowed by
    the
    configuration
    is: '6', you may want to alter your configuration.>
    How do we ensure our configuration is correct? Whenever this
    message
    is seen and
    the servers need to start. If we do not restart them, after a
    while
    they will
    hang and we need to restart them. Is there any way to resolve
    this
    issue? Thanks.

  • Using Threads And Sockets

    Hello,
    I want to create a program that can send 2 or more files through the socket to the same client at the same time. Is it possible? I am trying to use threads to do this but I am not sure what to do in those threads. Should I send the socket to the thread class and create BufferedReader and DataOutputStream again in the thread?
    Also should I create threads in the client-side?
    Thanks
    Edited by: bcaputcu on May 18, 2010 2:19 AM

    bcaputcu wrote:
    Hello,
    I want to create a program that can send 2 or more files through the socket to the same client at the same time. Is it possible?No. At least not in the way you're thinking.
    I am trying to use threads to do this but I am not sure what to do in those threads. Should I send the socket to the thread class and create BufferedReader and DataOutputStream again in the thread?No, because you can't do that. The socket won't create multiple streams for your threads.
    Also should I create threads in the client-side?No.
    You need to send the files one at a time. While you could basically send the data interleaved, it would still only involve only one thread, one socket and one set of streams. And it would be a silly thing to do.

  • Increasing max number of socket readers on client

    How can you increase the number of socket readers on a client
              application which
              uses JMS, EJB and talks to multiple WLAS servers.
              I get the following message
              Muxer> <There are: '3' active sockets, but the maximum number of socket
              readers allowed by theconfiguration is: '2', you may want alter your
              configuration.>
              But I cant find out how to increase the socket readers or better yet can
              I use the native IO for Solaris and NT clients??
              

    Try to use the WebItem Parameter "MAX_TEXT_LINES":
    <object>
    <param name="OWNER" value="SAP_BW"/>
    <param name="CMD" value="GET_ITEM"/>
    <param name="NAME" value="DOCUMENT_1"/>
    <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_DOC"/>
    <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
    <b><param name="MAX_TEXT_LINES" value="50"/></b>
    ITEM:            DOCUMENT_1
    </object>

  • Increasing socket readers in client program

    I am trying to connect to multiple Weblogic servers from a single client at
    the same time and get the following message:
    <Sep 14, 2001 10:21:15 AM CDT> <Warning> <JavaSocketMuxer> <There are: '3'
    active
    sockets, but the maximum number of socket readers allowed by
    theconfiguration is
    : '2', you may want alter your configuration.>
    How do I change the configuration in my client so I can have more the two
    connections.
    Thanks,
    Jim Anderson

    java -Dweblogic.ThreadPoolSize=15 -Dweblogic.ThreadPoolPercentSocketReaders= 75
    (means 75% of ThreadPoolSize)
    -classpath %classpath%;. etc...
    James Anderson wrote:
    I am trying to connect to multiple Weblogic servers from a single client at
    the same time and get the following message:
    <Sep 14, 2001 10:21:15 AM CDT> <Warning> <JavaSocketMuxer> <There are: '3'
    active
    sockets, but the maximum number of socket readers allowed by
    theconfiguration is
    : '2', you may want alter your configuration.>
    How do I change the configuration in my client so I can have more the two
    connections.
    Thanks,
    Jim Anderson

  • I need to multiplex communication between threads and sockets

    Hello,
    I need to implement a server which will have a maximum of 10 clients connected.
    I wanted to go for classic blocking I/O because I won't have much clients.
    My problem is that even if I accept() some sockets and then create a thread for each socket,
    then I still need to communicate some data to the other threads, problem is that I am blocked
    on the read() operation, how could I address this problem?
    I mean, lets say I am thread1 and blocked on read() on my socket, now thread7 wants to tell
    me something like a chat message coming from client he handles, how could thread7 manage
    to wake thread1 and send him a message somehow?
    I do not want to deal with NIO stuff if possible because I do not need to scale, I just have a
    problem because I am stuck on the read.
    I will run on Windows.
    Thanks for help.
    Edited by: Marzullo on Jul 15, 2010 1:05 PM

    Marzullo wrote:
    Hello,
    I need to implement a server which will have a maximum of 10 clients connected.
    I wanted to go for classic blocking I/O because I won't have much clients.
    My problem is that even if I accept() some sockets and then create a thread for each socket,
    then I still need to communicate some data to the other threads, problem is that I am blocked
    on the read() operation, how could I address this problem?For small apps like that, I've found it helpful to have two threads per socket: 1 reader and 1 writer. The reader can block on read() 99% of the time, while the writer is blocked on LinkedBlockingQueue.take() 99% of the time (or Object.wait() depending). The writer's queue is populated from the outside with whatever messages are destined to that socket.
    I mean, lets say I am thread1 and blocked on read() on my socket, now thread7 wants to tell
    me something like a chat message coming from client he handles, how could thread7 manage
    to wake thread1 and send him a message somehow?If thread1 is blocked on read() then it will receive any data that was sent to it, there's no need to wake it up because it gets what it's been waiting for (data on the input stream). Thread7 just needs to write data to the socket's output stream and the other end wakes up automatically because read() only blocks until data is available.

  • This is very important... It concerns topics of threads and sockets...

    Hey...
    This has been very complicating for me.
    I have tried so many solutions for the past
    few days but i have been stuck here with no
    no things to think of. I would really appreciate if someone
    can help me out in doing this or any suggestions.
    Now this is the case..
    My program runs a frame with an "OPEN" menuitem
    a connect button ,upload button, a porgress bar and a progress text label near it.... In the open u choose a file that u want to upload. In the connect u choose the IP address that u need to Upload the chosen file to. And in the upload, u start uploading u're file. Now i am using sockets to connect through my machine and the chosen IP address. The progress bar should note the process of uploading and accordingly get's updated...The progress text label should either say "No String" or "Uploading" when i'm uploading as well as blinking on and off....
    Now i got through almost all of the stuff above, i'm only stuck in updating the progress bar and the text. To make things more clearer i will include the upgrade method that i do the connection and start sending the stuff. In there i've also created a thread to update the bar but for now, i only set the value to 10.... The thing is it never updates the bar unless the whole process of downloading is done. The file chosen to be uploaded is about 1MG and it takes about 40secs to send the whole file to another machine.....
    I've also tried using seperate threads in different classes
    but it never worked..
    NOW THE PROGRESS BAR HAS BEEN DECLARED IN THE
    PROGRAM AS JProgressBar. What i'm suppose to do is
    read the file in 29 bytes. Then send 15 and then 14.
    Once i'm less than 29 bytes i send either 15 or 14 or
    the remainder... The sendMsg method is the one that
    handles sending the bytes and receiving the
    acknowledgment. The socket is created when i hit the
    connect button and choose the IP address...
    Please any extra suggestion is appreciated.
    /CODE/
    public void UpgradeActionPerformed(ActionEvent e)
    final Runnable doprogressValue = new Runnable()
    public void run()
    jProgressBar.setValue(10);
    Thread appThread = new Thread()
    public void run()
    try
    SwingUtilities.invokeAndWait(doprogressValue);
    catch (Exception ex)
    ex.printStackTrace();
    try
    DataInputStream inputStream = new DataInputStream(new FileInputStream(fileName));
    //Send Set to DownLoad Moad message
    byte[] msg = new byte[MaxMessageSize];
    msg[0]=(byte)((SystemSpecific<<4) | (DataCounter));
    msg[1]=FirmWareDNLMode;
    returnVal=sendMsg(msg, rcvMsg);
    if(returnVal == false)
    return;
    //Set Progress Bar Max & Min values
    jProgressBar.setMinimum(0);
    jProgressBar.setMaximum(inputStream.available());
    while((inputStream.available()) >= MaxMessageRead)
    bytesRead = inputStream.read(mainBuffer,offset,MaxMessageRead);
    //Send First 15 Bytes
    returnVal=sendMsg(msg, rcvMsg);
    if(returnVal == false)
    return;
    //Send Next 14 Bytes
    returnVal=sendMsg(msg, rcvMsg);
    if(returnVal == false)
    return;
    //Send The 15 Bytes Left
    returnVal=sendMsg(msg, rcvMsg);
    if(returnVal == false)
    return;
    //Send The 14 Bytes Left
    returnVal=sendMsg(msg, rcvMsg);
    if(returnVal == false)
    return;
    //Send The Remainder Bytes
    returnVal=sendMsg(msg, rcvMsg);
    if(returnVal == false)
    return;
    //Send Set to Reset Mode
    returnVal=sendMsg(msg, rcvMsg);
    if(returnVal == false)
    return;
    inputStream.close();
    socket.close();
    connectionStatus.setText("Not Connected");
    fileStatus.setText("Loading completed");
    upgradeButton.setEnabled(false);
    connectButton.setEnabled(false);
    catch(NullPointerException null_ex)
    JOptionPane.showMessageDialog(null,"Connection Not Created","Error",JOptionPane.ERROR_MESSAGE);
    catch(IOException IO_ex)
    IO_ex.printStackTrace();
    appThread.start();
    /CODE/

    Yeah... i dide finally figure out a way doing it.... This is how i did it....
    /CODE/
    // This is all going to be under the upload action...
    {//beggining of the uplaod action
    finally Runnable doProgressVal = new Runnable()
    public void run()
    time.start();//This is an instance of class timer that i
    // created. It actually sets the value of
    // of the progressBar to the latest upload
    Thread mainThread = new Thread()
    public void run()
    SwingUtilities.invokeAndWait(doprogressVal);
    do the uploading of the file to the specified server
    mainThread.start
    }//end of upload action
    /CODE/
    Hope this help if u want it for something. It works fine..

  • Using thread and socket connection with other machines

    Hi all!
    we are using weblgoic 5.1 SP9 JDK1.2.2
    we already using java.net.Socket and java.lang.Thread
    to communication TANDEM Machine on the weblogic.
    the reason why we use to socket and thread even though it is not
    recommanded is that below
    1. once we connect Socket, then we using until server shutdown or
    connection may has the problem, so we're using thread to wait
    java.io.Inputstream to read from socket.(if I using EJB, It can't
    wait socket inputstream indefinetly, because it has timeout)
    2. we're logging Database date sent or received with TANDEM Machine.
    so we need Database Access. so we using Database Access
    thru Weblogic.
    3. EJB Application using (other EJB Application - send Module)
    to send data to TANDEM Machine. So "Send Module" should
    be implemented EJB.
    but. Now I see there might be problem this framework.
    so, is there some way by just using J2EE spec, to implement this kind of
    framework.
    wait for your great help !!
    regards.

    Yes i've tried interrupt method and it doesn't have any effects on the thread... it stay in connect() method...
    And for the timeouts, in fact i use an API : J2SSH, to connect with SSH protocol, and the setting of connection timeouts is not implemented yet... and the default timeout is about 4 minutes...
    so i don't know how to solve this problem...

  • T Box: help with coaxial vs threaded wall socket issue

    Hi there! Hope someone out there can help me or point me in the right direction! I purchased a T Box Entertainer Bundle for my new rental residence, and after moving in yesterday I received my T Box today. All excited about plugging in the T Box and catching up on some viewing from the past few days, but it seems that while my new place has a TV connection, it is not the standard coaxial type! Arrrggghhhh! There is the usual phone connection attached to the wall, and beneath that a wall plate branded with Telstra (upside down!) and instead of the usual coaxial connection there is a threaded socket with a small female pin port. Just to satisfy my own curiosity I did try and plug the coaxial cable which came with the T Box to the socket, but obviously it doesn't fit either with male or female connections. A bit of slow online searching later (I also don't have my internet or landline connected as yet, and am in a mobile blackspot to compound the problem) and I am pretty sure what I have in the wall is actually a cable or Foxtel connection. From what I've read, if I get an adapter I will still need to get the whole thing rewired to an antenna...is this correct? Or is it possible that as the T Box has Foxtel anyway that either an adapter or a different cable would work?Or is this something that the tech can do when they come out to connect my landline and ADSL2+? Fingers crossed there is a reasonable solution to this as with being in a rental my options are limited!Many thanks in advance to you all.

    AlanM52 wrote:
    That wall plate is for Foxtel – not FTA. You will not be able to get BigPond cable in that complex. DIY I would look at smaller caravan type antenna (window/balcony) and some cable. Not long ago ALDI were selling “active” indoor antennas for about $30-40 bucks, if you can get one and no-go just return.Thanks Alan...but if that is the case, why doesn't Foxtel have any history over the past 6 years of anyone ever having Foxtel in this unit? The wall plate is not Foxtel branded, but Telstra branded. The complex is probably 50 years old, but the reno is a lot more recent - say, a couple of years maximum. Also, Foxtel are telling me that only a couple of people in the last 6 years have ever had Foxtel anywhere in the entire 40-odd apartment complex which is over two separate buildings...why would there be backboned Foxtel cable if no one is using it? Foxtel use Telstra cable to deliver their content - I get that. But if practically no one is using the cable for Foxtel - what ARE they using it for? It doesn't seem to be broadband as I was told only ADSL2+ is available to me...
    There are no visible external antennas, and if all the units have been cabled, why would this one be different? I find it difficult to believe that all the residents are having to rely on rabbit-ears or window antennas simply to get FTA!There are a lot of large metal structures around this area, as well as other frequency-interference objects,so I am surmising that this would be the reason the building has been backboned cabled. But hey - just guessing here... So really - who can I ask about what is actually connected to this address? Foxtel say it's not them and tell me to ask Telstra, Telstra SHOP staff (not the good folk here) are telling me they cant help me in person and I have to call customer service from home,  I don't have a landline or my ADSL connected yet so can only use my mobile for which I have limited service while I wait for the delivery of a 3G home booster thingy. Can anyone tell me to which Telstra department I should be directing my enquiry to?At the moment I have now useless T-Box sitting here begging to be used, which I purchased in good faith on the advice I received from a Telstra provider that I have the necessary and correct connections for it to work! Seeing as they appeared to have access to the information required to check on the service availability to this address and specifically this apartment - who do I need to contact to get more information?At the very least, put me out of my misery - if I have to install an antenna, so be it, but I need to be sure this is the only option available to me before I go through the process of getting landlord, body corporate, aand whoeverelse persmission, not to mention the considerable expense! Please - someone, anyone at Telstra - tell me who I need to contact, to find out once and for all, with absolute certainty what this connection is for!  Sorry if I sound desperate...everyone has been very helpful here so far, but I'm going crazy trying to figure this out!

Maybe you are looking for

  • Doubt about constructor and show.Input dialog

    Hi everybody! I wrote this program in java. It works, but I have some doubts. The points that are not clear to me are in comments. Thanks in advance: import javax.swing.JOptionPane; public class Bicicleta extends JOptionPane{      int velocidad;     

  • Constant Reboots and Incorrect Date/Time

    My phone constantly shuts down and the red light blinks very slow - maybe once every 15 seconds. If I remove the battery when the phone comes back on it shows a date/time of Wed, Dec 31 1969 7pm???

  • Making a Google Base Feed

    Can anyone explain to me how to make a google base feed with numbers? I've tried creating and submitting a feed multiple times, but I keep getting an error message saying "We didn't understand your delimiter".

  • Can I restore an old version of iTunes?

    I'm having trouble getting my MacBook Pro to recognise my iPod Classic - it connects via usb then says 'Ejecting - you may now disconnect'. I've tried the reset/restore approach and connecting in disk mode but the best I get is my iPod appearing as a

  • Move documents along with its version through workflow

    hi suggest which of the 2 ways is possible through Designer workflow, 1)can i move a document along with its version to another library where same settings are enabled. 2)can i move a document from a library and add as a new version to another item p