1 22 package org.jboss.test.classloader.scoping.singleton; 23 24 import java.security.CodeSource ; 25 26 import org.jboss.system.ServiceMBeanSupport; 27 28 34 public class TestService extends ServiceMBeanSupport 35 implements TestServiceMBean 36 { 37 protected void startService() 38 { 39 MySingleton singleton = MySingleton.getInstance(); 40 log.debug("Start called, singleton="+singleton); 41 log.debug("Singleton version="+singleton.getVersion()); 42 } 43 44 public boolean checkVersion(String version) 45 { 46 MySingleton singleton = MySingleton.getInstance(); 47 CodeSource cs = singleton.getClass().getProtectionDomain().getCodeSource(); 48 log.debug("MySingleton.CS: "+cs); 49 log.debug("Comparing version: "+version+", to: "+singleton.getVersion()); 50 return version.equals(singleton.getVersion()); 51 } 52 53 } 54 | Popular Tags |