SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Apr 2002
    Location
    somerset, new jersey, usa
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Reconnect after Iiop 60: connection closed by server error

    Hi All:
    I am getting a connection closed by server error (Iiop 60) because my server, when it remains idle, will drop the connection or close the socket.

    I would like to be able to reconnect to the server when this happens (i.e., when this error is generated)and continue executing. How can I check for this error and then reconnect and continue processing? Any ideas will be most helpful. I could increase the timeout parm on the server but then that may defeat the purpose of simulating a production environment.
    Thanks in advance.


    ------------------
    ra
    ra

  2. #2
    Senior Member
    Join Date
    Nov 1999
    Posts
    164
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Reconnect after Iiop 60: connection closed by server error

    You can handle issues like this on the fly using Event handlers. These can be used to execute certain code on occurence of a particular event - in this case the error.

    In general, I think that Event handlers are a very useful addition to bdl and provide the flexibility to deal with situations which would otherwise require a lot of tortuous coding to handle.

    ------------------

  3. #3
    Junior Member
    Join Date
    Apr 2002
    Location
    somerset, new jersey, usa
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Reconnect after Iiop 60: connection closed by server error

    Stonzo: Thanks so much for the reply. I am using an event handler. However, I have a problem in that I several handles ghIiop0 - ghIiop7 that I would want to check for this event and do a reconnect. Currently,in my dcleven, I am doing an IiopObjectConnect(ghIiop0) if the error is raised but it will not allow me to do this for all other handles since they IiopRequest has not been encountered for that handle e.g., ghIiop1. How do I reconnect on the other handles?
    I was thinking that I would need a conditional statement that includes not just a check on the error raised but also the handle before doing the reconnect (i.e., IiopObjectConnect(specific handle) but can't seem to get that right with if error & ghIiop elseif clause. Is there another way?
    Thanks in advance!

    ------------------
    ra
    ra

  4. #4
    Senior Member
    Join Date
    Nov 1999
    Posts
    164
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Reconnect after Iiop 60: connection closed by server error

    Something like the following in your handler might do it:

    if (ghIiop0 > 0) then
    IiopObjectConnect(ghIiop0)
    elseif (ghIiop1 > 0) then
    IiopObjectConnect(ghIiop1)
    etc

    (I think that valid handles are > 0).

    Of course, it may be that you'd have to build in further checking still. For example I guess that the error may occur before all the handles are created, right? I imagine that the exact implementation would be dependent on the nature of the script and the SUT.
    I can't think of any easy way to do this without some additional conditional checking.

    ------------------

  5. #5
    Junior Member
    Join Date
    Apr 2002
    Location
    somerset, new jersey, usa
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Reconnect after Iiop 60: connection closed by server error

    Stronzo,
    I've modified as you suggested using additional if clause instead of using "&", which I wasn't able to do and was able to compile. Will test later. Thanks again.

    handler Reconnect <EVENT_RAISE_ERROR>
    var
    nError : number;

    begin
    nError := GetLastError();
    if gnConnClosedByServer = nError then
    if (ghIiop0 >0) then
    IiopObjectConnect(ghIiop0);
    print("Error caught ghIiop0", 1, TEXT_MAGENTA);
    elseif (ghIiop1>0) then
    IiopObjectConnect(ghIiop1);
    print("Error caught ghIiop1", 1, TEXT_MAGENTA);
    elseif (ghIiop2>0) then
    IiopObjectConnect(ghIiop2);
    print("Error caught ghIiop2", 1, TEXT_MAGENTA);
    elseif (ghIiop3>0) then
    IiopObjectConnect(ghIiop3);
    print("Error caught ghIiop3", 1, TEXT_MAGENTA);
    elseif (ghIiop4>0) then
    IiopObjectConnect(ghIiop4);
    print("Error caught ghIiop4", 1, TEXT_MAGENTA);
    elseif (ghIiop5>0) then
    IiopObjectConnect(ghIiop5);
    print("Error caught ghIiop5", 1, TEXT_MAGENTA);
    elseif (ghIiop6>0) then
    IiopObjectConnect(ghIiop6);
    print("Error caught ghIiop5", 1, TEXT_MAGENTA);
    elseif (ghIiop7>0) then
    IiopObjectConnect(ghIiop7);
    print("Error caught ghIiop7", 1, TEXT_MAGENTA);
    end;
    else
    throw;
    end;



    ------------------
    ra
    ra

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 10:45 PM.

Copyright BetaSoft Inc.