2 Replies Latest reply on Feb 5, 2007 9:46 AM by Per Newgro

    Access scoped / isoloated bean from a sar

    Per Newgro Newbie

      Hi *,

      i already read alot of faqs, tutorials and threads. But i didn't found an appropriate solution.

      I run 2 applications within one server (default). Bot are packaged as an ear. Both applications are based upon a little framework (located in framework.jar packaged in both ears). The framework.jar contains the interfaces for the beans.
      I added a jboss-app.xml with the loader-repository tag to isolate both applications. Everything works fine.

      Now i have written a Scheduler-MBean (deployed in a sar file). This should backup my database files at an appropriate date. But i can't access the backup-bean within the application-ear. Is there a solution for this?

      server.../deploy
      |-- applA.ear
      | |-- META-INF/jboss-app.xml
      | |-- META-INF/...
      | |-- application.xml
      | |-- framework.jar
      | |-- beansA.jar
      |-- applB.ear
      | |-- META-INF/jboss-app.xml
      | |-- META-INF/...
      | |-- application.xml
      | |-- framework.jar
      | |-- beansB.jar
      |-- deploy.last
      | |-- backupA-timer.sar
      | |-- jboss-service.xml
      | |-- my/BackupASchedulable.class
      | |-- framework.jar
      


      I get a ClassCastException. I know already that the isolated ears are loaded within different ClassLoaders. But how can i access the beans from classes in my sar?

      Thanks for helping me
      Cheers
      Per