1 22 package org.jboss.ejb3; 23 24 import java.util.Collection ; 25 import java.util.HashMap ; 26 import org.jboss.logging.Logger; 27 28 32 public class Ejb3Registry 33 { 34 private static final Logger log = Logger.getLogger(Ejb3Registry.class); 35 36 private static HashMap containers = new HashMap (); 37 38 public static void register(Container container) 39 { 40 containers.put(container.getObjectName().getCanonicalName(), container); 41 } 42 43 public static void unregister(Container container) 44 { 45 containers.remove(container.getObjectName().getCanonicalName()); 46 } 47 48 public static Container getContainer(String oid) 49 { 50 return (Container)containers.get(oid); 51 } 52 53 public static Collection getContainers() 54 { 55 return containers.values(); 56 } 57 58 } 59 | Popular Tags |