1 Reply Latest reply on Sep 25, 2003 12:24 PM by adrian.brock

    Timer MBean ClasCastException problem

    gcomba

      Hi,

      I'm using a "Scheduler" (implementing org.jboss.varia.scheduler.Schedulable) to do some taks and the logic is inside a SLSB.

      The problem is that if I change the .jar with the SLSB and restart the application (changing application.xml) the application stop working (because a ClassCastException with the Home interfaces), but the timer doesn't work anymore too.

      I'm using the "ServiceLocator" (from Sun) to access and caching the Home interfaces, so there should be the problem, but I was wondering if is there some way to "flush" the centralized class loader to refresh the interfaces... may be I should not duplicate the home interfaces inside the .jar with the "timer" class.

      Any clue?

      Thanks in advance,

      Gustavo Comba

        • 1. Re: Timer MBean ClasCastException problem

          The ServiceLocator pattern doesn't understand redeployment.
          If you redeploy a shared class you also need to redeploy
          its users.
          Separating the home/remote interfaces in a separate
          jar that does not get redeployed will also solve the problem.

          Regards,
          Adrian