Java Doc for JmsSession.java in  » EJB-Server-resin-3.1.5 » resin » com » caucho » jms » connection » 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 » EJB Server resin 3.1.5 » resin » com.caucho.jms.connection 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.caucho.jms.connection.JmsSession

All known Subclasses:   com.caucho.jms.connection.TopicSessionImpl,  com.caucho.jms.connection.QueueSessionImpl,
JmsSession
public class JmsSession implements XASession,ThreadTask,XAResource(Code)
Manages the JMS session.

Inner Class :abstract class TransactedMessage
Inner Class :class SendMessage extends TransactedMessage
Inner Class :class ReceiveMessage extends TransactedMessage

Field Summary
final protected static  L10NL
    
final protected static  Loggerlog
    

Constructor Summary
public  JmsSession(ConnectionImpl connection, boolean isTransacted, int ackMode, boolean isXA)
    

Method Summary
public  voidacknowledge()
    
protected  voidaddConsumer(MessageConsumerImpl consumer)
    
 voidaddTransactedReceive(AbstractDestination queue, MessageImpl message)
     Adds a message to the session message queue.
public  voidcheckOpen()
     Checks that the session is open.
 voidcheckThread()
     Verifies that multiple threads aren't using the session. 4.4.1 the client takes the responsibility.
public  voidclose()
    
public  voidcommit()
     Commits the messages.
public  voidcommit(Xid xid, boolean onePhase)
     Called to commit.
public  QueueBrowsercreateBrowser(Queue queue)
     Creates a QueueBrowser to browse messages in the queue.
public  QueueBrowsercreateBrowser(Queue queue, String messageSelector)
     Creates a QueueBrowser to browse messages in the queue.
public  BytesMessagecreateBytesMessage()
     Creates a new byte[] message.
public  MessageConsumercreateConsumer(Destination destination)
     Creates a consumer to receive messages.
public  MessageConsumercreateConsumer(Destination destination, String messageSelector)
     Creates a consumer to receive messages.
public  MessageConsumercreateConsumer(Destination destination, String messageSelector, boolean noLocal)
     Creates a consumer to receive messages.
public  TopicSubscribercreateDurableSubscriber(Topic topic, String name)
     Creates a durable subscriber to receive messages.
public  TopicSubscribercreateDurableSubscriber(Topic topic, String name, String messageSelector, boolean noLocal)
     Creates a subscriber to receive messages.
public  MapMessagecreateMapMessage()
     Creates a new map message.
public  MessagecreateMessage()
     Creates a message.
public  ObjectMessagecreateObjectMessage()
     Creates an object message.
public  ObjectMessagecreateObjectMessage(Serializable obj)
     Creates an object message.
public  MessageProducercreateProducer(Destination destination)
     Creates a producer to produce messages.
public  QueuecreateQueue(String queueName)
     Creates a new queue.
public  StreamMessagecreateStreamMessage()
     Creates a stream message.
public  TemporaryQueuecreateTemporaryQueue()
     Creates a temporary queue.
public  TemporaryTopiccreateTemporaryTopic()
     Creates a temporary topic.
public  TextMessagecreateTextMessage()
     Creates a text message.
public  TextMessagecreateTextMessage(String message)
     Creates a text message.
public  TopiccreateTopic(String topicName)
     Creates a new topic.
public  voidend(Xid xid, int flags)
     Called when the resource is is done with a transaction.
public  voidforget(Xid xid)
     Called to forget an Xid that had a heuristic commit.
public  intgetAcknowledgeMode()
     Returns the acknowledge mode for the session.
 ClassLoadergetClassLoader()
     Returns the ClassLoader.
public  StringgetClientID()
    
 ConnectionImplgetConnection()
     Returns the connection.
public  MessageListenergetMessageListener()
    
public  SessiongetSession()
    
public  booleangetTransacted()
     Returns true if the session is in a transaction.
public  intgetTransactionTimeout()
     Gets the transaction timeout in seconds.
public  XAResourcegetXAResource()
    
public  booleanisActive()
     Returns true if the connection is active.
 booleanisAsynchronous()
     Set true for a synchronous session.
public  booleanisClosed()
    
public  booleanisSameRM(XAResource xa)
     Returns true if the specified resource has the same RM.
 booleanisStopping()
     Returns true if the connection is active.
 booleannotifyMessageAvailable()
     Notifies the receiver.
