Java Doc for JmsAccessor.java in  » J2EE » spring-framework-2.5 » org » springframework » jms » support » 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.5 » org.springframework.jms.support 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.springframework.jms.support.JmsAccessor

All known Subclasses:   org.springframework.jms.support.destination.JmsDestinationAccessor,
JmsAccessor
abstract public class JmsAccessor implements InitializingBean(Code)
Base class for org.springframework.jms.core.JmsTemplate and other JMS-accessing gateway helpers, defining common properties such as the JMS ConnectionFactory to operate on. The subclass org.springframework.jms.support.destination.JmsDestinationAccessor adds further, destination-related properties.

Not intended to be used directly. See org.springframework.jms.core.JmsTemplate .
author:
   Juergen Hoeller
since:
   1.2
See Also:   org.springframework.jms.support.destination.JmsDestinationAccessor
See Also:   org.springframework.jms.core.JmsTemplate



Field Summary
final protected  Loglogger
    


Method Summary
public  voidafterPropertiesSet()
    
protected  JmsExceptionconvertJmsAccessException(JMSException ex)
     Convert the specified checked javax.jms.JMSException JMSException to a Spring runtime org.springframework.jms.JmsException JmsException equivalent.
protected  ConnectioncreateConnection()
     Create a JMS Connection via this template's ConnectionFactory.
protected  SessioncreateSession(Connection con)
     Create a JMS Session for the given Connection.
public  ConnectionFactorygetConnectionFactory()
     Return the ConnectionFactory that this accessor uses for obtaining JMS Connection Connections .
public  intgetSessionAcknowledgeMode()
     Return the acknowledgement mode for JMS Session sessions .
protected  booleanisClientAcknowledge(Session session)
     Determine whether the given Session is in client acknowledge mode.
public  booleanisSessionTransacted()
     Return whether the JMS Session sessions used by this accessor are supposed to be transacted.
public  voidsetConnectionFactory(ConnectionFactory connectionFactory)
     Set the ConnectionFactory to use for obtaining JMS Connection Connections .
public  voidsetSessionAcknowledgeMode(int sessionAcknowledgeMode)
     Set the JMS acknowledgement mode that is used when creating a JMS Session to send a message.

Default is Session.AUTO_ACKNOWLEDGE .

Vendor-specific extensions to the acknowledgment mode can be set here as well.

Note that that inside an EJB the parameters to create(Queue/Topic)Session(boolean transacted, int acknowledgeMode) method are not taken into account.

public  voidsetSessionAcknowledgeModeName(String constantName)
     Set the JMS acknowledgement mode by the name of the corresponding constant in the JMS Session interface, e.g.
public  voidsetSessionTransacted(boolean sessionTransacted)
     Set the transaction mode that is used when creating a JMS Session . Default is "false".

Note that within a JTA transaction, the parameters passed to create(Queue/Topic)Session(boolean transacted, int acknowledgeMode) method are not taken into account.


Field Detail
logger
final protected Log logger(Code)
Logger available to subclasses





Method Detail
afterPropertiesSet
public void afterPropertiesSet()(Code)



convertJmsAccessException
protected JmsException convertJmsAccessException(JMSException ex)(Code)
Convert the specified checked javax.jms.JMSException JMSException to a Spring runtime org.springframework.jms.JmsException JmsException equivalent.

The default implementation delegates to the org.springframework.jms.support.JmsUtils.convertJmsAccessException method.
Parameters:
  ex - the original checked JMSException to convert the Spring runtime JmsException wrapping ex
See Also:   org.springframework.jms.support.JmsUtils.convertJmsAccessException




createConnection
protected Connection createConnection() throws JMSException(Code)
Create a JMS Connection via this template's ConnectionFactory.

This implementation uses JMS 1.1 API. the new JMS Connection
throws:
  JMSException - if thrown by JMS API methods
See Also:   javax.jms.ConnectionFactory.createConnection




createSession
protected Session createSession(Connection con) throws JMSException(Code)
Create a JMS Session for the given Connection.

This implementation uses JMS 1.1 API.
Parameters:
  con - the JMS Connection to create a Session for the new JMS Session
