How do I issue the close() method within an onMessage() method call and what are the semantics of the close() method?
Submitted by: AdministratorIf you wish to issue the close() method within an onMessage() method call, the system administrator must select the Allow Close In OnMessage check box when configuring the connection factory. For more information, see JMS Connection Factories in the Administration Console Online Help. If this check box is not selected and you issue the close() method within an onMessage() method call, the call will hang.
The close() method performs the following steps to execute an orderly shutdown:
* Terminates the receipt of all pending messages. Applications may return a message or null if a message was not available at the time of the close.
* Waits until all message listeners that are currently processing messages have completed (except for the message listener from which the close() method is being called).
* Rolls back in-process transactions on its transacted sessions (unless such transactions are part of an external JTA user transaction).
* Does not force an acknowledge of client-acknowledged sessions. By not forcing an acknowledge, no messages are lost for queues and durable subscriptions that require reliable processing.
When you close a connection, all associated objects are also closed. You can continue to use the message objects created or received via the connection, except the received message's acknowledge() method. Closing a closed connection has no effect.
Note: Attempting to acknowledge a received message from a closed connection's session throws an IllegalStateException.
When you close a session, all associated producers and consumers are also closed.
For more information about the impact of the close() method for each object, see the appropriate javax.jms javadoc.
Submitted by: Administrator
The close() method performs the following steps to execute an orderly shutdown:
* Terminates the receipt of all pending messages. Applications may return a message or null if a message was not available at the time of the close.
* Waits until all message listeners that are currently processing messages have completed (except for the message listener from which the close() method is being called).
* Rolls back in-process transactions on its transacted sessions (unless such transactions are part of an external JTA user transaction).
* Does not force an acknowledge of client-acknowledged sessions. By not forcing an acknowledge, no messages are lost for queues and durable subscriptions that require reliable processing.
When you close a connection, all associated objects are also closed. You can continue to use the message objects created or received via the connection, except the received message's acknowledge() method. Closing a closed connection has no effect.
Note: Attempting to acknowledge a received message from a closed connection's session throws an IllegalStateException.
When you close a session, all associated producers and consumers are also closed.
For more information about the impact of the close() method for each object, see the appropriate javax.jms javadoc.
Submitted by: Administrator
Read Online BEA Weblogic Job Interview Questions And Answers
Top BEA Weblogic Questions
☺ | Can I use the getAttribute() and setAttribute() methods of Version 2.2 of the Java Servlet API to parse XML documents? |
☺ | Which of the following are the benefits of MDB (Message Driven Beans) over standard JMS consumers? |
☺ | Why do I get an error while trying to retrieve the text for ORA-12705? |
☺ | Why am I getting an ORA-01000: maximum open cursors exceeded error, even though I closed all ResultSet, Statement, and Connection objects? |
☺ | Can WebLogic Server start with a UNIX boot? |
Top Application Program Categories
☺ | AutoCAD Interview Questions. |
☺ | Microsoft Office Interview Questions. |
☺ | Microsoft Outlook Interview Questions. |
☺ | Microsoft Excel Interview Questions. |
☺ | WPF Interview Questions. |