@@ -0,0 +1,1759 @@
+/*%0A * Copyright 2005 The JA-SIG Collaborative. All rights reserved. See license%0A * distributed with this file and available online at%0A * http://www.uportal.org/license.html%0A */%0Apackage org.jasig.cas.util;%0A%0Aimport org.apache.commons.logging.Log;%0Aimport org.apache.commons.logging.LogFactory;%0Aimport org.jboss.cache.PropertyConfigurator;%0Aimport org.jboss.cache.TreeCache;%0Aimport org.springframework.beans.factory.DisposableBean;%0Aimport org.springframework.beans.factory.FactoryBean;%0Aimport org.springframework.beans.factory.InitializingBean;%0Aimport org.springframework.core.io.Resource;%0Aimport org.springframework.util.Assert;%0A%0A/**%0A * %0A * @author Scott Battaglia%0A * @version $Revision$ $Date$%0A * @since 3.0.5%0A *%0A */%0Apublic final class JBossCacheFactoryBean implements FactoryBean, DisposableBean,%0A    InitializingBean %7B%0A    %0A    private Log log = LogFactory.getLog(this.getClass());%0A    %0A    private TreeCache cache;%0A    %0A    private Resource configLocation;%0A%0A    public Object getObject() throws Exception %7B%0A        return this.cache;%0A    %7D%0A%0A    public Class getObjectType() %7B%0A        return TreeCache.class;%0A    %7D%0A%0A    public boolean isSingleton() %7B%0A        return true;%0A    %7D%0A%0A    public void destroy() throws Exception %7B%0A        log.info(%22Shutting down TreeCache service.%22);%0A        this.cache.stopService();%0A    %7D%0A%0A    public void afterPropertiesSet() throws Exception %7B%0A        Assert.notNull(this.configLocation, %22configLocation cannot be null.%22);%0A        this.cache = new TreeCache();%0A        final PropertyConfigurator propertyConfigurator = new PropertyConfigurator();%0A        propertyConfigurator.configure(this.cache, this.configLocation.getInputStream());%0A        log.info(%22Starting TreeCache service.%22);%0A        this.cache.startService();%0A    %7D%0A%7D%0A

support for JBossCache factory bean