From bf082bc3aab42f68ad04dd92cae4432c470942c6 Mon Sep 17 00:00:00 2001 From: Steve Bohlen Date: Thu, 10 May 2012 18:16:27 -0400 Subject: [PATCH] fixing changes related to upgrades to Common.Logging 2.0 --- .../Spring.Messaging.Ems.xml | 4605 +++++++++-------- .../Spring.Web.Mvc4/Spring.Web.Mvc4.xml | 324 +- .../Aspects/Exception/CaptureOutputLogger.cs | 5 +- .../ExeConfigurationSystemTests.config | 14 +- .../ExeConfigurationSystemTests.cs | 4 +- 5 files changed, 2476 insertions(+), 2476 deletions(-) diff --git a/src/Spring/Spring.Messaging.Ems/Spring.Messaging.Ems.xml b/src/Spring/Spring.Messaging.Ems/Spring.Messaging.Ems.xml index 294ed5c0..7be40ab0 100644 --- a/src/Spring/Spring.Messaging.Ems/Spring.Messaging.Ems.xml +++ b/src/Spring/Spring.Messaging.Ems/Spring.Messaging.Ems.xml @@ -4,216 +4,499 @@ Spring.Messaging.Ems - + + Base class for EmsTemplate} and other + EMS-accessing gateway helpers, adding destination-related properties to + EmsAccessor's common properties. + + +

Not intended to be used directly. See EmsTemplate.

+ +
+ Juergen Hoeller + Mark Pollack (.NET) +
+ + Base class for EmsTemplate and other EMS-accessing gateway helpers + It defines common properties like the ConnectionFactory}. The subclass + EmsDestinationAccessor adds further, destination-related properties. + + Not intended to be used directly. See EmsTemplate. + + + Juergen Hoeller + Mark Pollack (.NET) + + - A Connection object is a client's active connection to TIBCO EMS Server. + Verify that ConnectionFactory property has been set. - + - An interface containing all methods and properties on the TIBCO.EMS.Connection class. - Refer to the TIBCO EMS API documentation for more information. + Creates the connection via the ConnectionFactory. + + + + + + Creates the session for the given Connection + + The connection to create a session for. + The new session + + + + Returns whether the Session is in client acknowledgement mode. + + The session to check. + true if in client ack mode, false otherwise + + + + Gets or sets the connection factory to use for obtaining EMS Connections. + + The connection factory. + + + + Gets or sets the session acknowledge mode for EMS Sessions including whether or not the session is transacted + + + Set the EMS acknowledgement mode that is used when creating a EMS + Session to send a message. The default is AUTO_ACKNOWLEDGE. + + The session acknowledge mode. + + + + Set the transaction mode that is used when creating a EMS Session. + Default is "false". + + + Setting this flag to "true" will use a short local EMS transaction + when running outside of a managed transaction, and a synchronized local + EMS transaction in case of a managed transaction being present. + The latter has the effect of a local EMS + transaction being managed alongside the main transaction (which might + be a native ADO.NET transaction), with the EMS transaction committing + right after the main transaction. + + + + + + Resolves the given destination name to a EMS destination. + + The current session. + Name of the destination. + The located Destination + If resolution failed. + + + + Gets or sets the destination resolver that is to be used to resolve + Destination references for this accessor. + + The default resolver is a DynamicDestinationResolver. Specify a + JndDestinationResolver for resolving destination names as JNDI locations. + + The destination resolver. + + + + Gets or sets a value indicating whether Publish/Subscribe + domain (Topics) is used. Otherwise, the Point-to-Point domain + (Queues) is used. + + + this + setting tells what type of destination to create if dynamic destinations are enabled. + true if Publish/Subscribe domain; otherwise, false + for the Point-to-Point domain. + + + A simple message converter that can handle TextMessages, BytesMessages, + MapMessages, and ObjectMessages. Used as default by EmsTemplate, for + ConvertAndSend and ReceiveAndConvert operations. + +

Converts a String to a EMS TextMessage, a byte array to a EMS BytesMessage, + a Map to a EMS MapMessage, and a Serializable object to a EMS ObjectMessage + (or vice versa).

+ + +
+ Juergen Hoeller + Mark Pollack (.NET) +
+ + Strategy interface that specifies a IMessageConverter + between .NET objects and EMS messages. + + + Mark Pollack + Juergen Hoeller + Mark Pollack (.NET) + + + Convert a .NET object to a EMS Message using the supplied session + to create the message object. + + the object to convert + + the Session to use for creating a EMS Message + + the EMS Message + + EMSException if thrown by EMS API methods + MessageConversionException in case of conversion failure + + + Convert from a EMS Message to a .NET object. + the message to convert + + the converted .NET object + + MessageConversionException in case of conversion failure + + + Convert a .NET object to a EMS Message using the supplied session + to create the message object. + + the object to convert + + the Session to use for creating a EMS Message + + the EMS Message + + EMSException if thrown by EMS API methods + MessageConversionException in case of conversion failure + + + Convert from a EMS Message to a .NET object. + the message to convert + + the converted .NET object + + MessageConversionException in case of conversion failure + + + Create a EMS TextMessage for the given String. + the String to convert + + current EMS session + + the resulting message + + EMSException if thrown by EMS methods + + + Create a EMS BytesMessage for the given byte array. + the byyte array to convert + + current EMS session + + the resulting message + + EMSException if thrown by EMS methods + + + Create a EMS MapMessage for the given Map. + the Map to convert + + current EMS session + + the resulting message + + EMSException if thrown by EMS methods + + + Create a EMS ObjectMessage for the given Serializable object. + the Serializable object to convert + + current EMS session + + the resulting message + + EMSException if thrown by EMS methods + + + Extract a String from the given TextMessage. + the message to convert + + the resulting String + + EMSException if thrown by EMS methods + + + Extract a byte array from the given BytesMessage. + the message to convert + + the resulting byte array + + EMSException if thrown by EMS methods + + + Extract a IDictionary from the given MapMessage. + the message to convert + + the resulting Map + + EMSException if thrown by EMS methods + + + + Extracts the serializable object from the given object message. + + The message to convert. + The resulting serializable object. + + + + Provides a layer of indirection when adding the 'type' of the object as a message property. Mark Pollack - + - Closes the connection and reclaims resources. + Convert from a type to a string. + + The type of object to convert. + + + + + Convert from a string to a type + + The type id. + + + + + Gets the name of the field in the message that has type information.. + + The name of the type id field. + + + + Convenient superclass for JNDI-based service locators, + providing configurable lookup of a specific JNDI resource. + + + + Exposes a JndiName property. + + Subclasses may invoke the Lookup method whenever it is appropriate. + Some classes might do this on initialization, while others might do it + on demand. The latter strategy is more flexible in that it allows for + initialization of the locator before the JNDI object is available. + + + Juergen Hoeller + Mark Pollack (.NET) + + + + Convenient superclass to access JndiProperties, JndiContextType or alternatively set the ILookupContext directly. + + Juergen Hoeller + Mark Pollack + + + + Create the JndiLookupContext if it has not been explicitly set. - + - Creates the session. + Gets or sets the lookup context. - if set to true the session has transaction semantcis. - Indicates whether and how the consumer is to acknowledge received messages. - This version of CreateSession accepts an integer value associated with the acknowledge mode described by a Session member and should only be used for backward compatibility. - This parameter is ignored if the session is transacted. - A newly created session. + The lookup context. - + - Creates the session. + Gets or sets the JNDI environment properties. - if set to true [transacted]. - The acknowledge mode. - When true, the new session has transaction semantics. - Indicates whether and how the consumer is to acknowledge received messages. - Legal values are listed under SessionMode. - This parameter is ignored if the session is transacted. + The jndi properties. + + + + Gets or sets the type of the jndi context. The default is JndiContextType.JMS + + The type of the jndi context. + + + + Ensure that the JndiName property is set and create the TIBCO EMS ILookupContext instance. + + + + + Lookups this instance using the JndiName and ExpectedType properties + + The object retrieved from Jndi + + + + Gets or sets the Jndi name to lookup. + + The name of the jndi. + + + + Gets or sets the type that the located JNDI object is supposed + to be assignable to, if any. + + The expected type. + + + + Callback for browsing the messages in an EMS queue. + + + To be used with EmsTemplate's callback methods that take a IBrowserCallback argument + + Juergen Hoeller + Mark Pollack (.NET) + + + + Perform operations on the given Session and QueueBrowser + + The session. + The browser. + The object from working with the Session and QueueBrowser, may be null + If there is any problem when accessing EMS API + + + + Convenient super class for application classes that need EMS access. + + + Requires a ConnectionFactory or a EmsTemplate instance to be set. + It will create its own EmsTemplate if a ConnectionFactory is passed in. + A custom EmsTemplate instance can be created for a given ConnectionFactory + through overriding the createEmsTemplate method. + + + + + + Creates a EmsTemplate for the given ConnectionFactory. + + Only invoked if populating the gateway with a ConnectionFactory reference. + Can be overridden in subclasses to provide a different EmsTemplate instance + + + The connection factory. + + + + + Ensures that the JmsTemplate is specified and calls . + + + + + Subclasses can override this for custom initialization behavior. + Gets called after population of this instance's properties. + + + + + Gets or sets the EMS template for the gateway. + + The EMS template. + + + + Gets or sets he EMS connection factory to be used by the gateway. + Will automatically create a EmsTemplate for the given ConnectionFactory. + + The connection factory. + + + Callback for executing any number of operations on a provided + Session + + +

To be used with the EmsTemplate.Execute(ISessionCallback)} + method, often implemented as an anonymous inner class.