public  intprepare(Xid xid)
     Called to start the first phase of the commit.
protected  Messagereceive(MessageConsumerImpl consumer, long timeout)
     Called to synchronously receive a message.
public  voidrecover()
     Recovers the messages.
public  Xid[]recover(int flag)
     Called to find Xid's that need recovery.
protected  voidremoveConsumer(MessageConsumerImpl consumer)
    
public  voidrollback()
     Rollsback the messages.
public  voidrollback(Xid xid)
     Called to roll back.
public  voidrollbackImpl()
     Rollsback the messages.
public  voidrun()
    
public  voidsend(AbstractDestination queue, Message appMessage, int deliveryMode, int priority, long timeout)
     Adds a message to the session message queue.
 voidsetAsynchronous()
     Set true for a synchronous session.
public  voidsetMessageListener(MessageListener listener)
    
public  booleansetTransactionTimeout(int timeout)
     Sets the transaction timeout in seconds.
 voidstart()
     Starts the session.
public  voidstart(Xid xid, int flags)
     Called when the resource is associated with a transaction.
 voidstop()
     Stops the session.
public  StringtoString()
    
public  voidunsubscribe(String name)
     Unsubscribe from a durable subscription.

Field Detail
L
final protected static L10N L(Code)



log
final protected static Logger log(Code)




Constructor Detail
JmsSession
public JmsSession(ConnectionImpl connection, boolean isTransacted, int ackMode, boolean isXA) throws JMSException(Code)




Method Detail
acknowledge
public void acknowledge() throws JMSException(Code)
Acknowledge received



addConsumer
protected void addConsumer(MessageConsumerImpl consumer)(Code)



addTransactedReceive
void addTransactedReceive(AbstractDestination queue, MessageImpl message)(Code)
Adds a message to the session message queue.



checkOpen
public void checkOpen() throws javax.jms.IllegalStateException(Code)
Checks that the session is open.



checkThread
void checkThread() throws JMSException(Code)
Verifies that multiple threads aren't using the session. 4.4.1 the client takes the responsibility. There's no validation check.



close
public void close() throws JMSException(Code)
Closes the session



commit
public void commit() throws JMSException(Code)
Commits the messages.



commit
public void commit(Xid xid, boolean onePhase) throws XAException(Code)
Called to commit.



createBrowser
public QueueBrowser createBrowser(Queue queue) throws JMSException(Code)
Creates a QueueBrowser to browse messages in the queue.
Parameters:
  queue - the queue to send messages to.



createBrowser
public QueueBrowser createBrowser(Queue queue, String messageSelector) throws JMSException(Code)
Creates a QueueBrowser to browse messages in the queue.
Parameters:
  queue - the queue to send messages to.



createBytesMessage
public BytesMessage createBytesMessage() throws JMSException(Code)
Creates a new byte[] message.



createConsumer
public MessageConsumer createConsumer(Destination destination) throws JMSException(Code)
Creates a consumer to receive messages.
Parameters:
  destination - the destination to receive messages from.



createConsumer
public MessageConsumer createConsumer(Destination destination, String messageSelector) throws JMSException(Code)
Creates a consumer to receive messages.
Parameters:
  destination - the destination to receive messages from.
Parameters:
  messageSelector - query to restrict the messages.



createConsumer
public MessageConsumer createConsumer(Destination destination, String messageSelector, boolean noLocal) throws JMSException(Code)
Creates a consumer to receive messages.
Parameters:
  destination - the destination to receive messages from.
Parameters:
  messageSelector - query to restrict the messages.



createDurableSubscriber
public TopicSubscriber createDurableSubscriber(Topic topic, String name) throws JMSException(Code)
Creates a durable subscriber to receive messages.
Parameters:
  topic - the topic to receive messages from.



createDurableSubscriber
public TopicSubscriber createDurableSubscriber(Topic topic, String name, String messageSelector, boolean noLocal) throws JMSException(Code)
Creates a subscriber to receive messages.
Parameters:
  topic - the topic to receive messages from.
Parameters:
  messageSelector - topic to restrict the messages.
Parameters:
  noLocal - if true, don't receive messages we've sent



createMapMessage
public MapMessage createMapMessage() throws JMSException(Code)
Creates a new map message.



createMessage
public Message createMessage() throws JMSException(Code)
Creates a message. Used when only header info is important.



