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>

Similar Messages

  • 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

  • How do I make preview show only one page at a time in full screen

    When I show a document using full screen (or slideshow) in Preview, it shows two pages at a time.  I just want to show one at a time, but can't find anything that lets me specify this.  There is no relevant Preference that I can see, and if I check single page in view and then choose full screen or slideshow in view, the first page is displayed fine, but then subsequent pages are displayed two up.

    Hi, Eric,
    Thanks.  It looks like I didn't quite make my question clear enough, though.
    I want to show a multi-page document one page at a time.  If I open it and choose "full screen" in view, I get the first page showing just fine.  But if I then use the arrow to go to the second page, Preview shows two pages (#2 and 3), and then continues to show the rest of the document two pages at a time when I advance using the arrow. 
    I want to show one page at a time, and be able to advance to the next page using the arrow.
    Can I do this in Preview?
    Thanks,
    Russ

  • Configuring PPP options for only one VPN connection

    How do you configure PPP options for only one VPN connection that is using L2TP over IPSec? The built-in VPN client in 10.4.9 is failing authentication because it won't talk MSCHAP-V2 (this is the only authentication protocol I can use) with the server. I am able to establish a connection if I add the following to /etc/ppp/options:
    refuse-eap
    refuse-pap
    refuse-chap
    refuse-mschap
    require-mschap-v2
    However, these options will affect all PPP connections. The preference file that contains the network configurations (/Library/Preferences/SystemConfiguration/preferences.plist) also contains PPP options for each specific network service. After some searching around, I found that there are several keys that seem promising (MSCHAP2, etc.). But these keys take a string value and I have no clue what they should be. These keys are defined in SCSchemaDefinitions.h file.
    Any ideas?
      Mac OS X (10.4.9)  

    Hi Brian,
    I just tried to check all of ADDT´s "includes" files for any internal references (read: "require" or "require_once" statements) to the file "tNG_config.inc.php". So far I can only see this file referenced in the file "tNG.inc.php" (within the "$KT_tNG_uploadFileList1" array).
    So what could this mean ? Maybe you´ll have to make copies of the the original "tNG.inc.php" as well and save them as, say, "tNG.inc_ital.php" file plus make sure that these copies internally point to a different "tNG_config_ital.inc.php" file -- because it´s always the first mentioned file which gets referenced from e.g. an ADDT login page (see the "Load the tNG classes" - part)
    I want to use ADDT’s User Registration Wizard and I have looked at all the neat stuff in the Control Panel/Login Settings
    The Control Panel will always update the main "tNG_config.inc.php" file, so any further modifications will have to become manually applied to the custom files you´re creating.
    Cheers,
    Günter

  • How to configure trex name server

    hi all
      while creating index i am getting the error
    Index could not be created; creating index failed: TREX Name Server (including back-up servers) is down or not accessable. (Errorcode 7217)
    for the above error i need to configure the trex name server using  TREX Configuration in the J2EE Engine  in j2ee visual administrator .
    can any one tell me the clear path that where to configure the above and where j2ee visual administrator installed how to configure the name server
    awaiting for replies
    regards
    ganesh

    Hi Ganesh,
    In order to access the Visual Administrator, go to Start > Programs > SAP J2EE Engine > Visual Administrator. After you login, you will see 2 nodes i.e. Dispatcher and Server. Expand the Server node. Then go to "Services" and expand it. Then go all the way down to "TREX Service". Then on the right hand side, go to the property "nameserver.address" where you will key in "tcpip://<nameserver>:<port>". Then hit "Update" and click on the "Save" button. Then when you go to TRex Monitor, you should be able to see the Name Server running. Hope this helps.
    Thanks,
    Sri
    P.S Please rewards points if you find this helpful. Thanks.

  • How to configure single web server instance to multiple application servers..

    Hi all,
    we are running single instance of IWS6.0 SP2 on solaris, we want to comfigure this single instance to multiple application servers(JRun). Can any one advise me whether it is possible to do.
    Thanks
    Raj

    Hi Raj,
    "how to configure single web server instance to multiple application servers.."
    It's not possible for setting up multiple applicataion servers for Single iWS instance.
    Thanks,
    Dakshin.

  • Can anybody know how to configure Multi threaded server?

    Hi
    All,
    Can anybody know how to configure Multi threaded server?
    Thanks,
    Vishal

    Values are just samples only. use what ever appropriate for your environment. Understand each of them before using in production.
    alter system set DISPATCHERS="(PROTOCOL=tcp)(DISPATCHERS=3)(CONNECTIONS=1000)"
    alter system set shared_servers=100
    replace "DEDICATED" with "SHARED" in tns names
    Ready to go.
    select username,server from gv$session (server should show none or shared)

  • When I open up iphoto and click on the events tab then double click on an event, it used to show minis of all the photos in that event.  Now it shows only one photo at a time.  How do I get it back? Can you help?

    When I open up iphoto and click on the events tab then double click on an event, it used to show minis of all the photos in that event.  Now it shows only one photo at a time.  How do I get it back? Can you help?

    On the bottom bar of the window (on the left iPhoto 11, on the right in other versions) note the slider. Drag it left.
    Regards
    TD

  • How to connect my mac to only one wireless network?

    How to connect my mac to only one wireless network?

    Do you mean that there are several wireless networks within range, and you don't want it switching between them?

  • How to select only one record at a time in ALV

    Hi all,
    I have to use ALV report.  Each record on the report output should have a button (or radio button) which will allow the record to be selected.  My requirement is to select only one record at a time.
    please guide me how to proceed further.
    regards
    manish

    hi
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/sampleCheckBoxProgram
    Regards
    Pavan

  • How to Configure a mail server with OIM

    Experts ,
    Any idea/links/Docs on how to configure a mail server with OIM and to send mail notification to someone .
    Pardon me, if my questions seems to be incomplete .
    Thanks
    Suren

    .Create an IT Resource of Type Mail Server. Give Name as "Email Server.Now populate the values for all the parameter for example Server,username,password and authentication type.
    .Go to System Configuration and in Email Server property value give the name of IT resource you created in step1 so the name will be "Email Server".
    http://forums.oracle.com/forums/messageview.jspa?messageID=3867506&stqc=true

  • How to configure the smtp server..

    i had an error when running the java mail program..
    this is my program
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    import java.io.*;
    import java.util.Properties;
    public class MailClient
    public void sendMail(String mailServer, String from, String to,
    String subject, String messageBody,
    String[] attachments) throws
    MessagingException, AddressException
    // Setup mail server
    Properties props = System.getProperties();
    props.put("mail.smtp.host", mailServer);
    // Get a mail session
    Session session = Session.getDefaultInstance(props, null);
    // Define a new mail message
    Message message = new MimeMessage(session);
    message.setFrom(new InternetAddress(from));
    message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
    message.setSubject(subject);
    // Create a message part to represent the body text
    BodyPart messageBodyPart = new MimeBodyPart();
    messageBodyPart.setText(messageBody);
    //use a MimeMultipart as we need to handle the file attachments
    Multipart multipart = new MimeMultipart();
    //add the message body to the mime message
    multipart.addBodyPart(messageBodyPart);
    // add any file attachments to the message
    // addAtachments(attachments, multipart);
    // Put all message parts in the message
    message.setContent(multipart);
    // Send the message
    Transport.send(message);
    protected void addAtachments(String[] attachments, Multipart multipart)
    throws MessagingException, AddressException
    for(int i = 0; i<= attachments.length -1; i++)
    String filename = attachments;
    MimeBodyPart attachmentBodyPart = new MimeBodyPart();
    //use a JAF FileDataSource as it does MIME type detection
    DataSource source = new FileDataSource(filename);
    attachmentBodyPart.setDataHandler(new DataHandler(source));
    //assume that the filename you want to send is the same as the
    //actual file name - could alter this to remove the file path
    attachmentBodyPart.setFileName(filename);
    //add the attachment
    multipart.addBodyPart(attachmentBodyPart);
    public static void main(String[] args)
    try
    MailClient client = new MailClient();
    String server="smtp.canvasindia.com";
    String from="[email protected]";
    String to = "[email protected]";
    String subject="Test";
    String message="Testing";
    String[] filenames ={"c:/A.java"};
    client.sendMail(server,from,to,subject,message,filenames);
    catch(Exception e)
    e.printStackTrace(System.out);
    the error is .................
    javax.mail.SendFailedException: Invalid Addresses;
    nested exception is:
    com.sun.mail.smtp.SMTPAddressFailedException: 553 Attack detected from p
    ool 59.144.8.116. <http://unblock.secureserver.net/?ip=59.144.8.*>
    at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584)
    at javax.mail.Transport.send0(Transport.java:169)
    at javax.mail.Transport.send(Transport.java:98)
    at MailClient.sendMail(MailClient.java:47)
    at MailClient.main(MailClient.java:84)
    Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 553 Attack detected fro
    m pool 59.144.8.116. <http://unblock.secureserver.net/?ip=59.144.8.*>
    at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1047)
    ... 5 more
    how to configure the smtp server in my machine..
    please guide me...

    This uses gmail account, and gmail smtp
    * MailSender.java
    * Created on 14 November 2006, 17:07
    * This class is used to send mails to other users
    package jmailer;
    * @author Abubakar Gurnah
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    public class MailSender{
        private String d_email,d_password;
         * This example is for gmail, you can use any smtp server
         * @param d_email --> your gmail account e.g. [email protected]
         * @param d_password  --> your gmail password
         * @param d_host --> smtp.gmail.com
         * @param d_port --> 465
         * @param m_to --> [email protected]
         * @param m_subject --> Subject of the message
         * @param m_text --> The main message body
        public String send(String d_email,String d_password,String d_host,String d_port,
                String m_from,String m_to,String m_subject,String m_text ) {
            this.d_email=d_email;
            this.d_password=d_password;
            Properties props = new Properties();
            props.put("mail.smtp.user", d_email);
            props.put("mail.smtp.host", d_host);
            props.put("mail.smtp.port", d_port);
            props.put("mail.smtp.starttls.enable","true");
            props.put("mail.smtp.auth", "true");
            //props.put("mail.smtp.debug", "true");
            props.put("mail.smtp.socketFactory.port", d_port);
            props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
            props.put("mail.smtp.socketFactory.fallback", "false");
            SecurityManager security = System.getSecurityManager();
            try {
                Authenticator auth = new SMTPAuthenticator();
                Session session = Session.getInstance(props, auth);
                //session.setDebug(true);
                MimeMessage msg = new MimeMessage(session);
                msg.setText(m_text);
                msg.setSubject(m_subject);
                msg.setFrom(new InternetAddress(m_from));
                msg.addRecipient(Message.RecipientType.TO, new InternetAddress(m_to));
                Transport.send(msg);
                return "Successful";
            } catch (Exception mex) {
                mex.printStackTrace();
            return "Fail";
        //public static void main(String[] args) {
        //    MailSender blah = new MailSender();
        private class SMTPAuthenticator extends javax.mail.Authenticator {
            public PasswordAuthentication getPasswordAuthentication() {
                return new PasswordAuthentication(d_email, d_password);
    }

  • How to configure the Integration Server Settins?

    Hi,
    I am doing a scenario like Idoc 2 File, I am passing parameter of Adapter Engine is a Integration Server, and when we generate a Idoc and send to XI system using TC: WE19. XI System is not picked the Idoc, and when i am checking RWB the Adapter Framework. Please Guide me how to configure the Integration Server setting.
    Regards
    Mohan

    Hi,
    did you checked the ur IDOC outbound status?
    also check IDX5, whether it has reached XI system.
    plz do check all ur settings:
    1. Create RFC destination to XI in SM59 transaction
    2. Create a port in we21
    3. Create partner profile we20
    4. we05- Idocs monitoring
    XI Settings:
    1. Create RFC destination to XI in SM59 transaction
    2. Idx1 – Port maintenance
    3. Idx2 - Metadata maintenance
    4. Idx5 – All Idoc inbound and outbound messages
    regards
    Message was edited by:
            Vijaya Lakshmi MV

  • I have lost the remote that was paired. I bought another remote, but the procedure to pair the new one does not work. I suspect the the AT will work with only one remote at-a-time and i have to unpaid the first before pairing the second. How do I unpair?

    I have lost the remote that was paired. I bought another remote, but the procedure to pair the new one does not work. I suspect the the AT will work with only one remote at-a-time and i have to unpair the first before pairing the second. If this is true, how do I unpair? If not, what can I do?

    I was premature in posting the question. I found the answer in andother posting, and it was successful.
    Thanks, and sorry for the false alarm.

  • How to configura multiple ldap server to the sun access manager

    Hi,
    please help how to configure multiple ldap server to the sun access manager, for example access manager does't find the user in ldap1 then it should search in ldap2.
    Thanks
    Mouli

    There�s no need for deleting the default amSDK based datastore because it�s needed for some default accounts.
    You may try to create the datastore using the commandline (amadmin)
    Have a look /etc/opt/SUNWam/config/xml/idRepoService.xml
    You may also try to create amadmin account in the external ldap directory.
    (Un)fortunately i�ve never tried to remove the default datastore.
    -Bernhard

Maybe you are looking for

  • How do I create a point to a list of devices?

    I have a .dll code with a function to control the Analyzer from AX/4000, as follow bellow: void anaRun(UINT8 run, UINT8 *devList, UINT8 numDev) How do I create in Labview the list of devices and how do I specify the number of devices? Thank you.

  • How to validate the selection screen

    Hi, I am developing a program. In selection screen I face one problem. For three scenario three blocks I prepared. and another block for three radio button for three scenario. My objectives is if we select one readio button for one scenario, another

  • Adding individual tasklist to document set

    Hello! I'm looking in too the functionality of SharePoint 2013 for a company where i'm an intern. I wan't to know if the following is possible. We wan't to add a document set for each project. When we view this document set "project" i wan't to add a

  • Starting OEM 11g from command window...

    Hi , C:\oracle\product\11.1.0\db>set ORACLE_SID=oracle11g C:\oracle\product\11.1.0\db>set ORACLE_HOME=C:\oracle\product\11.1.0\db C:\oracle\product\11.1.0\db>emctl 'C:\oracle\product\11.1.0\db\jdk/bin/java' is not recognized as an internal or e xtern

  • Best way to completely erase data from Iphone 5s?

    thinking of selling my 5s. I was wondering if there was any way to erase all data to where it's unrecoverable.