JMS Queue Consumers

          Hi,
          I am using WL6.1 SP4 JMS Queues and MDB's. During busy times, the bean(s) can't
          keep up. Number of consumers are always 15 (cosumers total- 30 , consumers high
          - 15 and consumers -15 on Monitoring window) even lot messages are pending in
          the queue. The pool parameters specified in DD are as below
          <pool>
          <max-beans-in-free-pool>30</max-beans-in-free-pool>
          <initial-beans-in-free-pool>5</initial-beans-in-free-pool>
          </pool>
          Can some one help me out.
          Thanks in adv,
          Dp
          

As far as I know, these are the only two parms that effect
          MDB instance creation on 6.1. I suggest:
          1) increase the values higher to see what happens
          2) make sure to reboot (these values are not dynamic)
          3) force server to thread dump to ensure that the extra threads
          are getting created and that the MDBs are running in
          the thread pool that your are increasing...
          4) post to the weblogic.ejb newsgroup, which "owns" mdbs
          5) contact customer support
          Tom
          DP wrote:
          > Hi,
          >
          > I increased this thread pool size to 25.
          > Now the max-beans-in-free-pool is 20.
          > Still it is not increasing the beans count above 15.
          >
          > DP
          >
          > Tom Barnes <[email protected]> wrote:
          >
          >>MDBs run in the main "default execute" thread pool, which has a
          >>default size of 15. This is the limit you are running into.
          >>You can configure a server's thread pool size on the console.
          >>
          >>Note that since this thread pool is used for other server work,
          >>the MDB max-beans-in-free-pool should be configured to something
          >>somewhat less that the "default execute" thread pool size. This
          >>prevents starvation dead-locks...
          >>
          >>Tom
          >>
          >>DP wrote:
          >>
          >>>Hi,
          >>>
          >>>I am using WL6.1 SP4 JMS Queues and MDB's. During busy times, the
          >>
          >>bean(s) can't
          >>
          >>>keep up. Number of consumers are always 15 (cosumers total- 30 , consumers
          >>
          >>high
          >>
          >>>- 15 and consumers -15 on Monitoring window) even lot messages are
          >>
          >>pending in
          >>
          >>>the queue. The pool parameters specified in DD are as below
          >>>
          >>><pool>
          >>> <max-beans-in-free-pool>30</max-beans-in-free-pool>
          >>> <initial-beans-in-free-pool>5</initial-beans-in-free-pool>
          >>> </pool>
          >>>
          >>>Can some one help me out.
          >>>
          >>>Thanks in adv,
          >>>Dp
          >>
          >
          

