Menu

#324 UIL IL does not unbind socket in stop

v3.0 Rabbit Hole
closed-fixed
JBossMQ (39)
5
2002-12-06
2002-12-03
No

This bug was detected on jdk 1.4.1, Win2k, JBoss 3.0.(3|4)

After stopping UIL service and restarting it again ( I
was actually removing the jbossmq-service.xml and
adding it back into deploy) UIL IL MBean throws an
exception that the socket cannot be bound to the
specified address another socket is already bound to it.

Funny, I would have thought that once the UIL MBean is
garbage collected (since I am removing and adding
jbossmq-service.xml I expect that to happen), then the
socket should be GCed and closed, aparently this does
not happen.

The fix is simple, in
org/jboss/mq/il/uil/UILServerILService.java

modify stopService() so it closes the server socket:

public void stopService()
{
try
{
running = false;
unbindJNDIReferences();
// unbind the serverSocket if needed
if (serverSocket != null &&
serverSocket.isBound()) {
serverSocket.close();
}
}
catch (Exception e)
{
e.printStackTrace();
}
}

Discussion

  • Christian Riege

    Christian Riege - 2002-12-06

    Logged In: YES
    user_id=176671

    looks good, will apply your fix. thanks!

     
  • Christian Riege

    Christian Riege - 2002-12-06
    • assigned_to: nobody --> lqd
    • status: open --> open-accepted
     
  • Christian Riege

    Christian Riege - 2002-12-06
    • assigned_to: lqd --> nobody
    • milestone: 129788 -->
    • labels: 323945 -->
     
  • Christian Riege

    Christian Riege - 2002-12-06
    • status: open-accepted --> closed-accepted
     
  • Christian Riege

    Christian Riege - 2002-12-06

    Logged In: YES
    user_id=176671

    i applied your patch to 3.0, 3.2 and HEAD.

     
  • Christian Riege

    Christian Riege - 2002-12-06
    • assigned_to: nobody --> lqd
    • milestone: --> v3.0 Rabbit Hole
    • labels: --> JBossMQ
    • status: closed-accepted --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB