1 2 Previous Next 16 Replies Latest reply on Jan 9, 2004 11:31 AM by birwin Go to original post
      • 15. Re: Programatic EJB cache flush
        raja05

         

        "birwin" wrote:
        I attempted to implement this code, but my code throws an error and complains that the ObjectName class does not have a flushCache method. The fully qualified name of my ObjectName is javax.management.ObjectName. Does JBoss subclass ObjectName? If not, why might I be getting this error?


        Ohh okay. i really dint get your question the first time.
        The error is because Of NOT objectname having the flushCache but the objectname that is being used in the invoke not having a flushCache method.
        You would create a ObjectName like
        ObjectName objName = new ObjectName("jboss.j2ee:jndiName=local/TestEJB,service=EJB")

        and then use the invoke on it. The only thing that you need to make sure
        that the MBean Class has the flushCache method in it. You would check it by clicking on the link in the JMX-Console and going to the MBean View page and see if the method that you are invoking is available for that MBeanClass.



        • 16. Re: Programatic EJB cache flush
          birwin

          raja05, thanks for your help. It turns out I accidentally placed the EJB in the ejb-jar file as a session bean. The MBean class was a StatelessSessionContainer. After I changed the deployment descriptor to instead of I was able to flush the cache. Thank you for your help. Your suggestions led me to the problem.

          1 2 Previous Next