1 26 27 package org.objectweb.jonas_lib.deployment.api; 28 29 import org.objectweb.jonas_lib.deployment.xml.ResourceEnvRef; 30 import org.objectweb.jonas_lib.deployment.xml.JonasResourceEnv; 31 32 37 public class ResourceEnvRefDesc { 38 39 42 private String name; 43 44 47 private Class type; 48 49 52 private String jndiName; 53 54 64 public ResourceEnvRefDesc(ClassLoader classLoader, ResourceEnvRef res, 65 JonasResourceEnv jRes) throws DeploymentDescException { 66 67 name = res.getResourceEnvRefName(); 68 try { 69 type = classLoader.loadClass(res.getResourceEnvRefType()); 70 } catch (ClassNotFoundException e) { 71 throw new DeploymentDescException("resource-env-ref-type class not found for resource-env-ref " + name, e); 72 } 73 jndiName = jRes.getJndiName(); 74 } 75 76 80 public String getName() { 81 return name; 82 } 83 84 88 public Class getType() { 89 return type; 90 } 91 92 96 public String getJndiName() { 97 return jndiName; 98 } 99 100 104 public String toString() { 105 StringBuffer ret = new StringBuffer (); 106 ret.append("\ngetName()=" + getName()); 107 ret.append("\ngetType()=" + getType()); 108 ret.append("\ngetJndiName()=" + getJndiName()); 109 return ret.toString(); 110 } 111 112 } 113 | Popular Tags |