<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE rfc SYSTEM "../schemata/rfc2629/rfc2629.dtd" [

<!-- You need one entry like the following for each RFC referenced -->
<!ENTITY RFC2119 PUBLIC ''
  'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
<!ENTITY RFC3986 PUBLIC ''
  'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml'>
<!ENTITY RFC3987 PUBLIC ''
  'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3987.xml'>
<!ENTITY RFC4395 PUBLIC ''
  'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4395.xml'>
<!ENTITY RFC5234 PUBLIC ''
  'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5234.xml'>
  ]>
  
<?xml-stylesheet type="text/xsl" href="../transforms/rfc2629.xslt"?>

<?rfc toc="yes"?>            <!-- You want a table of contents -->
<?rfc tocdepth="2"?>
<?rfc symrefs="yes"?>        <!-- Use symbolic labels for references -->
<?rfc sortrefs="yes"?>       <!-- This sorts the references -->
<?rfc iprnotified="no" ?>    <!-- Change to "yes" if someone has disclosed IPR for the draft -->
<?rfc compact="yes"?>        <!-- Avoid excessive white space -->
<?rfc topblock="yes"?>       <!-- Include neat little block in HTML output -->


<rfc ipr="full3978" docName="draft-merrick-jms-uri-05" category="info">


<!-- From here on code by example -->

<front>
  <title abbrev="JMS URI Scheme">URI Scheme for Java(tm) Message Service 1.0</title>

  <!-- One author object for each listed author. Maximum 5; beyond that
       list contributors in the Acknowledgements section. -->

  <author initials="R. A." surname="Merrick" fullname="Roland Merrick">
    <organization abbrev="IBM">International Business Machines Corporation</organization>
    <address>
      <postal>
        <street>PO Box 31, Birmingham Road</street>
        <country>United Kingdom</country>
        <code>CV34 5JL</code>
        <region></region>
        <city>Warwick</city>
      </postal>
      <email>roland@uk.ibm.com</email>
    </address>
  </author>

  <author initials="P." surname="Easton" fullname="Peter Easton">
    <organization abbrev="Progress">Progress Software Corporation</organization>
    <address>
      <postal>
        <street>14 Oak Park Drive</street>
        <country>United States</country>
        <code>MA 01730</code>
        <region></region>
        <city>Bedford</city>
      </postal>
      <email>peaston@progress.com</email>
    </address>
  </author>

  <author initials="D." surname="Rokicki" fullname="Derek Rokicki">
    <organization abbrev="Software AG">Software AG.</organization>
      <address>
	<postal>
          <street>11700 Plaza America Drive</street>
          <city>Reston</city>
	  <code>VA 20190</code>
	  <country>United States</country>
	</postal>
	<email>derek.rokicki@softwareag.com</email>
      </address>
  </author>

  <author initials="E." surname="Johnson" fullname="Eric Johnson">
    <organization abbrev="TIBCO">TIBCO Software Inc.</organization>
    <address>
      <postal>
      	<street>3303 Hillview Avenue</street>
      	<city>Palo Alto</city>
      	<code>CA 94304</code>
      	<country>United States</country>
      </postal>
      <email>eric@tibco.com</email>
    </address>
  </author>

   <!-- Current date is required for draft submission -->
   <date month="November" year="2008" />

  <!-- This needs to be one of the defined IETF Areas -->
  <area>AREA</area>

  <!-- This line is traditional :-) -->
  <workgroup>Network Working Group</workgroup>

  <abstract>
    <t>This document defines the format of  Uniform Resource Identifiers (URI) as defined in <xref target="RFC3986"/>,
    for designating connections and destination addresses used in the Java(tm) Messaging Service (JMS) <xref target="REF-JMS"/>. 
    It was originally designed for particular uses, but should have general applicability wherever a JMS URI is needed to describe 
    the connection to a JMS provider, and access to a JMS destination.
    The syntax of this 'jms' URI is not compatible with any known current vendor implementation, but the expressivity of the format
    should permit all vendors to use it.</t>
  </abstract>
</front>

