[jboss-user] [Beginners Corner] - Access scoped / isoloated bean from a sar

newgro do-not-reply at jboss.com
Mon Feb 5 06:13:00 EST 2007


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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011269#4011269

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011269



More information about the jboss-user mailing list