1 23 package com.sun.enterprise.repository; 24 25 import java.io.Serializable ; 26 import java.util.Set ; 27 import java.util.Iterator ; 28 import com.sun.enterprise.util.LocalStringManagerImpl; 29 30 36 public class JmsCnxFactoryResource extends J2EEResourceBase 37 implements Serializable { 38 39 private static LocalStringManagerImpl localStrings = 40 new LocalStringManagerImpl(JmsCnxFactoryResource.class); 41 42 private boolean isQueue_; 43 44 public JmsCnxFactoryResource(String name) { 45 super(name); 46 } 47 48 protected J2EEResource doClone(String name) { 49 JmsCnxFactoryResource clone = new JmsCnxFactoryResource(name); 50 clone.setIsQueue(getIsQueue()); 51 return clone; 52 } 53 54 public int getType() { 55 return J2EEResource.JMS_CNX_FACTORY; 56 } 57 58 public String getTypeString() { 60 if (getIsQueue()) return IASJ2EEResourceFactoryImpl.JMS_QUEUE_CONNECTION_FACTORY; 61 return IASJ2EEResourceFactoryImpl.JMS_TOPIC_CONNECTION_FACTORY; 62 } 63 65 public boolean getIsQueue() { 66 return isQueue_; 67 } 68 69 public void setIsQueue(boolean isQueue) { 70 isQueue_ = isQueue; 71 } 72 73 public String toString() { 74 String propsString = getPropsString(); 75 76 String npMsg = localStrings.getLocalString("enterprise.repository.resource_noproperties", "No Properties"); 78 79 return "< JMS Connection Factory: " + getName() + ", " + 80 getTypeString()+ ", " + 81 ((propsString.length() > 0) ? 82 propsString : npMsg) + " >"; 83 85 } 86 } 87 | Popular Tags |