FileDocCategorySizeDatePackage
JmxDependencyPolicy.javaAPI DocJBoss 4.2.12602Fri Jul 13 20:53:58 BST 2007org.jboss.ejb3

JmxDependencyPolicy

public class JmxDependencyPolicy extends Object implements DependencyPolicy
Old JMX Kernel dependency registry
author
Bill Burke
version
$Revision: 60233 $

Fields Summary
protected HashSet
dependencies
Constructors Summary
Methods Summary
public voidaddDatasource(java.lang.String jndiName)

      String ds = jndiName;
      if (ds.startsWith("java:/"))
      {
         ds = ds.substring(6);

      }
      else if (ds.startsWith("java:"))
      {
         ds = ds.substring(5);
      }
      //tring onStr = "jboss.jca:name=" + ds + ",service=ManagedConnectionFactory";
      String onStr = "jboss.jca:name=" + ds + ",service=DataSourceBinding";

      try
      {
         dependencies.add(new ObjectName(onStr));
      }
      catch (MalformedObjectNameException e)
      {
         throw new RuntimeException(e);
      }
   
public voidaddDependency(java.lang.String dependency)


      
   
      ObjectName on = null;
      try
      {
         on = new ObjectName(dependency);
      }
      catch (MalformedObjectNameException e)
      {
         throw new RuntimeException(dependency, e);
      }
      dependencies.add(on);
   
public java.util.CollectiongetDependencies()

      return dependencies;
   
public java.util.CollectiongetDependencies(java.util.Collection currentDependencies)

      dependencies.addAll(currentDependencies);
      return dependencies;