When objects are unexported forcibly (via the UnicastRemoteObject.unexportObject
or Activatable.unexportObject method), they may still have pending or executing
RMI calls. If the object table becomes empty because the last remote object is
unexported (forcibly or not) or garbage collected, the keep-alive thread will
terminate and the VM will exit if there are no other non-daemon threads present.
In these circumstances, the VM may exit while forcibly-unexported objects are
still executing remote calls. This type of shutdown is not orderly. If the
remote object's VM exits while a remote call is in progress, the caller will
experience a connection reset.
The keep-alive thread should not be terminated if there are remote calls that
are either pending or in progress, even if the object table is empty due to
forcibly unexported objects. If immediate shutdown is required by the server,
it can simply call System.exit.
or Activatable.unexportObject method), they may still have pending or executing
RMI calls. If the object table becomes empty because the last remote object is
unexported (forcibly or not) or garbage collected, the keep-alive thread will
terminate and the VM will exit if there are no other non-daemon threads present.
In these circumstances, the VM may exit while forcibly-unexported objects are
still executing remote calls. This type of shutdown is not orderly. If the
remote object's VM exits while a remote call is in progress, the caller will
experience a connection reset.
The keep-alive thread should not be terminated if there are remote calls that
are either pending or in progress, even if the object table is empty due to
forcibly unexported objects. If immediate shutdown is required by the server,
it can simply call System.exit.
- duplicates
-
JDK-4308542 ActivationGroup should have a more orderly shutdown
-
- Closed
-