3 Replies Latest reply on Jul 27, 2004 3:36 AM by Adrian

    How to implement a global persistent singleton in a stateful

    Adrian Newbie

      Hi,

      I use a Java-To-COM bridge in a statefull session bean and I MUST manage here an object (a java handler class containing the reference to the COM object) like a global object over all session beans.

      I tryied this by implementing a singleton class as an attribute of the session bean, but I get an exception when the bean will be passivated - the bridging classes use sockets to communicate to COM :-(

      I cannot destroy and recreate the COM-handler class, because this will
      destroy and recreate the COM object. I need here something like an unremovable singleton object that act like a server or for my session bean.

      Any ideas how to solve this problem ?

      Best thanks in advance,

      Adrian