1 Reply Latest reply on Oct 29, 2010 3:05 AM by welle

    Sar classes are singletons?

    tachoknight

      Hi all-

       

      I've been trying to find some definitive information about whether or not a sar is, effectively, a singleton object within JBoss. The reason I ask is because I have a sar that loads a configuration file that is queried a lot by some EJBs, WARs, etc. I have exposed a "reload configuration" method that can be invoked from the jmx interface which does just that...blows away the list and reloads it from the file.

       

      But this got me thinking; I don't see, via the log files, the list being populated every time an ejb invokes it, only when I start up JBoss or hit the "reload" button. Even though the ejb connects to the sar and instantiates the class, the config list is always populated.

       

      Does this mean that the class that extends ServiceMBeanSupport is somehow being treated by JBoss as singletons?

       

      Just curious, I wanted to make sure I understand how sars actually work.

       

      Thanks,

       

      Ron