Java Doc for JmsTemplate102.java in  » J2EE » spring-framework-2.0.6 » org » springframework » jms » core » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » spring framework 2.0.6 » org.springframework.jms.core 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.springframework.jms.core.JmsTemplate
   org.springframework.jms.core.JmsTemplate102

JmsTemplate102
public class JmsTemplate102 extends JmsTemplate (Code)
A subclass of JmsTemplate that uses the JMS 1.0.2 specification, rather than the JMS 1.1 methods used by JmsTemplate itself. This class can be used for JMS 1.0.2 providers, offering the same API as JmsTemplate does for JMS 1.1 providers.

You must specify the domain or style of messaging to be either Point-to-Point (Queues) or Publish/Subscribe (Topics), using the "pubSubDomain" property. Point-to-Point (Queues) is the default domain.

The "pubSubDomain" property is an important setting due to the use of similar but separate class hierarchies in the JMS 1.0.2 API. JMS 1.1 provides a new domain-independent API that allows for easy mix-and-match use of Point-to-Point and Publish/Subscribe domain.

This template uses a DynamicDestinationResolver and a SimpleMessageConverter102 as default strategies for resolving a destination name or converting a message, respectively.
author:
   Mark Pollack
author:
   Juergen Hoeller
since:
   1.1
See Also:   JmsTemplate102.setConnectionFactory
See Also:   JmsTemplate102.setPubSubDomain
See Also:   JmsTemplate
See Also:   org.springframework.jms.support.destination.DynamicDestinationResolver
See Also:   org.springframework.jms.support.converter.SimpleMessageConverter102
See Also:   javax.jms.Queue
See Also:   javax.jms.Topic
See Also:   javax.jms.QueueSession
See Also:   javax.jms.TopicSession
See Also:   javax.jms.QueueSender
See Also:   javax.jms.TopicPublisher
See Also:   javax.jms.QueueReceiver
See Also:   javax.jms.TopicSubscriber




Constructor Summary
public  JmsTemplate102()
     Create a new JmsTemplate102 for bean-style usage.
public  JmsTemplate102(ConnectionFactory connectionFactory, boolean pubSubDomain)
     Create a new JmsTemplate102, given a ConnectionFactory.

Method Summary
public  voidafterPropertiesSet()
     In addition to checking if the connection factory is set, make sure that the supplied connection factory is of the appropriate type for the specified destination type: QueueConnectionFactory for queues, and TopicConnectionFactory for topics.
protected  ConnectioncreateConnection()
     This implementation overrides the superclass method to use JMS 1.0.2 API.
protected  MessageConsumercreateConsumer(Session session, Destination destination, String messageSelector)
     This implementation overrides the superclass method to use JMS 1.0.2 API.
protected  SessioncreateSession(Connection con)
     This implementation overrides the superclass method to use JMS 1.0.2 API.
protected  MessageProducerdoCreateProducer(Session session, Destination destination)
     This implementation overrides the superclass method to use JMS 1.0.2 API.
protected  voiddoSend(MessageProducer producer, Message message)
     This implementation overrides the superclass method to use JMS 1.0.2 API.
protected  ConnectiongetConnection(JmsResourceHolder holder)
     This implementation overrides the superclass method to accept either a QueueConnection or a TopicConnection, depending on the domain.
protected  SessiongetSession(JmsResourceHolder holder)
     This implementation overrides the superclass method to accept either a QueueSession or a TopicSession, depending on the domain.
protected  voidinitDefaultStrategies()
     Initialize the default implementations for the template's strategies: DynamicDestinationResolver and SimpleMessageConverter102.
protected  booleanisClientAcknowledge(Session session)
     This implementation overrides the superclass method to avoid using JMS 1.1's Session getAcknowledgeMode() method.


Constructor Detail
JmsTemplate102
public JmsTemplate102()(Code)
Create a new JmsTemplate102 for bean-style usage.

Note: The ConnectionFactory has to be set before using the instance. This constructor can be used to prepare a JmsTemplate via a BeanFactory, typically setting the ConnectionFactory via setConnectionFactory.
See Also:   JmsTemplate102.setConnectionFactory




