1 23 package com.sun.enterprise.repository; 24 25 import java.io.Serializable ; 26 27 32 public class ExternalJndiResource extends J2EEResourceBase implements Serializable { 33 34 private String jndiLookupName_; 35 private String resType_; 36 private String factoryClass_; 37 38 public ExternalJndiResource(String name) { 39 super(name); 40 } 41 42 protected J2EEResource doClone(String name) { 43 ExternalJndiResource clone = new ExternalJndiResource(name); 44 clone.setJndiLookupName(getJndiLookupName()); 45 clone.setResType(getResType()); 46 clone.setFactoryClass(getFactoryClass()); 47 return clone; 48 } 49 50 public int getType() { 51 return J2EEResource.EXTERNAL_JNDI_RESOURCE; 52 } 53 54 public String getJndiLookupName() { 55 return jndiLookupName_; 56 } 57 58 public void setJndiLookupName(String jndiLookupName) { 59 jndiLookupName_ = jndiLookupName; 60 } 61 62 public String getResType() { 63 return resType_; 64 } 65 66 public void setResType(String resType) { 67 resType_ = resType; 68 } 69 70 public String getFactoryClass() { 71 return factoryClass_; 72 } 73 74 public void setFactoryClass(String factoryClass) { 75 factoryClass_ = factoryClass; 76 } 77 78 public boolean isJMSConnectionFactory() { 80 if (resType_ == null) return false; 81 82 return (IASJ2EEResourceFactoryImpl.JMS_QUEUE_CONNECTION_FACTORY.equals(resType_) || 83 IASJ2EEResourceFactoryImpl.JMS_TOPIC_CONNECTION_FACTORY.equals(resType_)); 84 } 85 87 public String toString() { 88 return "< External Jndi Resource : " + getName() + " , " + getJndiLookupName() + "... >"; 89 } 90 } 91 | Popular Tags |