1 22 package org.jboss.ha.singleton; 23 24 import java.net.URI ; 25 import java.util.List ; 26 import java.util.StringTokenizer ; 27 28 import org.jboss.system.ServiceMBean; 29 import org.jboss.system.server.profileservice.VFSDeploymentScannerImpl; 30 31 38 public class HASingletonDeploymentScanner 39 extends VFSDeploymentScannerImpl 40 implements HASingletonDeploymentScannerMBean 41 { 42 public void deploySingletons(String uris) throws Exception 43 { 44 StringTokenizer tokenizer = new StringTokenizer (uris, ","); 45 while (tokenizer.hasMoreTokens()) 46 { 47 String uri = tokenizer.nextToken(); 48 uri = uri.trim(); 49 addURI(new URI (uris)); 50 } 51 52 scan(); 53 } 54 55 public void undeploySingletons(String uris) throws Exception 56 { 57 StringTokenizer tokenizer = new StringTokenizer (uris, ","); 58 while (tokenizer.hasMoreTokens()) 59 { 60 String uri = tokenizer.nextToken(); 61 uri = uri.trim(); 62 removeURI(new URI (uris)); 63 } 64 65 scan(); 66 } 67 } 68 | Popular Tags |