4 Replies Latest reply on Jan 24, 2006 4:52 PM by andyd

    Transactions in an MBean service using TreeCacheAop

    andyd

      Guys,
      What is the correct way to get a transaction set up for use against a TreeCacheAop instance when in an MBean?

      I have tried

      1 mgr = DummyTransactionManager.getInstance();
      2 ObjectName cacheService = new ObjectName("btgs.bgan:service=TreeCacheAop");
      3 server = MBeanServerLocator.locate();
      4 tree = (TreeCacheAopIfc)MBeanServerInvocationHandler.newProxyInstance(server, cacheService,TreeCacheAopIfc.class,false);


      this throws a NameAlreadyBoundException at 4 and the rollback doesn't seem to work when I try and roll back after a field change of a serialised object stored in the cache.

      Do you still have to aspectize pojos if they are Serializable? Could this be my problem?

      I have seen the exampe BSHs, but I'm not sure that that is the answer.



      Thanks,
      Andy.