throws:
  JMSException - if thrown by JMS API methods
See Also:   javax.jms.Connection.createSession(booleanint)




getConnectionFactory
public ConnectionFactory getConnectionFactory()(Code)
Return the ConnectionFactory that this accessor uses for obtaining JMS Connection Connections .



getSessionAcknowledgeMode
public int getSessionAcknowledgeMode()(Code)
Return the acknowledgement mode for JMS Session sessions . the acknowledgement mode applied by this accessor



isClientAcknowledge
protected boolean isClientAcknowledge(Session session) throws JMSException(Code)
Determine whether the given Session is in client acknowledge mode.

This implementation uses JMS 1.1 API.
Parameters:
  session - the JMS Session to check whether the given Session is in client acknowledge mode
throws:
  javax.jms.JMSException - if thrown by JMS API methods
See Also:   javax.jms.Session.getAcknowledgeMode
See Also:   javax.jms.Session.CLIENT_ACKNOWLEDGE




isSessionTransacted
public boolean isSessionTransacted()(Code)
Return whether the JMS Session sessions used by this accessor are supposed to be transacted. true if the JMS Sessions used are transacted
See Also:   JmsAccessor.setSessionTransacted(boolean)



setConnectionFactory
public void setConnectionFactory(ConnectionFactory connectionFactory)(Code)
Set the ConnectionFactory to use for obtaining JMS Connection Connections .



setSessionAcknowledgeMode
public void setSessionAcknowledgeMode(int sessionAcknowledgeMode)(Code)
Set the JMS acknowledgement mode that is used when creating a JMS Session to send a message.

Default is Session.AUTO_ACKNOWLEDGE .

Vendor-specific extensions to the acknowledgment mode can be set here as well.

Note that that inside an EJB the parameters to create(Queue/Topic)Session(boolean transacted, int acknowledgeMode) method are not taken into account. Depending on the transaction context in the EJB, the container makes its own decisions on these values. See section 17.3.5 of the EJB spec.
Parameters:
  sessionAcknowledgeMode - the acknowledgement mode
See Also:   javax.jms.Session.AUTO_ACKNOWLEDGE
See Also:   javax.jms.Session.CLIENT_ACKNOWLEDGE
See Also:   javax.jms.Session.DUPS_OK_ACKNOWLEDGE
See Also:   javax.jms.Connection.createSession(booleanint)




setSessionAcknowledgeModeName
public void setSessionAcknowledgeModeName(String constantName)(Code)
Set the JMS acknowledgement mode by the name of the corresponding constant in the JMS Session interface, e.g. "CLIENT_ACKNOWLEDGE".

If you want to use vendor-specific extensions to the acknowledgment mode, use JmsAccessor.setSessionAcknowledgeModeName(String) instead.
Parameters:
  constantName - the name of the Session acknowledge mode constant
See Also:   javax.jms.Session.AUTO_ACKNOWLEDGE
See Also:   javax.jms.Session.CLIENT_ACKNOWLEDGE
See Also:   javax.jms.Session.DUPS_OK_ACKNOWLEDGE
See Also:   javax.jms.Connection.createSession(booleanint)




setSessionTransacted
public void setSessionTransacted(boolean sessionTransacted)(Code)
Set the transaction mode that is used when creating a JMS Session . Default is "false".

Note that within a JTA transaction, the parameters passed to create(Queue/Topic)Session(boolean transacted, int acknowledgeMode) method are not taken into account. Depending on the J2EE transaction context, the container makes its own decisions on these values. Analogously, these parameters are not taken into account within a locally managed transaction either, since the accessor operates on an existing JMS Session in this case.

Setting this flag to "true" will use a short local JMS transaction when running outside of a managed transaction, and a synchronized local JMS transaction in case of a managed transaction (other than an XA transaction) being present. The latter has the effect of a local JMS transaction being managed alongside the main transaction (which might be a native JDBC transaction), with the JMS transaction committing right after the main transaction.
Parameters:
  sessionTransacted - the transaction mode
See Also:   javax.jms.Connection.createSession(booleanint)




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.