1 26 27 package org.objectweb.jonas_lib.deployment.api; 28 29 import org.objectweb.jonas_lib.deployment.xml.EjbLocalRef; 30 31 36 public class EjbLocalRefDesc { 37 38 41 private String ejbRefName = null; 42 43 46 private String ejbRefType = null; 47 48 51 private String localHome = null; 52 53 56 private String local = null; 57 58 61 private String ejbLink = null; 62 63 66 private String jndiName = null; 67 68 69 75 public EjbLocalRefDesc(EjbLocalRef ejbLocalRef) throws DeploymentDescException { 76 ejbRefName = ejbLocalRef.getEjbRefName(); 77 ejbRefType = ejbLocalRef.getEjbRefType(); 78 localHome = ejbLocalRef.getLocalHome(); 79 local = ejbLocalRef.getLocal(); 80 if (ejbLocalRef.getEjbLink() == null) { 81 String err = "ejb-link missing for ejb-local-ref '" + ejbRefName + "'."; 82 throw new DeploymentDescException(err); 83 } 84 ejbLink = ejbLocalRef.getEjbLink(); 85 } 86 87 91 public String getEjbRefName() { 92 return ejbRefName; 93 } 94 95 99 public String getEjbRefType() { 100 return ejbRefType; 101 } 102 103 107 public String getLocalHome() { 108 return localHome; 109 } 110 111 115 public String getLocal() { 116 return local; 117 } 118 119 123 public String getEjbLink() { 124 return ejbLink; 125 } 126 127 131 public String getJndiLocalName() { 132 return jndiName; 133 } 134 135 139 public void setJndiLocalName(String jndiName) { 140 this.jndiName = jndiName; 141 } 142 143 147 public String toString() { 148 StringBuffer ret = new StringBuffer (); 149 ret.append("\ngetEjbRefName()=" + getEjbRefName()); 150 ret.append("\ngetEjbRefType()=" + getEjbRefType()); 151 ret.append("\ngetLocalHome()=" + getLocalHome()); 152 ret.append("\ngetLocal()=" + getLocal()); 153 ret.append("\ngetEjbLink()=" + getEjbLink()); 154 ret.append("\ngetJndiLocalName()=" + getJndiLocalName()); 155 return ret.toString(); 156 } 157 158 } 159 | Popular Tags |