The static threadgroup within org.jboss.mq.Connection
causes a problem if it is used in an applet. If the
reload button is pressed, then the threadgroup is not
yet destroyed when the new connection is already
established. Therefore the reader and writer thread of
the SocketMgr of the new connection are still attached
to the static threadgroup which will be destroyed by
the JVM of the plugin. This will as well destroy the
reader and writer thread of the new Connection / SocketMgr.
One possible solution for that is to make the thread
group of the Connection a member and pass it on during
the cloning process so that the SocketMgr can attach
its thread to the right threadgroup, i.e. then one that
was newly created.
To be able to do that I had to change the interface
org.jboss.mq.il.ServerIL so that its cloneServerIL
methods takes a connection as a parameter.
Within the Connection the threadgroup has become a
member and the clockdaemon (which is now as well a
member) gets initialized in the constructor of the
takes now as well a Connection as parameter.
One possible other solution would be to use the default
threadgroup of the applet instead, since I haven't seen
any code that makes any use of the threadgroup itself.
Log in to post a comment.