+
+ Mark Pollack + + +
+ + Execute any number of operations against the supplied EMS + Session, possibly returning a result. + + the EMS Session - A newly created session. - - - - Starts (or restarts) a connection's delivery of incoming messages. - - - - - Temporarily stops a connection's delivery of incoming messages. - - - - - A String representation of the connection object - - - A that represents this instance. + a result object from working with the Session, if any (so can be null) + EMSException if there is any problem - + - Gets the native TIBCO EMS connection. + subclass that adds + Session, MessageProducer, and MessageConsumer caching. This ConnectionFactory + also switches the ReconnectOnException property to true + by default, allowing for automatic recovery of the underlying + Connection. - The native connection. + + By default, only one single Session will be cached, with further requested + Sessions being created and disposed on demand. Consider raising the + SessionCacheSize property in case of a high-concurrency environment. + + NOTE: This ConnectionFactory requires explicit closing of all Sessions + obtained from its shared Connection. This is the usual recommendation for + native EMS access code anyway. However, with this ConnectionFactory, its use + is mandatory in order to actually allow for Session reuse. + + + Note also that MessageConsumers obtained from a cached Session won't get + closed until the Session will eventually be removed from the pool. This may + lead to semantic side effects in some cases. For a durable subscriber, the + logical Session.Close() call will also close the subscription. + Re-registering a durable consumer for the same subscription on the same + Session handle is not supported; close and reobtain a cached Session first. + + + + Juergen Hoeller + Mark Pollack (.NET) - + - Occurs when the client library detects a problem with the connection. + A ConnectionFactory adapter that returns the same Connection + from all CreateConnection() calls, and ignores calls to + Connection.Close(). According to the JMS Connection + model, this is perfectly thread-safe. The + shared Connection can be automatically recovered in case of an Exception. - - - - Gets the URL of the server this connection is currently connected to - - The active URL. - - - - Gets or sets the client ID. - - The client ID. - - - - Gets the connection ID. - - The connection ID. - - - - Gets or sets the exception listener. - - The exception listener. - - - - Gets a value indicating whether the connection is closed. - - true if the connection is closed; otherwise, false. - - - - Gets a value indicating whether the connection communicates with a secure protocol - - true if the connection communicates with a secure protocol; otherwise, false. - - - - Gets the metadata for this connection - - The metadata for this connection. - - - - Initializes a new instance of the class. - - The underlying TIBCO EMS connection. - - - - Closes the connection and reclaims resources. - - - - - Creates the session. - - if set to true the session has transaction semantcis. - Indicates whether and how the consumer is to acknowledge received messages. - This version of CreateSession accepts an integer value associated with the acknowledge mode described by a Session member and should only be used for backward compatibility. - This parameter is ignored if the session is transacted. - A newly created session. - - - - Creates the session. - - if set to true [transacted]. - The acknowledge mode. - When true, the new session has transaction semantics. - Indicates whether and how the consumer is to acknowledge received messages. - Legal values are listed under SessionMode. - This parameter is ignored if the session is transacted. - A newly created session. - - - - Starts (or restarts) a connection's delivery of incoming messages. - - - - - Temporarily stops a connection's delivery of incoming messages. - - - - - Gets the native TIBCO EMS connection. - - The native connection. - - - - Occurs when the client library detects a problem with the connection. - - - - - Gets the URL of the server this connection is currently connected to - - The active URL. - - - - Gets or sets the client ID. - - The client ID. - - - - Gets the connection ID. - - The connection ID. - - - - Gets or sets the exception listener. - - The exception listener. - - - - Gets a value indicating whether the connection is closed. - - - true if the connection is closed; otherwise, false. - - - - - Gets a value indicating whether the connection communicates with a secure protocol - - - true if the connection communicates with a secure protocol; otherwise, false. - - - - - Gets the metadata for this connection - - The metadata for this connection. + + + You can either pass in a specific Connection directly or let this + factory lazily create a Connection via a given target ConnectionFactory. + + + Useful for testing and in applications when you want to keep using the + same Connection for multiple + calls, without having a pooling ConnectionFactory underneath. This may span + any number of transactions, even concurrently executing transactions. + + + Note that Spring's message listener containers support the use of + a shared Connection within each listener container instance. Using + SingleConnectionFactory with a MessageListenerContainer only really makes sense for + sharing a single Connection across multiple listener containers. + + + Juergen Hoeller + Mark Pollack + Mark Pollack (.NET) @@ -335,478 +618,6 @@ true to enable multicast; false to disable. - - - Gets or sets the the default length of time in milliseconds from its dispatch time - that a produced message should be retained by the message system. - - Time to live is set to zero by default. - The message time to live in milliseconds; zero is unlimited - - - - Market interface for EMS SSL store types - - - - - Parser for the EMS <listener-container> element. - - Mark Fisher - Juergen Hoeller - Mark Pollack (.NET) - - - - Parse the specified XmlElement and register the resulting - ObjectDefinitions with the IObjectDefinitionRegistry - embedded in the supplied - - The element to be parsed. - TThe object encapsulating the current state of the parsing process. - Provides access to a IObjectDefinitionRegistry - The primary object definition. - -

- This method is never invoked if the parser is namespace aware - and was called to process the root node. -

-
-
- - - Namespace parser for the EMS namespace. - - Mark Fisher - Juergen Hoeller - Mark Pollack (.NET) - - - - Register a MessageListenerContainer for the 'listener-container' tag. - - - - - EMS MessageConsumer decorator that adapts all calls - to a shared MessageConsumer instance underneath. - - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class. - - The target. - - - - Receives the next message produced for this message consumer. - - the next message produced for this message consumer, , or null if this message consumer is concurrently closed - - - - Receives the next message that arrives within the specified timeout interval. - - The timeout value. - the next message produced for this message consumer, or null if the timeout expires or this message consumer is concurrently closed - - - - Receives the next message if one is immediately available. - - the next message produced for this message consumer, or null if one is not available - - - - No-op implementation since it is caching. - - - - - Description that shows this is a cached MessageConsumer - - Description that shows this is a cached MessageConsumer - - - - Gets the target MessageConsumer, the consumer we are 'wrapping' - - The target MessageConsumer. - - - - Occurs when a message is received. - - - - - MessageProducer decorator that adapts calls to a shared MessageProducer - instance underneath, managing QoS settings locally within the decorator. - - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class. - - The target. - - - - Sends the specified message. - - The message. - - - - Sends the specified message. - - The message. - The delivery mode. - The priority. - The time to live. - - - - Sends a message to the specified destination. - - The destination. - The message. - - - - Reset properties. - - - - - Returns string indicated this is a wrapped MessageProducer - - - - - - Gets or sets a value indicating whether disable setting of the message ID property. - - true if disable message ID setting; otherwise, false. - - - - Gets or sets a value indicating whether disable setting the message timestamp property. - - - true if disable message timestamp; otherwise, false. - - - - - Gets or sets the producer's default delivery mode. - - The message delivery mode for this message producer - - - - Gets or sets the MSG delivery mode. - - The MSG delivery mode. - - - - Gets or sets the priority of messages sent with this producer. - - The priority. - - - - Gets or sets the the default length of time in milliseconds from its dispatch time - that a produced message should be retained by the message system. - - Time to live is set to zero by default. - The message time to live in milliseconds; zero is unlimited - - - - Gets the target MessageProducer, the producer we are 'wrapping' - - The target MessageProducer. - - - - Wrapper for Session that caches producers and registers itself as available - to the session cache when being closed. Generally used for testing purposes or - if need to get at the wrapped Session object via the TargetSession property (for - vendor specific methods). - - Juergen Hoeller - Mark Pollack - - - - Subinterface of Session to be implemented by - implementations that wrap an Session to provide added - functionality. Allows access to the the underlying target Session. - - Mark Pollack - - - - - - Gets the target session of the decorator. - This will typically be the native provider Session or a wrapper from a session pool. - - The underlying session, never null - - - - Initializes a new instance of the class. - - The target session. - The session list. - The CachingConnectionFactory. - - - - Creates the producer, potentially returning a cached instance. - - The destination. - A message producer. - - - - If have not yet reached session cache size, cache the session, otherwise - dispose of all cached message producers and close the session. - - - - - Creates the consumer, potentially returning a cached instance. - - The destination. - A message consumer - - - - Creates the consumer, potentially returning a cached instance. - - The destination. - The selector. - A message consumer - - - - Creates the consumer, potentially returning a cached instance. - - The destination. - The selector. - if set to true [no local]. - A message consumer. - - - - Creates the durable consumer, potentially returning a cached instance. - - The destination. - The name of the durable subscription. - The selector. - if set to true [no local]. - A message consumer - - - - Creates the durable consumer, potentially returning a cached instance. - - The destination. - The name of the durable subscription. - A message consumer - - - - Creates the consumer. - - The destination. - The selector. - if set to true [no local]. - The subscription. - - - - - Gets the queue. - - The name. - - - - - Gets the topic. - - The name. - - - - - Creates the temporary queue. - - - - - - Creates the temporary topic. - - - - - - Creates the message. - - - - - - Creates the text message. - - - - - - Creates the text message. - - The text. - - - - - Creates the map message. - - - - - - Creates the bytes message. - - - - - - Creates the object message. - - - - - - Creates the object message. - - The body. - - - - - Creates the stream message. - - - - - - Commits this instance. - - - - - Rollbacks this instance. - - - - - Returns a that represents the current . - - - A that represents the current . - - - - - Gets the target, for testing purposes. - - The target. - - - - Gets a value indicating whether this is transacted. - - true if transacted; otherwise, false. - - - - Gets the acknowledgement mode. - - The acknowledgement mode. - - - - subclass that adds - Session, MessageProducer, and MessageConsumer caching. This ConnectionFactory - also switches the ReconnectOnException property to true - by default, allowing for automatic recovery of the underlying - Connection. - - - By default, only one single Session will be cached, with further requested - Sessions being created and disposed on demand. Consider raising the - SessionCacheSize property in case of a high-concurrency environment. - - NOTE: This ConnectionFactory requires explicit closing of all Sessions - obtained from its shared Connection. This is the usual recommendation for - native EMS access code anyway. However, with this ConnectionFactory, its use - is mandatory in order to actually allow for Session reuse. - - - Note also that MessageConsumers obtained from a cached Session won't get - closed until the Session will eventually be removed from the pool. This may - lead to semantic side effects in some cases. For a durable subscriber, the - logical Session.Close() call will also close the subscription. - Re-registering a durable consumer for the same subscription on the same - Session handle is not supported; close and reobtain a cached Session first. - - - - Juergen Hoeller - Mark Pollack (.NET) - - - - A ConnectionFactory adapter that returns the same Connection - from all CreateConnection() calls, and ignores calls to - Connection.Close(). According to the JMS Connection - model, this is perfectly thread-safe. The - shared Connection can be automatically recovered in case of an Exception. - - - - You can either pass in a specific Connection directly or let this - factory lazily create a Connection via a given target ConnectionFactory. - - - Useful for testing and in applications when you want to keep using the - same Connection for multiple - calls, without having a pooling ConnectionFactory underneath. This may span - any number of transactions, even concurrently executing transactions. - - - Note that Spring's message listener containers support the use of - a shared Connection within each listener container instance. Using - SingleConnectionFactory with a MessageListenerContainer only really makes sense for - sharing a single Connection across multiple listener containers. - - - Juergen Hoeller - Mark Pollack - Mark Pollack (.NET) - Wrapped Connection @@ -1073,153 +884,593 @@ true if this instance is active; otherwise, false. - + - Implementation of Spring IExceptionListener interface that supports - chaining allowing the addition of multiple ExceptionListener instances in order. + Parser for the EMS <listener-container> element. + Mark Fisher Juergen Hoeller Mark Pollack (.NET) - + - Adds the exception listener to the chain + Parse the specified XmlElement and register the resulting + ObjectDefinitions with the IObjectDefinitionRegistry + embedded in the supplied - The listener. - - - - Called when an exception occurs in message processing. - - The exception. - - - - Gets the exception listeners as an array. - - The exception listeners. - - - Helper class for obtaining transactional EMS resources - for a given ConnectionFactory. - - Juergen Hoeller - Mark Pollack (.NET) - - - - Releases the given connection, stopping it (if necessary) and eventually closing it. - - Checks , if available. - This is essentially a more sophisticated version of - + The element to be parsed. + TThe object encapsulating the current state of the parsing process. + Provides access to a IObjectDefinitionRegistry + The primary object definition. + +

+ This method is never invoked if the parser is namespace aware + and was called to process the root node. +

