How should I use sorted queues? : BEA Weblogic
Answer / Simpal Chauhan
To use Sorted Queues in WebLogic Server, you can follow these steps:
1. Declare a JMS queue with the `XA` and `SORTED` options enabled. For example:
- `<resource-ref>
<res-ref-name>myqueue</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<res-auth>Container</res-auth>
<jndi-name>java:comp/env/myqueue</jndi-name>
</resource-ref>`
2. Send messages with the sort key specified. For example, in Java:
- `QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
Queue queue = (Queue) context.lookup("java:comp/env/myqueue");
TextMessage message = session.createTextMessage("This is a sorted message with sort key 10");
message.setJMSProperty("JMSXGroupID", "some-group");
message.setJMSPriority(DeliveryConstants.DEFAULT_PRIORITY);
message.setJMSMessageID(UUID.randomUUID().toString());
message.setStringProperty("JMSXSortedKey", "10");
sender.send(queue, message);`
| Is This Answer Correct ? | 0 Yes | 0 No |
What is t3 protocol?
what is LDAP?
Explain what are the ways in which the dns request of failed servers handled?
What is the no_acknowledge acknowledge mode used for? : BEA Weblogic
What is multicast Address?
An instance of stateful session ejb when accessed simultaneously from more than one clients on same vm results in remoteexception or ejbexception. In case the client is a servlet thread, which of the techniques can be used to avoid remoteexception/ejbexception? : BEA Weblogic
Write a program to bind string values in a preparedstatement?
In how many formats we can deploy an application in wls??
What is web.xml ?
Can someone please tell me the basic differences between weblogic 8,9 and 10 versions
What is Unicast?
While packaging the web application defaultwebapp for deployment into the weblogic server, the home and remote interfaces of the enterprise beans used by the servlets should reside in which directory? : BEA Weblogic