JmsTemplate102
public JmsTemplate102(ConnectionFactory connectionFactory, boolean pubSubDomain)(Code)
Create a new JmsTemplate102, given a ConnectionFactory.
Parameters:
  connectionFactory - the ConnectionFactory to obtain Connections from
Parameters:
  pubSubDomain - whether the Publish/Subscribe domain (Topics) orPoint-to-Point domain (Queues) should be used
See Also:   JmsTemplate102.setPubSubDomain




Method Detail
afterPropertiesSet
public void afterPropertiesSet()(Code)
In addition to checking if the connection factory is set, make sure that the supplied connection factory is of the appropriate type for the specified destination type: QueueConnectionFactory for queues, and TopicConnectionFactory for topics.



createConnection
protected Connection createConnection() throws JMSException(Code)
This implementation overrides the superclass method to use JMS 1.0.2 API.



createConsumer
protected MessageConsumer createConsumer(Session session, Destination destination, String messageSelector) throws JMSException(Code)
This implementation overrides the superclass method to use JMS 1.0.2 API.



createSession
protected Session createSession(Connection con) throws JMSException(Code)
This implementation overrides the superclass method to use JMS 1.0.2 API.



doCreateProducer
protected MessageProducer doCreateProducer(Session session, Destination destination) throws JMSException(Code)
This implementation overrides the superclass method to use JMS 1.0.2 API.



doSend
protected void doSend(MessageProducer producer, Message message) throws JMSException(Code)
This implementation overrides the superclass method to use JMS 1.0.2 API.



getConnection
protected Connection getConnection(JmsResourceHolder holder)(Code)
This implementation overrides the superclass method to accept either a QueueConnection or a TopicConnection, depending on the domain.



getSession
protected Session getSession(JmsResourceHolder holder)(Code)
This implementation overrides the superclass method to accept either a QueueSession or a TopicSession, depending on the domain.



initDefaultStrategies
protected void initDefaultStrategies()(Code)
Initialize the default implementations for the template's strategies: DynamicDestinationResolver and SimpleMessageConverter102.
See Also:   JmsTemplate102.setDestinationResolver
See Also:   JmsTemplate102.setMessageConverter
See Also:   org.springframework.jms.support.destination.DynamicDestinationResolver
See Also:   org.springframework.jms.support.converter.SimpleMessageConverter102



isClientAcknowledge
protected boolean isClientAcknowledge(Session session) throws JMSException(Code)
This implementation overrides the superclass method to avoid using JMS 1.1's Session getAcknowledgeMode() method. The best we can do here is to check the setting on the template.
See Also:   JmsTemplate102.getSessionAcknowledgeMode()



Fields inherited from org.springframework.jms.core.JmsTemplate
final public static long DEFAULT_RECEIVE_TIMEOUT(Code)(Java Doc)