- The connection to release. (if this is null, the call will be ignored) - The ConnectionFactory that the Connection was obtained from. (may be null) - whether the Connection might have been started by the application.
- - - Return the innermost target Session of the given Session. If the given - Session is a decorated session, it will be unwrapped until a non-decorated - Session is found. Otherwise, the passed-in Session will be returned as-is. - - The session to unwrap - The innermost target Session, or the passed-in one if no decorator - - - - Determines whether the given JMS Session is transactional, that is, - bound to the current thread by Spring's transaction facilities. - - The session to check. - The ConnectionFactory that the Session originated from - - true if is session transactional, bound to current thread; otherwise, false. - - - - Obtain a EMS Session that is synchronized with the current transaction, if any. - the ConnectionFactory to obtain a Session for - - the existing EMS Connection to obtain a Session for - (may be null) - - whether to allow for a local EMS transaction - that is synchronized with a Spring-managed transaction (where the main transaction - might be a ADO.NET-based one for a specific DataSource, for example), with the EMS - transaction committing right after the main transaction. If not allowed, the given - ConnectionFactory needs to handle transaction enlistment underneath the covers. - - the transactional Session, or null if none found - - EMSException in case of EMS failure - - - - Obtain a EMS Session that is synchronized with the current transaction, if any. - - the TransactionSynchronizationManager key to bind to - (usually the ConnectionFactory) - the ResourceFactory to use for extracting or creating - EMS resources - whether the underlying Connection approach should be - started in order to allow for receiving messages. Note that a reused Connection - may already have been started before, even if this flag is false. - - the transactional Session, or null if none found - - EMSException in case of EMS failure - - - Callback interface for resource creation. - Serving as argument for the DoGetTransactionalSession method. - - - - Fetch an appropriate Session from the given EmsResourceHolder. - the EmsResourceHolder - - an appropriate Session fetched from the holder, - or null if none found - - - - Fetch an appropriate Connection from the given EmsResourceHolder. - the EmsResourceHolder - - an appropriate Connection fetched from the holder, - or null if none found - - - - Create a new EMS Connection for registration with a EmsResourceHolder. - the new EMS Connection - - EMSException if thrown by EMS API methods - - - Create a new EMS Session for registration with a EmsResourceHolder. - the EMS Connection to create a Session for - - the new EMS Session - - EMSException if thrown by EMS API methods - - - - Return whether to allow for a local EMS transaction that is synchronized with - a Spring-managed transaction (where the main transaction might be a ADO.NET-based - one for a specific IDbProvider, for example), with the EMS transaction - committing right after the main transaction. - Returns whether to allow for synchronizing a local EMS transaction - + + + Common base class for all containers which need to implement listening + based on a Connection (either shared or freshly obtained for each attempt). + Inherits basic Connection and Session configuration handling from the + base class. + + + This class provides basic lifecycle management, in particular management + of a shared Connection. Subclasses are supposed to plug into this + lifecycle, implementing the as well as + + + + + Mark Pollack - - Callback for resource cleanup at the end of a non-native EMS transaction + + + The monitor object to lock on when performing operations on the connection. + + + The monitor object to lock on when performing operations that update the lifecycle of the container. + + + + + Call base class method, then and then + + + + + Validates the configuration of this container. The default implementation + is empty. To be overriden in subclasses. + + + + + Calls when the application context destroys the container instance. + + + + + Initializes this container. Creates a Connection, starts the Connection + (if the property hasn't been turned off), and calls + . + + If startup failed + + + + Stop the shared connection, call , and close this container. + + + + + Starts this container. + + if starting failed. + + + + Start the shared Connection, if any, and notify all invoker tasks. + + + + + Stops this container. + + if stopping failed. + + + + Notify all invoker tasks and stop the shared Connection, if any. + + if thrown by EMS API methods. + + + + + Register any invokers within this container. + Subclasses need to implement this method for their specific + invoker management process. A shared Connection, if any, will already have been + started at this point. + + + + + Close the registered invokers. Subclasses need to implement this method + for their specific invoker management process. A shared Connection, if any, + will automatically be closed afterwards. + + + + + Establishes a shared Connection for this container. + + + + The default implementation delegates to + which does one immediate attempt and throws an exception if it fails. + Can be overridden to have a recovery process in place, retrying + until a Connection can be successfully established. + + + If thrown by EMS API methods + + + + Refreshes the shared connection that this container holds. + + + Called on startup and also after an infrastructure exception + that occurred during invoker setup and/or execution. + + If thrown by EMS API methods + + + + Creates the shared connection for this container. + + + The default implementation creates a standard Connection + and prepares it through + + the prepared Connection + if the creation failed. + + + + Prepares the given connection, which is about to be registered + as shared Connection for this container. + + + The default implementation sets the specified client id, if any. + Subclasses can override this to apply further settings. + + The connection to prepare. + If the preparation efforts failed. + + + + Starts the shared connection. + + If thrown by EMS API methods + + + + + Stops the shared connection. + + if thrown by EMS API methods. + + + + Gets or sets the client id for a shared Connection created and used by this container. + + + Note that client ids need to be unique among all active Connections + of the underlying JMS provider. Furthermore, a client id can only be + assigned if the original ConnectionFactory hasn't already assigned one. + + The client id. + + + Set whether to automatically start the listener after initialization. +

Default is "true"; set this to "false" to allow for manual startup.

+
+
+ + + Set the name of the object in the object factory that created this object. + + The name of the object in the factory. + +

+ Invoked after population of normal object properties but before an init + callback like 's + + method or a custom init-method. +