<middle>
  <section anchor="intro" title="Introduction">
    <t>The "jms" URI scheme is used to designate a javax.jms.Destination object and an associated javax.jms.ConnectionFactory object, 
    and optionally provide additional information concerning the way that the Destination object is to be used. Probably the most common, 
    and certainly the most compatible way in Java to retrieve such destinations, is via Java Naming and Directory Information (JNDI)
    <xref target="REF-JNDI" /> methods.  So as to extend compatibility to existing vendor mechanisms beyond JNDI lookup, the "jms" URI syntax allows
    variants on the core syntax.  The variant exists as an explicit part of the syntax so that tools that are otherwise
    unfamiliar with the variant can recognize the presence of a URI with an alternate interpretation.</t>
    
    <t>In its simplest and most interoperable form, this URI scheme starts with "jms:jndi:" plus a JNDI name for a Destination.
    Since interaction with some resources may require JNDI contextual information or JMS header fields and properties to be
    specified as well, the "jndi" variant of the "jms" URI scheme includes support for supplying this additional JNDI information
    as query parameters.</t>
    
    <t>While the "jndi" variant provides compatibility, vendors may define
	additional variants.  This specification defines three variants, "jndi",
	"queue", and "topic".</t>

<section title="Requirements notation">
<t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
"SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
and "OPTIONAL" in this document are to be interpreted as
described in <xref target="RFC2119"/>.</t>
<t>All syntax descriptions use the ABNF specified by <xref target="RFC5234"/>, Augmented BNF for Syntax Specifications: ABNF.</t>
</section>
</section>

<section anchor="scheme-name" title="URI Scheme Name">
    <t>The name of the URI scheme is 'jms'. </t>
</section>

<section anchor="syntax" title="Syntax of a jms URI">
    <t>The following ABNF describes the jms scheme URI syntax: </t>
   	<figure>
   		<artwork>
    			<![CDATA[
 jms-uri = "jms:" jms-variant ":" jms-dest
     [ "?" param *( "&" param ) ]

 jms-variant = segment-nz-nc
 
 jms-dest = path-rootless ; specific meaning per variant
 
 param = param-name "=" param-value

 param-name = 1*(unreserved / pct-encoded)

 param-value = *(unreserved / pct-encoded)

 segment-nz-nc = <as defined in RFC 3986>
 
 path-rootless = <as defined in RFC 3986>

 unreserved = <as defined in RFC 3986>

 pct-encoded = <as defined in RFC 3986>

         ]]></artwork>
	</figure>
</section>

<section anchor="semantics" title="URI scheme semantics">
	<t>JMS URI schemes are used to locate JMS Destination resources and do not specify actions
	to be taken on those resources. Operations available on JMS destinations are fully and
	normatively defined by the JMS specification and as such, are out of scope for this URI specification.
	</t>
	
    <t>The required particles in the JMS URI are the scheme name ("jms"), the variant identifier,
    and the &lt;jms-dest&gt; portions.  The three recognized variants (&lt;jms-variant&gt; above) are "jndi", "queue",
    and "topic". The &lt;jms-dest&gt; portion identifies the JMS destination object in a way that is determined by the
    particular variant.</t>
    
    <t>Each variant may have query parameters specific to that variation.  All such parameters that
    cannot be shared across schemes should use the name of the variant as the prefix to the parameters.
    Parameters that apply across multiple variants, perhaps because they are generally applicable, such
    as JMS settings, should not have any particular prefix, and should not begin with any known prefix.
    This latter convention enables tools that are otherwise unfamiliar with a particular variant to
    recognize that a particular URI includes parameters specific to that variant.
    </t>
    
    <t>Examples of the URI scheme include:</t>
    <figure>
    	<artwork>
jms:jndi:SomeJndiNameForDestination?jndiInitialContextFactory=
    com.example.jndi.JndiFactory&amp;priority=3

