Closing Sockets

Hi all,
Im having a big problem with the closing of sockets.
I have a simple program which handles the sending / receiving and monitoring of HTTP traffic.
My program has a 'sender' part which opens a socket, writes a request (using the socket output stream), reads the response (using the socket input stream, until read() == -1 ) and then closes the streams and socket.
The 'receiver' part simply receives socket connections, reads the content (until read() == -1), writes a response, and then closes the streams and socket.
The monitor part is a simple 'tunnel'. For each received socket connection, a connection is made to a server.
Two threads then operate like this:
T1) While read from client != -1, write to server
T2) While read from server != -1, write to client
Seems simple enough, and sort of works.
The problem I have is cleanly closing all sockets without screwing up either the tunnel or a client.
I try not to close the streams / sockets at the 'logical' times, but for some reason any combination I try results in Socket Closed exceptions during a read in either the tunnel or the client.
There is a fair amount of code - so I dont expect anyone to wade thru it to find the problem, but Im just wondering if anyone has:
1) Had similar problems and found a solution
2) Can point me in the direction for more details on the mechanics and implications of closing socket streams
The java docs seem very sketchy on this subject!!
Thanks for your help!

Thanks for the response (2 dukes for the fast reply - plenty more available on this one though!)....
Does this mean that there is no 'clean' way to accomplish the transfer task?
I think both examples will work, but I have a couple of issues:
This exception is quite normal and indicates that another thread abruptly forced your socket closed or you tried to read or write after closing it yourself. You must catch it.The problem I have with this is that under these circumstances, it is a 'SocketException' which is thrown. The API says that this is thrown if 'there is an error in the underlying protocol, such as a TCP error'. So to be sure I was dealing with the right problem, I'd have to start parsing the exception text looking for "Socket Closed".
Im keener on option 2:
providing signalling between your threads Sounds like this is what I need.... Again there is a catch though.
See, the thread handling the client will be in a blocking read (it will have read everything from the client, and written it to the server. However, as the client socket isn't closed yet, it doesn't know its time to stop). So, Im back to using exceptions again (Im assuming I'd have to do an interrupt?).
I thought I could get round this on the client side by closing the output stream after writing everything (would signify to the reader thread that all is done).
This, however, just results in the socket getting closed (my ignorance of the underlying mechanics of sockets showing through here...).
Further, I want my 'monitor' to work with all request / response based systems - so I cant write a termination sequence on the client side to indicate end of input.
So - Im really stuck with using exceptions as flags then??

Similar Messages

  • Sun Ray Connector proxy : Child closed socket prematurely, session shutdown

    Dear All,
    I'm using SRS 5 & SRWC 2.2 :
    $ pkginfo -l SUNWuttsc
       PKGINST:  SUNWuttsc
          NAME:  Sun Ray Connector for Microsoft Windows Operating Systems (opt)
      CATEGORY:  system,sunray
          ARCH:  i386
       VERSION:  2.2_32
       BASEDIR:  /opt
        VENDOR:  Sun Microsystems, Inc.
          DESC:  Commands, configuration, resources and Man Pages
        PSTAMP:  SunOS_5.10_20091021175007
      INSTDATE:  févr 05 2010 10:34
       HOTLINE:  Please contact your local service provider
        STATUS:  Installation complète.
         FILES:       26 chemins d'accès installés
                       9 répertoires
                      10 exécutables
                       1 exécutables setuid/setgid
                    9037 blocs utilisés (env.)
    The SRWC crash and restart immediately...
    As you can see I've some log like this :
    Feb  7 03:03:15 SRS Sun Ray Connector proxy:[18056]: [ID 855542 user.error] Child closed socket prematurely, session shutdown
    Feb  7 03:03:15 SRS Sun Ray Connector proxy:[18089]: [ID 855542 user.error] Child closed socket prematurely, session shutdown
    Feb  7 03:03:23 SRS Sun Ray Connector proxy:[18254]: [ID 855542 user.error] Child closed socket prematurely, session shutdown
    Feb  7 03:03:23 SRS Sun Ray Connector proxy:[18214]: [ID 855542 user.error] Child closed socket prematurely, session shutdown
    Feb  7 03:03:23 SRS Sun Ray Connector proxy:[18219]: [ID 855542 user.error] Child closed socket prematurely, session shutdown
    Feb  7 03:03:23 SRS Sun Ray Connector proxy:[18221]: [ID 855542 user.error] Child closed socket prematurely, session shutdown
    Feb  7 03:03:23 SRS Sun Ray Connector proxy:[18220]: [ID 855542 user.error] Child closed socket prematurely, session shutdown
    ...I'm using a separate DHCP on LAN. DTU & TSE (W2K8) are working 95% of time and sometime and randomly, one DTU has a full black screen. The only way to get the login screen of win 2K8 is to reset his own session.
    Help will be really appreciated.
    Florent.

    I have the same issue . . .
    1. Sun Ray 5 (Sun Ray 4.2)
    2. SRWC 2.2
    3. Solaris 10 u9 X86 on two x2200
    4. Terminal Server on Win2K3 R2 Standard x64 Edition SP2
    I have a handful of users and they all logon the same way, which is to enter username & password then I have the following lines at the end of the users' individual .dtprofile file . . .
    <begin snip>
    DTSOURCEPROFILE=true
    /opt/SUNWuttsc/bin/uttsc -b -m -O -u uname 192.168.100.29
    exit
    <end snip>
    Of course 'uname' is actually the user name followed by the Terminal Server IP address and as you can see I am using the '-O' option, but every morning all the users on a server have their Sun Ray sessions reset and I find this in the messages file . . .
    Mar 16 09:38:31 sunraya Sun Ray Connector proxy:[12941]: [ID 855542 user.error] Child closed socket prematurely, session shutdown
    . . . . Using cron, I reset the Sun Ray service twice a day on both servers at 7AM and 7PM . . .
    # cat /sunray-restart.script
    # This is to restart SunRay 5 service due to
    # what I think may be a memory leak that disconnects
    # the SunRay Windows Connector every day
    /opt/SUNWut/sbin/utrestart -c
    echo "#" >> /var/adm/messages
    date >> /var/adm/messages
    echo "#" >> /var/adm/messages
    echo " RESTARTING SUNRAY SERVICE " >> /var/adm/messages
    echo "#" >> /var/adm/messages
    echo "#" >> /var/adm/messages
    . . . But this does not appear to having an affect.
    I will be looking around the forums for any other bits of information about this. The "Known Issues" can probably be found in the Release Notes.

  • Weblogic 11G error = BEA-000449  Closing socket as no data read from it

    In My Weblogic 11G, i am getting Warning msg in my log file saying Closing socket as no data read from it
    ####<Nov 2, 2010 12:10:53 AM IST> <Warning> <Socket> <TradeServer> <TradeServer> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <1288636853607> <BEA-000449> <Closing socket as no data read from it on 95.66.7.15:58,089 during the configured idle timeout of 25 secs>
    ####<Nov 2, 2010 12:10:53 AM IST> <Warning> <Socket> <TradeServer> <TradeServer> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <1288636853607> <BEA-000449> <Closing socket as no data read from it on 95.66.7.15:58,088 during the configured idle timeout of 25 secs>
    ####<Nov 2, 2010 12:21:37 AM IST> <Info> <JDBC> <TradeServer> <TradeServer> <[ACTIVE] ExecuteThread: '23' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <1288637497701> <BEA-001128> <Connection for pool "IB_JDBC_Data_Source" closed.>
    I have follow the following step
    If you want to follow this solution. Go to Admin console -> Click on Domain->Configuration->Log Filters->create new Log filter.
    I added this line in expression "(MESSAGE !='Closing socket as no data read from it during the configured idle timeout of 5 secs')"
    Go to your server-(for each server you have to set it individually)->Logging->Advanced->Select this log filter for Standard Out or log file.
    My Filter is "(MESSAGE !=Closing socket as no data read from it ')"
    this is not working in weblogic 11G, any one have the solution to stop this msg.
    Edited by: Amar_Shaw on Nov 3, 2010 1:40 PM

    Hi Amar,
    I think you have given the wrong string in the filter, you are getting "*Closing socket as no data read from it on 95.66.7.15:58,089 during the configured idle timeout of 25 secs*" and you have given in the filter "*Closing socket as no data read from it during the configured idle timeout of 5 secs*".
    You can change it and see if that works for you.
    Also the above option is just to suppress the issue which are getting which in this case is fine as its just a warning message, however you can even try to tune few of the follwoing parameters that too would help you to remove this warning message.
    1. Set the parameter -Dweblogic.client.socket.ConnectTimeout=XXX, in the start-up script of the server which you are seeing this issue under JAVA_OPTIONS
    Note: Where "XXX" is the value in ms.
    Example:
    -Dweblogic.client.socket.ConnectTimeout=500
    2. Try tuning the duration time to a higher value from the below Console path
    Server -> Protocols (tab) -> HTTP (sub-tab) -> Duration
    Regards,
    Ravish Mody
    http://middlewaremagic.com/weblogic/
    Middleware Magic | Come, Join Us and Experience The Magic…

  • BEA-000449  Closing socket as no data read from it

    This error message is filling up the server log files. It looks like some network problem. How can I find the cause ? This does not create a functional problem, but I am sure there will be a performance problem. Also, since this message is filling up the logs rapidly, I cannot see my regular application debug statements.
    <Warning> <Socket> <myserver.mydomain.net> <my_managedserver_01> <[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1218554019557> <BEA-000449> <Closing socket as no data read from it during the configured idle timeout of 30 secs>
    The timeout of 30 seconds is the value set in Login Timeout in server tuning tab.
    Environment:
    WebLogic Portal 10.0 MP1 (The domain is a server domain, not portal domain)
    Red Hat linux 4
    Intel Xeon
    Message was edited by:
    prakashp

    In My Weblogic 11G, i am getting Warning msg in my log file saying Closing socket as no data read from it
    ####<Nov 2, 2010 12:10:53 AM IST> <Warning> <Socket> <TradeServer> <TradeServer> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1288636853607> <BEA-000449> <Closing socket as no data read from it on 95.66.7.15:58,089 during the configured idle timeout of 25 secs>
    ####<Nov 2, 2010 12:10:53 AM IST> <Warning> <Socket> <TradeServer> <TradeServer> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1288636853607> <BEA-000449> <Closing socket as no data read from it on 95.66.7.15:58,088 during the configured idle timeout of 25 secs>
    ####<Nov 2, 2010 12:21:37 AM IST> <Info> <JDBC> <TradeServer> <TradeServer> <[ACTIVE] ExecuteThread: '23' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1288637497701> <BEA-001128> <Connection for pool "IB_JDBC_Data_Source" closed.>
    I have follow the following step
    If you want to follow this solution. Go to Admin console -> Click on Domain->Configuration->Log Filters->create new Log filter.
    I added this line in expression "(MESSAGE !='Closing socket as no data read from it during the configured idle timeout of 5 secs')"
    Go to your server-(for each server you have to set it individually)->Logging->Advanced->Select this log filter for Standard Out or log file.
    this is not working in weblogic 11G, any one have the solution to stop this msg.

  • Closing socket as no data read

    Hi,
    I am using weblogic 10.3 application server. I am frequently facing the below warning in log file
    <BEA-000449> <Closing socket as no data read from it during the configured idle timeout of *0 secs*>
    As a response, "Page cannot be displayed" error is seen in browser for that request. I checked the config.xml, nowhere it is configured as 0 seconds.
    Please help me with your suggestions.
    Regards
    Purushoth
    Edited by: user13299431 on Nov 29, 2010 2:01 AM

    [Refer to this link|http://forums.oracle.com/forums/thread.jspa?messageID=9114422]

  • Closing Socket within 0 Seconds

    Hi,
    I am using weblogic 10.3 application server. I am frequently facing the below warning in log file
    <BEA-000449> <Closing socket as no data read from it during the configured idle timeout of *0 secs*>
    As a response, "Page cannot be displayed" error is seen in browser for that request. I checked the config.xml, nowhere it is configured as 0 seconds.
    Please help me with your suggestions.
    Regards
    Edited by: user13299431 on Nov 29, 2010 4:36 AM

    Hi
    This is message you can filter it thru LogFilter
    You can set the Logfileter on your Admin console -> Click on Domain->Configuration->Log Filters->create new Log filter.
    I added this line in expression "(MESSAGE !='Closing socket as no data read from it during the configured idle timeout of 0 secs')"
    Go to your server-(for each server you have to set it individually)->Logging->Advanced->Select this log filter for Standard Out or log file
    Ref:
    BEA-000449  Closing socket as no data read from it
    http://download.oracle.com/docs/cd/E15051_01/wls/docs103/ConsoleHelp/taskhelp/domain_log_filters/CreateLogFilters.html
    Hope this will helps you.

  • Windows7 64-bit causes BEA-000449 Closing socket as no data read

    Hi,
    I have a new Windows7 64-bit laptop and copied my ADF and other FMW apps to the new laptop from my windows XP. I am using Jdev 11.1.1.5 on the prior XP and the new Windows7.
    The applications ran fine in XP and I am able to run the the JSPX pages in the windows7 but for one critical issue.
    I have a page that issues a query to a web service and is able to display the results in a table. The table rows have links to call a managed bean to prepare then uses an Action to display the results in a new form page. The two pages are in an unbounded task flow. When I click on the link I don't see any debug messages from the bean and don't see the Form page but I see in the logs:
    <Warning> <Socket> <BEA-000449> <Closing socket as no data read from it on 127.0.0.1:49,319 during the configured idle timeout of 5 secs>
    I never had such issue with XP. (note I used the same Jdev 11.1.1.5 software for both)
    Also I have the same application running on a Linx server and when I tested to click on the link from the result table also I never see the Form page when using Windows7 but works fine with XP !?
    Can we use Windows 7 with ADF and WebCenter applications? This critical since my client users are planning to upgrade to Windows7.
    Is there a special configurations to resolve such issue and others that I still didn't test.
    Thanks

    Update,
    I was using IE 9 on windows7 and IE 8 on XP. I now tested with Firefox 64-bit, which is named Namoroka since that was the 64-bit version I found, and I didn't have such issue, surpised.
    My client must use IE since we also have Siebel which uses ActiveX and many government agencies are certified on IE.
    (Note: when using Namoroka, I keep getting a popup when move from one page to another that: "You are using an unsupported browser. The supported browsers are Interner Explorer 7 and higher, Firefox 2.0.0.2 and higher, Safari 3.1.2 and higher, and Google Chrome 1.0 or higher. )
    From what I see now can't upgrade to windows7, but I did see that many are using it. So please help in what you already solved this issue.
    Thanks

  • Does closing socket with close() also closes the outputStream and inputStre

    hi i have a simple query
    does closing socket with close() also closes the outputStream and inputStream() associated with the socket

    Yes.

  • Using a selector to detect closed socket channel.

    Basically our app uses one thread to perform a select on multiple socket channels. When a socket is closed (either remotely or locally) the server app needs to unregister the client (so we need to detect closed channels). We've been using blocking IO previously (no dramas), but now we're dealing with many connections/clients we need to rework it as we're getting excessive amounts of threads. Anyway, that's just background.
    Here's the problem we're getting, I have boiled it down to the following.
    SocketChannel channel = SocketChannel.open();
    channel.connect(socketAddress); // for the test this is localhost.
    // this make sure socket is open, remote end just echos, waits 3 seconds and closes the socket.
    channel.write(ByteBuffer.wrap("testLocalSocketClose\n".getBytes()));
    channel.configureBlocking(false);
    Selector selector = Selector.open();
    LOG.fine("registering channel");
    channel.register(selector, SelectionKey.OP_READ, channel);
    LOG.fine("closing channel");
    channel.close();
    LOG.fine("waiting...");
    int i = selector.select();
    // this never happens (or it does very rarely)
    LOG.fine("selector woke with " + i + " selected");I would have expected the selector to return the selection key of the dead channel. Given that it doesn't and this scenario is possible (channel closing just after a read operation but before another select is called - in separate threads obviously). How can we reliably detect/be informed that the channel has been closed?
    (I saw somewhere someone mention adding the OP_WRITE to the key, I have tried this as well and it makes no difference).
    Many Thanks.
    Bob.

    May I suggest you look at your application and reassess; either it's wrong or it's your understanding of what our issue is.
    Please try the simple test below.
    WSADATA ws;
    WSAStartup(0x0101, &ws);
    SOCKET sock = socket(PF_INET, SOCK_STREAM, 0);
    struct sockaddr_in server;
    server.sin_family = AF_INET;
    server.sin_addr.s_addr = htonl(INADDR_ANY);
    server.sin_port = htons(9000);
    cout << "binding" << endl;
    bind(sock, (struct sockaddr *)&server, sizeof(server));
    cout << "listening" << endl;
    listen(sock, SOMAXCONN);
    struct sockaddr_in client;
    int client_size = sizeof(client);
    memset(&client, 0, client_size);
    cout << "accepting" << endl;
    SOCKET clientSock = accept(sock, (struct sockaddr*)&client, &client_size);
    // shutdown socket.
    cout << "shutting down client socket" << endl;
    shutdown(clientSock, SD_BOTH);
    // setup select
    FD_SET fd;
    TIMEVAL tv;
    FD_ZERO(&fd);
    tv.tv_sec  = static_cast<int>(6000);
    tv.tv_usec = 0;
    FD_SET(clientSock, &fd);
    cout << "selecting" << endl;
    int rc = select(0, &fd, NULL, NULL, &tv);     
    cout << rc << ", " << FD_ISSET(clientSock, &fd) << endl;
    char msg[500];
    if (FD_ISSET(clientSock, &fd)) {
         cout << recv(clientSock, msg, 500, 0) << endl;
         cout << WSAGetLastError() << endl;
    cout << "closing" << endl;
    closesocket(clientSock);Telnet to port 9000, you get the following output immediately:
    binding
    listening
    accepting
    shutting down client socket
    selecting
    1, 1
    -1
    10058
    closing
    The solution I posted previously re calling shutdownInput/Output in Java isn't correct however, I left OP_WRITE on by mistake, which always returns ready, my fault.  Apologies.
    Whatever the behaviour, it will be the same for Selector.select() as it is for select().
    Clearly not.
    Edited by: Bawb on 29-Jul-2011 07:01, I had left OP_WRITE on which was returning ready each time, when I realised and took it out I removed the shutdown code which made me think I hadn't sorted this. Apologies again.
    Still reckon an RFE for OP_SHUTDOWN should be added to Java.
    Thanks.

  • Can still write to a closed socket

    Hi
    When the server closes the socket , my client can still write to the outputStream no exception is thrown (although nothing actually reaches the server - as expected), however when I go to read from the socket I get a SocketException.
    This is a problem for me as I rely on the write failing in order restart the socket. This problem only seems to occur on solaris, not windows.
    Any help would be appreciated.
    Thanks
    Paul

    Either you are stating your problem incorrectly or you are misinterpreting the results (or something is hideously wrong with your VM and/or IP stack.)
    Given the following client code...
        Socket s = ....
        OutputStream os = s.getOutputStream();
        os.write(...);If the server has closed the socket or it no longer exists for any reason, you will get an exception.
    Perhaps your problem is actually that, depending on the OS and different factors, you might not get a timeout exception for up to 5 minutes after the initial write?

  • Closed Sockets?

    I'm trying to transfer data from one table on a DB to another using an application but I keep getting the below error. Is this SQL related or is it down to the application? Does anyone know how to resolve this issue?
    tblGec_Stg_Val,0: ODBC function "SQLFetch" reported: SQLSTATE = 08S01: Native Error Code = 0: Msg = [IBM(DataDirect OEM)][ODBC SQL Server Wire Protocol driver]Socket closed.
    ODBC function "SQLFetch" reported: SQLSTATE = 08S01: Native Error Code = 0: Msg = [IBM(DataDirect OEM)][ODBC SQL Server Wire Protocol driver]Socket closed.
    ODBC function "SQLFetch" reported: SQLSTATE = 08S01: Native Error Code = 0: Msg = [IBM(DataDirect OEM)][ODBC SQL Server Wire Protocol driver]Socket closed. (CC_OdbcDBStatement::dbsFetch, file CC_OdbcDBStatement.cpp, line 1,594)
    ODBC function "SQLEndTran(SQL_ROLLBACK)" reported: SQLSTATE = HY000: Native Error Code = 0: Msg = [IBM(DataDirect OEM)][ODBC SQL Server Wire Protocol driver]General error. NULL UtilityStmt (CC_OdbcConnection::rollback, file CC_OdbcConnection.cpp, line 1,237)
    ODBC function "SQLFreeHandle(SQL_HANDLE_STMT)" reported: SQLSTATE = 08S01: Native Error Code = 0: Msg = [IBM(DataDirect OEM)][ODBC SQL Server Wire Protocol driver]Socket closed. (CC_OdbcDBStatement::~CC_OdbcDBStatement, file CC_OdbcDBStatement.cpp, line 223)
    ODBC function "SQLEndTran(SQL_ROLLBACK)" reported: SQLSTATE = HY000: Native Error Code = 0: Msg = [IBM(DataDirect OEM)][ODBC SQL Server Wire Protocol driver]General error. NULL UtilityStmt (CC_OdbcConnection::rollback, file CC_OdbcConnection.cpp, line 1,237)

    SQLSTATE = 08S01 means:
    The
    communication link between the driver and the data source to which the driver was attempting to connect failed before the function completed processing.
    Could be network issue
    http://www.easysoft.com/developer/interfaces/odbc/sqlstate_status_return_codes.html#08S01
    http://community.spiceworks.com/topic/372789-sqlstate-08s01-08001-connection-failure

  • Closing socket connection from 2nd thread

    I did some research on different operating systems to find a unique solution how to timeout a blocking recv call in one thread.
    Closing the connection from another thread helps but I found that there are two different methods how to close the connection:
    - either just calling close with the correct linger options
    - call shutdown first and then close
    Unfortunately most platforms work fine with only one of these methods and fail more or less severe with the other method.
    While I think to fully understand the behavior of Windows and Linux, Solaris is still a big question mark for me.
    I have some machines (running Solaris 8, 7 and 2.6) which work well with just closing and crash the system when using shutdown (while having bad luck in the timing of the other peer). And I have another 2.6 machine that behaves the other way around.
    I created a detailed description about the whole problem and my findings in a PDF if you are interested: http://www.webwasher.com/download/notes/timeoutblockingsocketcall.pdf
    Is anybody able to explain how the Solaris implementation works here?
    And does anybody know why I see the differences with the two 2.6 boxes? (I changed patch level and exchanged clib without success.
    Martin

    I have a main program which creates a thread.Why not create a thread once the object has been read.
    The thread would take some time to process this
    object before it accepts another object to be passed
    in from the main program.Threads are used for concurrent execution. If you don't want concurrent execution, don't use additional threads. Have the main program do the reading and execution and then it cannot read another object until it has finished executing the previous one.
    >
    However, I realise that my main program:
    s = new Socket("localhost", 2001);
    will produce a socket connection
    socket connection even if the thread is still
    processing the object. Why is this possible?This is what threads do. It is call multi-threading.
    Initially I thought the thread would lock the socketIt will lock the sockect when you lock it with synchronized. Howver you are creating a new socket each time so even this would not do what you suggest.
    and my main program would not be able to get a socket
    connection until my thread releases the socket.Everytime you call new Socket() it creates a NEW socket. You can open as many socket as the server can handle. (10000+)
    Code in my thread to accept a socket connection:
    server = new ServerSocket(2001);
    ois = new ObjectInputStream(server.accept().getInputStream());I would suggest putting the Socket created by server.accept() into a variable. Otherwise you will not be able to reply to the request, nor will you be able to close() the connection.
    How can I workaround this issue. Hope somebody can help. Thanks.You don't need a workaround, you need to fix the logic of your application.

  • Java Pug-in 1.4.1_02 not closing sockets using URLConnection

    I am developing an applet that accesses a URL to get data to be displayed on the screen (Apache, mod_plsql). The problem is that when I execute the applet using "appletviewer" in my machine, each URLConnection shares only one socket connection to the WEB server. When the same applet is executed in the browser through the Java Plug-in 1.4.1_02, each URLConnection creates a new socket connection. Is there any bug? Is this a matter of configuration? Browser version? To test the applet I am using Forte for Java 4CE, JDK 1.4.1_02 (the same version as the Plug-in). I have tried many things already without success, there are no error messages in the server nor any exception on the applet. Both my machine and the server are Windows 2000 SP3.

    Have you found a solution to this? I'm having a similar problem with URLConnection always starting a new socket connection when run from within the Java Plug-In.

  • Problem closing sockets when using OCI8 JDBC connections

    Hi,
    We have a java thread that maintains a socket connection with a Telnet client. We are finding that this thread is unable to successfully close this connection with Socket.close(). The reason that close() fails appears to be that the same thread is creating an (OCI8 driver) JDBC connection via another Java object. If we don't create the JDBC connection within this thread the socket closes correctly.
    Has anybody else experienced such problems?
    We believe that this problem might be related to a BugRat report #391.
    Cheers.
    Max
    null

    Sounds like a mis-match between the JDBC Drivers and the installed Oracle Client.
    The JDBC Drivers with JDeveloper 9.0.3 should be the 9.0.1.3 versions (included with the iAS Admin Client and iAS 9.0.2)
    Also note, the JDBC driver used by OC4J is "classes12dms.jar", not "classes12.jar"
    Hope this helps,
    Rob

  • Properly closing socket and killing thread in cmd window

    Hey all,
    I'm creating my socket connection in a program that i am running in a cmd window. For what i need in my prog, i have a loop that tries to connect every 5 seconds, and even after that, I need to continue looping to check and try to connect.
    The only way i can end the program is to cntrl-c or X out of the program. What i need to know is there a way to properly clean up the thread and close the socket w/o any memory leak issues?
    Thanks

    What i need to know is there a
    way to properly clean up the thread and close the
    socket w/o any memory leak issues?All modern popular use OSes clean sockets, threads and memory (normal) when the application exits for any reason at all.

Maybe you are looking for

  • When I authorize, it says I already have but still won't let me play purchased music

    Over the past few years, I've bought numerous songs through iTunes. Now, for all of these songs it's telling me that I need to authorize my computer to listen to them. When I authorize my computer, it says "This computer is already authorized" When I

  • Ipod in windows, but not in updater or itunes

    I followed the help/support links for both updating the ipod and the "windows sees it but itunes doesn't" but none of the tips worked. I reinstalled itunes and have the most recent ipod updater installed, but when i go to update it says "Plug in an i

  • Getting output from my MBP to LCD TV

    Read any postings in this forum but could not find an answer. I have Apple's mini displayport, a DVi to HDMI cable and the appropriate audio cables. After connecting the MBP to the LCD TV I can see the desktop on the TV**. However when I closed the l

  • Baseline date change OBB8- payment terms

    Hi Is it ok to change the baseline date in a payment term in OBB8 after posting several invoices? What consequesnces should this change have? Thanks in advance Aparna

  • Output Report in HTML format thru Oracle Forms. ASAP!!!

    Hi, How can i create a HTML output format thru Oracle Runtime Form? I have tried using the .REP and i was able to produce the HTML output format but when call the .REP using Oracle Form i was not able to produce the desired output. Attach below is th