+
+
+ + + Gets a value indicating whether this container is currently running, + that is, whether it has been started and not stopped yet. + + + true if this container is running; otherwise, false. + + + + + Gets a value indicating whether this container's listeners are generally allowed to run. + + + + >This implementation always returns true; the default 'running' + state is purely determined by /. + + + Subclasses may override this method to check against temporary + conditions that prevent listeners from actually running. In other words, + they may apply further restrictions to the 'running' state, returning + false if such a restriction prevents listeners from running. + + + true if running allowed; otherwise, false. + + + + Gets a value indicating whether this container is currently active, + that is, whether it has been set up but not shut down yet. + + true if active; otherwise, false. + + + Return whether a shared EMS Connection should be maintained + by this listener container base class. + + + + + + Gets the shared connection maintained by this container. + Available after initialization. + + The shared connection (never null) + if this container does not maintain a + shared Connection, or if the Connection hasn't been initialized yet. + + + + + + Exception that indicates that the initial setup of this container's + shared Connection failed. This is indicating to invokers that they need + to establish the shared Connection themselves on first access. + + + + + Initializes a new instance of the class. + + The message. + + + Exception thrown when a synchronized local transaction failed to complete + (after the main transaction has already completed). + + Jergen Hoeller + Mark Pollack (.NET) + + + + Creates a new instance of the SynchedLocalTransactionFailedException class. with the specified message. + + + A message about the exception. + + + + + Creates a new instance of the SynchedLocalTransactionFailedException class with the specified message + and root cause. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + EMS MessageConsumer decorator that adapts all calls + to a shared MessageConsumer instance underneath. + + Juergen Hoeller + Mark Pollack (.NET) + + + + Initializes a new instance of the class. + + The target. + + + + Receives the next message produced for this message consumer. + + the next message produced for this message consumer, , or null if this message consumer is concurrently closed + + + + Receives the next message that arrives within the specified timeout interval. + + The timeout value. + the next message produced for this message consumer, or null if the timeout expires or this message consumer is concurrently closed + + + + Receives the next message if one is immediately available. + + the next message produced for this message consumer, or null if one is not available + + + + No-op implementation since it is caching. + + + + + Description that shows this is a cached MessageConsumer + + Description that shows this is a cached MessageConsumer + + + + Gets the target MessageConsumer, the consumer we are 'wrapping' + + The target MessageConsumer. + + + + Occurs when a message is received. + + + + + Generic utility methods for working with EMS. Mainly for internal use + within the framework, but also useful for custom EMS access code. + + + + Close the given EMS Connection and ignore any thrown exception. + This is useful for typical finally blocks in manual EMS code. + + the EMS Connection to close (may be null) + + + + Close the given EMS Connection and ignore any thrown exception. + This is useful for typical finally blocks in manual EMS code. + + the EMS Connection to close (may be null) + + whether to call stop() before closing + + + + Close the given EMS Session and ignore any thrown exception. + This is useful for typical finally blocks in manual EMS code. + + the EMS Session to close (may be null) + + + + Close the given EMS MessageProducer and ignore any thrown exception. + This is useful for typical finally blocks in manual EMS code. + + the EMS MessageProducer to close (may be null) + + + + Close the given EMS MessageConsumer and ignore any thrown exception. + This is useful for typical finally blocks in manual EMS code. + + the EMS MessageConsumer to close (may be null) + + + + Commit the Session if not within a distributed transaction. + Needs investigation - no distributed tx in .NET messaging providers + the EMS Session to commit + + EMSException if committing failed + + + Rollback the Session if not within a distributed transaction. + Needs investigation - no distributed tx in EMS + the EMS Session to rollback + + EMSException if committing failed + + + + Closes the given queue browser and ignore any thrown exception. + This is useful for typical finally blocks in manual EMS code. + + The queue browser to close (may be null. + + + + Converts the acknowledgement mode from an integer to an enumeration. If the integer + does not match a valid enumeration, the returned enumeration is SessionMode.AutoAcknowledge + + The ack mode. + The corresponding SessionMode enumeration + + + + The various JNDI Context types. + + + + + Create a tibjmsnaming context to lookup administered object inside the tibjmsnaming server. + + + + + Create a ldap context to lookup administered object in an ldap server. + + + + + MessageProducer decorator that adapts calls to a shared MessageProducer + instance underneath, managing QoS settings locally within the decorator. + + Juergen Hoeller + Mark Pollack (.NET) + + + + Gets or sets the the default length of time in milliseconds from its dispatch time + that a produced message should be retained by the message system. + + Time to live is set to zero by default. + The message time to live in milliseconds; zero is unlimited + + + + Initializes a new instance of the class. + + The target. + + + + Sends the specified message. + + The message. + + + + Sends the specified message. + + The message. + The delivery mode. + The priority. + The time to live. + + + + Sends a message to the specified destination. + + The destination. + The message. + + + + Reset properties. + + + + + Returns string indicated this is a wrapped MessageProducer + + + + + + Gets or sets a value indicating whether disable setting of the message ID property. + + true if disable message ID setting; otherwise, false. + + + + Gets or sets a value indicating whether disable setting the message timestamp property. + + + true if disable message timestamp; otherwise, false. + + + + + Gets or sets the producer's default delivery mode. + + The message delivery mode for this message producer + + + + Gets or sets the MSG delivery mode. + + The MSG delivery mode. + + + + Gets or sets the priority of messages sent with this producer. + + The priority. + + + + Gets or sets the the default length of time in milliseconds from its dispatch time + that a produced message should be retained by the message system. + + Time to live is set to zero by default. + The message time to live in milliseconds; zero is unlimited + + + + Gets the target MessageProducer, the producer we are 'wrapping' + + The target MessageProducer. + + + + Market interface for EMS SSL store types + + + + Thrown by IMessageConverter implementations when the conversion + of an object to/from a Message fails. + + Mark Pollack + + + + Creates a new instance of the IMessageConverterException class. with the specified message. + + + A message about the exception. + + + + + Creates a new instance of the IMessageConverterException class with the specified message + and root cause. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + Perform operations on the given Session and MessageProducer. + The message producer is not associated with any destination. + + the EMS Session object to use + + the EMS MessageProducer object to use + + a result object from working with the Session, if any (can be null) + + Connection holder, wrapping a EMS Connection and a EMS Session. EmsTransactionManager binds instances of this class to the thread, @@ -1347,307 +1598,416 @@ true if frozen; otherwise, false. - + - A implementation - for a single EMS ConnectionFactory. Binds a - Connection/Session pair from the specified ConnecctionFactory to the thread, - potentially allowing for one thread-bound Session per ConnectionFactory. + Message listener adapter that delegates the handling of messages to target + listener methods via reflection, with flexible message type conversion. + Allows listener methods to operate on message content types, completely + independent from the EMS API. - - Application code is required to retrieve the transactional Session via - . Spring's - will autodetect a thread-bound Session and - automatically participate in it. + By default, the content of incoming messages gets extracted before + being passed into the target listener method, to let the target method + operate on message content types such as String or byte array instead of + the raw Message. Message type conversion is delegated to a Spring + . By default, a + will be used. (If you do not want such automatic message conversion taking + place, then be sure to set the property + to null.) + + If a target listener method returns a non-null object (typically of a + message content type such as String or byte array), it will get + wrapped in a EMS Message and sent to the response destination + (either the EMS "reply-to" destination or the + specified. - Transaction synchronization is turned off by default, as this manager might be used - alongside an IDbProvider based Spring transaction manager such as the - AdoPlatformTransactionManager, which has stronger needs for synchronization. + The sending of response messages is only available when + using the entry point (typically through a + Spring message listener container). Usage as standard EMS MessageListener + does not support the generation of response messages. + + Consult the reference documentation for examples of method signatures compliant with this + adapter class. Juergen Hoeller Mark Pollack (.NET) - + - Initializes a new instance of the class. + Variant of the standard EMS MessageListener interface, + offering not only the received Message but also the underlying + Session object. The latter can be used to send reply messages, + without the need to access an external Connection/Session, + i.e. without the need to access the underlying ConnectionFactory. - The ConnectionFactory has to be set before using the instance. - This constructor can be used to prepare a EmsTemplate via a ApplicationContext, - typically setting the ConnectionFactory via ConnectionFactory property. + Supported by Spring's + as direct alternative to the standard MessageListener interface. + + Juergen Hoeller + Mark Pollack (.NET) + + + Callback for processing a received EMS message. + Implementors are supposed to process the given Message, + typically sending reply messages through the given Session. + + the received EMS message + + the underlying EMS Session + + EMSException if thrown by EMS methods + + + + The default handler method name. + + + + + Initializes a new instance of the class with default settings. + + + + + Initializes a new instance of the class for the given handler object + + The delegate object. + + + + Standard JMS {@link MessageListener} entry point. + Delegates the message to the target listener method, with appropriate + conversion of the message arguments + + + + In case of an exception, the method will be invoked. + Note + Does not support sending response messages based on + result objects returned from listener methods. Use the + entry point (typically through a Spring + message listener container) for handling result objects as well. + + The incoming message. + + + + Spring entry point. - Turns off transaction synchronization by default, as this manager might - be used alongside a dbprovider-based Spring transaction manager like - AdoPlatformTransactionManager, which has stronger needs for synchronization. - Only one manager is allowed to drive synchronization at any point of time. + Delegates the message to the target listener method, with appropriate + conversion of the message argument. If the target method returns a + non-null object, wrap in a EMS message and send it back. + + + The incoming message. + The session to operate on. + + + + Initialize the default implementations for the adapter's strategies. + + + + + Handle the given exception that arose during listener execution. + The default implementation logs the exception at error level. + This method only applies when used as standard EMS MessageListener. + In case of the Spring mechanism, + exceptions get handled by the caller instead. + + + The exception to handle. + + + + Extract the message body from the given message. + + The message. + the content of the message, to be passed into the + listener method as argument + if thrown by EMS API methods + + + + Gets the name of the listener method that is supposed to + handle the given message. + The default implementation simply returns the configured + default listener method, if any. + + The EMS request message. + The converted JMS request message, + to be passed into the listener method as argument. + the name of the listener method (never null) + if thrown by EMS API methods + + + + Handles the given result object returned from the listener method, sending a response message back. + + The result object to handle (never null). + The original request message. + The session to operate on (may be null). + + + + Builds a JMS message to be sent as response based on the given result object. + + The JMS Session to operate on. + The content of the message, as returned from the listener method. + the JMS Message (never null) + If there was an error in message conversion + if thrown by EMS API methods + + + + Post-process the given response message before it will be sent. The default implementation + sets the response's correlation id to the request message's correlation id. + + The original incoming message. + The outgoing JMS message about to be sent. + if thrown by EMS API methods + + + + Determine a response destination for the given message. + + + The default implementation first checks the JMS Reply-To + Destination of the supplied request; if that is not null + it is returned; if it is null, then the configured + default response destination} + is returned; if this too is null, then an + is thrown. + The original incoming message. + Tthe outgoing message about to be sent. + The session to operate on. + the response destination (never null) + if thrown by EMS API methods + if no destination can be determined. - + - Initializes a new instance of the class - given a ConnectionFactory. + Resolves the default response destination into a Destination, using this + accessor's in case of a destination name. - The connection factory to obtain connections from. + The session to operate on. + The located destination - + - Make sure the ConnectionFactory has been set. + Sends the given response message to the given destination. + The session to operate on. + The destination to send to. + The outgoing message about to be sent. - + - Get the EmsTransactionObject. + Post-process the given message producer before using it to send the response. + The default implementation is empty. - he EmsTransactionObject. + The producer that will be used to send the message. + The outgoing message about to be sent. - + - Begin a new transaction with the given transaction definition. + Gets or sets the handler object to delegate message listening to. - Transaction object returned by - . - instance, describing - propagation behavior, isolation level, timeout etc. - Does not have to care about applying the propagation behavior, - as this has already been handled by this abstract manager. + Specified listener methods have to be present on this target object. + If no explicit handler object has been specified, listener + methods are expected to present on this adapter instance, that is, + on a custom subclass of this adapter, defining listener methods. - - In the case of creation or system errors. - + The handler object. - + - Suspend the resources of the current transaction. + Gets or sets the default handler method to delegate to, + for the case where no specific listener method has been determined. + Out-of-the-box value is ("HandleMessage"}. - Transaction object returned by - . - - An object that holds suspended resources (will be kept unexamined for passing it into - .) - - - Transaction synchronization will already have been suspended. - - - in case of system errors. - + The default handler method. - + - Resume the resources of the current transaction. - - Transaction object returned by - . - The object that holds suspended resources as returned by - . - Transaction synchronization will be resumed afterwards. - - - In the case of system errors. - - - - - Perform an actual commit on the given transaction. - - The status representation of the transaction. - - In the case of system errors. - - - - - Perform an actual rollback on the given transaction. - - The status representation of the transaction. - - In the case of system errors. - - - - - Set the given transaction rollback-only. Only called on rollback - if the current transaction takes part in an existing one. - - The status representation of the transaction. - - In the case of system errors. - - - - - Cleanup resources after transaction completion. - - Transaction object returned by - . - + Sets the default destination to send response messages to. This will be applied + in case of a request message that does not carry a "JMSReplyTo" field. + Response destinations are only relevant for listener methods that return + result objects, which will be wrapped in a response message and sent to a + response destination. - Called after - and - - execution on any outcome. + Alternatively, specify a "DefaultResponseQueueName" or "DefaultResponseTopicName", + to be dynamically resolved via the DestinationResolver. + +
+ The default response destination. +
+ + + Sets the name of the default response queue to send response messages to. + This will be applied in case of a request message that does not carry a + "EMSReplyTo" field. + Alternatively, specify a JMS Destination object as "defaultResponseDestination". + + The name of the default response destination queue. + + + + Sets the name of the default response topic to send response messages to. + This will be applied in case of a request message that does not carry a + "ReplyTo" field. + Alternatively, specify a JMS Destination object as "defaultResponseDestination". + + The name of the default response destination topic. + + + + Gets or sets the destination resolver that should be used to resolve response + destination names for this adapter. + The default resolver is a . + Specify another implementation, for other strategies, perhaps from a directory service. + + The destination resolver. + + + + Gets or sets the message converter that will convert incoming JMS messages to + listener method arguments, and objects returned from listener + methods back to EMS messages. + + + The default converter is a {@link SimpleMessageConverter}, which is able + to handle BytesMessages}, TextMessages, MapMessages, and ObjectMessages. + The message converter. - + - Check if the given transaction object indicates an existing transaction - (that is, a transaction which has already started). - - Transaction object returned by - . - - True if there is an existing transaction. - - - In the case of system errors. - - - - - Creates the connection via thie manager's ConnectionFactory. - - The new Connection - If thrown by underlying messaging APIs - - - - Creates the session for the given Connection - - The connection to create a Session for. - the new Session - If thrown by underlying messaging APIs - - - - Gets or sets the connection factory that this instance should manage transaction. - for. - - The connection factory. - - - - Gets the resource factory that this transaction manager operates on, - In tihs case the ConnectionFactory - - The ConnectionFactory. - - - - EMS Transaction object, representing a EmsResourceHolder. - Used as transaction object by EMSTransactionManager + Internal class combining a destination name and its target destination type (queue or topic). - + - Extension of the IConnectionFactory interface, - indicating how to release Connections obtained from it. + Exception to be thrown when the execution of a listener method failed. Juergen Hoeller Mark Pollack (.NET) - + - Shoulds we stop the connection, obtained from this ConnectionFactory? + Initializes a new instance of the class, with the specified message - The connection to check. - wheter a stop call is necessary + The message. - + - Internal chained ExceptionListener for handling the internal recovery listener - in combination with a user-specified listener. + Initializes a new instance of the class, with the specified message + and root cause exception + + The message. + The inner exception. + + + + A Spring FactoryObject that returns TIBCO.EMS.ILookupContext. Use the returned + ILookupContext to do you lookups at runtime. + + + + Important properties to set are JndiProperties and JndiContexType. JndiContextType is set to + LookupContextFactory.TIBJMS_NAMING_CONT by default. + + To lookup objects at startup time and cache their values, as well as provide a + default value if lookup fail, + + + Mark Pollack + + + + Returns the TIBCO.EMS.ILookupContext + + TIBCO.EMS.ILookupContext + + + + Return typeof(TIBCO.EMS.ILookupContext) - + - Add information to show this is a shared EMS connection + Returns true - Description of connection wrapper - - Exception thrown when a synchronized local transaction failed to complete - (after the main transaction has already completed). + + To be used with EmsTemplate's send method that + convert an object to a message. - Jergen Hoeller + + It allows for further modification of the message after it has been processed + by the converter. This is useful for setting of EMS Header and Properties. + + Mark Pollack + + + Apply a IMessagePostProcessor to the message. The returned message is + typically a modified version of the original. + + the EMS message from the IMessageConverter + + the modified version of the Message + + EMSException if thrown by EMS API methods + + + Strategy interface for resolving EMS destinations. + + + Used by EmsTemplate for resolving + destination names from simple Strings to actual + Destination implementation instances. + + + The default DestinationResolver implementation used by + EmsTemplate instances is the + DynamicDestinationResolver class. Consider using the + JndDestinationResolver for more advanced scenarios. + + + Juergen Hoeller Mark Pollack (.NET) - - - Creates a new instance of the SynchedLocalTransactionFailedException class. with the specified message. + + Resolve the given destination name, either as located resource + or as dynamic destination. - - A message about the exception. + the current EMS Session - - - - Creates a new instance of the SynchedLocalTransactionFailedException class with the specified message - and root cause. - - - A message about the exception. + the name of the destination - - The root exception that is being wrapped. + true if the domain is pub-sub, false if P2P + the EMS destination (either a topic or a queue) + + EMSException if resolution failed - + - Delegate callback for browsing the messages in an EMS queue. + Delegate that creates a EMS message given a Session - - - - Convenient super class for application classes that need EMS access. - - - Requires a ConnectionFactory or a EmsTemplate instance to be set. - It will create its own EmsTemplate if a ConnectionFactory is passed in. - A custom EmsTemplate instance can be created for a given ConnectionFactory - through overriding the createEmsTemplate method. - - - - - - Creates a EmsTemplate for the given ConnectionFactory. - - Only invoked if populating the gateway with a ConnectionFactory reference. - Can be overridden in subclasses to provide a different EmsTemplate instance - - - The connection factory. - - - - - Ensures that the JmsTemplate is specified and calls . - - - - - Subclasses can override this for custom initialization behavior. - Gets called after population of this instance's properties. - - - - - Gets or sets the EMS template for the gateway. - - The EMS template. - - - - Gets or sets he EMS connection factory to be used by the gateway. - Will automatically create a EmsTemplate for the given ConnectionFactory. - - The connection factory. + the EMS Session to be used to create the + Message (never null) + + the Message to be sent + + EMSException if thrown by EMS API methods Helper class that simplifies EMS access code. @@ -1668,117 +2028,6 @@ Juergen Hoeller Mark Pollack (.NET) - - Base class for EmsTemplate} and other - EMS-accessing gateway helpers, adding destination-related properties to - EmsAccessor's common properties. - - -

Not intended to be used directly. See EmsTemplate.