jms:queue:ExampleQueueName?timeToLive=1000
</artwork></figure>
    
	<section anchor="shared-parameters" title="Shared Parameters">

	<t>In addition to the required particles, the jms URI scheme supports the following "shared"
	parameters, which may be included as parameters in any order (following the '?' parameter-start
	indicator, and separated by '&amp;').  This pattern is consistent with other non-hierarchical
	URI specifications. </t>

	<section title="deliveryMode">
	<t>Indicates whether the request message is persistent or not.
	This property corresponds to the JMS message header field "JMSDeliveryMode" defined in section 3.4.2. of the
	JMS 1.1 specification.  This may be "PERSISTENT" or "NON_PERSISTENT". If this parameter is 
	not specified then the JMS default SHOULD be used. </t>
	</section>
	<section title="timeToLive">
	<t>The lifetime, in milliseconds, of the request message.  This property corresponds to
	the JMS Time-To-Live value defined in section 4.8 of the JMS 1.1 specification.
	If this parameter is not specified then the JMS default SHOULD be used. </t>
	</section>
	<section title="priority">
	<t>The JMS priority associated with the request message.  As per section 3.4.10 of the JMS 1.1
	specification this must be a number between 0 and 9, inclusive, and corresponds to the JMS message header
	field "JMSPriority". If this parameter is not specified then the JMS default SHOULD be used. </t>
	</section>

	<!-- added 2007-06-21 RAM -->
	<section title="replyToName">
	<t>This property corresponds to the JMS message header field "JMSReplyTo" defined in section 3.4.6
	of the JMS 1.1 specification. Specifies the JMS destination object to which a response message
	should be sent in a way that is determined by the particular variant.
	</t>
	</section>

	</section>
		
    <section anchor="jndi-variant" title="JNDI Variant">

	    <t>The "jndi" variant implies the use of JNDI for discovering the Destination object.  When
	    this is specified as the variant, the &lt;jms-dest&gt; portion of the syntax is the name for
	    JNDI lookup purposes.  Additional JNDI specific parameters may be specified.  The JNDI 
	    specific parameters SHOULD only be processed when the URI variant is "jndi".</t>
	    
		<section anchor="jndi-parameters" title="JNDI Parameters">
		
		<section title="jndiConnectionFactoryName">
		<t>Specifies the JNDI name of the Java class providing the connection factory. </t>
		</section>
		<section title="jndiInitialContextFactory">
		<t>Specifies the fully qualified Java class name of the "InitialContextFactory" implementation class to use. </t>
		</section>
		<section title="jndiURL">
		<t>Specifies the JNDI provider URL, in a form consistent with javax.naming.spi.NamingManager.getURLContext(String
        scheme, Hashtable environment) as defined in the JNDI specification.</t>
		</section>
		
		<section title="Additional JNDI Parameters" anchor="additional-jndi-params" >
		<t>It is possible that connecting to a JNDI provider requires additional
		parameters.  These parameters can be passed in as custom parameters (see
		Section 4.4).  To identify a custom parameter as JNDI specific, the
		parameter name must start with the prefix "jndi-".</t>
		
		<t>For example, if the JNDI provider requires a parameter named
		com.sun.jndi.someParameter, you can supply the parameter in the URI as:
		jndi-com.sun.jndi.someParameter=someValue</t>
  
		</section>
		</section>

		<section anchor="jndi-lookup"
			title="Performing a JNDI Look-up">
			<t>
				To perform a look-up based on a JNDI variant URI an application must create a JNDI 
				InitialContext object.  The InitialContext object can then be used to look up the 
				JMS ConnectionFactory object (using the "jndiConnectionFactoryName" URI parameter); 
				the target JMS Destination object (using the &lt;jms-dest&gt; portion of the JMS URI); and 
				the "replyToName" JMS Destination object (if the "replyToName" parameter is specified on the 
				URI).
				</t>	
				<t>
				The application creates the InitialContext object by first setting up two properties:
				"Context.INITIAL_CONTEXT_FACTORY", with the value of the 
				jndiInitialContextFactory JMS URI parameter; and
				"Context.PROVIDER_URL", with the value of the 
				jndiURL URI parameter, and then passing the two properties to the 
				InitialContext constructor.  
				</t>
				<t>
				To locate a connection factory or destination object, the application passes the name
				of the object into the InitialContext.lookup() method.  
				</t>
				<t>
				For example, the JMS URI...</t>				
   	<figure>
   		<artwork>
    			<![CDATA[
jms:jndi:REQ_QUEUE?jndiURL=file:/C:/JMSAdmin
&jndiInitialContextFactory=com.sun.jndi.fscontext.RefFSContextFactory
&jndiConnectionFactoryName=CONNFACT
&replyToName=RESP_QUEUE          
         ]]></artwork>
		</figure>		
