Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 53 package org.bsf.remoting; 54 55 import java.io.Serializable ; 56 57 58 63 64 public class EJBDefinition implements Serializable { 65 66 private String _jndiName; 67 private String _home; 68 private String _remote; 69 70 public EJBDefinition(String p_jndiName, String p_homeClassName, 71 String p_remoteClassName) { 72 _jndiName = p_jndiName; 73 _home = p_homeClassName; 74 _remote = p_remoteClassName; 75 } 76 77 78 public Class getHomeClass() { 79 try { 80 return Class.forName(_home); 81 } catch (ClassNotFoundException ex) { 82 throw new RuntimeException ("Unable to load the class : " + _home); 83 } 84 } 85 86 public Class getRemoteClass() { 87 try { 88 return Class.forName(_remote); 89 } catch (ClassNotFoundException ex) { 90 throw new RuntimeException ("Unable to load the class : " + _remote); 91 } 92 } 93 94 public String getRemoteName() { 95 return _remote; 96 } 97 98 public String getHomeName() { 99 return _home; 100 } 101 102 public String getJndiName() { 103 return _jndiName; 104 } 105 106 public boolean equals(Object obj) { 107 if (obj instanceof EJBDefinition) { 108 EJBDefinition definition = (EJBDefinition) obj; 109 if (!(definition.getHomeName().equals(_home)) 110 || !(definition.getJndiName().equals(_jndiName)) 111 || !(definition.getRemoteName().equals(_remote))) 112 return false; 113 return true; 114 } 115 return false; 116 } 117 118 public String toString() { 119 return "EJB " + _jndiName + " Home class : " + _home; 120 } 121 122 public int hashCode() { 123 return _jndiName.hashCode(); 124 } 125 } 126 127 128 129
| Popular Tags
|