- -
- Juergen Hoeller - Mark Pollack (.NET) -
- - Base class for EmsTemplate and other EMS-accessing gateway helpers - It defines common properties like the ConnectionFactory}. The subclass - EmsDestinationAccessor adds further, destination-related properties. - - Not intended to be used directly. See EmsTemplate. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Verify that ConnectionFactory property has been set. - - - - - Creates the connection via the ConnectionFactory. - - - - - - Creates the session for the given Connection - - The connection to create a session for. - The new session - - - - Returns whether the Session is in client acknowledgement mode. - - The session to check. - true if in client ack mode, false otherwise - - - - Gets or sets the connection factory to use for obtaining EMS Connections. - - The connection factory. - - - - Gets or sets the session acknowledge mode for EMS Sessions including whether or not the session is transacted - - - Set the EMS acknowledgement mode that is used when creating a EMS - Session to send a message. The default is AUTO_ACKNOWLEDGE. - - The session acknowledge mode. - - - - Set the transaction mode that is used when creating a EMS Session. - Default is "false". - - - Setting this flag to "true" will use a short local EMS transaction - when running outside of a managed transaction, and a synchronized local - EMS transaction in case of a managed transaction being present. - The latter has the effect of a local EMS - transaction being managed alongside the main transaction (which might - be a native ADO.NET transaction), with the EMS transaction committing - right after the main transaction. - - - - - - Resolves the given destination name to a EMS destination. - - The current session. - Name of the destination. - The located Destination - If resolution failed. - - - - Gets or sets the destination resolver that is to be used to resolve - Destination references for this accessor. - - The default resolver is a DynamicDestinationResolver. Specify a - JndDestinationResolver for resolving destination names as JNDI locations. - - The destination resolver. - - - - Gets or sets a value indicating whether Publish/Subscribe - domain (Topics) is used. Otherwise, the Point-to-Point domain - (Queues) is used. - - - this - setting tells what type of destination to create if dynamic destinations are enabled. - true if Publish/Subscribe domain; otherwise, false - for the Point-to-Point domain. - Specifies a basic set of EMS operations. @@ -3096,27 +3345,131 @@ ResourceFactory implementation that delegates to this template's callback methods.
- - Callback for executing any number of operations on a provided - Session + + Callback interface for resource creation. + Serving as argument for the DoGetTransactionalSession method. - -

To be used with the EmsTemplate.Execute(ISessionCallback)} - method, often implemented as an anonymous inner class.

-
- Mark Pollack - -
- - Execute any number of operations against the supplied EMS - Session, possibly returning a result. + + Helper class for obtaining transactional EMS resources + for a given ConnectionFactory. - the EMS Session - - a result object from working with the Session, if any (so can be null) + Juergen Hoeller + Mark Pollack (.NET) + + + + Releases the given connection, stopping it (if necessary) and eventually closing it. + + Checks , if available. + This is essentially a more sophisticated version of + + + The connection to release. (if this is null, the call will be ignored) + The ConnectionFactory that the Connection was obtained from. (may be null) + whether the Connection might have been started by the application. + + + + Return the innermost target Session of the given Session. If the given + Session is a decorated session, it will be unwrapped until a non-decorated + Session is found. Otherwise, the passed-in Session will be returned as-is. + + The session to unwrap + The innermost target Session, or the passed-in one if no decorator + + + + Determines whether the given JMS Session is transactional, that is, + bound to the current thread by Spring's transaction facilities. + + The session to check. + The ConnectionFactory that the Session originated from + + true if is session transactional, bound to current thread; otherwise, false. - EMSException if there is any problem + + + Obtain a EMS Session that is synchronized with the current transaction, if any. + the ConnectionFactory to obtain a Session for + + the existing EMS Connection to obtain a Session for + (may be null) + + whether to allow for a local EMS transaction + that is synchronized with a Spring-managed transaction (where the main transaction + might be a ADO.NET-based one for a specific DataSource, for example), with the EMS + transaction committing right after the main transaction. If not allowed, the given + ConnectionFactory needs to handle transaction enlistment underneath the covers. + + the transactional Session, or null if none found + + EMSException in case of EMS failure + + + + Obtain a EMS Session that is synchronized with the current transaction, if any. + + the TransactionSynchronizationManager key to bind to + (usually the ConnectionFactory) + the ResourceFactory to use for extracting or creating + EMS resources + whether the underlying Connection approach should be + started in order to allow for receiving messages. Note that a reused Connection + may already have been started before, even if this flag is false. + + the transactional Session, or null if none found + + EMSException in case of EMS failure + + + Callback interface for resource creation. + Serving as argument for the DoGetTransactionalSession method. + + + + Fetch an appropriate Session from the given EmsResourceHolder. + the EmsResourceHolder + + an appropriate Session fetched from the holder, + or null if none found + + + + Fetch an appropriate Connection from the given EmsResourceHolder. + the EmsResourceHolder + + an appropriate Connection fetched from the holder, + or null if none found + + + + Create a new EMS Connection for registration with a EmsResourceHolder. + the new EMS Connection + + EMSException if thrown by EMS API methods + + + Create a new EMS Session for registration with a EmsResourceHolder. + the EMS Connection to create a Session for + + the new EMS Session + + EMSException if thrown by EMS API methods + + + + Return whether to allow for a local EMS transaction that is synchronized with + a Spring-managed transaction (where the main transaction might be a ADO.NET-based + one for a specific IDbProvider, for example), with the EMS transaction + committing right after the main transaction. + Returns whether to allow for synchronizing a local EMS transaction + + + + + Callback for resource cleanup at the end of a non-native EMS transaction + Creates a EMS message given a Session @@ -3141,560 +3494,52 @@ message producers instead of creating/destroying them on each operation. - + - Callback for browsing the messages in an EMS queue. - - - To be used with EmsTemplate's callback methods that take a IBrowserCallback argument - - Juergen Hoeller - Mark Pollack (.NET) - - - - Perform operations on the given Session and QueueBrowser - - The session. - The browser. - The object from working with the Session and QueueBrowser, may be null - If there is any problem when accessing EMS API - - - To be used with EmsTemplate's send method that - convert an object to a message. - - - It allows for further modification of the message after it has been processed - by the converter. This is useful for setting of EMS Header and Properties. - - Mark Pollack - - - Apply a IMessagePostProcessor to the message. The returned message is - typically a modified version of the original. - - the EMS message from the IMessageConverter - - the modified version of the Message - - EMSException if thrown by EMS API methods - - - Callback for sending a message to a EMS destination. - -

To be used with the EmsTemplate.Execute(IProducerCallback) - method, often implemented as an anonymous inner class.

- -

The typical implementation will perform multiple operations on the - supplied EMS Session and MessageProducer.

-
- Mark Pollack -
- - Perform operations on the given Session and MessageProducer. - The message producer is not associated with any destination. - - the EMS Session object to use - - the EMS MessageProducer object to use - - a result object from working with the Session, if any (can be null) - - - - - Delegate that creates a EMS message given a Session - - the EMS Session to be used to create the - Message (never null) - - the Message to be sent - - EMSException if thrown by EMS API methods - - - - Delegate that is used with EmsTemplate's ConvertAndSend method that converts - an object. - - - It allows for further modification of the message after it has been processed - by the converter. This is useful for setting of EMS Header and Properties. - - Mark Pollack - - - Perform operations on the given Session and MessageProducer. - The message producer is not associated with any destination. - - the EMS Session object to use - - the EMS MessageProducer object to use - - a result object from working with the Session, if any (can be null) - - - - - Callback delegate for code that operates on a Session. - - The EMS Session object. - - Allows you to execute any number of operations - on a single ISession, possibly returning a result a result. - - - A result object from working with the Session, if any (so can be null) - - EMSException if there is any problem - Mark Pollack - - - - The various JNDI Context types. - - - - - Create a tibjmsnaming context to lookup administered object inside the tibjmsnaming server. - - - - - Create a ldap context to lookup administered object in an ldap server. - - - - - Convenient superclass to access JndiProperties, JndiContextType or alternatively set the ILookupContext directly. - - Juergen Hoeller - Mark Pollack - - - - Create the JndiLookupContext if it has not been explicitly set. - - - - - Gets or sets the lookup context. - - The lookup context. - - - - Gets or sets the JNDI environment properties. - - The jndi properties. - - - - Gets or sets the type of the jndi context. The default is JndiContextType.JMS - - The type of the jndi context. - - - - Convenient superclass for JNDI-based service locators, - providing configurable lookup of a specific JNDI resource. - - - - Exposes a JndiName property. - - Subclasses may invoke the Lookup method whenever it is appropriate. - Some classes might do this on initialization, while others might do it - on demand. The latter strategy is more flexible in that it allows for - initialization of the locator before the JNDI object is available. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Ensure that the JndiName property is set and create the TIBCO EMS ILookupContext instance. - - - - - Lookups this instance using the JndiName and ExpectedType properties - - The object retrieved from Jndi - - - - Gets or sets the Jndi name to lookup. - - The name of the jndi. - - - - Gets or sets the type that the located JNDI object is supposed - to be assignable to, if any. - - The expected type. - - - - Return the Jndi object - - The Jndi object - - - - Sets the default object to fall back to if the JNDI lookup fails. - Default is none. - - - This can be an arbitrary bean reference or literal value. - It is typically used for literal values in scenarios where the JNDI environment - might define specific config settings but those are not required to be present. - - - The default object to use when lookup fails. - - - - Return type of object retrieved from Jndi or the expected type if the Jndi retrieval - did not succeed. - - Return value of retrieved object - - - - Returns true - - - - - Gets the template object definition that should be used - to configure the instance of the object managed by this factory. - - - - - - A Spring FactoryObject that returns TIBCO.EMS.ILookupContext. Use the returned - ILookupContext to do you lookups at runtime. - - - - Important properties to set are JndiProperties and JndiContexType. JndiContextType is set to - LookupContextFactory.TIBJMS_NAMING_CONT by default. - - To lookup objects at startup time and cache their values, as well as provide a - default value if lookup fail, - - - Mark Pollack - - - - Returns the TIBCO.EMS.ILookupContext - - TIBCO.EMS.ILookupContext - - - - Return typeof(TIBCO.EMS.ILookupContext) - - - - - Returns true - - - - - Exception thrown if a type mismatch is encountered for an object - located in a JNDI environment. + Implementation of Spring IExceptionListener interface that supports + chaining allowing the addition of multiple ExceptionListener instances in order. Juergen Hoeller Mark Pollack (.NET) - + - Creates a new instance of the - class. + Adds the exception listener to the chain - - A message about the exception. - + The listener. - + - Initializes a new instance of the class - building an explanation text from the given arguments. + Called when an exception occurs in message processing. - The Jndi name. - Type required type of the lookup. - The actual type that the lookup returned. + The exception. - + - Gets the actual type that the lookup returned, if available. + Gets the exception listeners as an array. - The actual type that the lookup. + The exception listeners. - + - Gets the required type for the lookup, if available. + Exception thrown when the maximum connection recovery time has been exceeded. - The equired type for the lookup + Mark Pollack - - - Common base class for all containers which need to implement listening - based on a Connection (either shared or freshly obtained for each attempt). - Inherits basic Connection and Session configuration handling from the - base class. - - - This class provides basic lifecycle management, in particular management - of a shared Connection. Subclasses are supposed to plug into this - lifecycle, implementing the as well as - - - - - - Mark Pollack - - + - The monitor object to lock on when performing operations on the connection. - - - - - The monitor object to lock on when performing operations that update the lifecycle of the container. - - - - - Call base class method, then and then - - - - - Validates the configuration of this container. The default implementation - is empty. To be overriden in subclasses. - - - - - Calls when the application context destroys the container instance. - - - - - Initializes this container. Creates a Connection, starts the Connection - (if the property hasn't been turned off), and calls - . - - If startup failed - - - - Stop the shared connection, call , and close this container. - - - - - Starts this container. - - if starting failed. - - - - Start the shared Connection, if any, and notify all invoker tasks. - - - - - Stops this container. - - if stopping failed. - - - - Notify all invoker tasks and stop the shared Connection, if any. - - if thrown by EMS API methods. - - - - - Register any invokers within this container. - Subclasses need to implement this method for their specific - invoker management process. A shared Connection, if any, will already have been - started at this point. - - - - - Close the registered invokers. Subclasses need to implement this method - for their specific invoker management process. A shared Connection, if any, - will automatically be closed afterwards. - - - - - Establishes a shared Connection for this container. - - - - The default implementation delegates to - which does one immediate attempt and throws an exception if it fails. - Can be overridden to have a recovery process in place, retrying - until a Connection can be successfully established. - - - If thrown by EMS API methods - - - - Refreshes the shared connection that this container holds. - - - Called on startup and also after an infrastructure exception - that occurred during invoker setup and/or execution. - - If thrown by EMS API methods - - - - Creates the shared connection for this container. - - - The default implementation creates a standard Connection - and prepares it through - - the prepared Connection - if the creation failed. - - - - Prepares the given connection, which is about to be registered - as shared Connection for this container. - - - The default implementation sets the specified client id, if any. - Subclasses can override this to apply further settings. - - The connection to prepare. - If the preparation efforts failed. - - - - Starts the shared connection. - - If thrown by EMS API methods - - - - - Stops the shared connection. - - if thrown by EMS API methods. - - - - Gets or sets the client id for a shared Connection created and used by this container. - - - Note that client ids need to be unique among all active Connections - of the underlying JMS provider. Furthermore, a client id can only be - assigned if the original ConnectionFactory hasn't already assigned one. - - The client id. - - - Set whether to automatically start the listener after initialization. -