<t>				
				...would be used by the following (non-normative) code sample to locate and retrieve a JMS 
				ConnectionFactory called "CONNFACT", and JMS Destinations called "REQ_QUEUE" 
				and "RESP_QUEUE", from a file system JNDI context called "c:/JMSAdmin".
	</t>			
   	<figure>
   		<artwork>
    			<![CDATA[

/*
 * Preconditions on URI: 
 * - portion <jms-dest> has been parsed into variable "jms_dest"
 * - parameters "jndiConnectionFactoryName",
 *   "jndiInitialContextFactory", "replyToName" and "jndiURL" have
 *   been parsed into variables of the same name
 */
Hashtable environment = new Hashtable();
environment.put(Context.INITIAL_CONTEXT_FACTORY,
  jndiInitialContextFactory);
environment.put(Context.PROVIDER_URL, jndiURL);
/*
 *  Create File System Initial Context
 */
Context ctx = new InitialContext(environment);
/*
 * Now get the JMS ConnectionFactory and Destination.  These will be
 * used later on in the application to create the JMS Connection and
 * send / receive messages 
 */
ConnectionFactory jmsConnFact = (ConnectionFactory)
  ctx.lookup(jndiConnectionFactoryName);
Destination requestDest = (Destination) ctx.lookup(jms_dest);
Destination replyDest = (Destination) ctx.lookup(replyToName);

]]></artwork>
		</figure>
    <t>				
		The ConnectionFactory is used to create a Connection, which itself is used 
		to create a Session.  The session can then be used to create the MessageProducer
		- which sends messages to the target destination, and the MessageConsumer which 
		receives messages from the replyToName destination (as shown in the following code 
		extract)
	</t>			
   	<figure>
   		<artwork>
    			<![CDATA[
/*
 * Create a producer to send a message to the request destination
 * that was specified in the URI, then create the message, setting
 * the replyToName destination in the message to the one specified
 * in the URI, and send it.
 */    			
MessageProducer producer = sess.createProducer(requestDest);     
BytesMessage reqMsg = sess.createBytesMessage();
reqMsg.setJMSReplyTo(replyDest);
producer.send(reqMsg);
/*
 * Create a consumer to get a message from the replyToName
 * destination using a selector to get the specific response to this
 * request. The responder must set the correlation ID of the response
 * to the message ID of the request message
 */
MessageConsumer consumer = sess.createConsumer(replyDest,
        "JMSCorrelationID = '" + reqMsg.getJMSMessageID() + "'");
Message respMsg = (Message) consumer.receive(300000);			

]]></artwork>
		</figure>




	<section anchor="jndi-custom-parameter-lookup" title="Performing a JNDI Look-up with Custom Parameters">
	<t>Any custom parameters with a prefix of "jndi-" in the URI should be used
	when establishing a connection to the JNDI provider.  Before passing the
	custom parameter to the JNDI provider, remove the "jndi-" prefix as the
	prefix is for identifying the custom parameter in the URI only.</t>
	
	<t>For example, the JMS URI...</t>				
   	<figure>
   		<artwork>
    			<![CDATA[
jms:jndi:REQ_QUEUE?jndiURL=file:/C:/JMSAdmin
&jndiInitialContextFactory=com.sun.jndi.fscontext.RefFSContextFactory
&jndiConnectionFactoryName=CONNFACT
&jndi-com.sun.jndi.someParameter=someValue
         ]]></artwork>
	</figure>
	<t>...instructs the consumer to use the following properties to connect to