Similar Messages

  • Jms queue multiple consumers

    Hi,
    I am new to the JMS queue concept. I have two BPEL processes each having JMS adapter for consuming the data from the same queue. How do i differentiate which consumer consumes which data that is put into the queue. Is there any field in the queue that decides which consumer has to consume the message.
    Just to add to above query, if the message goes to all the consumers, is there any way that i put some logic there to let only the eligible consumer actually process that message.
    It would be helpful if i get any documentation on this.
    Thanks in advance for the Help!
    Edited by: Marius J on Jun 2, 2009 7:38 AM

    Thanks Sahil and JDT. Thanks for the response.
    Sahil,
    I was able to proceed the way u specified. I am using AQ. How do i send the corrid while enqueuing the data in the queue. I am using the following command to enqueue the data.
    CONNECT aq_user/aq_user@tsh9i
    DECLARE
    l_enqueue_options     DBMS_AQ.enqueue_options_t;
    l_message_properties  DBMS_AQ.message_properties_t;
    l_message_handle      RAW(16);
    l_event_msg           AQ_ADMIN.event_msg_type;
    BEGIN
    l_event_msg := AQ_ADMIN.event_msg_type('REPORTER', 1, 2);
    DBMS_AQ.enqueue(queue_name          => 'aq_admin.event_queue',
    enqueue_options     => l_enqueue_options,
    message_properties  => l_message_properties,
    payload             => l_event_msg,
    msgid               => l_message_handle);
    COMMIT;
    END
    But, as per your inputs, we need to send corrid in order to meet my requirement. Can u please guide me regarding this.
    Thanks again
    Regards,
    MJ
    Edited by: Marius J on Jun 4, 2009 7:39 AM

  • MDBs in 9.1 continue to consume JMS queues even after being deleted

    <b>We have an MDB application that reads a batch message off of a JMS queue, archives it in a database, parses the batch message into individual messages and writes them onto other JMS queues to be consumed by another application. Everything was running fine in Weblogic 8.1.5. However, due to problems with XA drivers and the MSDTC(predictable SQL server crashes), we decided to upgrade to Weblogic 9.1 to take advantage of the LLR option.</b>
              <b>First, we had an issue where our MDBs were causing the following exception:</b>
              <i>####<May 26, 2006 7:42:12 PM EDT> <Error> <JMX> <ist-clft2> <wltest1> <ExecuteThread: '1' for queue: 'default'> <<WLS Kernel>> <> <> <1148686932991> <BEA-149500> <An exception occurred while registering the MBean null.
              java.lang.IllegalArgumentException: Registered more than one instance with the same objectName : com.bea:ServerRuntime=wltest1,MessageDrivenEJBRuntime=RhapsodyMDB_DMBModule!JMSServer4@DMB_BEAN_QUEUE,Name=RhapsodyMDB_DMBModule!JMSServer4@DMB_BEAN_QUEUE,ApplicationRuntime=DataBrokerEAR1_2,Type=EJBPoolRuntime,EJBComponentRuntime=DataBrokerEJB new:[email protected] existing weblogic.ejb.container.monitoring.EJBPoolRuntimeMBeanImpl@7db003
                   at weblogic.management.jmx.ObjectNameManagerBase.registerObject(ObjectNameManagerBase.java:146)
                   at weblogic.management.mbeanservers.internal.WLSObjectNameManager.lookupObjectName(WLSObjectNameManager.java:133)
                   at weblogic.management.jmx.modelmbean.WLSModelMBeanFactory.registerWLSModelMBean(WLSModelMBeanFactory.java:86)
                   at weblogic.management.mbeanservers.internal.RuntimeMBeanAgent$1.registered(RuntimeMBeanAgent.java:104)
                   at weblogic.management.provider.internal.RegistrationManagerImpl.invokeRegistrationHandlers(RegistrationManagerImpl.java:205)
                   at weblogic.management.provider.internal.RegistrationManagerImpl.register(RegistrationManagerImpl.java:85)
                   at weblogic.management.runtime.RuntimeMBeanDelegate.register(RuntimeMBeanDelegate.java:320)
                   at weblogic.management.runtime.RuntimeMBeanDelegate.<init>(RuntimeMBeanDelegate.java:257)
                   at weblogic.management.runtime.RuntimeMBeanDelegate.<init>(RuntimeMBeanDelegate.java:222)
                   at weblogic.ejb.container.monitoring.EJBPoolRuntimeMBeanImpl.<init>(EJBPoolRuntimeMBeanImpl.java:32)
                   at weblogic.ejb.container.monitoring.MessageDrivenEJBRuntimeMBeanImpl.<init>(MessageDrivenEJBRuntimeMBeanImpl.java:49)
                   at weblogic.ejb.container.manager.MessageDrivenManager.initialize(MessageDrivenManager.java:503)
                   at weblogic.ejb.container.manager.MessageDrivenManager.setup(MessageDrivenManager.java:120)
                   at weblogic.ejb.container.manager.MessageDrivenManager.setup(MessageDrivenManager.java:146)
                   at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl.createMDManager(MessageDrivenBeanInfoImpl.java:1481)
                   at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl.createDDMDManagers(MessageDrivenBeanInfoImpl.java:1378)
                   at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl.onDDMembershipChange(MessageDrivenBeanInfoImpl.java:1285)
                   at weblogic.jms.common.CDS$DD2Listener.listChange(CDS.java:454)
                   at weblogic.jms.common.CDSServer$DDHandlerChangeListener.statusChangeNotification(CDSServer.java:167)
                   at weblogic.jms.dd.DDHandler.callListener(DDHandler.java:318)
                   at weblogic.jms.dd.DDHandler.callListeners(DDHandler.java:344)
                   at weblogic.jms.dd.DDHandler.run(DDHandler.java:282)
                   at weblogic.jms.common.SerialScheduler.run(SerialScheduler.java:37)
                   at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
              >
              ####<May 26, 2006 7:42:13 PM EDT> <Info> <EJB> <ist-clft2> <wltest1> <ExecuteThread: '1' for queue: 'default'> <<WLS Kernel>> <> <> <1148686933069> <BEA-010060> <The Message-Driven EJB: RhapsodyMDB has connected/reconnected to the JMS destination: weblogic.jms.DMB_BEAN_QUEUE.></i>
              <b>
              Generally this happend after there were cluster communication issues. Multi-cast messages were lost and our MDB reconnects to the JMS queues as indicated by the below log:</b>
              <i>####<May 30, 2006 5:19:06 PM EDT> <Info> <EJB> <AMTC-RAP-STG3> <RAPBEA1S> <[ACTIVE] ExecuteThread: '54' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1149023946040> <BEA-010060> <The Message-Driven EJB: DataBrokerMDB has connected/reconnected to the JMS destination: weblogic.jms.PHINMS_DMB_QUEUE.>
              ####<May 30, 2006 5:19:10 PM EDT> <Info> <Cluster> <AMTC-RAP-STG3> <RAPBEA1S> <[ACTIVE] ExecuteThread: '22' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1149023950228> <BEA-000112> <Removing RAPBEA3S jvmid:720875810499147484S:cmts-rap-bea3:[7005,-1,-1,-1,-1,-1,-1]:DMBstg:RAPBEA3S from cluster view due to timeout.>
              ####<May 30, 2006 5:19:11 PM EDT> <Info> <Cluster> <AMTC-RAP-STG3> <RAPBEA1S> <[STANDBY] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1149023951009> <BEA-000115> <Lost 2 multicast message(s).>
              ####<May 30, 2006 5:19:11 PM EDT> <Info> <Cluster> <AMTC-RAP-STG3> <RAPBEA1S> <[ACTIVE] ExecuteThread: '22' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1149023951040> <BEA-000111> <Adding RAPBEA3S with ID 720875810499147484S:cmts-rap-bea3:[7005,-1,-1,-1,-1,-1,-1]:DMBstg:RAPBEA3S to cluster: DMBstg_cluster view.></i>
              <b>
              This would cause the queues to eventually have hundreds of consumers and cause the server to fail.
              Basically, it seems as though the MDBs that are supposed to stop continue and attempt to process, while new threads connect to the JMS queues.
              I tried undeploying our application and deleted it from the configuration. However there were consumers still on the respective queues and when I sent messages, I got an error indicating a "Class Not Found exception" due to the fact that the EJB was undeployed and deleted from the configuration, however the MDB component was not and continued to listen for messages. In 8.1.5, as soon as the application was undeployed, there were zero consumers on the JMS queues.
              I have read the posts about a soon to be released fix that would have the MDBs connect only to the queues locally and not go out the the cluster. Would this fix my issue?
              Is there something in the deployment descriptor to configure that will cause it to disconnect and now spawn so many consumers to the JMS queues?
              Why is it that the number of MDB consumers on the JMS queues stayed static in 8.1.5, but they are erratic in 9.1 even after I set our 9.1 server to use the 8.1.5 execute queue policy. Help would be much appreciated.</b>

    I recommend contacting customer support. There's a known problem with MDBs listening to distributed destinations that are local to the same cluster as the MDB, you're problem may be related (the clue is that the stack trace contains jms.dd.DDHandler.callListeners()). The problem is that the MDB connects to all physical queues in a distributed destination rather than just the local queue.
              Tom

  • JMS Queue working with only one AIA instance.

    Hi,
    We are having a Web-Logic JMS Queue configured for an instance. I have developed a consumer in AIA instance to pull the messages from the Queue.
    And this works fine.
    Now I have an another instance consumer which is pointing to the same Queue, but it fails to get the messages from it.
    I have switched off the consumer in the FIRST instance, but even then consumer from the SECOND instance was not able to pull the messages.
    Later, I tried switching on the consumer of the FIRST instance, and all the messages were pulled in this instance.
    So how can I make it work with two AIA instances and one JMS Queue, provided only one AIA instance consumer is active at a time.
    Thanks in Advance.
    Regards!

    * Likely your best bet is to check your server logs for "Error" and "Warning" messages, and/or, since these questions are specific to AIA's usage of JMS, post your questions to the AIA newsgroup.
    * WL JMS does not impose a limit on the number of consumers on a queue, but it does only allow one named connection with the same "client id" to connect at a time. Its unusual to name connections in queueing applications, but possible - and AIA may be doing this. (If this is the problem there should be "client id in use" style log messages or exceptions.)
    * Another possibility is a misconfiguration of your remote consumer. Make sure the URL is correct, and remember, if an application is running in the same cluster as the remote destination, don't specify a URL.
    * Also, if the remote consumer is running in a different domain, make sure the domains are named differently, and that no two JMS servers in the two domains have the same name (as per the unique naming restrictions documented in the Best Practices section of the JMS configuration guide -- http://download.oracle.com/docs/cd/E14571_01/web.1111/e13738/best_practice.htm#CACJCGHG ).
    Regards,
    Tom

  • Single MDB on a clustered JMS queues(2)

    I have 2 JMS servers in a cluster and each server has a JMS queue, which forms the distributed destination. Now I need a MDB to listen on both these queues. Is it possible?
    Thanks
    -Ankur

    Yes - thats the usual purpose of distributed queues, to allow consumers to consume from the distributed queue (wherever its hosted).
    Though distributed destinations are JMS provider specific so do check your providers documentation on using distributed queues. In some providers, like ActiveMQ, distributed queues look and act just like regular queues so they just work from inside a JMS client or MDB.
    James
    http://logicblaze.com/

  • Issue in Synchronous OSB using Jms Queues in OSB11g

    Hi,
    I am working on building a synchronous OSB using the following steps.
    1)     Creating the Synchronous OSB Proxy Service which routes the message to the business service which in turn places a message in the Queue(inqueue) by populating the JMSCorrelationId and waits for the response message to consume from another queue.
    2)     A Composite(SOA) will consume the message from this Queue
    3)     It will do necessary transformation and Places it in another Queue (Say Response Queue).
    4)     OSB Business service waiting in Step 1 will receive the response from this response Queue.
    I used a sample Wsdl which has both request and response message types.
    I observed that the correlation ID is maintained properly from inqueue to response queue. But the message is not getting picked up by OSB from the response Queue
    Twist: It is working absolutely fine in OSB 10g but it is not working in OSB 11g.
    I tried using Messaging service as well as using the sample WSDL i.e keepiing the soap message in the queue. Both the cases are working absolutely fine OSB 10g but not in OSB 11g.
    Can anyone faced a similar issue or any pointers will be great help in this regard.
    Regards,
    Ashok

    To debug this further can you check if the response Q has any active consumers. ? When you use response by correlation ID business service, OSB actually creates MDB's with message selectors under the hood.
    This is a sample of the ejb-jar.xml of the MDB created for a business service with response by Correlation ID pattern.
    <?xml version='1.0' encoding='UTF-8'?>
    <jav:ejb-jar xmlns:jav="http://java.sun.com/xml/ns/javaee">
    <jav:display-name>BEA ALSB JMS Outbound Sync-Async Endpoint</jav:display-name>
    <jav:enterprise-beans>
    <jav:message-driven>
    <jav:ejb-name>ResponseEJB-6577847719916437493-3893eeb7.1287d30ba4f.-7fe1</jav:ejb-name>
    <jav:ejb-class>com.bea.wli.sb.transports.jms.JmsAsyncResponseMDB</jav:ejb-class>
    <jav:transaction-type>Container</jav:transaction-type>
    <jav:message-destination-type>javax.jms.Queue</jav:message-destination-type>
    <jav:activation-config>
    *<jav:activation-config-property>*
    *<jav:activation-config-property-name>messageSelector</jav:activation-config-property-name>*
    *<jav:activation-config-property-value>JMSCorrelationID LIKE 'ID:424541534594cf52%'</jav:activation-config-property-value>*
    *</jav:activation-config-property>*
    </jav:activation-config>
    <jav:env-entry>
    <jav:env-entry-name>service-ref</jav:env-entry-name>
    <jav:env-entry-type>java.lang.String</jav:env-entry-type>
    <jav:env-entry-value>BusinessService$Test$RequestQ</jav:env-entry-value>
    </jav:env-entry>
    As you can see the message selector is based on JMSCorrelationID LIKE 'ID:424541534594cf52%'. This means the business service will pick only those messages which has its correlation ID starting with ID:424541534594cf52.
    You can see the message selector for your MDB from admin console --> deployments.
    Check and confirm if the correlation ID created in the request also starts with this value and the same is send back from the server. Also try deleting and recreating the business service or rename the business service which will create a new MDB under the hood and check the above.

  • JMS queue consumer challenge

    Hi there,
              I have met a pretty challenging problem in JMS queue consumer and
              would like to know if any JMS lovers in the group know about it.
              We have queue receiver listening on queue which contains a number of
              mugs.
              Once a msg is received (onMessage returns), the msg is handed over to
              a worker thread from a thread pool.
              Essentially there are two parts of the problem:
              1. We want kind of flow control - only x number of msg can be
              processed at a given time. This can be resolved by using semaphore.
              However, there might be better solution out there. Anyhow, this is
              less an issue than the second part -
              2. As we know client_acknowledge happens at the session level:
              Acknowledging a consumed message automatically acknowledges the
              receipt of all messages that have been consumed by its session. For
              example, if a message consumer consumes ten messages and then
              acknowledges the fifth message delivered, all ten messages are
              acknowledged. 
              -- this is the problem -- we want to acknowledge each msg
              individually so that only the processed msg is acknowledged although
              there are x number of msg being retrieved. By doing that we won't lost
              any msg in case the JMS client crashes.
              It is a challenge, isn't it? Might well not be one for you, if you
              know the trick. If you do, could you share with us? Thanks a lot.
              Mike
              

    Just to be clear, I favor (2), where each worker thread has its own session and
              consumer.
              This naturally throttles, as there are only as many outstanding messages as
              worker-threads.
              BTW, be aware that it is against spec, and dangerous, to call acknowledge()
              outside of
              onMessage() - as this multi-threads the Session and Session's are not thread
              safe.
              Tom
              Tom Barnes wrote:
              > Actually you both are correct. The ack behavior is configurable on the
              > connection factory via the "AcknowledgePolicy", where the default is
              > what the spec requires (ack-all). Prior to 6.1
              > the behavior was what one would expect (ack-before).
              >
              > As for how to solve the problem at hand. I can think of three approaches:
              >
              > (1) use the current async consumer but set the ack-policy
              > to ack-before, and defer acknowledging a msg until all msgs before
              > it have finished their processing
              >
              > (2) use multiple synchronous consumers, one consumer per defered msg
              >
              > (3) use a single synchronous consumer, but dequeue transactionally,
              > one transaction per msg. suspend the transaction, then have
              > the worker thread resume the transaction once it finishes processing
              > the message and call commit. (Take care that the default
              > tran timeout is 30 seconds.)
              >
              > Shean-Guang Chang wrote:
              >
              > > Just to correct one assumption. Ack the fifth message will not ack message
              > > received after that (e.g. message 6, 7, 8, etc...). At least not WLS JMS.
              > > If this is not true for you please give details of your client code and
              > > version of WLS JMS you have. Thanks!
              > >
              > > "Mike" <[email protected]> wrote in message
              > > news:[email protected]...
              > > > Hi there,
              > > >
              > > > I have met a pretty challenging problem in JMS queue consumer and
              > > > would like to know if any JMS lovers in the group know about it.
              > > >
              > > > We have queue receiver listening on queue which contains a number of
              > > > mugs.
              > > > Once a msg is received (onMessage returns), the msg is handed over to
              > > > a worker thread from a thread pool.
              > > >
              > > > Essentially there are two parts of the problem:
              > > >
              > > > 1. We want kind of flow control - only x number of msg can be
              > > > processed at a given time. This can be resolved by using semaphore.
              > > > However, there might be better solution out there. Anyhow, this is
              > > > less an issue than the second part -
              > > >
              > > > 2. As we know client_acknowledge happens at the session level:
              > > > Acknowledging a consumed message automatically acknowledges the
              > > > receipt of all messages that have been consumed by its session. For
              > > > example, if a message consumer consumes ten messages and then
              > > > acknowledges the fifth message delivered, all ten messages are
              > > > acknowledged.
              > > > -- this is the problem -- we want to acknowledge each msg
              > > > individually so that only the processed msg is acknowledged although
              > > > there are x number of msg being retrieved. By doing that we won't lost
              > > > any msg in case the JMS client crashes.
              > > >
              > > > It is a challenge, isn't it? Might well not be one for you, if you
              > > > know the trick. If you do, could you share with us? Thanks a lot.
              > > >
              > > > Mike
              

  • Jms queue in "write only" mode...

    Hi.
    I have a jms queue and I want set it to "write only mode" for some time. It means that I want to put messages to this queue but I want this messages to not be able to receive by any consumer until I remove "write only" flag. Is it possible?
    Thanks in advance!

    do you have control of the consumers? at my previous job, we wanted to stop queue consumption at certain points in time. we were using jboss, which enabled us to control the mdb consumer pool via jmx. dunno if other app servers have similar functionality. regardless, you aren't going to find a solution to this within vanilla jms, it will be an app-server specific solution. (possibly you could put the mdb's in their own ear file, and deploy/undeploy this ear as necessary?)

  • Consumer number for a JMS queue continues to grow

              I am using WLS 7.0 SP2. I have a JMS Queue and number of consumers continues to
              grow.
              Is there any way to stop it from growing? If not, should I be concerned about
              the memory usage by those consumers?
              Thanks.
              Rick
              

              Tom,
              You are right on JMS resources. We found that developer didn't close JMS session
              and conneciton which caused the memory leak. Now it has being running more than
              10 hours without crashing.
              Thanks.
              Rick
              Tom Barnes <[email protected]> wrote:
              >
              >Rick Chang wrote:
              >> I am using WLS 7.0 SP2. I have a JMS Queue and number of consumers
              >continues to
              >> grow.
              >>
              >> Is there any way to stop it from growing?
              >
              >No.
              >
              >> If not, should I be concerned about
              >> the memory usage by those consumers?
              >
              >Before jumping to conclusions though, make sure
              >that you are looking at the right statistic, there
              >are three for consumer count:
              > current -- active consumer count
              > high -- highest active consumer count
              > total -- total consumers ever created
              > (ever increasing by definition)
              >
              >If you are looking at "current"
              >the statistics point to a likely memory/resource leak.
              >Perhaps some part of your application is failing to close
              >its JMS resources when it is finished with them.
              >
              >>
              >> Thanks.
              >>
              >> Rick
              >
              

  • JMS/Queue cluster question

              Hi
              I have some very basic cluster questions on JMS Queues. Lets say Q1>I have 3 WLS
              in cluster. I create the queue in only WLS#1 - then all the other WLS (#2 and #3)
              should have a stub in their JNDI tree for the Queue which points to the Queue in
              #1 - right? Basically what I am trying to acheive is to have the queue in one server
              and all the other servers have a pointer to it - I beleive this is possible in WLS
              cluster - right??
              Q2> Is there any way a client to the queue running on a WLS can tell whether the
              Queue handle its using is local (ie in the same server) or remote. Is the API createQueue(./queuename)
              going to help here??
              Q3>Is there any way to create a Queue dynamically - I guess JMX is the answer -right?
              But I will take this question a bit further - lets say Q1 answer is yes. In this
              case if server #1 crashes - then #2 and #3 have no Queues. So if they try to create
              a replica of the Queue (as on server#1) - pointing to the same filestore - can they
              do it?? - I want only one of them to succed in creating the Queue and also the Queue
              should have all the data of the #1 Queue (1 to 1 replica).
              All I want is the concept of primary and secondary queue in a cluster. Go on using
              the primary queue - but if it fails use the 2ndry queue. Kind of HttpSession replication
              concept in clusters. My cluster purpose is more for failover rather than loadbalancing.
              TIA
              Anamitra
              

              Anamitra wrote:
              > Hi Tom
              > 7.0 is definitely an option for me. So lets take the scenarion on case of JMS cluster
              > and 7.0.
              >
              > I do not understand what u mean by HA framework?
              An HA framework is a third party product that can be used to automatically restart a failed server
              (perhaps on a new machine), and that will guarantee that the same server isn't started in two
              different places (that would be bad). There are few of these HA products, "Veritas" is one of
              them. Note that if you are using JMS file stores or transactions, both of which depend on the disk,
              you must make sure that the files are available on the new machine. One approach to this is to use
              what is known as a "dual-ported" disk.
              > If I am using a cluster of 3 WLS
              > 7.0 servers - as u have said I can create a distrubuted Queue with a fwd delay attribute
              > set to 0 if I have the consumer only in one server say server #1.
              > But still if the server #1 goes down u say that the Queues in server #2 and server
              > #3 will not have access to the messages which were stuck in the server #1 Queue when
              > it went down -right?
              Right, but is there a point in forwarding the messages to your consumer's destination if your
              application is down?
              If your application can tolerate it, you may wish to consider allowing multiple instances of it (one
              per physical destination). That way if something goes down, only those messages are out-of-business
              until the application comes back up...
              >
              >
              > Why cant the other servers see them - they all point to the same store right??
              > thanks
              > Anamitra
              >
              Again, multiple JMS servers can not share a store. Nor can multiple stores share a file. That will
              cause corruption. Multiple stores CAN share a database, but can't use the same tables in the
              database.
              Tom
              >
              > Tom Barnes <[email protected]> wrote:
              > >
              > >
              > >Anamitra wrote:
              > >
              > >> Hi
              > >> I have some very basic cluster questions on JMS Queues. Lets say Q1>I
              > >have 3 WLS
              > >> in cluster. I create the queue in only WLS#1 - then all the other WLS
              > >(#2 and #3)
              > >> should have a stub in their JNDI tree for the Queue which points to the
              > >Queue in
              > >> #1 - right?
              > >
              > >Its not a stub. But essentially right.
              > >
              > >> Basically what I am trying to acheive is to have the queue in one server
              > >> and all the other servers have a pointer to it - I beleive this is possible
              > >in WLS
              > >> cluster - right??
              > >
              > >Certainly.
              > >
              > >>
              > >> Q2> Is there any way a client to the queue running on a WLS can tell whether
              > >the
              > >> Queue handle its using is local (ie in the same server) or remote. Is
              > >the API createQueue(./queuename)
              > >> going to help here??
              > >
              > >That would do it. This returns the queue on the CF side of the established
              > >Connection.
              > >
              > >>
              > >> Q3>Is there any way to create a Queue dynamically - I guess JMX is the
              > >answer -right?
              > >> But I will take this question a bit further - lets say Q1 answer is yes.
              > >In this
              > >> case if server #1 crashes - then #2 and #3 have no Queues. So if they
              > >try to create
              > >> a replica of the Queue (as on server#1) - pointing to the same filestore
              > >- can they
              > >> do it??
              > >> - I want only one of them to succed in creating the Queue and also the
              > >Queue
              > >> should have all the data of the #1 Queue (1 to 1 replica).
              > >
              > >No. Not possible. Corruption city.
              > >Only one server may safely access a store at a time.
              > >If you have an HA framework that can ensure this atomicity fine, or are
              > >willing
              > >to ensure this manually then fine.
              > >
              > >>
              > >>
              > >> All I want is the concept of primary and secondary queue in a cluster.
              > >Go on using
              > >> the primary queue - but if it fails use the 2ndry queue. Kind of HttpSession
              > >replication
              > >> concept in clusters. My cluster purpose is more for failover rather than
              > >loadbalancing.
              > >
              > >If you use 7.0 you could use a distributed destination, with a high weight
              > >on the destination
              > >you want used most. Optionally, 7.0 will automatically forward messages
              > >from distr. dest
              > >members that have no consumers to those that do.
              > >
              > >In 6.1 you can emulate a distributed destination this way (from an upcoming
              > >white-paper):
              > >Approximating Distributed Queues in 6.1
              > >
              > >If you wish to distribute the destination across several servers in a cluster,
              > >use the distributed
              > >destination features built into WL 7.0. If 7.0 is not an option, you can
              > >still approximate a simple
              > >distributed destination when running JMS servers in a &#8220;single-tier&#8221;
              > configuration.
              > > Single-tier indicates
              > >that there is a local JMS server on each server that a connection factory
              > >is targeted at. Here is a
              > >typical scenario, where producers randomly pick which server and consequently
              > >which part of the
              > >distributed destination to produce to, while consumers in the form of MDBs
              > >are pinned to a particular
              > >destination and are replicated homogenously to all destinations:
              > >
              > >· Create JMS servers on multiple servers in the cluster. The servers will
              > >collectively host the
              > >distributed queue &#8220;A&#8221;. Remember, the JMS servers (and WL servers) must
              > >be named differently.
              > >
              > >· Configure a queue on each JMS server. These become the physical destinations
              > >that collectively become
              > >the distributed destination. Each destination should have the same name
              > >"A".
              > >
              > >· Configure each queue to have the same JNDI name &#8220;JNDI_A&#8221;, and also
              > take
              > >care to set the destination&#8217;s
              > >&#8220;JNDINameReplicated&#8221; parameter to false. The &#8220;JNDINameReplicated&#8221;
              > parameter
              > >is available in 7.0, 6.1SP3
              > >or later, or 6.1SP2 with patch CR061106.
              > >
              > >· Create a connection factory, and target it at all servers that have a
              > >JMS server with &#8220;A&#8221;.
              > >
              > >· Target the same MDB pool at each server that has a JMS server with destination
              > >&#8220;A&#8221;, configure its
              > >destination to be &#8220;JNDI_A&#8221;. Do not specify a connection factory URL
              > when
              > >configuring the MDB, as it can
              > >use the server&#8217;s default JNDI context that already contains the destination.
              > >
              > >· Producers look up the connection factory, create a connection, then a
              > >session as usual. Then producers
              > >look up the destination by calling javax.jms.QueueSession.createQueue(String).
              > > The parameter to
              > >createQueue requires a special syntax, the syntax is &#8220;./<queue name>&#8221;,
              > so
              > >&#8220;./A&#8221; works in this example.
              > >This will return a physical destination of the distributed destination that
              > >is local to the producer&#8217;s
              > >connection. This syntax is available on 7.0, 6.1SP3 or later, and 6.1SP2
              > >with patch CR072612.
              > >
              > >This design pattern allows for high availability, as if one server goes
              > >down, the distributed destination
              > >is still available and only the messages on that one server become unavailable.
              > > It also allows for high
              > >scalability as speedup is directly proportional to the number of servers
              > >on which the distributed
              > >destination is deployed.
              > >
              > >
              > >
              > >>
              > >> TIA
              > >> Anamitra
              > >
              > >
              > ><!doctype html public "-//w3c//dtd html 4.0 transitional//en">
              > ><html>
              > >Anamitra wrote:
              > ><blockquote TYPE=CITE>Hi
              > ><br>I have some very basic cluster questions on JMS Queues. Lets say Q1>I
              > >have 3 WLS
              > ><br>in cluster. I create the queue in only WLS#1 - then all the other WLS
              > >(#2 and #3)
              > ><br>should have a stub in their JNDI tree for the Queue which points to
              > >the Queue in
              > ><br>#1 - right?</blockquote>
              > >Its not a stub. But essentially right.
              > ><blockquote TYPE=CITE>Basically what I am trying to acheive is to have
              > >the queue in one server
              > ><br>and all the other servers have a pointer to it - I beleive this is
              > >possible in WLS
              > ><br>cluster - right??</blockquote>
              > >Certainly.
              > ><blockquote TYPE=CITE>
              > ><br>Q2> Is there any way a client to the queue running on a WLS can tell
              > >whether the
              > ><br>Queue handle its using is local (ie in the same server) or remote.
              > >Is the API createQueue(./queuename)
              > ><br>going to help here??</blockquote>
              > >That would do it. This returns the queue on the
              > >CF side of the established Connection.
              > ><blockquote TYPE=CITE>
              > ><br>Q3>Is there any way to create a Queue dynamically - I guess JMX is
              > >the answer -right?
              > ><br>But I will take this question a bit further - lets say Q1 answer is
              > >yes. In this
              > ><br>case if server #1 crashes - then #2 and #3 have no Queues. So if they
              > >try to create
              > ><br>a replica of the Queue (as on server#1) - pointing to the same filestore
              > >- can they
              > ><br>do it?? <br>
              > >- I want only one of them to succed in creating the Queue and also the
              > >Queue
              > ><br>should have all the data of the #1 Queue (1 to 1 replica).</blockquote>
              > >No. Not possible. Corruption city.
              > ><br>Only one server may safely access a store at a time.
              > ><br>If you have an HA framework that can ensure this atomicity fine, or
              > >are willing
              > ><br>to ensure this manually then fine.
              > ><blockquote TYPE=CITE>
              > ><p>All I want is the concept of primary and secondary queue in a cluster.
              > >Go on using
              > ><br>the primary queue - but if it fails use the 2ndry queue. Kind of HttpSession
              > >replication
              > ><br>concept in clusters. My cluster purpose is more for failover rather
              > >than loadbalancing.</blockquote>
              > >If you use 7.0 you could use a distributed destination, with a high weight
              > >on the destination
              > ><br>you want used most. Optionally, 7.0 will automatically
              > >forward messages from distr. dest
              > ><br>members that have no consumers to those that do.
              > ><p><i>In 6.1 you can emulate a distributed destination this way (from an
              > >upcoming white-paper):</i>
              > ><br><i>Approximating Distributed Queues in 6.1</i><i></i>
              > ><p><i>If you wish to distribute the destination across several servers
              > >in a cluster, use the distributed destination features built into WL 7.0.
              > >If 7.0 is not an option, you can still approximate a simple distributed
              > >destination when running JMS servers in a &#8220;single-tier&#8221; configuration.
              > >Single-tier indicates that there is a local JMS server on each server that
              > >a connection factory is targeted at. Here is a typical scenario,
              > >where producers randomly pick which server and consequently which part
              > >of the distributed destination to produce to, while consumers in the form
              > >of MDBs are pinned to a particular destination and are replicated homogenously
              > >to all destinations:</i><i></i>
              > ><p><i>· Create JMS servers on multiple servers in the cluster.
              > >The servers will collectively host the distributed queue &#8220;A&#8221;. Remember,
              > >the JMS servers (and WL servers) must be named differently.</i><i></i>
              > ><p><i>· Configure a queue on each JMS server. These become
              > >the physical destinations that collectively become the distributed destination.
              > >Each destination should have the same name "A".</i><i></i>
              > ><p><i>· Configure each queue to have the same JNDI name &#8220;JNDI_A&#8221;,
              > >and also take care to set the destination&#8217;s &#8220;JNDINameReplicated&#8221;
              > parameter
              > >to false. The &#8220;JNDINameReplicated&#8221; parameter is available in
              > >7.0, 6.1SP3 or later, or 6.1SP2 with patch CR061106.</i><i></i>
              > ><p><i>· Create a connection factory, and target it at all servers
              > >that have a JMS server with &#8220;A&#8221;.</i><i></i>
              > ><p><i>· Target the same MDB pool at each server that has a JMS server
              > >with destination &#8220;A&#8221;, configure its destination to be &#8220;JNDI_A&#8221;.
              > >Do not specify a connection factory URL when configuring the MDB, as it
              > >can use the server&#8217;s default JNDI context that already contains the destination.</i><i></i>
              > ><p><i>· Producers look up the connection factory, create a connection,
              > >then a session as usual. Then producers look up the destination by
              > >calling javax.jms.QueueSession.createQueue(String). The parameter
              > >to createQueue requires a special syntax, the syntax is &#8220;./<queue name>&#8221;,
              > >so &#8220;./A&#8221; works in this example. This will return a physical
              > >destination of the distributed destination that is local to the producer&#8217;s
              > >connection. This syntax is available on 7.0, 6.1SP3 or later,
              > >and 6.1SP2 with patch CR072612.</i><i></i>
              > ><p><i>This design pattern allows for high availability, as if one server
              > >goes down, the distributed destination is still available and only the
              > >messages on that one server become unavailable. It also allows
              > >for high scalability as speedup is directly proportional to the number
              > >of servers on which the distributed destination is deployed.</i>
              > ><br><i></i>
              > ><br><i></i>
              > ><blockquote TYPE=CITE>
              > ><br>TIA
              > ><br>Anamitra</blockquote>
              > ></html>
              > >
              > >
              

  • Program to consume the JMS queue

    Hi, I' m new to WebLogic stuff. Got a question over here. There's a JMS queue that we want to have a program (not those built in stuff from weblogic) to see if they re consumed. Similar stuff would be displayed like
              <b>ABCD Queue consumers: 1 / consumers high: 0 ...messages: 10 / messages received: 19........</b>
              as if we get into the console page to check the JMS queues.
              I've got no clues yet. We don't wanna check the number of files from C:\Original and the destination folder C:\Destin......if so, it'd be an easy task but that s not what we wanted....

    As with any WebLogic subsystem, you can get all statistics programmatically using standard JMX mbeans (see the JMX developer guide). The console uses these beans, as does the WLST scripting language. In addition, there are helper methods in the public weblogic.jms.extensions package that simplify access to these beans.
              I think there are various mbean and WLST samples on dev2dev, including one called "JMSStats.java". Note that JMSStats.java, and some other samples were written for versions 8.1 and earlier. They use deprecated methods that don't have access to all runtime statistics for 9.0 and later versions.
              Tom

  • Publishing message to JMS Queue on Weblogic from OSB proxy service

    Hi,
    1. I have created a JMS module: testModule and a JMS queue: testQueue in the weblogic admin console.
    2. Created a business service with the above queue as endpoint.
    3. Created a proxy service which publishes the message to the queue using the business service. I have used Publish activity to publish the message to the business service.
    When i run the proxy service with the request message, then, no error is coming but, in the admin console when i click on JMS module->testModule->testQueue->Monitoring tab, i see nothing. There are no entries in the table so, how can i check if the message is properly published to the queue or not.
    The queue is not listened by any service for consuming the messages.
    Kindly help me in figuring out this issue.
    Thanks in advance.

    If the destination was a topic, the behavior would be expected. Messages only stays on a topic and are delivered to consumers if there are consumers or durable subscribers.
    Did you check the server logs and see if there are any exceptions or warnings?
    You can also turn on jms debugging by adding the following to your server startup script.
    -Dweblogic.debug.DebugJMSFrontEnd=true
    -Dweblogic.debug.DebugJMSBackEnd=true
    The debugging messages wiill show up in the server log.

  • I want to access JMS Queue in websphere from a client application

    Hello all
    I tried to access a jms queue in the websphere from a client application
    my connection factory jndi name is : MyConn
    my queue name jndi name is : MyQueue
    and here is my code :
    Hashtable environment = new Hashtable();
    environment.put(Context.INITIAL_CONTEXT_FACTORY,
    "com.ibm.websphere.naming.WsnInitialContextFactory");
    environment.put(Context.URL_PKG_PREFIXES, "com.ibm.ws.naming");
    environment.put(Context.PROVIDER_URL, "corbaloc:iiop:localhost:2809");
    return new InitialContext(environment);
    then:
    q = (Queue) ctx.lookup(QJNDIName);
    QueueConnectionFactory connFactory = (QueueConnectionFactory)
    ctx.lookup(ConnFactName);
    I had the following exception :
    javax.naming.NameNotFoundException: Context: networking/nodes/networking/servers/server1, name: MyQueue: First component in name MyQueue not found. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
    Can i have any help please ....

    Hi
    You are missing some critical jar files in your class path. It should be namingclient.jar, also please or something similar that is missing in classpath.
    HTH
    VJ

  • Oracle AQ to JMS Queue which is on Oracle Application server

    Hi,
    I am using Oracle Streams AQ Oracle database 10g
    and i have a JMS Queue on oracle Application server.
    how i can Propagate message from Oracle AQ (AQ$_JMS_TEXT_MESSAGE)Queue to JMS Queue. ?
    Thanks,
    Satnani

    Hi Justin,
    Thanks for Reply, but in my case my JMS queue is on Oracle Application Server.
    and i want to propagate message from AQ to JMS queue.
    and none of the document is available to describe how to send message from oracle database AQ to JMS queue which is on application server.
    please help
    Thanks,
    Satnani

  • How to delete the messages from JMS Queue

    Hi,Can anybody help how to delete the messages from the JMS Queue.Thanks in advance.

    You can dequeue the message using a JMS client or delete it using Weblogic Admin Console -
    http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e13952/taskhelp/jms_modules/queues/ManageQueues.html
    Regards,
    Anuj

Maybe you are looking for