Default is "true"; set this to "false" to allow for manual startup.

-
-
- - - Set the name of the object in the object factory that created this object. - - The name of the object in the factory. - -

- Invoked after population of normal object properties but before an init - callback like 's - - method or a custom init-method. -

-
-
- - - Gets a value indicating whether this container is currently running, - that is, whether it has been started and not stopped yet. - - - true if this container is running; otherwise, false. - - - - - Gets a value indicating whether this container's listeners are generally allowed to run. - - - - >This implementation always returns true; the default 'running' - state is purely determined by /. - - - Subclasses may override this method to check against temporary - conditions that prevent listeners from actually running. In other words, - they may apply further restrictions to the 'running' state, returning - false if such a restriction prevents listeners from running. - - - true if running allowed; otherwise, false. - - - - Gets a value indicating whether this container is currently active, - that is, whether it has been set up but not shut down yet. - - true if active; otherwise, false. - - - Return whether a shared EMS Connection should be maintained - by this listener container base class. - - - - - - Gets the shared connection maintained by this container. - Available after initialization. - - The shared connection (never null) - if this container does not maintain a - shared Connection, or if the Connection hasn't been initialized yet. - - - - - - Exception that indicates that the initial setup of this container's - shared Connection failed. This is indicating to invokers that they need - to establish the shared Connection themselves on first access. - - - - - Initializes a new instance of the class. + Initializes a new instance of the class, with the specified message The message. + + + Initializes a new instance of the class, with the specified message + and root cause exception + + The message. + The inner exception. + Abstract base class for message listener containers. Can either host @@ -3963,355 +3808,268 @@ Used to trigger a rollback for an external transaction manager in that case. - + - Exception to be thrown when the execution of a listener method failed. + Return the Jndi object + + The Jndi object + + + + Sets the default object to fall back to if the JNDI lookup fails. + Default is none. + + + This can be an arbitrary bean reference or literal value. + It is typically used for literal values in scenarios where the JNDI environment + might define specific config settings but those are not required to be present. + + + The default object to use when lookup fails. + + + + Return type of object retrieved from Jndi or the expected type if the Jndi retrieval + did not succeed. + + Return value of retrieved object + + + + Returns true + + + + + Gets the template object definition that should be used + to configure the instance of the object managed by this factory. + + + + + + Wrapper for Session that caches producers and registers itself as available + to the session cache when being closed. Generally used for testing purposes or + if need to get at the wrapped Session object via the TargetSession property (for + vendor specific methods). Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class, with the specified message - - The message. - - - - Initializes a new instance of the class, with the specified message - and root cause exception - - The message. - The inner exception. - - - - Message listener adapter that delegates the handling of messages to target - listener methods via reflection, with flexible message type conversion. - Allows listener methods to operate on message content types, completely - independent from the EMS API. - - - By default, the content of incoming messages gets extracted before - being passed into the target listener method, to let the target method - operate on message content types such as String or byte array instead of - the raw Message. Message type conversion is delegated to a Spring - . By default, a - will be used. (If you do not want such automatic message conversion taking - place, then be sure to set the property - to null.) - - If a target listener method returns a non-null object (typically of a - message content type such as String or byte array), it will get - wrapped in a EMS Message and sent to the response destination - (either the EMS "reply-to" destination or the - specified. - - - The sending of response messages is only available when - using the entry point (typically through a - Spring message listener container). Usage as standard EMS MessageListener - does not support the generation of response messages. - - Consult the reference documentation for examples of method signatures compliant with this - adapter class. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Variant of the standard EMS MessageListener interface, - offering not only the received Message but also the underlying - Session object. The latter can be used to send reply messages, - without the need to access an external Connection/Session, - i.e. without the need to access the underlying ConnectionFactory. - - - Supported by Spring's - as direct alternative to the standard MessageListener interface. - - Juergen Hoeller - Mark Pollack (.NET) - - - Callback for processing a received EMS message. - Implementors are supposed to process the given Message, - typically sending reply messages through the given Session. - - the received EMS message - - the underlying EMS Session - - EMSException if thrown by EMS methods - - - - The default handler method name. - - - - - Initializes a new instance of the class with default settings. - - - - - Initializes a new instance of the class for the given handler object - - The delegate object. - - - - Standard JMS {@link MessageListener} entry point. - Delegates the message to the target listener method, with appropriate - conversion of the message arguments - - - - In case of an exception, the method will be invoked. - Note - Does not support sending response messages based on - result objects returned from listener methods. Use the - entry point (typically through a Spring - message listener container) for handling result objects as well. - - The incoming message. - - - - Spring entry point. - - Delegates the message to the target listener method, with appropriate - conversion of the message argument. If the target method returns a - non-null object, wrap in a EMS message and send it back. - - - The incoming message. - The session to operate on. - - - - Initialize the default implementations for the adapter's strategies. - - - - - Handle the given exception that arose during listener execution. - The default implementation logs the exception at error level. - This method only applies when used as standard EMS MessageListener. - In case of the Spring mechanism, - exceptions get handled by the caller instead. - - - The exception to handle. - - - - Extract the message body from the given message. - - The message. - the content of the message, to be passed into the - listener method as argument - if thrown by EMS API methods - - - - Gets the name of the listener method that is supposed to - handle the given message. - The default implementation simply returns the configured - default listener method, if any. - - The EMS request message. - The converted JMS request message, - to be passed into the listener method as argument. - the name of the listener method (never null) - if thrown by EMS API methods - - - - Handles the given result object returned from the listener method, sending a response message back. - - The result object to handle (never null). - The original request message. - The session to operate on (may be null). - - - - Builds a JMS message to be sent as response based on the given result object. - - The JMS Session to operate on. - The content of the message, as returned from the listener method. - the JMS Message (never null) - If there was an error in message conversion - if thrown by EMS API methods - - - - Post-process the given response message before it will be sent. The default implementation - sets the response's correlation id to the request message's correlation id. - - The original incoming message. - The outgoing JMS message about to be sent. - if thrown by EMS API methods - - - - Determine a response destination for the given message. - - - The default implementation first checks the JMS Reply-To - Destination of the supplied request; if that is not null - it is returned; if it is null, then the configured - default response destination} - is returned; if this too is null, then an - is thrown. - - - The original incoming message. - Tthe outgoing message about to be sent. - The session to operate on. - the response destination (never null) - if thrown by EMS API methods - if no destination can be determined. - - - - Resolves the default response destination into a Destination, using this - accessor's in case of a destination name. - - The session to operate on. - The located destination - - - - Sends the given response message to the given destination. - - The session to operate on. - The destination to send to. - The outgoing message about to be sent. - - - - Post-process the given message producer before using it to send the response. - The default implementation is empty. - - The producer that will be used to send the message. - The outgoing message about to be sent. - - - - Gets or sets the handler object to delegate message listening to. - - - Specified listener methods have to be present on this target object. - If no explicit handler object has been specified, listener - methods are expected to present on this adapter instance, that is, - on a custom subclass of this adapter, defining listener methods. - - The handler object. - - - - Gets or sets the default handler method to delegate to, - for the case where no specific listener method has been determined. - Out-of-the-box value is ("HandleMessage"}. - - The default handler method. - - - - Sets the default destination to send response messages to. This will be applied - in case of a request message that does not carry a "JMSReplyTo" field. - Response destinations are only relevant for listener methods that return - result objects, which will be wrapped in a response message and sent to a - response destination. - - Alternatively, specify a "DefaultResponseQueueName" or "DefaultResponseTopicName", - to be dynamically resolved via the DestinationResolver. - - - The default response destination. - - - - Sets the name of the default response queue to send response messages to. - This will be applied in case of a request message that does not carry a - "EMSReplyTo" field. - Alternatively, specify a JMS Destination object as "defaultResponseDestination". - - The name of the default response destination queue. - - - - Sets the name of the default response topic to send response messages to. - This will be applied in case of a request message that does not carry a - "ReplyTo" field. - Alternatively, specify a JMS Destination object as "defaultResponseDestination". - - The name of the default response destination topic. - - - - Gets or sets the destination resolver that should be used to resolve response - destination names for this adapter. - The default resolver is a . - Specify another implementation, for other strategies, perhaps from a directory service. - - The destination resolver. - - - - Gets or sets the message converter that will convert incoming JMS messages to - listener method arguments, and objects returned from listener - methods back to EMS messages. - - - The default converter is a {@link SimpleMessageConverter}, which is able - to handle BytesMessages}, TextMessages, MapMessages, and ObjectMessages. - - - The message converter. - - - - Internal class combining a destination name and its target destination type (queue or topic). - - - - - EmsResourceHolder marker subclass that indicates local exposure, - i.e. that does not indicate an externally managed transaction. - - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class. - - The session. - - - - Exception thrown when the maximum connection recovery time has been exceeded. - Mark Pollack - + - Initializes a new instance of the class, with the specified message + Subinterface of Session to be implemented by + implementations that wrap an Session to provide added + functionality. Allows access to the the underlying target Session. - The message. + Mark Pollack + + - + - Initializes a new instance of the class, with the specified message - and root cause exception + Gets the target session of the decorator. + This will typically be the native provider Session or a wrapper from a session pool. + + The underlying session, never null + + + + Initializes a new instance of the class. + + The target session. + The session list. + The CachingConnectionFactory. + + + + Creates the producer, potentially returning a cached instance. + + The destination. + A message producer. + + + + If have not yet reached session cache size, cache the session, otherwise + dispose of all cached message producers and close the session. + + + + + Creates the consumer, potentially returning a cached instance. + + The destination. + A message consumer + + + + Creates the consumer, potentially returning a cached instance. + + The destination. + The selector. + A message consumer + + + + Creates the consumer, potentially returning a cached instance. + + The destination. + The selector. + if set to true [no local]. + A message consumer. + + + + Creates the durable consumer, potentially returning a cached instance. + + The destination. + The name of the durable subscription. + The selector. + if set to true [no local]. + A message consumer + + + + Creates the durable consumer, potentially returning a cached instance. + + The destination. + The name of the durable subscription. + A message consumer + + + + Creates the consumer. + + The destination. + The selector. + if set to true [no local]. + The subscription. + + + + + Gets the queue. + + The name. + + + + + Gets the topic. + + The name. + + + + + Creates the temporary queue. + + + + + + Creates the temporary topic. + + + + + + Creates the message. + + + + + + Creates the text message. + + + + + + Creates the text message. + + The text. + + + + + Creates the map message. + + + + + + Creates the bytes message. + + + + + + Creates the object message. + + + + + + Creates the object message. + + The body. + + + + + Creates the stream message. + + + + + + Commits this instance. + + + + + Rollbacks this instance. + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets the target, for testing purposes. + + The target. + + + + Gets a value indicating whether this is transacted. + + true if transacted; otherwise, false. + + + + Gets the acknowledgement mode. + + The acknowledgement mode. + + + + Namespace parser for the EMS namespace. + + Mark Fisher + Juergen Hoeller + Mark Pollack (.NET) + + + + Register a MessageListenerContainer for the 'listener-container' tag. - The message. - The inner exception. @@ -4452,193 +4210,269 @@ Always use a shared EMS connection - - Strategy interface that specifies a IMessageConverter - between .NET objects and EMS messages. - + + + An interface containing all methods and properties on the TIBCO.EMS.Connection class. + Refer to the TIBCO EMS API documentation for more information. Mark Pollack - Juergen Hoeller - Mark Pollack (.NET) - - Convert a .NET object to a EMS Message using the supplied session - to create the message object. + + + Closes the connection and reclaims resources. - the object to convert + + + + Creates the session. + + if set to true the session has transaction semantcis. + Indicates whether and how the consumer is to acknowledge received messages. + This version of CreateSession accepts an integer value associated with the acknowledge mode described by a Session member and should only be used for backward compatibility. + This parameter is ignored if the session is transacted. + A newly created session. + + + + Creates the session. + + if set to true [transacted]. + The acknowledge mode. + When true, the new session has transaction semantics. + Indicates whether and how the consumer is to acknowledge received messages. + Legal values are listed under SessionMode. + This parameter is ignored if the session is transacted. - the Session to use for creating a EMS Message - - the EMS Message + A newly created session. + + + + Starts (or restarts) a connection's delivery of incoming messages. + + + + + Temporarily stops a connection's delivery of incoming messages. + + + + + A String representation of the connection object + + + A that represents this instance. - EMSException if thrown by EMS API methods - MessageConversionException in case of conversion failure - - Convert from a EMS Message to a .NET object. - the message to convert - - the converted .NET object - - MessageConversionException in case of conversion failure - - + - Provides a layer of indirection when adding the 'type' of the object as a message property. + Gets the native TIBCO EMS connection. - Mark Pollack + The native connection. - + - Convert from a type to a string. + Occurs when the client library detects a problem with the connection. - The type of object to convert. - - + - Convert from a string to a type + Gets the URL of the server this connection is currently connected to - The type id. - + The active URL. - + - Gets the name of the field in the message that has type information.. + Gets or sets the client ID. - The name of the type id field. + The client ID. - - Thrown by IMessageConverter implementations when the conversion - of an object to/from a Message fails. - - Mark Pollack - - + - Creates a new instance of the IMessageConverterException class. with the specified message. + Gets the connection ID. - - A message about the exception. - + The connection ID. - + - Creates a new instance of the IMessageConverterException class with the specified message - and root cause. + Gets or sets the exception listener. - - A message about the exception. - - - The root exception that is being wrapped. - + The exception listener. - - A simple message converter that can handle TextMessages, BytesMessages, - MapMessages, and ObjectMessages. Used as default by EmsTemplate, for - ConvertAndSend and ReceiveAndConvert operations. + + + Gets a value indicating whether the connection is closed. + + true if the connection is closed; otherwise, false. + + + + Gets a value indicating whether the connection communicates with a secure protocol + + true if the connection communicates with a secure protocol; otherwise, false. + + + + Gets the metadata for this connection + + The metadata for this connection. + + + Simple DestinationResolver implementation resolving destination names + as dynamic destinations. -

