1 24 package org.objectweb.joram.client.jms; 25 26 import java.util.*; 27 28 import javax.jms.JMSException ; 29 30 31 34 public class ConnectionMetaData implements javax.jms.ConnectionMetaData { 35 36 public final static int jmsMajorVersion = 1; 37 38 public final static int jmsMinorVersion = 1; 39 40 public final static String jmsProviderName = "Joram"; 41 42 public final static String jmsVersion = "1.1"; 43 44 public static int providerMajorVersion = 4; 45 46 public static int providerMinorVersion = 3; 47 48 public final static String providerVersion = "@version@"; 49 50 public final static Vector jmsxProperties = new Vector(); 51 52 static { 53 int idx1 = 0; 54 int idx2 = 0; 55 try { 56 idx1 = providerVersion.indexOf('.'); 57 if (idx1 != -1) { 58 providerMajorVersion = 59 Integer.parseInt(providerVersion.substring(0, idx1)); 60 } 61 } catch (Exception exc) { 62 } 63 try { 64 idx2 = providerVersion.indexOf('.', idx1 +1); 65 if (idx2 != -1) { 66 providerMinorVersion = 67 Integer.parseInt(providerVersion.substring(idx1 +1, idx2)); 68 } 69 } catch (Exception exc) { 70 } 71 72 jmsxProperties.add("JMSXDeliveryCount"); 73 jmsxProperties.add("JMSXGroupID"); 74 jmsxProperties.add("JMSXGroupSeq"); 75 } 76 77 82 public int getJMSMajorVersion() throws JMSException { 83 return jmsMajorVersion; 84 } 85 86 91 public int getJMSMinorVersion() throws JMSException { 92 return jmsMinorVersion; 93 } 94 95 100 public String getJMSProviderName() throws JMSException { 101 return jmsProviderName; 102 } 103 104 109 public String getJMSVersion() throws JMSException { 110 return jmsVersion; 111 } 112 113 118 public Enumeration getJMSXPropertyNames() throws JMSException { 119 return jmsxProperties.elements(); 120 } 121 122 127 public int getProviderMajorVersion() throws JMSException { 128 return providerMajorVersion; 129 } 130 131 136 public int getProviderMinorVersion() throws JMSException { 137 return providerMinorVersion; 138 } 139 140 145 public String getProviderVersion() throws JMSException { 146 return providerVersion; 147 } 148 } 149 150 151 | Popular Tags |