2
* Copyright 2001, 2002,2004 The Apache Software Foundation.
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
8
* http://www.apache.org/licenses/LICENSE-2.0
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
17
package org.apache.axis.transport.jms;
19
import javax.jms.DeliveryMode;
20
import javax.jms.Message;
21
import javax.jms.Session;
24
* JMSConstants contains constants that apply to all JMS providers.
26
* <code>JMSConstants</code> contains the constant definitions for
27
* interacting with the WSClient. The most important constants are the
28
* <code>HashMap</code> keys for use in the arguments to the
29
* <code>send, call, registerListener, unregisterListener</code> methods of
30
* <code>JMSEndpoint</code> and the <code>createConnector</code> method of
31
* <code>JMSConnectorFactory</code>.
33
* @author Jaime Meritt (jmeritt@sonicsoftware.com)
34
* @author Richard Chung (rchung@sonicsoftware.com)
35
* @author Dave Chappell (chappell@sonicsoftware.com)
36
* @author Ray Chun (rchun@sonicsoftware.com)
39
public interface JMSConstants
41
public final static String PROTOCOL = "jms";
43
// abbreviated version of all constants (see below for description of each constant)
44
// the short name is used in the JMS URL. the full name is used in the Axis call.
45
final static String _WAIT_FOR_RESPONSE = "waitForResponse";
46
final static String _CLIENT_ID = "clientID";
47
final static String _VENDOR = "vendor";
48
final static String _DOMAIN = "domain";
49
final static String _JMS_CORRELATION_ID = "jmsCorrelationID";
50
final static String _JMS_CORRELATION_ID_AS_BYTES = "jmsCorrelationIDAsBytes";
51
final static String _JMS_TYPE = "jmsType";
52
final static String _TIME_TO_LIVE = "ttl";
53
final static String _PRIORITY = "priority";
54
final static String _DELIVERY_MODE = "deliveryMode";
55
final static String _MESSAGE_SELECTOR = "messageSelector";
56
final static String _ACKNOWLEDGE_MODE = "acknowledgeMode";
57
final static String _SUBSCRIPTION_NAME = "subscriptionName";
58
final static String _UNSUBSCRIBE = "unsubscribe";
59
final static String _NO_LOCAL = "noLocal";
60
final static String _NUM_RETRIES = "numRetries";
61
final static String _NUM_SESSIONS = "numSessions";
62
final static String _CONNECT_RETRY_INTERVAL = "connectRetryInterval";
63
final static String _INTERACT_RETRY_INTERVAL = "interactRetryInterval";
64
final static String _TIMEOUT_TIME = "timeoutTime";
65
final static String _MIN_TIMEOUT_TIME = "minTimeoutTime";
66
/** Defines a prefix added to each application-specific property in the
67
* JMS URL that should be added to the JMS Message when issued.
69
final static String _MSG_PROP_PREFIX = "msgProp.";
71
public static String JMS_PROPERTY_PREFIX = "transport.jms.";
74
* This is used as a key in the Call properties telling the JMS transport
75
* to wait for a response from the service. The default value is true.
76
* If false is specified, the message will be delivered without specifying
77
* a ReplyTo. The client will always return null from invoke unless
78
* a client-side exception is thrown (similar to invokeOneWay in semantics)
79
* The value must be a <code>java.lang.Boolean</code>.
80
* See the javax.jms javadoc for information on this property.
82
final static String WAIT_FOR_RESPONSE = JMS_PROPERTY_PREFIX + _WAIT_FOR_RESPONSE;
85
* <code>JMSConnectorFactory</code> parameter valid for either domain. This should
86
* be used as a key in the environment map passed into calls to
87
* <code>createConnector</code> in <code>JMSConnectorFactory</code>
88
* This is a required property for durable subscribers.
89
* The value must be a <code>java.lang.String</code>.
90
* See the javax.jms javadoc for information on this property.
92
final static String CLIENT_ID = JMS_PROPERTY_PREFIX + _CLIENT_ID;
94
// there is no short version
95
final static String DESTINATION = JMS_PROPERTY_PREFIX + "Destination";
97
final static String VENDOR = JMS_PROPERTY_PREFIX + _VENDOR;
98
public final static String JNDI_VENDOR_ID = "JNDI";
100
final static String DOMAIN = JMS_PROPERTY_PREFIX + _DOMAIN;
102
final static String DOMAIN_QUEUE = "QUEUE";
103
final static String DOMAIN_TOPIC = "TOPIC";
104
final static String DOMAIN_DEFAULT = DOMAIN_QUEUE;
107
* Key for properties used in the <code>send</code> and <code>call</code>
108
* methods. It is valid for either domain.
109
* The value must be a <code>java.lang.String</code>.
110
* See the javax.jms javadoc for information on this property.
112
final static String JMS_CORRELATION_ID = JMS_PROPERTY_PREFIX + _JMS_CORRELATION_ID;
114
* Key for properties used in the <code>send</code> and <code>call</code>
115
* methods. It is valid for either domain.
116
* The value must be a <code>byte[]</code>.
117
* See the javax.jms javadoc for information on this property.
119
final static String JMS_CORRELATION_ID_AS_BYTES = JMS_PROPERTY_PREFIX + _JMS_CORRELATION_ID_AS_BYTES;
121
* Key for properties used in the <code>send</code> and <code>call</code>
122
* methods. It is valid for either domain.
123
* The value must be a <code>java.lang.String</code>.
124
* See the javax.jms javadoc for information on this property.
126
final static String JMS_TYPE = JMS_PROPERTY_PREFIX + _JMS_TYPE;
128
* Key for properties used in the <code>send</code> and <code>call</code>
129
* methods. It is valid for either domain.
130
* The value must be a <code>java.lang.Long</code>.
131
* See the javax.jms javadoc for information on this property.
133
final static String TIME_TO_LIVE = JMS_PROPERTY_PREFIX + _TIME_TO_LIVE;
135
* Key for properties used in the <code>send</code> and <code>call</code>
136
* methods. It is valid for either domain.
137
* The value must be a <code>java.lang.Integer</code>.
138
* See the javax.jms javadoc for information on this property.
140
final static String PRIORITY = JMS_PROPERTY_PREFIX + _PRIORITY;
142
* Key for properties used in the <code>send</code> and <code>call</code>
143
* methods. It is valid for either domain.
144
* The value must be a <code>java.lang.Integer</code> equal to
145
* DeliveryMode.NON_PERSISTENT or DeliveryMode.PERSISTENT.
146
* See the javax.jms javadoc for information on this property.
148
final static String DELIVERY_MODE = JMS_PROPERTY_PREFIX + _DELIVERY_MODE;
150
final static String DELIVERY_MODE_PERSISTENT = "Persistent";
151
final static String DELIVERY_MODE_NONPERSISTENT = "Nonpersistent";
152
final static String DELIVERY_MODE_DISCARDABLE = "Discardable";
153
final static int DEFAULT_DELIVERY_MODE = DeliveryMode.NON_PERSISTENT;
155
final static int DEFAULT_PRIORITY = Message.DEFAULT_PRIORITY;
156
final static long DEFAULT_TIME_TO_LIVE = Message.DEFAULT_TIME_TO_LIVE;
159
* Key for properties used in the <code>registerListener</code>
160
* method. It is valid for either domain.
161
* The value must be a <code>java.lang.String</code>.
162
* See the javax.jms javadoc for information on this property.
164
final static String MESSAGE_SELECTOR = JMS_PROPERTY_PREFIX + _MESSAGE_SELECTOR;
166
* Key for properties used in the <code>registerListener</code>
167
* method. It is valid for either domain.
168
* The value must be a <code>java.lang.Integer</code> that is one of
169
* Session.AUTO_ACKNOWLEDGE, Session.DUPS_OK_ACKNOWLEDGE,
170
* or Session.CLIENT_ACKNOWLEDGE.
171
* See the javax.jms javadoc for information on this property.
173
final static String ACKNOWLEDGE_MODE = JMS_PROPERTY_PREFIX + _ACKNOWLEDGE_MODE;
176
* value for ACKNOWLEDGE_MODE if left unset. It is equal to
177
* Session.DUPS_OK_ACKNOWLEDGE.
179
final static int DEFAULT_ACKNOWLEDGE_MODE = Session.DUPS_OK_ACKNOWLEDGE;
182
* Specifies the name of a durable subscription
183
* Key for properties used in the <code>registerListener</code>
184
* method. It is valid for the PubSub domain.
185
* The value must be a <code>java.lang.String</code>.
187
final static String SUBSCRIPTION_NAME = JMS_PROPERTY_PREFIX + _SUBSCRIPTION_NAME;
189
* Key for properties used in the <code>registerListener</code>
190
* method. It is valid for the PubSub domain.
191
* Specifies that the durable subscription should be unsubscribed
192
* (deleted from the broker) when unregistered.
193
* The value must be a <code>java.lang.Boolean</code>.
195
final static String UNSUBSCRIBE = JMS_PROPERTY_PREFIX + _UNSUBSCRIBE;
197
* Key for properties used in the <code>registerListener</code>
198
* method. It is valid for the PubSub domain.
199
* The value must be a <code>java.lang.Boolean</code>.
201
final static String NO_LOCAL = JMS_PROPERTY_PREFIX + _NO_LOCAL;
203
final static boolean DEFAULT_NO_LOCAL = false;
204
final static boolean DEFAULT_UNSUBSCRIBE = false;
207
* Key for properties used in the <code>createConnector</code>
208
* method. It changes the behavior of the wsclient.
209
* The value must be a <code>java.lang.Integer</code>.
211
final static String NUM_RETRIES = JMS_PROPERTY_PREFIX + _NUM_RETRIES;
213
* Key for properties used in the <code>createConnector</code>
214
* method. It changes the behavior of the wsclient.
215
* The value must be a <code>java.lang.Integer</code>.
217
final static String NUM_SESSIONS = JMS_PROPERTY_PREFIX + _NUM_SESSIONS;
219
* Key for properties used in the <code>createConnector</code>
220
* method. It changes the behavior of the wsclient.
221
* The value must be a <code>java.lang.Long</code>.
223
final static String CONNECT_RETRY_INTERVAL = JMS_PROPERTY_PREFIX + _CONNECT_RETRY_INTERVAL;
225
* Key for properties used in the <code>createConnector</code>
226
* method. It changes the behavior of the wsclient.
227
* The value must be a <code>java.lang.Long</code>.
229
final static String INTERACT_RETRY_INTERVAL = JMS_PROPERTY_PREFIX + _INTERACT_RETRY_INTERVAL;
231
* Key for properties used in the <code>createConnector</code>
232
* method. It changes the behavior of the wsclient.
233
* The value must be a <code>java.lang.Long</code>.
235
final static String TIMEOUT_TIME = JMS_PROPERTY_PREFIX + _TIMEOUT_TIME;
237
* Key for properties used in the <code>createConnector</code>
238
* method. It changes the behavior of the wsclient.
239
* The value must be a <code>java.lang.Long</code>.
241
final static String MIN_TIMEOUT_TIME = JMS_PROPERTY_PREFIX + _MIN_TIMEOUT_TIME;
243
final static int DEFAULT_NUM_RETRIES = 5;
244
final static int DEFAULT_NUM_SESSIONS = 5;
246
final static long DEFAULT_CONNECT_RETRY_INTERVAL = 2000;
247
final static long DEFAULT_TIMEOUT_TIME = 5000;
248
final static long DEFAULT_MIN_TIMEOUT_TIME = 1000;
249
final static long DEFAULT_INTERACT_RETRY_INTERVAL = 250;
251
// key used to store the JMS connector in the message context
252
final static String CONNECTOR = JMS_PROPERTY_PREFIX + "Connector";
254
// key used to store the JMS vendor adapter in the message context
255
final static String VENDOR_ADAPTER = JMS_PROPERTY_PREFIX + "VendorAdapter";
257
// key used to store the JMS URL string in the message context
258
final static String JMS_URL = JMS_PROPERTY_PREFIX + "EndpointAddress";
260
/** A property that carries a Map of application-specific properties to be
261
* added to the JMS messages when issued.
263
final static String JMS_APPLICATION_MSG_PROPS =
264
JMS_PROPERTY_PREFIX + "msgProps";
266
final static String ADAPTER_POSTFIX = "VendorAdapter";
b'\\ No newline at end of file'