Converts a String to a EMS TextMessage, a byte array to a EMS BytesMessage, - a Map to a EMS MapMessage, and a Serializable object to a EMS ObjectMessage - (or vice versa).

- - -
Juergen Hoeller Mark Pollack (.NET)
- - Convert a .NET object to a EMS Message using the supplied session - to create the message object. + + Resolve the given destination name, either as located resource + or as dynamic destination. - the object to convert + the current EMS Session - the Session to use for creating a EMS Message + the name of the destination - the EMS Message + true if the domain is pub-sub, false if P2P + + the EMS destination (either a topic or a queue) - EMSException if thrown by EMS API methods - MessageConversionException in case of conversion failure + EMSException if resolution failed - - Convert from a EMS Message to a .NET object. - the message to convert + + Resolve the given destination name to a Topic. + the current EMS Session - the converted .NET object + the name of the desired Topic. + + the EMS Topic name - MessageConversionException in case of conversion failure + EMSException if resolution failed - - Create a EMS TextMessage for the given String. - the String to convert + + Resolve the given destination name to a Queue. + the current EMS Session - current EMS session + the name of the desired Queue. - the resulting message + the EMS Queue name - EMSException if thrown by EMS methods + EMSException if resolution failed - - Create a EMS BytesMessage for the given byte array. - the byyte array to convert - - current EMS session - - the resulting message - - EMSException if thrown by EMS methods - - - Create a EMS MapMessage for the given Map. - the Map to convert - - current EMS session - - the resulting message - - EMSException if thrown by EMS methods - - - Create a EMS ObjectMessage for the given Serializable object. - the Serializable object to convert - - current EMS session - - the resulting message - - EMSException if thrown by EMS methods - - - Extract a String from the given TextMessage. - the message to convert - - the resulting String - - EMSException if thrown by EMS methods - - - Extract a byte array from the given BytesMessage. - the message to convert - - the resulting byte array - - EMSException if thrown by EMS methods - - - Extract a IDictionary from the given MapMessage. - the message to convert - - the resulting Map - - EMSException if thrown by EMS methods - - + - Extracts the serializable object from the given object message. + Internal chained ExceptionListener for handling the internal recovery listener + in combination with a user-specified listener. - The message to convert. - The resulting serializable object. + + + + Add information to show this is a shared EMS connection + + Description of connection wrapper + + + + A Connection object is a client's active connection to TIBCO EMS Server. + + + + + Initializes a new instance of the class. + + The underlying TIBCO EMS connection. + + + + Closes the connection and reclaims resources. + + + + + Creates the session. + + if set to true the session has transaction semantcis. + Indicates whether and how the consumer is to acknowledge received messages. + This version of CreateSession accepts an integer value associated with the acknowledge mode described by a Session member and should only be used for backward compatibility. + This parameter is ignored if the session is transacted. + A newly created session. + + + + Creates the session. + + if set to true [transacted]. + The acknowledge mode. + When true, the new session has transaction semantics. + Indicates whether and how the consumer is to acknowledge received messages. + Legal values are listed under SessionMode. + This parameter is ignored if the session is transacted. + A newly created session. + + + + Starts (or restarts) a connection's delivery of incoming messages. + + + + + Temporarily stops a connection's delivery of incoming messages. + + + + + Gets the native TIBCO EMS connection. + + The native connection. + + + + Occurs when the client library detects a problem with the connection. + + + + + Gets the URL of the server this connection is currently connected to + + The active URL. + + + + Gets or sets the client ID. + + The client ID. + + + + Gets the connection ID. + + The connection ID. + + + + Gets or sets the exception listener. + + The exception listener. + + + + Gets a value indicating whether the connection is closed. + + + true if the connection is closed; otherwise, false. + + + + + Gets a value indicating whether the connection communicates with a secure protocol + + + true if the connection communicates with a secure protocol; otherwise, false. + + + + + Gets the metadata for this connection + + The metadata for this connection. @@ -4699,6 +4533,20 @@ The default name of the assembly. + + + EmsResourceHolder marker subclass that indicates local exposure, + i.e. that does not indicate an externally managed transaction. + + Juergen Hoeller + Mark Pollack (.NET) + + + + Initializes a new instance of the class. + + The session. + Convert an object via XML serialization for sending via an ITextMessage @@ -4773,150 +4621,307 @@ true to specify that an exception be thrown when an invalid encoding is detected; otherwise, false. - - Simple DestinationResolver implementation resolving destination names - as dynamic destinations. - - Juergen Hoeller - Mark Pollack (.NET) - - - Strategy interface for resolving EMS destinations. + + + Delegate that is used with EmsTemplate's ConvertAndSend method that converts + an object. - Used by EmsTemplate for resolving - destination names from simple Strings to actual - Destination implementation instances. - + It allows for further modification of the message after it has been processed + by the converter. This is useful for setting of EMS Header and Properties. + + Mark Pollack + + + + Extension of the IConnectionFactory interface, + indicating how to release Connections obtained from it. + + Juergen Hoeller + Mark Pollack (.NET) + + + + Shoulds we stop the connection, obtained from this ConnectionFactory? + + The connection to check. + wheter a stop call is necessary + + + Callback for sending a message to a EMS destination. + +

To be used with the EmsTemplate.Execute(IProducerCallback) + method, often implemented as an anonymous inner class.

- The default DestinationResolver implementation used by - EmsTemplate instances is the - DynamicDestinationResolver class. Consider using the - JndDestinationResolver for more advanced scenarios. +

The typical implementation will perform multiple operations on the + supplied EMS Session and MessageProducer.

