2 Replies Latest reply on Oct 8, 2008 12:30 PM by tao_dl

    Start JBossCache MBeans in a Web Service Project

    tao_dl


      Dear forum,

      Currently I am working on a J2EE/JBoss project. In the web service call I'd like to call an initiated JBoss Cache MBean object. From the following ref link I learned how to start the JBoss Cache MBean from a web application (WAR), but no hint about how to start JBoss Cache MBean inside a web servic application.

      http://wiki.jboss.org/wiki/JBossCacheMBeans

      The reason is that there is neither web.xml file nor listener-class to be available. Does anyone have an idea?
      I am new in JBoss Cache, any help and response will be very appreciated!

      Thanks in advance,

      Tao

        • 1. Re: Start JBossCache MBeans in a Web Service Project
          genman

          There's no standard way to create stuff in a .war except through a servlet init(). You can use a "startup servlet" to create a cache, but for JBoss it's best to use a "sar".

          • 2. Re: Start JBossCache MBeans in a Web Service Project
            tao_dl

            Hi genman,
            Thanks for your response!
            I think I haven't well explained my question.
            Actually my problem is that I'd like to use a simillar "context listener" in a web service project, just as the "ServletContextListener " has done in a web application (WAR). The package structure of a web service project is different from a web application project. E.g. there is no "web.xml" file in a web serivce project package.