the JNDI provider:</t>
   	<figure>
   		<artwork>
    			<![CDATA[
java.naming.provider.url=file:/C:/JMSAdmin
java.naming.factory.initial=
	com.sun.jndi.fscontext.RefFSContextFactory
com.sun.jndi.someParameter=someValue
         ]]></artwork>
	</figure>

	</section>

	</section>

    </section>

    
    <section anchor="queue-and-topics-variant" title="Vendor Destination Names - Variants &quot;queue&quot; And &quot;topic&quot;" >
    
    <t>The JMS Session object provides a means to directly access queues and
	topics.  Specifically, it has the methods Session.createQueue(String
	name), and Session.createTopic(String name).  These methods can be used
	to "create" the Java representation of an existing JMS Topic or Queue.
    </t>
    
    <t>Since the Session interface requires external knowledge about whether a
	given name relates to a queue or topic, rather than introducing one new
	variant, this section defines two variants.  A JMS URI can indicate
	which of these methods to use by specifying the appropriate variant -
	either "queue" or "topic". For example:</t>
	<figure>
    	<artwork>
  jms:queue:ExampleQueueName</artwork>
    </figure>
    <t>to identify a JMS queue Destination, and</t>
    <figure>
    	<artwork>
  jms:topic:ExampleTopicName</artwork>
    </figure>
    <t>to identify a JMS topic Destination.</t>
    
    <t>JMS only specifies one way to obtain the names used by these APIs.  With
	a JMS Queue or Topic available, an implementation can call
	Queue.getQueueName(), or Topic.getTopicName(), respectively, both of
	which return a String object.  To create a correct corresponding URI,
	the resulting string must use standard URI escape mechanisms so that the
	resulting characters conform to &lt;jms-dest&gt;.</t>
    
    <section anchor="topic-reply" title="Treatment of replyToName parameter" >
    <t>When used with the "queue" and "topic" variants, the replyToName
	parameter, specified in section 4.1.4, always refers to a name of a JMS
	queue to look up via the Session.createQueue() method.  For either
	variant, if a JMS topic is instead required as a response destination, a
	JMS URI can employ the "topicReplyToName" parameter.  This parameter
	defines a name to look up with the Session.createTopic() method.</t>
	
	<t>A JMS URI MUST NOT specify both a "topicReplyToName" and a "replyToName"
	paramter.</t>
	
	</section>
	<section anchor="session-via-jndi" title="Obtaining a Session via JNDI" >
	<t>Using the Session.createQueue(), and Session.createTopic() methods
	assumes that a client program has already obtained a Session object.
	Where does that Session object come from - how does a client get it?</t>
	
	<t>One way to get a Session object is to simply revert to using JNDI.  That
	is, if a Session is not available to the client from some other context, the
	"queue" and "topic" variants MAY reuse the URL parameters specified in
	section 4.2.1, JNDI Parameters.  Via JNDI, those parameters will
	identify a ConnectionFactory, which can then be used to obtain a Session
	object.</t>
	
	<t>Combining the "queue" and "topic" variants with JNDI lookup for an
	implementation of ConnectionFactory raises an important consideration
	for JMS URI clients.  Once clients are using JNDI for one part of
	discovering a Destination, they almost certainly could use a
	vendor-neutral JNDI lookup for a Destination object, rather than a
	vendor-specific means.  As a result, clients should carefully consider
	alternatives to this approach.</t>
	
    </section>
    
    <section anchor="queue-topic-limitations" title="Limitations of &quot;queue&quot; and &quot;topic&quot;">
    
    <t>The JMS specification clearly identifies the two methods on the Session
	interface as returning vendor specific names for destinations.
	Consequently, users of the JMS URI scheme should carefully consider when
	these two variants should be applied.  If users plan switching between
	JMS vendors, they should also plan on regenerating resources that
	contain URIs in this vendor specific form.</t>
	
	<t>A JMS vendor may provide alternate ways to obtain the names that can be
	passed to Session.createQueue(), and Session.createTopic().  When using
	those alternate means, users of this URI specification should verify
	that the obtained names work as expected in all circumstances.</t>
	
    </section>
    
    </section>
            
		<section title="Custom parameters">
		<t>The set of parameters is extensible.  Any other vendor- or application-defined parameter may be supplied,
		in the URI, by passing it as &lt;param-name&gt;=&lt;param-value&gt; just like the set of well-known parameters.
		</t>
		</section>
		<t><spanx style="emph">Warning</spanx>: Vendors and applications MUST NOT include sensitive information (such as authorization tokens) in a URI.  Other means of authorization, authentication, and identification should be used.  Also see the security discussion below about properties that may be duplicated as JMS message properties. </t>
		</section>
  

  <section anchor="encoding" title="Encoding considerations">
    <t>The jms URI scheme distinguishes between &lt;unreserved&gt; characters and &lt;pct-encoded&gt; characters, as
    defined in <xref target="RFC3986"/>.  Apart from these encoding considerations, the characters '?' and 
    '&amp;' MUST be encoded when they appear within the &lt;jms-dest&gt; particle (for example, a JNDI name) or 
    in query parameters.  The character ':' SHOULD be escaped, when appearing in the &lt;jms-dest&gt; portion 
    of the syntax.</t>
    <t>Conversions to and from IRIs should follow the rules of RFC 3987, sections 3.1 and 3.2.  As per sections
    1.2c and 6.4 of <xref target="RFC3987"/>, all parts of the jms URI MUST use the UTF-8 encoding when
    converting to and from IRI format.</t>
  </section>

  <section anchor="scheme-usage" title="Applications/protocols that use the JMS URI scheme name">
    <t>A variety of vendors provide implementations of the JMS Service Provider Interface.  These products interoperate at the API level, in the Java programming language. </t>
    <t>Some vendors have provided additional products which interoperate with their own SPI implementations.  These extensions may also be able to make use of this URI scheme.</t>
    <t>The vendors working on this URI scheme are also working on a specification for carrying SOAP messages 
    over their respective implementations of JMS <xref target="REF-SOAPJMS"/>.  In addition, the 
    <eref target="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=sca-bindings">
    Service Component Architecture Bindings TC</eref> at OASIS will employ the jms URI scheme
    to identify JMS Destinations in appropriate circumstances.</t>
  </section>

  <section anchor="Interoperability" title="Interoperability considerations">
    <t>This jms URI scheme focuses on identifying a JMS Destination object, and some characteristics
    of communication using that Destination, and specifically excludes any notion of describing how JMS itself is implemented
    and how it delivers messages.  As a consequence of this focus, interoperability concerns
    are limited to how implementations obtain and use a Destination object.
    </t>
    
    <t>This scheme definition describes three variants for obtaining a Destination.  These variants
    achieve their aims with the use of JNDI and JMS APIs, with no new APIs or protocols defined here.
    As a consequence, interoperability concerns may arise as a result of implementations that do
    not conform to the specifications for those APIs.  Further, the use of Java, and JNDI in
    particular, means that the configuration of the execution environment, and the use of Java
    ClassLoaders may affect the interpretation of any given URI.  Consumers of these URIs are urged
    to consider the scope and consistency of the environment across which these URIs will be shared.
    </t>
  	
    <t>As described in <xref target="semantics" />, others can define additional variants, which
    provide the means to describe how to look up JMS Destination objects in a manner specific
    to some environment.  For any new variant, the shared parameters defined in
    <xref target="shared-parameters" /> MUST have the same meaning in that variant as they do here.
    That way, tools and people can safely copy these parameters between environments.
    Users should be aware that employing variants not defined here may make it more difficult
    to switch to an alternate JMS provider.
    </t>
  </section>

  <section anchor="security" title="Security Considerations">
    <t>Section 7 of <xref target="RFC3986"/> identifies some of the security concerns that should be identified in this specification.</t>

    <section title="Reliability and Consistency">
	    <t>This specification identifies only the variant (&lt;jms-variant&gt;) and variant specific
	    details (&lt;jms-dest&gt;) as an essential part of the URI. For reliability and consistency
	    purposes, these are the only part that can reasonably be expected to be stable.  Other optional JMS configuration
	    and message properties, indicated as URI parameters, like the "timeToLive", may
	    reasonably be determined by the sender of a message, without affecting the recipient.
	    Insofar as a recipient may wish to dictate certain parameters, such as the
	    "jndiConnectionFactoryName", those parameters can be specified.</t>
    </section>

    <section title="Malicious Construction">

			<section title="Recipient Concerns">
				<t>A malicious consumer of a service using a JMS URI could send,
				as part of a JMS message, a URI with a parameter such as "timeToLive"
				with a value specified in the URI that differs from the corresponding
				JMS message property ("JMSExpiration" header field, in this example).  In the
				case of such messages with such URIs, recipients are strongly cautioned
				to avoid applying processing logic based on particular URI parameters.
				Discrepancies in the message could be used to exploit differences in behavior between
				the selectors that a JMS-based application might use to affect which
				messages it sees, and the processing of the rest of the application.
				As defined in this document, the parameters of concern include: </t>
				<t>
				<list>
					<t>deliveryMode</t>
					<t>timeToLive</t>
					<t>priority</t>
				</list>
				</t>
				<t>Message senders are strongly urged to remove from the URI extra parameters like the
				above in environments where the data will be redundant with information specified
				elsewhere in the JMS message. </t>
				<t>Any use of additional parameters, either as a part of a definition of a new variant,
				or for more general use, should also specify whether those parameters should be removed by
				a sender as specified here.  If a recipient is aware of the jms URI scheme, and it
				receives a message containing a JMS URI, it MUST ignore or discard parameters that
				it does not recognize.
				</t>
			</section>

			<section title="Sender Concerns">
				<t>A third party could intercept and replace a URI containing any of the
				JMS/JNDI configuration parameters, such as "jndiConnectionFactoryName",
				"jndiInitialContextFactory", "jndiURL".  As these parameters may affect how
				an implementation establishes an initial connection, such parameters
				could be used as a means to subvert communications.
				This could possibly result in re-routing communications to third-parties,
				who could then monitor sent messages.  Clients should use these URI
				parameters only when assured of their validity in trusted environments. </t>
			</section>
		</section>

		<section title="Back-end Transcoding">
			<t>This specification, in using the URI specification, and building around the JMS specification, has no particular transcoding issues.  Any such issues are problems with the underlying implementation of Java and Java Messaging Service being employed. </t>
		</section>

		<section title="Semantic Attacks">
			<t>A possible semantic attack on the "jndi" variant could be accomplished by replacing
			characters of the JMS URI from one language with equivalent looking characters
			from another language, known as an "IDN homograph attack" <xref target="REF-Homograph">(IDN)</xref>.
			This kind of attack could occur in a variety of ways.  For example, if an environment allows
			for the automatic registration of JNDI destination names, a malicious actor could
			register and then publicize an alternate of an existing destination name.  Such an environment
			ought to prevent the use of homograph equivalents, perhaps by restricting allowed characters,
			so that clients do not accidentally send their requests to unintended destinations. </t>
			
			<t>The "queue" and "topic" variants are subject to the same concerns as the
			JNDI variant.  In addition, because the destination names are vendor
			defined, URIs employing these two variants may employ special characters
			that significantly change the meaning of the URI.  It is possible that
			the introduction of a single character - difficult for a human to notice
			- might dramatically change the intended meaning of a URI.  In
			situations where this might be an issue, users of this URI should
			strongly consider the "jndi" variant instead.</t>
			
		</section>

		<section title="Other Security Concerns">
			<t>This specification does not define or anticipate any use for IP addresses as part of the URI,
			so no issues around IP addresses, rare or otherwise, are raised by this specification. </t>
			
			<t>This specification does not define any characteristics of a jms scheme URI that contain
			sensitive information. </t>
		</section>

  </section>

  <section anchor="iana" title="IANA Considerations">
    <t>
    	The IANA is asked to register the Java Message Service URI
    	scheme described in this document, according to the following
    	scheme registration request, using the template from <xref target="RFC4395"/>:
    </t>
    <t>
       <list style="symbols">
           	<t>URI scheme name: jms</t>
           	<t>Status: Permanent</t>
           	<t>URI scheme syntax: See <xref target="syntax" /></t>
		    <t>URI scheme semantics: See <xref target="semantics" /></t>
			<t>Encoding considerations: See <xref target="encoding" /></t>
		    <t>Applications/protocols that use this URI scheme name: See <xref target="scheme-usage" /></t>
		    <t>Interoperability considerations: See <xref target="Interoperability" /> </t>
		    <t>Security considerations: See <xref target="security" /> </t>
		    <t>Contact: See Authors section</t>
		    <t>References:  See References section</t>
       </list>		
     </t>
  </section>


  <section anchor="contributors" title="Contributors">
  <t>The authors gratefully acknowledge the contributions of: 
  	<list>
  		<t>Phil Adams - International Business Machines Corporation - phil_adams@us.ibm.com</t>
    	<t>Glen Daniels - WSO2 - glen@wso2.com</t>
    	<t>Peter Easton - Progress Software - peaston@progress.com</t>
		<t>Tim Frank - Software AG. - tim.frank@softwareag.com</t>
    	<t>Lei Jin - BEA Systems, Inc. - ljin@bea.com</t>
    	<t>Eric Johnson - TIBCO Software Inc. - eric@tibco.com</t>
    	<t>Vinod Kumar - BEA Systems, Inc. - vkumar@bea.com</t>
    	<t>Amelia A. Lewis - TIBCO Software Inc. - alewis@tibco.com</t>
    	<t>Roland Merrick - International Business Machines Corporation - roland@uk.ibm.com</t>
    	<t>Mark Phillips - International Business Machines Corporation - m8philli@uk.ibm.com</t>
		<t>Derek Rokicki - Software AG. - derek.rokicki@softwareag.com</t>
    	<t>Stephen Todd - International Business Machines Corporation - stephen_todd@uk.ibm.com</t>
    	<t>Dongbo Xiao - BEA Systems, Inc. - xiaod@bea.com</t>
    	<t>Prasad Yendluri - Software AG - prasad.yendluri@softwareag.com</t>
    </list>
    </t>
  </section>
  
  <section anchor="acknowledgement" title="Acknowledgements">
    <t>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</t>
  </section>