+
+ Mark Pollack +
+ + Perform operations on the given Session and MessageProducer. + The message producer is not associated with any destination. + + the EMS Session object to use + + the EMS MessageProducer object to use + + a result object from working with the Session, if any (can be null) + + + + + Exception thrown if a type mismatch is encountered for an object + located in a JNDI environment. + + Juergen Hoeller + Mark Pollack (.NET) + + + + Creates a new instance of the + class. + + + A message about the exception. + + + + + Initializes a new instance of the class + building an explanation text from the given arguments. + + The Jndi name. + Type required type of the lookup. + The actual type that the lookup returned. + + + + Gets the actual type that the lookup returned, if available. + + The actual type that the lookup. + + + + Gets the required type for the lookup, if available. + + The equired type for the lookup + + + + Delegate callback for browsing the messages in an EMS queue. + + + + + Callback delegate for code that operates on a Session. + + The EMS Session object. + + Allows you to execute any number of operations + on a single ISession, possibly returning a result a result. + + + A result object from working with the Session, if any (so can be null) + + EMSException if there is any problem + Mark Pollack + + + + A implementation + for a single EMS ConnectionFactory. Binds a + Connection/Session pair from the specified ConnecctionFactory to the thread, + potentially allowing for one thread-bound Session per ConnectionFactory. + + + + Application code is required to retrieve the transactional Session via + . Spring's + will autodetect a thread-bound Session and + automatically participate in it. + + + Transaction synchronization is turned off by default, as this manager might be used + alongside an IDbProvider based Spring transaction manager such as the + AdoPlatformTransactionManager, which has stronger needs for synchronization. Juergen Hoeller Mark Pollack (.NET) - - Resolve the given destination name, either as located resource - or as dynamic destination. - - the current EMS Session - - the name of the destination - - true if the domain is pub-sub, false if P2P - - the EMS destination (either a topic or a queue) - - EMSException if resolution failed - - - Resolve the given destination name, either as located resource - or as dynamic destination. - - the current EMS Session - - the name of the destination - - true if the domain is pub-sub, false if P2P - - the EMS destination (either a topic or a queue) - - EMSException if resolution failed - - - Resolve the given destination name to a Topic. - the current EMS Session - - the name of the desired Topic. - - the EMS Topic name - - EMSException if resolution failed - - - Resolve the given destination name to a Queue. - the current EMS Session - - the name of the desired Queue. - - the EMS Queue name - - EMSException if resolution failed - - + - Generic utility methods for working with EMS. Mainly for internal use - within the framework, but also useful for custom EMS access code. + Initializes a new instance of the class. + + The ConnectionFactory has to be set before using the instance. + This constructor can be used to prepare a EmsTemplate via a ApplicationContext, + typically setting the ConnectionFactory via ConnectionFactory property. + + Turns off transaction synchronization by default, as this manager might + be used alongside a dbprovider-based Spring transaction manager like + AdoPlatformTransactionManager, which has stronger needs for synchronization. + Only one manager is allowed to drive synchronization at any point of time. + + - - Close the given EMS Connection and ignore any thrown exception. - This is useful for typical finally blocks in manual EMS code. - - the EMS Connection to close (may be null) - - - - Close the given EMS Connection and ignore any thrown exception. - This is useful for typical finally blocks in manual EMS code. - - the EMS Connection to close (may be null) - - whether to call stop() before closing - - - - Close the given EMS Session and ignore any thrown exception. - This is useful for typical finally blocks in manual EMS code. - - the EMS Session to close (may be null) - - - - Close the given EMS MessageProducer and ignore any thrown exception. - This is useful for typical finally blocks in manual EMS code. - - the EMS MessageProducer to close (may be null) - - - - Close the given EMS MessageConsumer and ignore any thrown exception. - This is useful for typical finally blocks in manual EMS code. - - the EMS MessageConsumer to close (may be null) - - - - Commit the Session if not within a distributed transaction. - Needs investigation - no distributed tx in .NET messaging providers - the EMS Session to commit - - EMSException if committing failed - - - Rollback the Session if not within a distributed transaction. - Needs investigation - no distributed tx in EMS - the EMS Session to rollback - - EMSException if committing failed - - + - Closes the given queue browser and ignore any thrown exception. - This is useful for typical finally blocks in manual EMS code. + Initializes a new instance of the class + given a ConnectionFactory. - The queue browser to close (may be null. + The connection factory to obtain connections from. - + - Converts the acknowledgement mode from an integer to an enumeration. If the integer - does not match a valid enumeration, the returned enumeration is SessionMode.AutoAcknowledge + Make sure the ConnectionFactory has been set. + + + + + Get the EmsTransactionObject. + + he EmsTransactionObject. + + + + Begin a new transaction with the given transaction definition. + + Transaction object returned by + . + instance, describing + propagation behavior, isolation level, timeout etc. + + Does not have to care about applying the propagation behavior, + as this has already been handled by this abstract manager. + + + In the case of creation or system errors. + + + + + Suspend the resources of the current transaction. + + Transaction object returned by + . + + An object that holds suspended resources (will be kept unexamined for passing it into + .) + + + Transaction synchronization will already have been suspended. + + + in case of system errors. + + + + + Resume the resources of the current transaction. + + Transaction object returned by + . + The object that holds suspended resources as returned by + . + Transaction synchronization will be resumed afterwards. + + + In the case of system errors. + + + + + Perform an actual commit on the given transaction. + + The status representation of the transaction. + + In the case of system errors. + + + + + Perform an actual rollback on the given transaction. + + The status representation of the transaction. + + In the case of system errors. + + + + + Set the given transaction rollback-only. Only called on rollback + if the current transaction takes part in an existing one. + + The status representation of the transaction. + + In the case of system errors. + + + + + Cleanup resources after transaction completion. + + Transaction object returned by + . + + + Called after + and + + execution on any outcome. + + + + + + Check if the given transaction object indicates an existing transaction + (that is, a transaction which has already started). + + Transaction object returned by + . + + True if there is an existing transaction. + + + In the case of system errors. + + + + + Creates the connection via thie manager's ConnectionFactory. + + The new Connection + If thrown by underlying messaging APIs + + + + Creates the session for the given Connection + + The connection to create a Session for. + the new Session + If thrown by underlying messaging APIs + + + + Gets or sets the connection factory that this instance should manage transaction. + for. + + The connection factory. + + + + Gets the resource factory that this transaction manager operates on, + In tihs case the ConnectionFactory + + The ConnectionFactory. + + + + EMS Transaction object, representing a EmsResourceHolder. + Used as transaction object by EMSTransactionManager - The ack mode. - The corresponding SessionMode enumeration diff --git a/src/Spring/Spring.Web.Mvc4/Spring.Web.Mvc4.xml b/src/Spring/Spring.Web.Mvc4/Spring.Web.Mvc4.xml index 8797a2db..6364e8e4 100644 --- a/src/Spring/Spring.Web.Mvc4/Spring.Web.Mvc4.xml +++ b/src/Spring/Spring.Web.Mvc4/Spring.Web.Mvc4.xml @@ -4,6 +4,168 @@ Spring.Web.Mvc4 + + + Context Handler for ASP.NET MVC Applications + + + + + Encapsulates arguments to the class. + + + + + Initializes a new instance of the MvcApplicationContextArgs class. + + + + + Initializes a new instance of the MvcApplicationContextArgs class. + + The name. + The parent context. + The configuration locations. + The configuration resources. + + + + Initializes a new instance of the MvcApplicationContextArgs class. + + The name. + The parent context. + The configuration locations. + The configuration resources. + if set to true [case sensitive]. + + + + Spring-based implementation of the interface for ASP.NET MVC. + + + + + Initializes a new instance of the class. + + The to be used by the resolver + + + + Resolves singly registered services that support arbitrary object creation. + + The type of the requested service or object. + The requested service or object. + + + + Resolves multiply registered services. + + The type of the requested services. + The requested services. + + + + Gets the application context. + + The application context. + + + + Gets or sets the name of the application context. + + + Defaults to using the root (default) Application Context. + + The name of the application context. + + + + Spring-based implementation of the interface for ASP.NET MVC Web API. + + + + + Initializes a new instance of the class. + + The to be used by the resolver + + + + Spring.NET-specific HttpApplication for ASP.NET MVC integration. + + + + + Executes custom initialization code after all event handler modules have been added. + + + + + Handles the BeginRequest event of the Application control. + + The source of the event. + The instance containing the event data. + + + + Builds the dependency resolver. + + The instance. + You must override this method in a derived class to control the manner in which the + is created. + + + + Builds the dependency resolver. + + The instance. + You must override this method in a derived class to control the manner in which the + is created. + + + + Configures the instance. + + + You must override this method in a derived class to control the manner in which the + is configured. + + + + + Registers the DependencyResolver implementation with the MVC runtime. + + You must override this method in a derived class to control the manner in which the + is registered. + + + + + + Registers the DependencyResolver implementation with the MVC runtime. + + You must override this method in a derived class to control the manner in which the + is registered. + + + + + + Thread-safe class that ensures that the is registered only once. + + + + + Registers the specified . + + The resolver. + + + + Registers the specified . + + The resolver. + Application Context for ASP.NET MVC Applications @@ -86,167 +248,5 @@ An array of s, or if none. - - - Encapsulates arguments to the class. - - - - - Initializes a new instance of the MvcApplicationContextArgs class. - - - - - Initializes a new instance of the MvcApplicationContextArgs class. - - The name. - The parent context. - The configuration locations. - The configuration resources. - - - - Initializes a new instance of the MvcApplicationContextArgs class. - - The name. - The parent context. - The configuration locations. - The configuration resources. - if set to true [case sensitive]. - - - - Context Handler for ASP.NET MVC Applications - - - - - Spring-based implementation of the interface for ASP.NET MVC. - - - - - Initializes a new instance of the class. - - The to be used by the resolver - - - - Resolves singly registered services that support arbitrary object creation. - - The type of the requested service or object. - The requested service or object. - - - - Resolves multiply registered services. - - The type of the requested services. - The requested services. - - - - Gets the application context. - - The application context. - - - - Gets or sets the name of the application context. - - - Defaults to using the root (default) Application Context. - - The name of the application context. - - - - Spring.NET-specific HttpApplication for ASP.NET MVC integration. - - - - - Executes custom initialization code after all event handler modules have been added. - - - - - Handles the BeginRequest event of the Application control. - - The source of the event. - The instance containing the event data. - - - - Builds the dependency resolver. - - The instance. - You must override this method in a derived class to control the manner in which the - is created. - - - - Builds the dependency resolver. - - The instance. - You must override this method in a derived class to control the manner in which the - is created. - - - - Configures the instance. - - - You must override this method in a derived class to control the manner in which the - is configured. - - - - - Registers the DependencyResolver implementation with the MVC runtime. - - You must override this method in a derived class to control the manner in which the - is registered. - - - - - - Registers the DependencyResolver implementation with the MVC runtime. - - You must override this method in a derived class to control the manner in which the - is registered. - - - - - - Thread-safe class that ensures that the is registered only once. - - - - - Registers the specified . - - The resolver. - - - - Registers the specified . - - The resolver. - - - - Spring-based implementation of the interface for ASP.NET MVC Web API. - - - - - Initializes a new instance of the class. - - The to be used by the resolver - diff --git a/test/Spring/Spring.Aop.Tests/Aspects/Exception/CaptureOutputLogger.cs b/test/Spring/Spring.Aop.Tests/Aspects/Exception/CaptureOutputLogger.cs index e384ea2e..1d76aa4f 100644 --- a/test/Spring/Spring.Aop.Tests/Aspects/Exception/CaptureOutputLogger.cs +++ b/test/Spring/Spring.Aop.Tests/Aspects/Exception/CaptureOutputLogger.cs @@ -7,10 +7,7 @@ namespace Spring.Aspects.Exceptions { public static readonly string NAME = "capturingLogger"; public CaptureOutputLogger() - : base(NAME, LogLevel.All, false, false, null) - -// TODO: use this line when upgrading to Common.Logging 2.0: -// : base(false, NAME, LogLevel.All, true, false, false, null) + : base(false, NAME, LogLevel.All, true, false, false, null) { } // private LogLevel _currentLogLevel = LogLevel.All; diff --git a/test/Spring/Spring.Services.Tests/EnterpriseServices/ExeConfigurationSystemTests.config b/test/Spring/Spring.Services.Tests/EnterpriseServices/ExeConfigurationSystemTests.config index 10e66559..05f4782e 100644 --- a/test/Spring/Spring.Services.Tests/EnterpriseServices/ExeConfigurationSystemTests.config +++ b/test/Spring/Spring.Services.Tests/EnterpriseServices/ExeConfigurationSystemTests.config @@ -7,9 +7,7 @@
- -
- +
@@ -17,10 +15,10 @@ - - - - - + + + + + diff --git a/test/Spring/Spring.Services.Tests/EnterpriseServices/ExeConfigurationSystemTests.cs b/test/Spring/Spring.Services.Tests/EnterpriseServices/ExeConfigurationSystemTests.cs index c6bf59a7..4ce6dd59 100644 --- a/test/Spring/Spring.Services.Tests/EnterpriseServices/ExeConfigurationSystemTests.cs +++ b/test/Spring/Spring.Services.Tests/EnterpriseServices/ExeConfigurationSystemTests.cs @@ -21,7 +21,7 @@ using System.Configuration; using System.Configuration.Internal; using System.IO; -using Common.Logging; +using Common.Logging.Configuration; using Common.Logging.Simple; using NUnit.Framework; using Spring.Util; @@ -44,7 +44,7 @@ namespace Spring.EnterpriseServices { ExeConfigurationSystem ccs = new ExeConfigurationSystem(exePath); prevConfig = ConfigurationUtils.SetConfigurationSystem(ccs, true); - LogSetting settings = (LogSetting) ConfigurationManager.GetSection("common/logging"); + LogSetting settings = (LogSetting) ConfigurationManager.GetSection("logging"); Assert.AreEqual(typeof (TraceLoggerFactoryAdapter), settings.FactoryAdapterType); Assert.AreEqual("from custom config!", ConfigurationManager.AppSettings["key"]);