Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*    */ package org.jboss.ejb3;
 /*    */ 
 /*    */ import java.util.Collection;
 /*    */ import java.util.HashSet;
 /*    */ import javax.management.ObjectName;
 /*    */ 
 /*    */ @Deprecated
 /*    */ public class JmxDependencyPolicy
/*    */   implements DependencyPolicy
/*    */ {
/* 38 */   protected HashSet<ObjectNamedependencies = new HashSet();
/*    */ 
/*    */   public void addDependency(String dependency)
/*    */   {
/* 42 */     ObjectName on = null;
/*    */     try
/*    */     {
/* 45 */       on = new ObjectName(dependency);
/*    */     }
/*    */     catch (MalformedObjectNameException e)
/*    */     {
/* 49 */       throw new RuntimeException(dependencye);
/*    */     }
/* 51 */     this..add(on);
/*    */   }
/*    */ 
/*    */   public Collection getDependencies()
/*    */   {
/* 56 */     return this.;
/*    */   }
/*    */ 
/*    */   public Collection getDependencies(Collection currentDependencies)
/*    */   {
/* 61 */     this..addAll(currentDependencies);
/* 62 */     return this.;
/*    */   }
/*    */ 
/*    */   public void addDatasource(String jndiName)
/*    */   {
/* 67 */     String ds = jndiName;
/* 68 */     if (ds.startsWith("java:/"))
/*    */     {
/* 70 */       ds = ds.substring(6);
/*    */     }
/* 73 */     else if (ds.startsWith("java:"))
/*    */     {
/* 75 */       ds = ds.substring(5);
/*    */     }
/*    */ 
/* 78 */     String onStr = "jboss.jca:name=" + ds + ",service=DataSourceBinding";
/*    */     try
/*    */     {
/* 82 */       this..add(new ObjectName(onStr));
/*    */     }
/*    */     catch (MalformedObjectNameException e)
/*    */     {
/* 86 */       throw new RuntimeException(e);
/*    */     }
/*    */   }
/*    */ }
/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/jboss-embedded-all.jar
 * Qualified Name:     org.jboss.ejb3.JmxDependencyPolicy
 * JD-Core Version:    0.6.0
 */
New to GrepCode? Check out our FAQ X