</middle>

<back>
<references title="Normative References">

  &RFC2119; &RFC3986; &RFC3987; &RFC4395; &RFC5234;

</references>
<references title="Informative References">

	<reference anchor='REF-JMS' target="http://java.sun.com/products/jms/">
			<front>
					<title>Java Message Service (JMS)</title>
					<author initials="M." surname="Hapner" fullname="Mark Hapner">
						<organization>Sun Microsystems</organization>
					</author>
					<author initials="R." surname="Burridge" fullname="Rich Burridge">
						<organization>Sun Microsystems</organization>
					</author>
					<author initials="R." surname="Sharma" fullname="Rahul Sharma">
						<organization>Sun Microsystems</organization>
					</author>
					<author initials="J." surname="Fialli" fullname="Joseph Fialli">
						<organization>Sun Microsystems</organization>
					</author>
					<author initials="K." surname="Stout" fullname="Kate Stout">
						<organization>Sun Microsystems</organization>
					</author>
					<date month="April" year="2002"/>
			</front>
	</reference>
	
	<reference anchor='REF-JNDI' target="http://java.sun.com/products/jndi/docs.html">
	    <front>
	        <title>Java Naming and Directory Interface Application Programming Interface</title>
	        <author fullname="">
	            <organization>Sun Microsystems, Inc.</organization>
	        </author>
	        <date month="July" year="1999" />
	    </front>
	</reference>

	<reference anchor='REF-Homograph' target="http://en.wikipedia.org/wiki/IDN_homograph_attack">
			<front>
					<title>IDN Homograph attack</title>
					<author fullname="Various">
						<organization>Unknown</organization>
					</author>
					<date month="any" year="2005-2006" />
			</front>
	</reference>

	<reference anchor='REF-SOAPJMS' target="http://www.w3.org/Submission/SOAPJMS/">
			<front>
					<title>SOAP over JMS</title>
					<author initials="G" surname="Daniels" fullname="Glen Daniels">
						<organization>WS02</organization>
					</author>
					<author initials="P" surname="Easton" fullname="Peter Easton">
						<organization>Progress Software</organization>
					</author>
					<author initials="T" surname="Frank" fullname="Tim Frank">
						<organization>Software AG.</organization>
					</author>
					<author initials="E" surname="Johnson" fullname="Eric Johnson">
						<organization>TIBCO Software Inc.</organization>
					</author>
					<author initials="A" surname="Lewis" fullname="Amy Lewis">
						<organization>TIBCO Software Inc.</organization>
					</author>
					<author initials="R" surname="Merrick" fullname="Roland Merrick">
						<organization>International Business Machines Corporation</organization>
					</author>
					<author initials="M" surname="Phillips" fullname="Mark Phillips">
						<organization>International Business Machines Corporation</organization>
					</author>
					<author initials="D" surname="Xiao" fullname="Dongbo Xiao">
						<organization>BEA Systems</organization>
					</author>
					<date month="October" year="2007" />
			</front>
	</reference>
</references>

</back>
</rfc>

