JMS Queue up or down

          HI,
          As part of the application I am developing, I need to write a message on a JMS
          Queue of
          another application (called Acq).
          Is their anyway of knowing programmatically whether the other application's (Acq)
          JMS Server is up or down.
          Thanks for the help
          ---Radhe
          

Hi Radhe,
          Search for "server health monitoring" in the docs.
          Or simply register a standard JMS connection onException
          and also a weblogic extension JMS session onException listener
          to listen for failures once the client succeeds
          in connecting. (poll/connection/onException repeat)
          Or use a store-and-forward design, where a local
          queue that is always there has an application MDB
          or a Messaging Brdige that forwards to the remote destination.
          This allows the produce to continue even if the remote side is down.
          Tom
          Radhe wrote:
          > HI,
          >
          > As part of the application I am developing, I need to write a message on a JMS
          > Queue of
          > another application (called Acq).
          >
          > Is their anyway of knowing programmatically whether the other application's (Acq)
          > JMS Server is up or down.
          >
          > Thanks for the help
          > ---Radhe
          

Similar Messages

  • JMS Queue slows down after time

              Hi,
              Our system makes use of queues extensively. We, pumps trhough tens of thousands
              of messages every day . Every few days, our Weblogic 7 SP5 JMS queue slows down
              with very little activity. After restarting the instance, everything goes back
              to normal. We have about 14 queues in our system with a very high rate of throughput.
              Any ideas as to what slows down the queue requiring a restart.
              The JMS file store is excluded from anti-virus and backup software.
              Kevin
              

              Hi Tom, The memory usage is fine. 1Gb is available to the JVM and the memory usage
              is usually about 1/4th of that when we experience the issues below
              Tom Barnes <[email protected].bea.com>
              wrote:
              >Another thing to look at is server CPU usage before and
              >during the slowdown.
              >
              >Also memory usage. There may be a memory leak
              >somewhere that expands JVM memory to the point
              >where the operating system begins to page...
              >
              >Kevin Sharfman wrote:
              >
              >> Hi Tom, We are able to measure a slowdown by the time it takes to post
              >messages
              >> to a queueas well as the time for a message to be delievered off the
              >queue. Our
              >> throughput just drops dramatically. During this time, the number of
              >messages in
              >> the queues are quite low, due to the slow duration of posting a message.
              >I will
              >> try and obtain thread drumps. However, the are no error messages nor
              >logs that
              >> point to any problem. Restarting the instance, immediatly solves the
              >performance
              >> problem. This problem occurs intermittedly - sometimes once a week
              >or once every
              >> 2 weeks or even twice a week.
              >>
              >>
              >> Tom Barnes <pleasereplyinnewsgroup.weblogic.developer.interest.jms@newsgrou
              >>
              >> ps.bea.com> wrote:
              >>
              >>>Hi Kevin,
              >>>
              >>>Is the number of messages in the destination higher at
              >>>these times?
              >>>
              >>>If there is "very little activity" how can you
              >>>measure a slowdown?
              >>>
              >>>Can you force server side thread-dumps the next
              >>>time this occurs?
              >>>
              >>>Tom
              >>>
              >>>Kevin Sharfman wrote:
              >>>
              >>>
              >>>>Hi,
              >>>>
              >>>>Our system makes use of queues extensively. We, pumps trhough tens
              >>>
              >>>of thousands
              >>>
              >>>>of messages every day . Every few days, our Weblogic 7 SP5 JMS queue
              >>>
              >>>slows down
              >>>
              >>>>with very little activity. After restarting the instance, everything
              >>>
              >>>goes back
              >>>
              >>>>to normal. We have about 14 queues in our system with a very high
              >rate
              >>>
              >>>of throughput.
              >>>
              >>>>Any ideas as to what slows down the queue requiring a restart.
              >>>>
              >>>>The JMS file store is excluded from anti-virus and backup software.
              >>>>
              >>>>Kevin
              >>>
              >>
              >
              

  • Queue up messages in a JMS queue during DB outages.

    I am currently using a MessageDriven EJB that pops messages of a JMS queue and
    then grabs a connection from a weblogic dbpool and process it. However if the
    database is down, the EJB still pops off messages and then throws exceptions when
    trying to get the connection from the pool and the exception is logged and the
    message lost.
    How can i architect the application so that when the db is down the messages are
    queued up in the JMS queue, so that when the DB comes back online they can be
    processed.?

    The $ is not a valid character for an element NAME per W3C standards. In short you can only use letters, numbers and the underscore ( _ )..
    You need to correct this message / data and reprocess the message.
    Setup an Error Queue so these messages get thrown some where that will not cause issues in your system. Then use error handling in something like AIA to report back to your support staff that a bad message was encountered, needs to be fixed and reprocessed.
    You will see that if you do a google search for how to escape a dollar sign in xpath, there are no good results....
    Hope that helps!
    -Luke

  • Help needed on JMS queues

    I am using Soa Suite 10.1.35 and trying to make a ESB integration work.
    The requirement is I have to de-queue some data from a JMS queue and invoke a Oracle Pl/SQL Api(DB adapter) using the data in an ESB project.
    I want it part of a single transaction, i.e. if the call to oracle API(db adapter ) fails( say db is down or api is invalid), i want the queue de-queue transaction to be rolled back as well.
    I have made the routing service as synchronous. I have marked istransacted ="true" connection factory in oc4j-ra.xml file and auto_commit =>false for the Queue table, queue creation.
    Still if the DB transaction fails the queue is not rolled back.
    Any help or pointers will be greatly appreciated.
    Please let me know if you require any information.
    Regards,
    Punit

    I tried compling servlet, but it is raising error
    that coul not find package javax.servletWhat I did not mention... you need to add those JARs in the Classpath explicitly. You will find them in %TOMCAT_HOME%\common\lib. You atleast need to add servlet-api.jar to your Classpath. :)

  • How to pick(or consume) messages from Woblogic JMS Queue only when DB is UP

    Hi,
    I have a requirement to pick(or consume) messages from Woblogic JMS Queue only when DB is UP.
    When DB is down, messages should remain in queue. When DB is up, messaged should be picked on scheduler basis.
    We are using SOA suite 11g(BPEL or mediator,JMS Adapter).
    What is the best way to achive it in SOA 11g.
    I tried, but when I setup a Consumer, there is no control over there. Messages are picked automatically.
    Please advise.
    Thanks
    Ram

    something wrong with the design.
    why dont you set the retry options in the fault policies?
    So if the external DB is down you could reprocess them after specified interval or make it go to human retry queue.
    Then you could use SOA api to retry all of them.
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • HowTo:Publish Msg to JMS queue deployed in a Weblogic Cluster from a client

    Hello All-
    I am new to Weblogic and need help from this forum. Forgive me for my ignorance. I am learning.
    Below is a brief about the context and the issues that we are facing:
    Background
    =======
    1. We have Oracle Service Bus (OSB) installed on top of Oracle Weblogic Server (ver 10.3). In OSB we have developed a proxy service that listens to a JMS queue for an incoming message
    2. The Weblogic environment is a cluster having 2 managed servers listening to different ports and it is front-ended by a Apache Load Balancer.
    3. Our requirement is to post an XML message from a Java client to the JMS queue which will then initiate the proxy service deployed. We are using t3 protocol to post the message from the client to the JMS queue
    Issue
    ====
    1. To post an XML message from the client, how do we give the address of the JMS queue in the clustered environment to enable failover/loadbalancing if one managed server goes down. I understand from your earlier posts in this forum that directly hitting the JMS queue on a particular managed server will not enable failover/loadbalancing in case one of them goes down
    2. Do we need to modify any config file in the Apache Proxy Plugin?
    3. Do we need to provide the address of the Apache proxy in the client to send the message?
    Kindly clarify and let me know me know if you need any additional information.
    Greatly appreciate your help!!!
    Regards,
    Dibya

    Hi Dibya,
    Please refer to : http://weblogic-wonders.com/weblogic/2010/05/13/apache-proxy-as-static-content-repository/#comment-1379
    Thanks
    Jay SenSharma

  • Polling a JMS Queue

    Hi,
    I am new to ODI,my scenario is that I want to poll a JMS Queue, from ODI for messages, and once I receive the message I want to persist it in DB, I need help to make this work.
    Thanks,
    Rahul

    I think you ran into a known Bug that has been fixed in recent versions/service-packs (sorry, I don't know the version number). Setting the delivery mode override to Persistent is fine as a work-around as long as you're sure that your applications don't send non-persistent messages to the affected destinations. If this is a concern and you need to force the delivery mode override back to its default whilst still keeping your time-to-live override, I think you can probably do this by shutting down your domain, then editing your XML to remove the delivery mode override stanza, and finally restarting...
    Tom

  • Injecting JMS Queue / Destination into MDB fails

    I am trying to inject a Destination into an EJB3 MDB using
        @Resource(name = "queue/abc/Responses")
        private Destination m_responseQueue;In the ejb-jar.xml file I declare the following
          <message-driven>
                <ejb-name>JobRequestListener</ejb-name>
                <ejb-class>com.abc.backend.jobs.JobRequestListener</ejb-class>
                <message-destination-link>JobRequests</message-destination-link>
                <!--Inherited From AbstractManagedBean -->
                <resource-ref>
                    <res-ref-name>jms/ConnectionFactory</res-ref-name>
                    <res-type>javax.jms.ConnectionFactory</res-type>
                    <res-auth>Container</res-auth>
                </resource-ref>
                <!--Local Resources -->
                <message-destination-ref>
                    <message-destination-ref-name>queue/abc/Responses</message-destination-ref-name>
                    <message-destination-type>javax.jms.Queue</message-destination-type>
                    <message-destination-usage>Produces</message-destination-usage>
                    <message-destination-link>Responses</message-destination-link>
                </message-destination-ref>
            </message-driven>and in weblogic-ejb-jar.xml I add
        <weblogic-enterprise-bean>
            <ejb-name>JobRequestListener</ejb-name>
            <message-driven-descriptor>
                <pool>
                    <max-beans-in-free-pool>20</max-beans-in-free-pool>
                    <initial-beans-in-free-pool>10</initial-beans-in-free-pool>
                </pool>
                <destination-jndi-name>queue/abc/JobRequests</destination-jndi-name>
            </message-driven-descriptor>
            <transaction-descriptor>
                <trans-timeout-seconds>315</trans-timeout-seconds>
            </transaction-descriptor>
            <!--Inherited From AbstractManagedBean -->
            <resource-description>
                <res-ref-name>jms/ConnectionFactory</res-ref-name>
                <jndi-name>jms/ABCConnectionFactory</jndi-name>
            </resource-description>
            <!--Local Resources -->        
            <resource-description>
                <res-ref-name>queue/abc/Responses</res-ref-name>
                <jndi-name>queue/abc/Responses</jndi-name>
            </resource-description>
        </weblogic-enterprise-bean>Initially I didn't have the resource-description in the weblogic-ejb-jar.xml file, but even after adding it I am still getting the following exception during deployment
    [EJB:011026]The EJB container failed while creating the java:/comp/env namespace for
    this EJB deployment. weblogic.deployment.EnvironmentException:
    [EJB:010176]The resource-env-ref 'queue/abc/Responses' declared in the ejb-jar.xml
    descriptor or annotation has no JNDI name mapped to it. The resource-ref must
    be mapped to a JNDI name using the resource-description element of the
    weblogic-ejb-jar.xml descriptor or corresponding annotation.
         at weblogic.ejb.container.deployer.EnvironmentBuilder.addResourceEnvReferences(EnvironmentBuilder.java:639)
         at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentContext(EJBDeployer.java:247)
         at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentFor(EJBDeployer.java:1014)
         at weblogic.ejb.container.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:908)
         at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1188)
         at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:425)By injecting a Queue rather then a destination I can work around this issue, however I would prefer to use a Destination as this allows me to change the behavior of my application without making code changes. It seems like a bug in 10.3 to me.
    Edited by: ejb3workshop on Sep 1, 2009 1:44 PM
    Edited by: ejb3workshop on Sep 1, 2009 1:59 PM
    Edited by: ejb3workshop on Sep 2, 2009 3:11 PM

    Because JMS resources by the very nature are "undependable", I think it is usually not advisable to inject JMS resources into an EJB except for MDB source destinations. The problem with injection of JMS resources is that if the JMS resource is not available at the point the EJB is originally deployed/initialized, the EJB deployment/initializaition will fail (except for MDBs, which will still deploy if the source is down, and will automatically retry internally). This is goodness for many types of resources, but since JMS resources are not necessarily always available by their very nature (down for maintenance, in the middle of a migration, initializing later in the boot, etc), most messaging applications should be specifically designed to be robustly handle the failure case during runtime.
    Anyhow, EJB3 does not require descriptors.
    I haven't fully vetted the following samples, but I think they should be pretty close to correct.
    Sample MDB code:
    // MDB will still deploy even if the source destination is down (the container will keep retrying internally).
    @MessageDriven(mappedName = "Server1Q1",
                            activationConfig = {@ActivationConfigProperty(
                                                          propertyName = "connectionFactoryJndiName",
                                                          propertyValue = "Server1CF")})
    public class MyMDB implements MessageListener {
      @EJB
      private MyStateless myStateless;
      @TransactionAttribute(TransactionAttributeType.REQUIRED)
      public void onMessage(Message message) {
        System.out.println("Got the message, version 5: "+message);
        myStateless.completeWorkOrder();
    Sample injected JMS resources - no resource descriptors needed:
    @Stateless(mappedName="StatelessBean")
    public class MyStatelessBean implements MyStateless {
      int ctr;
      @Resource(mappedName="mdbq2")
      private Queue queue1;
      @Resource(mappedName="cfadmin2")
      private QueueConnectionFactory connectionFactory2;
    Sample pseudo-code for non-injected JMS resources, no resource descriptors needed:
    Eg, instead of
    @Resource(mappedName="cfadmin")
    private QueueConnectionFactory cf;
    Do this:
      // note the semi-colon!  turns off injection, note the type field -- required
      // I'm not sure of exact syntax
      //cfadmin is assumed to be the JNDI name if the
      // JNDI name isn't specified in another parameter... 
      @Resource(mappedName="cfadmin", type="javax.jms.QueueConnectionFactory");  
      // this is not injected now
      // cache cf for re-use (performance)
      private QueueConnectionFactory cf;
      @Resource
      private SessionContext sctx;  // inject the session ctx
    And in the source code itself, do this:
       int tryCount == 3; 
       while (cf != null) {
         try { 
           // not quite sure if this is the righ syntax, but I think "java:/comp/env" prefix
           // isn't needed for the new EJB3.0 session context
           cf = sctx.lookup("cfadmin");  //cfadmin is mappedname for resource above
         } catch (NNN n) {  // don't know the exact exception
           if (--tryCount == 0) throw n;
           sleep 3 seconds  // don't want to retry in a tight loop
    Tom

  • Fail over when queue manager is down

    Hi,
    I am implementing the MessageListener interface to receive messages from MQ. How will the JMS notify if the queue manager goes down for some reason. I need to capture the exception so that I can fail over to the secondary queue manager.
    Please reply back if you have any pointers. Your help would be much appreciated.
    Regards,
    Sunil

    If you register an ExceptionListener, you will be notified when connection to the JMS server is lost by a call to the onException() method.
    http://java.sun.com/j2ee/1.4/docs/api/javax/jms/ExceptionListener.html
    I've used this previously to attempt reconnection on a time interval for a specified number of retries.
    -Scott
    http://www.swiftradius.com

  • How to view messages in Jms queue from OEM 12c Cloud Control

    Hi All,
    How can I view messages in a Jms queue from OEM 12c Cloud Control without logging into WebLogic Administration Console?
    Thanks in Advance!!

    EMCC 12c gets down to the JMS message queue/topic level in regards to the metrics being collected. It doesn't provide a view into the actual messages themselves. Are you trying to capture/track messages with a particular payload?

  • Using a  foreign WLS JMS queue (no bridge)

              Hi,
              We have a configuration from which we communicate from WLS 7 to a foreign MQ via
              JMS. This works well and we have loaded the foreign MQ jms objects into WLS JNDI
              using a statup class (as the whitepaper available describes) and we look them
              up successfully.
              However, we now have a siutation where we briefly need to switch our application
              to point to a WLS JMS queue on another remote WLS server. Is there an easy way
              to load foreign (maybe remote would be a better word in this case) WLS JMS QCF's
              and destinations into my local WLS JNDI so that I can treat them the same way
              as my MQ objects?
              I can't seem to find any information on how to do this as all information seems
              to point towards the messaging bridge (we can't use this as the bridge changes
              the message JMSMessageID and screws our correlation mechanism up).
              I know we could just look the foreign objects up by using the JNDI environment
              of the remote WLS machine but this would mean changing code and this I can't to
              do (as all our code uses the local default WLS JNDI).
              Any ideas would be gratefully received.
              Cheers,
              Jay.
              

    WLS JMS and MQ JMS handle their JNDI objects a little differently, so I can
              see how this can be confusing. An MQ JMS "ConnectionFactory" or
              "Destination" object is like a little configuration file that tells you
              where the queue manager or queue is, so you can serialize it and look it up
              later and use it to find the queue manager.
              A WLS JMS ConnectionFactory or Destination object is a reference to an
              object on a running server. So, you connect to the server and look them up,
              and then you can use it for messaging. You don't have to store these objects
              in a separate place, like MQ makes you do. But it means that the WLS JNDI
              objects have to be looked up from a running server, and if the server
              restarts, you have to look them up again.
              Doing what you're asking is definitely trickier in 7.0. One thing you could
              do is, again using a servlet or an EJB, connect to the remote JMS cluster
              and look up the objects at the time you want to make the switch. (If the
              remote cluster is down, you'll have to retry from time to time.) If the
              remote cluster is down, you won't be able to look up those objects, but then
              again, if it were down you wouldn't be able to send messages there anyway.
              Using 8.1 would be less complicated, but this method should also work.
              greg
              "Jay Green" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Thanks Greg. When I was searching the BEA website I read about the
              facility in
              > 8.1. Unfortunatley, as you point out, it doesn't help me much with WLS
              7.0.
              >
              > My first thought was to copy my exisiting MQ startup class but I couldn't
              work
              > out how to do this for the remote WLS jms objects as the standard jms
              classes
              > (for QCF etc) don't have methods that allow me to define the foreign WLS
              jms
              > host IP address etc. I checked the WLS 7 API and the jms package didn't
              seem
              > to offer anything to help me do this (as IBM do for MQ). Any ideas?
              >
              > Apologies if I'm being a bit slow here!
              >
              > "Greg Brail" <[email protected]> wrote:
              > >WLS 8.1 includes a feature called "Foreign JMS Providers" that lets you
              > >configure (using the console or config.xml) a link between a JMS JNDI
              > >object
              > >in your WLS servers' tree, and a JNDI object in another provider -- which
              > >could be WLS JMS, or a foreign vendor.
              > >
              > >Using this feature, your application could just look up the local JNDI
              > >objects in the local WLS tree, and then the server in turn performs the
              > >lookup from the actual JNDI provider using the parameters you put in
              > >the
              > >console (or config.xml). So, when you make a change in the console, new
              > >JNDI
              > >lookups will go to the new place.
              > >
              > >Unfortunately, this doesn't help you with 7.0. You could always
              > >programmitically update the local JNDI tree the way you're doing in your
              > >startup class, but instead do it from a servlet or an EJB.
              > >
              > > greg
              > >
              > >"Jay Green" <[email protected]> wrote in message
              > >news:[email protected]...
              > >>
              > >> Hi,
              > >>
              > >> We have a configuration from which we communicate from WLS 7 to a
              foreign
              > >MQ via
              > >> JMS. This works well and we have loaded the foreign MQ jms objects
              > >into
              > >WLS JNDI
              > >> using a statup class (as the whitepaper available describes) and we
              > >look
              > >them
              > >> up successfully.
              > >>
              > >> However, we now have a siutation where we briefly need to switch our
              > >application
              > >> to point to a WLS JMS queue on another remote WLS server. Is there
              > >an easy
              > >way
              > >> to load foreign (maybe remote would be a better word in this case)
              > >WLS JMS
              > >QCF's
              > >> and destinations into my local WLS JNDI so that I can treat them the
              > >same
              > >way
              > >> as my MQ objects?
              > >> I can't seem to find any information on how to do this as all
              information
              > >seems
              > >> to point towards the messaging bridge (we can't use this as the bridge
              > >changes
              > >> the message JMSMessageID and screws our correlation mechanism up).
              > >>
              > >> I know we could just look the foreign objects up by using the JNDI
              > >environment
              > >> of the remote WLS machine but this would mean changing code and this
              > >I
              > >can't to
              > >> do (as all our code uses the local default WLS JNDI).
              > >>
              > >> Any ideas would be gratefully received.
              > >>
              > >> Cheers,
              > >>
              > >> Jay.
              > >
              > >
              >
              

  • JMS Queue: External

    Dear All
    I need to test a JMS scenario where my ECC system is receiving message from an external JMS Queue.
    As the external source system is down I want to test my scenario with any JMS Queue which is available. The requirement is such that I cannot use SAP's Web AS J2EE JMS Queue in PI.
    Can anyone tell me are there any JMS queus available (or can be configured) so that I can test the scenario
    Regards
    Sourabh

    Hi,
    What do you mean by exteral source system down?? We can create local queues in PI it self,we can work the same scenariomwhen we are facing problems with MQ system down or we dont have any MQ system.
    I am not getting your exact requirement,suppose if you are trying to send message to MQ or retrieving message from MQ ,if queue dowm in this case we can create other queues in MQ , we can connect to the other queues.we can execute same scenario.
    suppose if your MQ System down means its not possible,but as i meantioned alredy we can crete queues in PI it self we have a feature.
    refer below thread
    Remote queue in XI server for IBM MQSeries
    Regards,
    Raj

  • 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>
              > >
              > >
              

  • Issue with MDB (jms Queue) in weblogic 8.1

              Hi all...
              I'm facing a strange kind of problem with MDB using weblogic 8.1.
              The code worked perfectly in weblogic 7.0.
              This is wht i'm trying to achieve..
              i'm having a MDB which implements a onMessage().
              I'm publishing message thru a standalone client. Publishing works fine..
              The problem is onMessage(javax.jms.Message msg) is never been called :-(.
              when i monitor it shows that messages are recieved..
              Am is missing something that is really important..
              here is my code
              package com.csxwt.zodiac.service.domain;
              import javax.ejb.*;
              import javax.jms.*;
              import javax.naming.*;
              import java.io.Serializable;
              //import com.csxwt.zodiac.service.domain.TestObject;
              public class MDBTestBean implements MessageDrivenBean, MessageListener {
              MessageDrivenContext messageDrivenContext;
              public void ejbCreate() throws CreateException {
              System.out.println("into the ejb create");
              /**@todo Complete this method*/
              public void ejbRemove() {
              /**@todo Complete this method*/
              public void onMessage(javax.jms.Message msg) {
              System.out.println("into the onMessage method 1 ");
              ObjectMessage objectMsg = null;
              String strObject = "Test";
              try
              System.out.println("into the onMessage method 2 ");
              if (msg instanceof ObjectMessage)
              System.out.println("into the onMessage method 3");
              objectMsg = (ObjectMessage) msg;
              Serializable serializableObj = objectMsg.getObject();
              String test = serializableObj.toString();
              System.out.println("value of the message sent " + test);
              TestObject test1 = null;
              if(serializableObj instanceof TestObject )
              test1 = (TestObject) serializableObj;
              System.out.println("after getting the test value ");
              System.out.println("getting the test object valuye " + test1.getName());
              else
              return;
              catch (Exception e)
              System.out.println("Message Bean:unexpected Exception thrown ");
              e.printStackTrace();
              public void setMessageDrivenContext(MessageDrivenContext messageDrivenContext)
              System.out.println("into MDB context");
              this.messageDrivenContext = messageDrivenContext;
              here are the 2 xml files....
              <ejb-jar>
              <enterprise-beans>
              <message-driven>
              <display-name>MDBTest</display-name>
              <ejb-name>MDBTest</ejb-name>
              <ejb-class>com.csxwt.zodiac.service.domain.MDBTestBean</ejb-class>
              <transaction-type>Container</transaction-type>
              <message-selector>GATE_LANE</message-selector>
              <message-driven-destination>
              <destination-type>javax.jms.Queue</destination-type>
              </message-driven-destination>
              </message-driven>
              </enterprise-beans>
              <assembly-descriptor>
              <container-transaction>
              <method>
              <ejb-name>MDBTest</ejb-name>
              <method-name>*</method-name>
              </method>
              <trans-attribute>Required</trans-attribute>
              </container-transaction>
              </assembly-descriptor>
              </ejb-jar>
              <weblogic-ejb-jar>
              <weblogic-enterprise-bean>
              <ejb-name>MDBTest</ejb-name>
              <message-driven-descriptor>
              <pool>
              <max-beans-in-free-pool>200</max-beans-in-free-pool>
              <initial-beans-in-free-pool>20</initial-beans-in-free-pool>
              </pool>
              <destination-jndi-name>zodiac.jms.queue.HardWareOutMessageQueue</destination-jndi-name>
              </message-driven-descriptor>
              </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              Am i missing something somewhere?????
              any help in this is highly appreciated..
              thanks in advance.
              r
              sasi
              

    Check your log for error and warning messages. If there
              are some, they should help trace down the problem. If there
              aren't any, try confirm that your MDB is deploying in
              the first place.
              The MDB below is a Q MDB, but you write below that your client
              is a "publisher". "Publisher" implies a topic producer, not
              a queue producer, and topic producer can't publish to queues.
              Tom
              T. Sasii Dharma wrote:
              > Hi all...
              >
              > I'm facing a strange kind of problem with MDB using weblogic 8.1.
              > The code worked perfectly in weblogic 7.0.
              > This is wht i'm trying to achieve..
              > i'm having a MDB which implements a onMessage().
              > I'm publishing message thru a standalone client. Publishing works fine..
              > The problem is onMessage(javax.jms.Message msg) is never been called :-(.
              > when i monitor it shows that messages are recieved..
              > Am is missing something that is really important..
              >
              > here is my code
              >
              > package com.csxwt.zodiac.service.domain;
              >
              > import javax.ejb.*;
              > import javax.jms.*;
              > import javax.naming.*;
              > import java.io.Serializable;
              > //import com.csxwt.zodiac.service.domain.TestObject;
              >
              > public class MDBTestBean implements MessageDrivenBean, MessageListener {
              > MessageDrivenContext messageDrivenContext;
              > public void ejbCreate() throws CreateException {
              > System.out.println("into the ejb create");
              > /**@todo Complete this method*/
              > }
              > public void ejbRemove() {
              > /**@todo Complete this method*/
              > }
              > public void onMessage(javax.jms.Message msg) {
              > System.out.println("into the onMessage method 1 ");
              > ObjectMessage objectMsg = null;
              > String strObject = "Test";
              > try
              > {
              > System.out.println("into the onMessage method 2 ");
              > if (msg instanceof ObjectMessage)
              > {
              > System.out.println("into the onMessage method 3");
              > objectMsg = (ObjectMessage) msg;
              > Serializable serializableObj = objectMsg.getObject();
              > String test = serializableObj.toString();
              > System.out.println("value of the message sent " + test);
              > TestObject test1 = null;
              > if(serializableObj instanceof TestObject )
              > {
              > test1 = (TestObject) serializableObj;
              > System.out.println("after getting the test value ");
              > System.out.println("getting the test object valuye " + test1.getName());
              > }
              >
              > }
              > else
              > {
              > return;
              > }
              >
              > }
              > catch (Exception e)
              > {
              > System.out.println("Message Bean:unexpected Exception thrown ");
              > e.printStackTrace();
              > }
              >
              > }
              > public void setMessageDrivenContext(MessageDrivenContext messageDrivenContext)
              > {
              > System.out.println("into MDB context");
              >
              > this.messageDrivenContext = messageDrivenContext;
              > }
              > }
              >
              >
              > here are the 2 xml files....
              >
              > <ejb-jar>
              > <enterprise-beans>
              > <message-driven>
              > <display-name>MDBTest</display-name>
              > <ejb-name>MDBTest</ejb-name>
              > <ejb-class>com.csxwt.zodiac.service.domain.MDBTestBean</ejb-class>
              > <transaction-type>Container</transaction-type>
              > <message-selector>GATE_LANE</message-selector>
              > <message-driven-destination>
              > <destination-type>javax.jms.Queue</destination-type>
              > </message-driven-destination>
              > </message-driven>
              > </enterprise-beans>
              > <assembly-descriptor>
              > <container-transaction>
              > <method>
              > <ejb-name>MDBTest</ejb-name>
              > <method-name>*</method-name>
              > </method>
              > <trans-attribute>Required</trans-attribute>
              > </container-transaction>
              > </assembly-descriptor>
              > </ejb-jar>
              >
              > <weblogic-ejb-jar>
              > <weblogic-enterprise-bean>
              > <ejb-name>MDBTest</ejb-name>
              > <message-driven-descriptor>
              > <pool>
              > <max-beans-in-free-pool>200</max-beans-in-free-pool>
              > <initial-beans-in-free-pool>20</initial-beans-in-free-pool>
              > </pool>
              > <destination-jndi-name>zodiac.jms.queue.HardWareOutMessageQueue</destination-jndi-name>
              > </message-driven-descriptor>
              > </weblogic-enterprise-bean>
              > </weblogic-ejb-jar>
              >
              > Am i missing something somewhere?????
              > any help in this is highly appreciated..
              >
              > thanks in advance.
              >
              > r
              > sasi
              

  • JMS queue notification delays

    We've noticed that when we import large calendars that there is a delay in some of the events propagating to attendee calendars. We assume that there is some sort of a delay or backlog in the JMS queue.
    1) how do you monitor the delay? I tried looking at NumMsgsIn and NumMsgsOut in mbean = com.sun.messaging.jms.server:desttype=t,name="DavNotificationTopic",subtype=Monitor,type=Destination. I expected to see NumMsgsIn greater than NumMsgsOut during the period of sync delay, but they were actually pretty equal the whole time.
    2) how do you tune the server to reduce or eliminate the delay?

    Yes and no. Yes, scheduling messages are deposited into individual users outboxes when the PUT on the calendar collection happens. But those scheduling messages are not removed from there immediately once processed (although they are purged after some time). A global internal queue is processing those messages asynchronously, adding the corresponding event into attendees calendars as needed.
    If you have a large calendar with a lot of events, themselves with a lot of attendees, the queue can grow quite large and take some time to process all those scheduling messages. There is currently no way to monitor this internal queue (well, unless you are ready to play with some SQL commands). On the other hand, by looking at the scheduling log, you can track the gap between messages that have been enqueued (second column is "E") and messages that have been delivered ("DL" or "DE", "DM" or "R"). It should come down to zero when all are processed. By looking at the 4th column, you can track the processing of a particular event (it corresponds to the event UID).

Maybe you are looking for

  • Difference between Federated single sign on  and just Single sign on

    Can anyone please give a clear definition of what is 1. Federated Single sign on? 2. Just Single Sign on ? As a security expert if you were to Architect security what will you suggest ? Lets take an example Landscape NW1(ABAP + JAVA)- system, NW-2(AB

  • How to create your own theme?

    Is it possible to create your own theme for use with iDVD? I know there are some commercially available (e.g. www.ithemez.com), but what tools are needed to create your own? Thanks, Pete.

  • FACEBOOK crashes

    Hi everyone I have serious problem with facebook app (both, from BB World and Android .bar). After launch, message appears: "Serious problem. Try later" My device is: Z10 STL 100-2 10.2.0.424 OS version: 10.2.0.1791 radio: 10.2.0.1972 webkit: 10.2.0.

  • Shipping instructions  not  cpoying  correctly  from  sto  to  delivery

    hi , i  am  facing  issue  like  shipping  instructions  from  STO  header  are  not  getting  copied  correctly   to  delivery  , what  may  be  the  problem  , please  help. regards, veeru. Moderator message: please do more research before asking,

  • Win XP wont recognize the 400GB USB external HDD

    I just bought a external 400gb hdd from toshiba, usb 2.0 no psu says plug and play right on the box and windows xp wont recognize it. The little blue led comes on, but nothing works at all. The only thing that happened once, is I THINK xp recognized