How to configure my JMS QUEUE serve only one message at a time?
Hi All,
I have requirement where I need to develope a JMS QUEUE in weblogic. This MDB has to serve only one message at a time. Is there any way to configure via annotations or in weblogic server settings ?
Any help would be really appreciated...
Thank you,
K.
I'm not aware of any way to configure the max pool size via annotations, you might try posting to the EJB newsgroup (please post back the answer). Of course you can set the size via an EJB descriptor, as per the MDB chapter of the Performance and Tuning guide in the edocs.
By the way, if you have ordered message processing requirements, I highly recommend taking a look at the WebLogic JMS "Unit-of-Order" (UOO) feature as per the UOO chapter of the JMS programmer's guide. For a variety of reasons, the UOO features is often, by far, the best option for handling such requirements. If this feature applies to your use case, then there would be no need to force single threaded message processing in some sort of manual fashion (the feature enforces this for you).
Tom
Similar Messages
-
How to configure my MDB serve only one message at a time?
Hi All,
I have requirement where I need to develope a MDB iin weblogic. This MDB has to serve only one message at a time. If the send second message is sent while the first one is running the second message has to sit in queue and start processing once the first message is finished.
Is there any way to configure via annotations or in weblogic server settings ?
Any help would be really appreciated...
Thank you,
K.Here is my client code to send the message
Connection connection = null;
javax.jms.Session session = null;
MessageProducer producer = null;
try
connection = lpConnectionFactory.createConnection();
session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
// Create a MessageProducer from the Session to the Validation Queue
producer = session.createProducer(myQueue);
((WLMessageProducer)producer).setUnitOfOrder();
// Create a message
ObjectMessage message = session.createObjectMessage();
message.setObject(params);
message.setStringProperty(MyServiceConstants.OPERATION, operation);
// Send the message to the queue
producer.send(message);
finally
if (producer != null)
producer.close();
if (session != null)
session.close();
if (connection != null)
connection.close();
Following is the weblogic-ejb-jar.xml
<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC
"-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN"
"http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd">
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>TestMDB</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>1</max-beans-in-free-pool>
<initial-beans-in-free-pool>1</initial-beans-in-free-pool>
</pool>
</message-driven-descriptor>
</weblogic-enterprise-bean>
</weblogic-ejb-jar> -
Hi,
I have an EAR file thai includes an EJB 3.0 module with a MDB. I use a Queue.
This is my code,
@Resource(mappedName = "jms/NotificationQueue")
private Queue notificationQueue;
@Resource(mappedName = "jms/NotificationQueueFactory")
private ConnectionFactory notificationQueueFactory;
public Customer update(Customer customer){
Customer updated = em.merge(customer);
try {
sendJMSMessageToNotificationQueue(updated);
} catch (JMSException ex) {
Logger.getLogger(CustomerSessionBean.class.getName()).log(Level.SEVERE, null, ex);
System.out.println("Customer updated in CustomerSessionBean!");
return updated;
private Message createJMSMessageForjmsNotificationQueue(Session session, Object messageData) throws JMSException
//Modified to use ObjectMessage instead
ObjectMessage tm = session.createObjectMessage();
tm.setObject((Serializable) messageData);
return tm;
private void sendJMSMessageToNotificationQueue(Object messageData) throws JMSException
Connection connection = null;
Session session = null;
try
connection = notificationQueueFactory.createConnection();
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageProducer messageProducer = session.createProducer(notificationQueue);
messageProducer.send(createJMSMessageForjmsNotificationQueue(session, messageData));
finally
if (session != null)
try
session.close();
catch (JMSException e)
Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "Cannot close session", e);
if (connection != null)
connection.close();
layed inside a stateless EJB 3.0.
And the MDB looks as follow,
@MessageDriven(mappedName = "jms/NotificationQueue", activationConfig = {
@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")
public class NotificationBean implements MessageListener {
public NotificationBean() {
public void onMessage(Message message)
try
Object msgObj = ((ObjectMessage)message).getObject();
if (msgObj != null)
Customer customer = (Customer)msgObj;
System.out.println("Customer with the following details has been updated:");
StringBuilder sb = new StringBuilder();
sb.append("Customer ID=");
sb.append(customer.getCustomerId());
sb.append(", ");
sb.append("Name=");
sb.append(customer.getName());
sb.append(", ");
sb.append("Email=");
sb.append(customer.getEmail());
System.out.println(sb.toString());
catch (JMSException ex)
Logger.getLogger(NotificationBean.class.getName()).log(Level.SEVERE, null, ex);
I have configured both "jms/NotificationQueue" and "jms/NotificationQueueFactory" inside OC4J server.
But when I try to deploy the EAR file, the server gives me the following error,
Operation failed with error: No destination location set for message-driven bean NotificationBean
How must I do to let the EAR file be deployed?
Thanks in advance
JoseMingzhuang
I want to configure a error queue for weblogic jms topic. Wanted: The message goes to error destination when messages have expired or reached their redelivery limit.
1. using jms transport configure proxy service:
Retry Count :3
Retry Interval:10
Error Destination: ErrorTopic
Expiration olicy: RedirectUnlike File/SFTP, JMS proxy service definition does not have the concept of Error Destination. To accomplish similar functionality go to JMSQ on (for which proxy is configured) server console (http://localhost:7001/console) and configure the Error Destination. Following URL will help in how to configure JMS Q.
http://edocs.bea.com/wls/docs103/ConsoleHelp/taskhelp/jms_modules/queues/ConfigureQueues.html
http://edocs.bea.com/wls/docs103/ConsoleHelp/taskhelp/jms_modules/queues/ConfigureQueueDeliveryFailure.html
I tried use the proxy service to consume message from the jms topic . and generation an error in the proxy message flow. But the message didn't goes into the error topic.If every thing is configured as per above step, then the after retries, the weblogic server will put the message into JMS topic configured. Your proxy will receive from this topic.
Let me know if we are not on same page.
Cheers
Manoj -
How can I set Mail to show only one email at a time
Mail will group emails based on subject or sender and then I keep losing or missing emails because they get buried in a thread. Sometimes under another persons name!
I'm old and easily confused.
I just want one email per line. No grouping. Can't seem to figure out how.
Thanks!Hi Keefer-in-space!
You may need to try turning off the “Include related messages” setting in the preferences of your Mail program:
Lion Mail: View conversations
http://support.apple.com/kb/PH4825
Thanks for coming to the Apple Support Communities!
Cheers,
Braden -
Using a queue with only one consumer
Hello,
I would like to know how I can setup a system with a JMS Queue and only one
consumer.
I think I can create a MDB and specify in the DD that I want only one
instance of the EJB so that I can have only one consumer.
Can anyone confirm this assertion ?
regards,
Dom
Dominique Jean-Prost wrote:
> Hello,
>
>
> I would like to know how I can setup a system with a JMS Queue and only one
> consumer.
>
> I think I can create a MDB and specify in the DD that I want only one
> instance of the EJB so that I can have only one consumer.
>
> Can anyone confirm this assertion ?
Yes.
For more information on configuring MDB concurrency see
the JMS Performance Guide white-paper here:
http://dev2dev.bea.com/technologies/jms/index.jsp
>
> regards,
>
> Dom
>
>
-
How to configure the JMS application in WSAD 5.0
hi
i need to configure an JMS application in WSAD 5, but while configuring the application i am checked with intial context exception. but i have configured the jndi in the server. but i cant able to run the application.
can anybody help me like how to configure the JMS application in WSAD (can we configure it without MQ simulator if yes i need the steps)
thanks in advanceHi,
did you check the WebSphere documentation or ask a question on an IBM forum?
Frank -
How to configure an jms adapter to use ActiveMQ?
Does anyone have an example of how to configure an jms adapter of oracle esb
for third party JMS provider to use ActiveMQ?
I had done something as follow:
1、add activemq shared-library in $SOA_INSTANCE/config/service.xml
2、config a jms adapter fro third party use paramter:
java.naming.factory.initial org.apache.activemq.jndi.ActiveMQInitialContextFactory
java.naming.provider.url tcp://10.20.30.26:61615
but I got a error:ERRJMS_CONN_FAC_NOT_FOUND.
Caused by: javax.naming.NameNotFoundException: org.apache.activemq.ActiveMQConnectionFactory
at org.apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:225)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at oracle.tip.adapter.jms.JMS.JMSFactory.jndiLookup(JMSFactory.java:237)
at oracle.tip.adapter.jms.JMS.JMSConnectionFactoryFactory.getConnectionFactory(JMSConnectionFactoryFactory.java:138)
... 51 more
what should I do? can someone give me a detail resolvent?I also had done as follows:
1、add activemq shared-library to shared-library named "oracle.esb" in server.xml :
<shared-library name="oracle.esb" version="10.1.3">
<import-shared-library name="apache.activemq"/>
</shared-library>
2、add in $SOA_INSTANCE\j2ee\soa\application-deployments\default\JmsAdapter\oc4j-ra.xml
<imported-shared-libraries>
<import-shared-library name="apache.activemq"/>
</imported-shared-libraries> -
How to configure Https in Project server 2010.
HI,
Can i any one help me,
How to configure Https in Project server 2010.
My server farm is 1.Test1(App & Wfe) 2. Test2(App & Wfe)
Both are load balanced wit NLB as abc.hyd.in
DO i need to Install certificate in two servers Test1 & Test2 or one server is enough ?
Can any one please provide me a link to configure Https for project server 2010 for Two Farms Servers.
Thank You, Kumar KSVThere is no special configuration for Project Server to have the IIS enabled, it follows the typical sharepoint SSL enablement, we might need some mor edetails on how your NLB is done is it hardware based, software based ? it all depends how you want
to architecht the system, you can enable the Https either on NLB or WFE, again depending upon how you want to enable it, you will need to install the certificates on both WFE or on NLB
Follow the blog below to configure the SSL:
http://epmxperts.wordpress.com/2011/03/05/extend-same-project-web-app-instance-for-different-protocol-authentication-mechanism/
http://blogs.msdn.com/b/sowmyancs/archive/2010/02/12/how-to-enable-ssl-on-a-sharepoint-web-application.aspx
http://www.sharepointconfig.com/2010/03/configuring-a-sharepoint-website-to-allow-ssl-connections/
Thanks | epmXperts | http://epmxperts.wordpress.com -
How to manually flush jms queue
hi,
we have some transaction which is stuck in a JMS queue and we want to forcibly clear it from queue.
please let me know how to go for this
thanksDoes anyone know how to publish a JMS queue? Thanks.Yes, I do. But rather than write a long posting describing how to use the JMS API. I'd like to invite you to read the JMS tutorial:
http://download.oracle.com/javaee/1.3/jms/tutorial/index.html
Look particularly at
http://download.oracle.com/javaee/1.3/jms/tutorial/1_3_1-fcs/doc/client.html
Nigel -
How to configure LDAP in BPEL Server
Hi,
How to configure LDAP in BPEL Server?
Also, what if we want to bounce to a YAHOO or GMAIL type email?
Basically, can we do dynamic email and phone notifications from BPEL?
Is there any documentation which tell us how to do this?
I appreciate any pointer in this regard.
Thanks in Advance.
Levey.Levey,
You can do the dynamic email and phone notifications with the help of xpath expressions. Basically there are api to get the these attributes based on the ID on the identity server.
--Shiv -
How to configure evaluations at level task only for released projects?
Hi,
Does anyone know how to configure evaluations at level task only for released projects?
What we need is that the evaluation will be executed only when project has released status. Is that possible?
Thanks a lot,
CAMILO URIBEHi CAMILO,
After the notes 1422722 & 1465106 is a service method available, which allow the customer to dis-able the evaluation.
CL_EVE_EXTRACT_FACTORY SET_ACTIVE
You can put a codes in some BADI method, which is called during save. Within the Badi-Implementation, call the SET_ACTIVE method, so that the evaluation not be tiggered (until the project get released.)
KInd regards,
Zhenbo -
Testing ODI connectivity with Sonic MQ JMS Queue server
Hi
We are trying to integrate our ODI to sonic MQ.
Since I am a newbie , could you please guide me in creating a data server and connecting it through physical agent?
Below are the steps I did.
1. I have copied the below jar files in ../driver directory and bounce the agent.
mfcontext.jar sonic_Client.jar sonic_ASPI.jar sonic_XA.jar sonic_Selector.jar sonic_Crypto.jar jndi.jar
3. tesed the connectivity to the JNDI URL and port using 'telnet myserver 7530'
3. created a new JMS Queue Server with below setting.
JNDI Authentification: Simple
JNDI User :Administrator
Password :
JNDI Protocol : <undefined>
JNDI Driver: com.sonicsw.jndi.mfcontext.MFContextFactory
JNDI URL: tcp://myserver:7530
JNDI Resource: ODI_QUEUE.Entry
4. apply the changes
When I tried to test it I got the below messages.
java.lang.Exception:
at com.sunopsis.graphical.l.pm.a(pm.java)
at com.sunopsis.graphical.l.pm.s(pm.java)
at com.sunopsis.graphical.l.pm.g(pm.java
at com.sunopsis.graphical.l.pm.a(pm.jav)
at com.sunopsis.graphical.l.pm.a(pm.java)
at com.sunopsis.graphical.l.iz.actionPerformed(iz.java)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)I think that you should update the Odiparams.bat in order to add the JMS driver files which are not in the path of the agent.
Stop your agent.
in the odiparams update one of the line
"set ODI_CLASSPATH" with the new files
and then restart your agent. -
How to configure the iTunes,to display only folder name as Album.
How to configure the iTunes,to display only folder name as Album under Music.
I have a folder with name "English" under this I have plenty of folders which are either movie names or custom names created by me,inside of these are the music files. I just want all the files to be copied to the iPod with out any album artwork(which the itunes display under "Album By Artist" contains).The "Album By Artist" doesnt seem to contain just the folder name,it gets something else like the website from where the music file downloaded. This makes me irritating to browse through iPod or iTunes.
Please help me in configuring,so that I can just see the same folder/music hierarchy I see in my windows machine in the iPod.Yep, I agree with Jurjen. It is not only limited to ACTVT, but rather fields of other objects as well which are "action" or "activity" related.
I would start the other way around - give them '03' only and investigate any transaction specific claims that it is not enough. There will be a few...
Cheers,
Julius -
How to publish a JMS Queue?
Hi there,
Does anyone know how to publish a JMS queue? Thanks.
Edited by: 886478 on Sep 20, 2011 10:17 PMDoes anyone know how to publish a JMS queue? Thanks.Yes, I do. But rather than write a long posting describing how to use the JMS API. I'd like to invite you to read the JMS tutorial:
http://download.oracle.com/javaee/1.3/jms/tutorial/index.html
Look particularly at
http://download.oracle.com/javaee/1.3/jms/tutorial/1_3_1-fcs/doc/client.html
Nigel -
How to open multiple sql files in only one ssms instance
how to open multiple sql files in only one ssms instance, I can't get anything to work that I find online..I hope you can help us.
I tried opening two files but selecting and hitting enter. it opens one SSMS and two tabs.
Balmukund Lakhani
Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
This posting is provided "AS IS" with no warranties, and confers no rights.
My Blog |
Team Blog | @Twitter
| Facebook
Author: SQL Server 2012 AlwaysOn -
Paperback, Kindle
Maybe you are looking for
-
So, I'm trying to sync all my Jason Mraz to my iPhone. On iTunes, after I plug in my iPhone to my MacBookPro, on the iPhone tab I check the artist "Jason Mraz." I then sync my phone. I goes through the process then when I check the music library on m
-
Went to convert from my free trial and purchase full version. When I hit the "Buy Now" button within my Editor, nothing happens. How do I proceed to upgrade? Thank you for your time and help!
-
Trying to focus in on a DateField component
Has anyone ever had trouble sending keyboard focus to the DateField component? Try this: create a new Flash document and insert a TextInput component named textItem, a DateField component named dateItem and a ComboBox component named ComboItem. Then
-
Powerbook 1400 cs pc card slot + battery
they don't work! i need help
-
Completely Wipe My MacBook Pro
I bought my MacBook Pro in September of 2010. Since then I have only downloaded OS X Mountain Lion & now OS X Mavericks. I would like to completley wipe my my MacBook Pro clean to return it to right out of the box settings! How would I go about doing