4 Replies Latest reply on Oct 31, 2007 1:08 PM by Manik Surtani

    Migrating to 2.0.0 using PropertyConfigurator

    Carl Shelbourne Newbie


      We have an 1.x installation of JBoss cache and are looking to move to the 2.0.0 branch.

      We configure the cache using a well know remote location, i.e. we serve out the config.xml file from a webserver. All chache clients know the location of the server and configure themselves using the xml file returned via a http request:

      public CacheManager( final InputStream is, final String clusterName ) throws Exception {
      PropertyConfigurator configurator = new PropertyConfigurator();
      TreeCache cache = new TreeCache();
      configurator.configure( cache, xmlConfigUrl );
      configurator.configure( cache, is );
      cache.setFetchInMemoryState( true );
      if ( clusterName != null )
       cache.setClusterName( clusterName );

      How do we do this in 2.0.0. The createCache calls provided by the factory only only seem to take string references or a bool to start it.

      I would be very grateful of a pointer in the right direction.