Methods inherited from org.springframework.jms.core.JmsTemplate
public void convertAndSend(Object message) throws JmsException(Code)(Java Doc)
public void convertAndSend(Destination destination, Object message) throws JmsException(Code)(Java Doc)
public void convertAndSend(String destinationName, Object message) throws JmsException(Code)(Java Doc)
public void convertAndSend(Object message, MessagePostProcessor postProcessor) throws JmsException(Code)(Java Doc)
public void convertAndSend(Destination destination, Object message, MessagePostProcessor postProcessor) throws JmsException(Code)(Java Doc)
public void convertAndSend(String destinationName, Object message, MessagePostProcessor postProcessor) throws JmsException(Code)(Java Doc)
protected MessageConsumer createConsumer(Session session, Destination destination, String messageSelector) throws JMSException(Code)(Java Doc)
protected MessageProducer createProducer(Session session, Destination destination) throws JMSException(Code)(Java Doc)
protected Object doConvertFromMessage(Message message)(Code)(Java Doc)
protected MessageProducer doCreateProducer(Session session, Destination destination) throws JMSException(Code)(Java Doc)
protected Message doReceive(Session session, Destination destination, String messageSelector) throws JMSException(Code)(Java Doc)
protected Message doReceive(Session session, MessageConsumer consumer) throws JMSException(Code)(Java Doc)
protected void doSend(Session session, Destination destination, MessageCreator messageCreator) throws JMSException(Code)(Java Doc)
protected void doSend(MessageProducer producer, Message message) throws JMSException(Code)(Java Doc)
public Object execute(SessionCallback action, boolean startConnection) throws JmsException(Code)(Java Doc)
public Object execute(SessionCallback action) throws JmsException(Code)(Java Doc)
public Object execute(ProducerCallback action) throws JmsException(Code)(Java Doc)
protected Connection getConnection(JmsResourceHolder holder)(Code)(Java Doc)
public Destination getDefaultDestination()(Code)(Java Doc)
public String getDefaultDestinationName()(Code)(Java Doc)
public int getDeliveryMode()(Code)(Java Doc)
public MessageConverter getMessageConverter()(Code)(Java Doc)
public int getPriority()(Code)(Java Doc)
public long getReceiveTimeout()(Code)(Java Doc)
protected Session getSession(JmsResourceHolder holder)(Code)(Java Doc)
public long getTimeToLive()(Code)(Java Doc)
protected void initDefaultStrategies()(Code)(Java Doc)
public boolean isExplicitQosEnabled()(Code)(Java Doc)
public boolean isMessageIdEnabled()(Code)(Java Doc)
public boolean isMessageTimestampEnabled()(Code)(Java Doc)
public boolean isPubSubNoLocal()(Code)(Java Doc)
protected boolean isSessionLocallyTransacted(Session session)(Code)(Java Doc)
public Message receive() throws JmsException(Code)(Java Doc)
public Message receive(Destination destination) throws JmsException(Code)(Java Doc)
public Message receive(String destinationName) throws JmsException(Code)(Java Doc)
public Object receiveAndConvert() throws JmsException(Code)(Java Doc)
public Object receiveAndConvert(Destination destination) throws JmsException(Code)(Java Doc)
public Object receiveAndConvert(String destinationName) throws JmsException(Code)(Java Doc)
public Message receiveSelected(String messageSelector) throws JmsException(Code)(Java Doc)
public Message receiveSelected(Destination destination, String messageSelector) throws JmsException(Code)(Java Doc)
public Message receiveSelected(String destinationName, String messageSelector) throws JmsException(Code)(Java Doc)
public Object receiveSelectedAndConvert(String messageSelector) throws JmsException(Code)(Java Doc)
public Object receiveSelectedAndConvert(Destination destination, String messageSelector) throws JmsException(Code)(Java Doc)
public Object receiveSelectedAndConvert(String destinationName, String messageSelector) throws JmsException(Code)(Java Doc)
public void send(MessageCreator messageCreator) throws JmsException(Code)(Java Doc)
public void send(Destination destination, MessageCreator messageCreator) throws JmsException(Code)(Java Doc)
public void send(String destinationName, MessageCreator messageCreator) throws JmsException(Code)(Java Doc)
public void setDefaultDestination(Destination destination)(Code)(Java Doc)
public void setDefaultDestinationName(String destinationName)(Code)(Java Doc)
public void setDeliveryMode(int deliveryMode)(Code)(Java Doc)
public void setDeliveryPersistent(boolean deliveryPersistent)(Code)(Java Doc)
public void setExplicitQosEnabled(boolean explicitQosEnabled)(Code)(Java Doc)
public void setMessageConverter(MessageConverter messageConverter)(Code)(Java Doc)
public void setMessageIdEnabled(boolean messageIdEnabled)(Code)(Java Doc)
public void setMessageTimestampEnabled(boolean messageTimestampEnabled)(Code)(Java Doc)
public void setPriority(int priority)(Code)(Java Doc)
public void setPubSubNoLocal(boolean pubSubNoLocal)(Code)(Java Doc)
public void setReceiveTimeout(long receiveTimeout)(Code)(Java Doc)
public void setTimeToLive(long timeToLive)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.