Administration threads cannot be interrupted or stopped by the user if they are currently in one of the following states and have been so for less than two minutes:

  • Stopping.
  • Executing command.
  • Sending response.

Additionally, administration threads cannot be disconnected, interrupted, or stopped while they are currently committing configuration changes (that is, a check-in is running in Rhapsody IDE), unless the commit has taken longer than 5 minutes.

Any attempt to stop or interrupt an administration thread in one of these conditions will fail. The threads page is reloaded with an error message indicating the problem.

Field/Action

Description

Thread Name

The internal thread name. For administration threads, this includes the remote IP and port for the client.

User

The user for this administration thread.

The user is not initially available for administration threads as the thread is created prior to login.

Session Time

The length of time this administration session has been active.

State

The thread state, which differs depending on the thread type. 
Administration threads will have the following states:

  • Starting.
  • Stopping.
  • Waiting for command.
  • Executing command.
  • Sending response.

Command

The command currently being processed by an administration thread.

Time in State

The amount of time the thread has been in its current state.

  • < 1 second - if less than a second.
  • The number of seconds - if less than a minute.
  • The number of minutes - if less than an hour.
  • The number of hours - if greater than an hour.

Thread Actions

  • Stack Trace - Opens a popup window showing a stack trace for the thread. A popup window is used to allow multiple stack traces of different threads to open simultaneously, without having to pre-generate the stack traces before displaying this page.
  • Disconnect - Disconnects an administration session. After confirming the action with the user, this immediately closes the administration connection. The administration thread will exit shortly afterward (the thread is allowed to exit cleanly).
  • Interrupt - Interrupts the thread. You must confirm this action. This sets a flag on the thread letting it know it has been interrupted. If the thread is blocked from performing some operation, it normally wakes up immediately and processes the interrupt. If the thread is busy, it may not notice the interrupt.

    While Rhapsody handles interrupts correctly, examples for existing Java code have shown incorrect ways of doing this. If you write a custom component that does not handle interrupts correctly, then it may do nothing.

    Interrupts are generally ignored if the thread is blocked within native code.

  • Terminate - Stops the thread. You must confirm this action. This calls the Java Thread.stop() method. This does not terminate the thread immediately, but causes it to throw ThreadDeath internally. This will almost always break out of any Java code, however, it is not likely to have an effect if the thread is stuck within native code.

    Rhapsody will automatically create a new thread to take the place of the thread that has been stopped.

If you interrupt or stop an administration session that still has a connected socket, it will perform a disconnect instead. This is to give a much greater chance of shutting down the session cleanly. If a second attempt is made (that is, the socket has been closed), then the interrupt or terminate will take place. Therefore, interrupting or stopping an administration thread will always result in the session being disconnected.