createObjectMessage
public ObjectMessage createObjectMessage() throws JMSException(Code)
Creates an object message.



createObjectMessage
public ObjectMessage createObjectMessage(Serializable obj) throws JMSException(Code)
Creates an object message.
Parameters:
  obj - a serializable message.



createProducer
public MessageProducer createProducer(Destination destination) throws JMSException(Code)
Creates a producer to produce messages.
Parameters:
  destination - the destination to send messages from.



createQueue
public Queue createQueue(String queueName) throws JMSException(Code)
Creates a new queue.



createStreamMessage
public StreamMessage createStreamMessage() throws JMSException(Code)
Creates a stream message.



createTemporaryQueue
public TemporaryQueue createTemporaryQueue() throws JMSException(Code)
Creates a temporary queue.



createTemporaryTopic
public TemporaryTopic createTemporaryTopic() throws JMSException(Code)
Creates a temporary topic.



createTextMessage
public TextMessage createTextMessage() throws JMSException(Code)
Creates a text message.



createTextMessage
public TextMessage createTextMessage(String message) throws JMSException(Code)
Creates a text message.



createTopic
public Topic createTopic(String topicName) throws JMSException(Code)
Creates a new topic.



end
public void end(Xid xid, int flags) throws XAException(Code)
Called when the resource is is done with a transaction.



forget
public void forget(Xid xid) throws XAException(Code)
Called to forget an Xid that had a heuristic commit.



getAcknowledgeMode
public int getAcknowledgeMode() throws JMSException(Code)
Returns the acknowledge mode for the session.



getClassLoader
ClassLoader getClassLoader()(Code)
Returns the ClassLoader.



getClientID
public String getClientID() throws JMSException(Code)
Returns the connection's clientID



getConnection
ConnectionImpl getConnection()(Code)
Returns the connection.



getMessageListener
public MessageListener getMessageListener() throws JMSException(Code)
Returns the message listener



getSession
public Session getSession()(Code)



getTransacted
public boolean getTransacted() throws JMSException(Code)
Returns true if the session is in a transaction.



getTransactionTimeout
public int getTransactionTimeout() throws XAException(Code)
Gets the transaction timeout in seconds.



getXAResource
public XAResource getXAResource()(Code)



isActive
public boolean isActive()(Code)
Returns true if the connection is active.



isAsynchronous
boolean isAsynchronous()(Code)
Set true for a synchronous session.



isClosed
public boolean isClosed()(Code)



isSameRM
public boolean isSameRM(XAResource xa) throws XAException(Code)
Returns true if the specified resource has the same RM.



isStopping
boolean isStopping()(Code)
Returns true if the connection is active.



notifyMessageAvailable
boolean notifyMessageAvailable()(Code)
Notifies the receiver.



prepare
public int prepare(Xid xid) throws XAException(Code)
Called to start the first phase of the commit.



receive
protected Message receive(MessageConsumerImpl consumer, long timeout) throws JMSException(Code)
Called to synchronously receive a message.



recover
public void recover() throws JMSException(Code)
Recovers the messages.



recover
public Xid[] recover(int flag) throws XAException(Code)
Called to find Xid's that need recovery.



removeConsumer
protected void removeConsumer(MessageConsumerImpl consumer)(Code)



rollback
public void rollback() throws JMSException(Code)
Rollsback the messages.



rollback
public void rollback(Xid xid) throws XAException(Code)
Called to roll back.



rollbackImpl
public void rollbackImpl() throws JMSException(Code)
Rollsback the messages.



run
public void run()(Code)
Called to synchronously receive messages



send
public void send(AbstractDestination queue, Message appMessage, int deliveryMode, int priority, long timeout) throws JMSException(Code)
Adds a message to the session message queue.



setAsynchronous
void setAsynchronous()(Code)
Set true for a synchronous session.



setMessageListener
public void setMessageListener(MessageListener listener) throws JMSException(Code)
Sets the message listener



setTransactionTimeout
public boolean setTransactionTimeout(int timeout) throws XAException(Code)
Sets the transaction timeout in seconds.



start
void start()(Code)
Starts the session.



start
public void start(Xid xid, int flags) throws XAException(Code)
Called when the resource is associated with a transaction.



stop
void stop()(Code)
Stops the session.



toString
public String toString()(Code)



unsubscribe
public void unsubscribe(String name) throws JMSException(Code)
Unsubscribe from a durable subscription.



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.