users@glassfish.java.net

Re: Multiple SelectorThreads

From: <glassfish_at_javadesktop.org>
Date: Wed, 18 Jul 2007 13:25:28 PDT

The only place in the ORB that a Selector thread is created is in the
CorbaTransportManagerImpl class, which creates one SelectorImpl class
(which is the implementer of the SelectorThread you see).
CorbaTransportManagerImpl is created when ORB.init( String[], Properties ) is
called (not simple ORB.init(), which creates the so-called singleton ORB).
I think you should look for ORB.init calls in the app, and then see if
the ORBs that are created are ever destroyed. Destroying an ORB is simple:
just call ORB.destroy(). Please note that the ORB also has a shutdown call.
Just calling shutdown may not be enough: make sure that ORBs that are
created are also destroyed.

It's also worth noting that creating an ORB can be a somewhat expensive
operation. Most applications create one or at most a small number of ORBs
at startup time, then use those ORBs afterwards. Our ORB implementation is
definitely NOT designed to support the creation of hundreds of ORBs, because
each ORB is independent: there is no resource sharing.

You can contact me directly (Ken.Cavanaugh_at_sun.com) if you need more help
with this.
[Message sent by forum member 'kcavanaugh' (kcavanaugh)]

http://forums.java.net/jive/thread.jspa?messageID=227164