WebLogic 12.1.2 erases subdeployment on Distributed Queue when targeted to multiple JMS Servers

Update: verified in a 12.1.1.0 (JDK6) cluster - bug does not occur there.
Hi,
  I have been migrating an 10.3.5.0 server to WebLogic 12.1.2.0 and have been unable to keep the subdeployment dropdown populated in the subdeployment tab of a uniform distributed queue when the subdeployment targets more than 1 JMS Server.
  If I uncheck one of the servers - I work fine - however I would like to target all JMS Servers in the cluster - this used to work fine in 10.3.5.0
  Following
http://docs.oracle.com/cd/E24329_01/apirefs.1211/e24401/taskhelp/jms_modules/distributed_queues/CreateUniformDistributedQueues.html
  I am able to create a new queue no problem against the multiple-server subdeployment - but when I navigate to the subdeployment dropdown - the target is erased with "None".
If I save the subdeployment after setting it during the queue create - it is erased
<sub-deployment-name>MW-JMS-SubDeployment</sub-deployment-name>
Before:
<weblogic-jms xmlns="http://xmlns.oracle.com/weblogic/weblogic-jms" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-jms http://xmlns.oracle.com/weblogic/weblogic-jms/1.1/weblogic-jms.xsd">
  <uniform-distributed-queue name="HousekeeperControlQueue">
    <sub-deployment-name>MW-JMS-SubDeployment</sub-deployment-name>
    <jndi-name>jms/HousekeeperControlQueue</jndi-name>
  </uniform-distributed-queue>
</weblogic-jms>
After:
<weblogic-jms xmlns="http://xmlns.oracle.com/weblogic/weblogic-jms" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-jms http://xmlns.oracle.com/weblogic/weblogic-jms/1.1/weblogic-jms.xsd">
  <uniform-distributed-queue name="HousekeeperControlQueue">
    <jndi-name>jms/HousekeeperControlQueue</jndi-name>
  </uniform-distributed-queue>
</weblogic-jms>
Workaround:
- upon server startup the config is valid - just dont re-save the jms module or the subdeployment target will be erases
- also when creating a new subdeployment you will be able to select it from a jms distributed queue in the advanced targeting section even if it contains expected multiple JMS servers
- you will not however be able to edit the JMS queue once created - if there is any change to targeting - recreating the queue is required
  thank you
  /michael

Update: verified in a 12.1.1.0 (JDK6) cluster - bug does not occur there.
Hi,
  I have been migrating an 10.3.5.0 server to WebLogic 12.1.2.0 and have been unable to keep the subdeployment dropdown populated in the subdeployment tab of a uniform distributed queue when the subdeployment targets more than 1 JMS Server.
  If I uncheck one of the servers - I work fine - however I would like to target all JMS Servers in the cluster - this used to work fine in 10.3.5.0
  Following
http://docs.oracle.com/cd/E24329_01/apirefs.1211/e24401/taskhelp/jms_modules/distributed_queues/CreateUniformDistributedQueues.html
  I am able to create a new queue no problem against the multiple-server subdeployment - but when I navigate to the subdeployment dropdown - the target is erased with "None".
If I save the subdeployment after setting it during the queue create - it is erased
<sub-deployment-name>MW-JMS-SubDeployment</sub-deployment-name>
Before:
<weblogic-jms xmlns="http://xmlns.oracle.com/weblogic/weblogic-jms" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-jms http://xmlns.oracle.com/weblogic/weblogic-jms/1.1/weblogic-jms.xsd">
  <uniform-distributed-queue name="HousekeeperControlQueue">
    <sub-deployment-name>MW-JMS-SubDeployment</sub-deployment-name>
    <jndi-name>jms/HousekeeperControlQueue</jndi-name>
  </uniform-distributed-queue>
</weblogic-jms>
After:
<weblogic-jms xmlns="http://xmlns.oracle.com/weblogic/weblogic-jms" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-jms http://xmlns.oracle.com/weblogic/weblogic-jms/1.1/weblogic-jms.xsd">
  <uniform-distributed-queue name="HousekeeperControlQueue">
    <jndi-name>jms/HousekeeperControlQueue</jndi-name>
  </uniform-distributed-queue>
</weblogic-jms>
Workaround:
- upon server startup the config is valid - just dont re-save the jms module or the subdeployment target will be erases
- also when creating a new subdeployment you will be able to select it from a jms distributed queue in the advanced targeting section even if it contains expected multiple JMS servers
- you will not however be able to edit the JMS queue once created - if there is any change to targeting - recreating the queue is required
  thank you
  /michael

Similar Messages

  • JMS for WebLogic Server 9.2. Members of distribute queues

    I don't understand concept of the distributed queues. As far as I understand, distributed queues consist of physical queues. How do I create physical queus for distributed queues ? What is the Members tab for Distributed queue ? If I have non-persistent distributed queu , can I have a distributed q that points to the cluster that doesn't have a JMS ?

    Hi,
    I was able to figure out the root cause. I was using the primitive data type "int" for primary key and foreign key for one of the beans in the relationship. After I changed it to "Integer" wrapper type, the issue got resolved.
    -Vinod

  • OSB distributed queue proxy configuration

    I have set up a distributed queue in WeblogicServer and I wonder how should I configure OSB proxy to consume JMS messages from it. I have read documentation at Oracle site and it says a distributed queue groups a bunch of local JMS queues in different servers that can be accesed through a common JNDI name. This provide load balancing and failover to messages put in the queue.
    In OSB proxy a JMS destination is configured with following URL: jms://server:port/destination. So if I have a distributed queue that maps to two JMS servers, what server and port must I set in proxy URL? Do I need to setup two different proxies, one for JMS server1 and another for JMS server2?
    Regards,
    DC.

    For weblogic JMS message producer load balancing happens at 3 different places.
    1- For intial context lookup - this depends upon the URI you specify in the Initial Context Call. e.g. if you specify t3://localhost:7002,localhost:7003 , all context lookups happen on port 7002. Port 7003 is used only if 7002 is down. Thus this supports failover instead of load balancing. If you want load balancing for context lookup then you have to use a dns based cluster address where dns does the name resolution to a different address each time.
    2- When a jms connection is created. The jms connection can be created to any managed server to which the Connection factory is targeted to. Thus you can have your context lookup on 7002 , but the actual jms connection can get created on 7003. If server affinity is enabled for the connection factory then the jms connection will be created to the same managed server instance as on which context lookup happened.
    3- When a message Producer send is executed. The message send can land on any dd member in the cluster if load balancing is enabled. If server affinity is enabled, then the message will end up on dd member on the same managed server instance to which the jms connection was made. For e.g. assume you have your jms client app has a jms connection on ms1 and the message produced ends up on ms2, then the following path would have been taken.
    jms client app --------Over jms connection-------> ms1 -------internally forwards ----------> ms2 ------puts message ---> dd2
    I would recommend you to read the JMS chapter of Professional Oracle Weblogic Server book where this is explained clearly.

  • Creating a MDB and Distributed Queue in Clustered env in weblogic 9.2

    I have created 3 managed servers and all these managed servers are in the cluster.
              Now i create JMS module for this cluster and create the Connection factory 'QUEUE_CF_8' and distributed Queue 'DIS_QUEUE_8' targeting to the cluster.
              I create a MDB and JMS client and deploy them in the cluster.JMS client sends the message to the distributed queue and MDB is listening to the distributed queue
              When i deploy the MDB , it is deploys perfectly . But when i run the client it fails with the following exception
              [java] javax.naming.NameNotFoundException: Unable to resolve 'QUEUE_CF_8'. Resolved '' [Root exception is javax.naming.NameNotFoundException: Unable to resolve 'QUEUE_CF_8'. Resolved '']; remaining name 'QUEUE_CF_8'
              When i view the JNDI tree for all the managed servers , i can see the Connection factory and the distributed queue.
              Also i deploy the MDB to the cluster and no submoduletargets are specified.
              Let me know what is that iam missing.

    <?xml version='1.0' encoding='UTF-8'?>
              <weblogic-jms xmlns="http://www.bea.com/ns/weblogic/90" xmlns:sec="http://www.bea.com/ns/weblogic/90/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls" xsi:schemaLocation="http://www.bea.com/ns/weblogic/920 http://www.bea.com/ns/weblogic/920.xsd">
              <connection-factory name="Queue_CF_8">
              <sub-deployment-name>Server_group_4</sub-deployment-name>
              <jndi-name>QUEUE_CF_8</jndi-name>
              <security-params>
              <attach-jmsx-user-id>false</attach-jmsx-user-id>
              </security-params>
              </connection-factory>
              <uniform-distributed-queue name="DIS_QUEUE_8">
              <sub-deployment-name>Server_group_4</sub-deployment-name>
              <jndi-name>DIS_QUEUE_8</jndi-name>
              <load-balancing-policy>Round-Robin</load-balancing-policy>
              </uniform-distributed-queue>
              </weblogic-jms>
              But the problem was with the clustering.
              Thanks for your time..

  • Queue vs Distributed queue

    Hi Guys,
    Could you please help me resolve some doubts on Regular Queue and Distributed Queues.
    1. What is the basic Difference between regular q and distributed q.
    2. Can we deploy the regular q on clustered weblogic, If yes, how will this be different from deploying a distributed q on cluster.
    Regards

    Hi,
    Queue or Distributed Queue had same set of working design but only one difference is one queue is set for one pinned services where as Distributed queue is targeted to Cluster that means, One distirbuted queue can have multiple queue which are targeted to individual managed server or JMS server.
    I hope you know difference between Uniform distributed queue and Distributed queue.
    Uniform Distributed queue will created its own temporary queue destination on run time where as Distributed queue will required physical queue to assigned with in clustere.
    Hope I address your query.
    Regards,
    Kal

  • Programming for Using JMS Distributed Queues

    Hi,
    Does anyone know specifically how your meant to write java code in order to fully make use of JMS Distributed queues. At the moment we have a 3rd party app, which I don't think is written correctly, as it always locks up after using a distributed queue, or a consumer is at 0 on one of the members of the distributed queue, when it should always should be constant and uniform.
    Its as if their code hasn't been written correctly.

    Distributed queue applications are encouraged to leverage WebLogic MDBs, which automatically ensure that consumers are attached to each distributed queue member, and to write applications in a way that has no dependency on which JVM a particular message is processed.
    At a guess, the third party product is setting up a consumer on one member of the distributed Q, while messages are being produced to the other member. If this assumption is true, here are some thoughts:
    * Consider using a single Q for the third party product's usage instead of a distributed queue. Configuring a distributed queue is not adding any high availability, as the product is expecting all messages to pin to the same Q instance.
    * Producers and consumers load-balance independently, but, when "affinity" and "load balance" are both configured to false on a Producer's connection factory, producers will have a tendency to load balance to the member that hosts more than one consumer. This might help somewhat, but my guess is that it won't help in all cases -- for example, after a restart I'm not sure that there's a guarantee that the consumer won't load balance to the "wrong" member (the member that has no messages).
    * It might help to enable "queue forwarding" on the distributed queue configuration. This feature automatically forwards messages trapped in a destination that has no consumers to a queue that has consumers. "Queue forwarding" is not compatible with WebLogic's "unit-of-order" feature, but it's likely the third party product isn't using this feature. Queue forwarding also imposes a performance penalty - but whether you notice the difference depends on whether you have high performance requirements.
    Hope this helps,
    Tom
    Edited by: TomB on Mar 9, 2011 6:28 PM

  • Using distributed queues and factories in a weblogic cluster

    Hi all,
    in our environment we have a domain which has two machines. One is running the AdminServer and Node1 and the 2nd machine is running Node2.
    For each Node I have created a JMS Server and a corresponding file store located at each machine.
    I've also created a JMS Module containing our required queues, factories and topics. Queues and Topics are of the Uniform Distributed type.
    I've targeted this module at the cluster and experimented with creating a subdeployment. But from what I recon, since all my resources have default targeting
    enabled, a subdeployment is not required, they target what is targeted by the JMS Module, right?
    However I get an exception when both nodes are up:
    <Nov 4, 2008 11:47:01 AM EET> <Warning> <JMS> <BEA-040498> <An error occurred while forwarding a message for distributed destination member       
    MyJMSModule!MyJMSServer@myTopic: weblogic.messaging.dispatcher.DispatcherException: java.rmi.RemoteException: Couldn't connect to weblogic.rjvm.RJVMImpl@187766d - id: '-1415064081927280896S:10.0.0.5:
    [7001,7001,-1,-1,-1,-1,-1]:app1:7003,app2:7001:my_domain        :NodeApp2' connect time: 'Tue Nov 04 11:47:01 EET 2008' - it is likely that the connection has already been shut down; nested exception is:
    5564732         java.rmi.ConnectException: Couldn't connect to weblogic.rjvm.RJVMImpl@187766d - id: '-1415064081927280896S:10.48.92.70:[7001,7001,-1,-1,-1,-1,-1]:app1:7003,app2:7001:my_domain:NodeApp2'
    connect time: 'Tue Nov 04 11:47:01 EET 2008' - it is likely that the connection has already been shut downThe two nodes are up and running and the node managers as well. Is this the correct way to create the queues and topics for a clustered environment?
    Thanks
    Edited by: dvm on Nov 4, 2008 3:12 AM

    I've done the steps but the problem still persists. I don't know if I had this before, but now both machines can't see each other.
    From Node1 logs *.out file:
    <Warning> <JMS> <BEA-040498> <An error occurred while forwarding a message for distributed destination member MyJMSModule!MyJMSServer2@my_cacheTopic:
    weblogic.messaging.dispatcher.DispatcherException: java.rmi.RemoteException:
    Couldn't connect to weblogic.rjvm.RJVMImpl@62017d - id: '4786464166486913267S:10.48.92.70:[7001,7001,-1,-1,-1,-1,-1]:app1:7003,app2:7001:my_domain:NodeApp2'
    connect time: 'Wed Nov 05 16:03:53 EET 2008' - it is likely that the connection has already been shut down; nested exception is:
    java.rmi.ConnectException: Couldn't connect to weblogic.rjvm.RJVMImpl@62017d - id: '4786464166486913267S:10.48.92.70:[7001,7001,-1,-1,-1,-1,-1]:app1:7003,app2:7001:my_domain:NodeApp2'
    connect time: 'Wed Nov 05 16:03:53 EET 2008' - it is likely that the connection has already been shut downand from Node2 logs *.out file:
    <Warning> <JMS> <BEA-040498> <An error occurred while forwarding a message for distributed destination member MyJMSModule!MyJMSServer1@my_cacheTopic:
    weblogic.messaging.dispatcher.DispatcherException: java.rmi.RemoteException:
    Couldn't connect to weblogic.rjvm.RJVMImpl@24b64a - id: '-788798942991630857S:10.48.92.69:[7003,7003,-1,-1,-1,-1,-1]:app1:7003,app2:7001:my_domain:NodeApp1'
    connect time: 'Wed Nov 05 16:03:59 EET 2008' - it is likely that the connection has already been shut down; nested exception is:
    java.rmi.ConnectException: Couldn't connect to weblogic.rjvm.RJVMImpl@24b64a - id: '-788798942991630857S:10.48.92.69:[7003,7003,-1,-1,-1,-1,-1]:app1:7003,app2:7001:my_domain:NodeApp1'
    connect time: 'Wed Nov 05 16:03:59 EET 2008' - it is likely that the connection has already been shut downThis happens just after the managed servers have been started with the application previously deployed.

  • Issue with Distributed Queue and WebLogic Clustering

    Hi, When a message is received by distributed queue, MDB is processing the message on two managed servers. There seems to be issue with clustering and the physical queues present on both the managed servers are receving the message.
    Our environment configuration details are as below:
    One Web logic Cluster with 2 nodes (2 managed web logic servers).
    One MDB deployed on the cluster listening to a queue with JNDI name “xng/jms/CODEventsQueue”
    One Distributed queue with two members on the two nodes of the cluster, and with JNDI name “xng/jms/CODEventsQueue”
    Two members of the distributed queue deployed on two JMS servers, which are separately deployed on each managed server .
    And the distributed queue is deployed on the cluster.
    Any help is appreciated.
    Thanks
    Sampath

    It is not clear to me how you concluded that "both the managed servers are receiving the message". Did you monitor the queues' statistics, or did you see both MDB instances received the same message?
    It looks like that you using a weighted distributed queue. Do the two physical queues that compose the distributed queue have their own JNDI names? If so, what are they?
    Have you tried to use a uniform distributed queue and see if the same behavior shows up?
    You can find more about uniform distributed destination at
    http://edocs.bea.com/wls/docs103/jms/dds.html#wp1313713
    BTW, which WebLogic Server releases are you using? Could you provide the distributed queue configuration?
    Thanks,
    Dongbo

  • Can distributed queues be implemented in weblogic 6.1

              hi,
              i am currently using weblogic 6.1 with 3 machines on a cluster.when using jms
              there seems to be no way to use distributed queues on the machine.this feature
              is however supported in weblogic 7.0.is there any workaround for this.this wuld
              essentially mean a single point of failure as the queue wuld be present on only
              1 wlserver and the other 2 servers though in cluster wuldnt have any reference
              to this queue..
              any help???
              

    The JMS Performance Guide white-paper contains examples
              of doing exactly this. You can find it here:
              http://dev2dev.bea.com/technologies/jms/index.jsp
              Illusionz wrote:
              > hi,
              > i am currently using weblogic 6.1 with 3 machines on a cluster.when using jms
              > there seems to be no way to use distributed queues on the machine.this feature
              > is however supported in weblogic 7.0.is there any workaround for this.this wuld
              > essentially mean a single point of failure as the queue wuld be present on only
              > 1 wlserver and the other 2 servers though in cluster wuldnt have any reference
              > to this queue..
              > any help???
              

  • JMS Timestamp in a Uniform Distributed Queue on Weblogic Console

    Dear Experts,
    I should need a clarification on how JMS Timestamp is valorized in a Uniform Distributed Queue. I explain me better :
    I will use the JMS Timestamp to re-order messages fetched from the Uniform Distributed Queue. Is it reliable ? How can I synchronize the this JMS property to be sure it is not dependent from physical machine where Uniform Distributed Queue is deployed ?
    Thanks a lot,
    Mike

    Try posting this in the weblogic jms forum : WebLogic Server - JMS where you might get help from Tom Barnes who is the weblogic jms development team lead.
    As far as I know time synchronization across machines should be a routine task for system admins. We had windows environment , where it was done using windows time service. The time server was configured on the domain controller and the time service running on the windows nodes periodically resynchronized its time with that of the time server.

  • Monitoring jms distributed queue on WebLogic 8.1 via MBeans

    Good afternon,
    please do you have someone java code (only basic enough !) for jmx monitoring jms distributed queue on weblogic 8.1 (Monitor all Active JMS Destinations and there Consumers, Consumers High, Consumers Total and so on..). Think should be used JMSDestinationRuntimeMBean interface but have no idea how write the code.
    Thank you for any hint
    Lada Dvorak

    This is a simple jmx sample code based on WLS 8.x
    import javax.naming.Context;
    import java.util.Set;
    import java.util.Iterator;
    import java.io.PrintWriter;
    import java.io.FileOutputStream;
    import weblogic.jndi.Environment;
    import weblogic.management.MBeanHome;
    import weblogic.management.WebLogicMBean;
    import weblogic.management.WebLogicObjectName;
    public class ListAllMBeans{   
         public static void main(String args[]) {       
              String url = "t3://localhost:7001";
              String username = "weblogic";
              String password = "weblogic";
              PrintWriter pWriter = null; // print without buffering
    try {            //Obtaining an MBeanHome Using JNDI           
                   Environment env = new Environment();
                   env.setProviderUrl(url);
                   env.setSecurityPrincipal(username);
                   env.setSecurityCredentials(password);
                   Context ctx = env.getInitialContext();
                   MBeanHome home = (MBeanHome)ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);
    Set allMBeans = home.getAllMBeans();
                   System.out.println("Size: " + allMBeans.size());
                   for (Iterator itr = allMBeans.iterator(); itr.hasNext(); ) {              
                        WebLogicMBean mbean = (WebLogicMBean)itr.next();
                        WebLogicObjectName objectName = mbean.getObjectName();
                        pWriter = new PrintWriter(new FileOutputStream("JMXType.txt", true), true);
                        pWriter.println(objectName.getName() + " is a(n) " + mbean.getType());
                        //System.out.println(objectName.getName() + " is a(n) " + mbean.getType());
              }catch(Exception e){           
                   System.out.println(e);
    I hope this will be helpful to you.

  • Distributed queue weblogic 6.1

              hi,
              i have simulated distributed queues on 6.1.
              there are 2 wls in a cluster. jndireplication is set to 'false' for the queues
              in both these servers.
              the queuenames are same and the jndi name is same as well.
              now i have a remote listener which needs to listen.my question is by connecting
              to one wls in the cluster (for eg server 1) , can i receive messages from the
              queue in server 2(both queues have same name and jndi name and targeted by the
              same conn factory ).
              i have tried , and the listener only seems to listen to the machine which it connects
              to intially and not the entire cluster...
              any help?????
              

              illusionz wrote:
              > hi,
              > i have simulated distributed queues on 6.1.
              > there are 2 wls in a cluster. jndireplication is set to 'false' for the queues
              > in both these servers.
              > the queuenames are same and the jndi name is same as well.
              >
              > now i have a remote listener which needs to listen.my question is by connecting
              > to one wls in the cluster (for eg server 1) , can i receive messages from the
              > queue in server 2(both queues have same name and jndi name and targeted by the
              > same conn factory ).
              > i have tried , and the listener only seems to listen to the machine which it connects
              > to intially and not the entire cluster...
              I'm wondering if you don't realize that JMS consumers
              pin themselves to a particular destination instance
              whence created. The same consumer can't be used to
              to listen to multiple destinations.
              Assuming that you do realize the above,
              this is a deliberate design of the distributed destination emulation
              example from the JMS Performance white-paper that
              you are following. The load-balancing
              decision is made by the connection host. Otherwise there
              would be no way to load-balance queues with the same JNDI name.
              So you have a few choices:
              (1) As Shean Chang states - you can lookup the exact destination via
              createQueue(jmsServerName + "/" + jmsQueueName) - where jmsQueueName
              is not the JNDI name of the destination, it is the configuration
              name.
              (2) Create a differently named/differently jndi-named
              connection factory for each server - and look up that.
              (3) Create a few connections to randomize which
              server's become the connection host.
              >
              > any help?????
              

  • JMS Uniform Distribute Queue Unit Of Order, problem when one node goes down

    Hi ,
    I have the following code which post a message (with Unit of Order set ) to a Uniform Distribute Queue in a cluster with two member servers (server1 and server2).
    --UDQ is targeted to a subdeployment that is mapped to two JMS servers pointing to each member servers
    --Connection Factory is using default targeting ( i tried mapping to Sub deployment also)
    javax.naming.InitialContext serverContext = new javax.naming.InitialContext();
    javax.jms.QueueConnectionFactory qConnFactory = (javax.jms.QueueConnectionFactory)serverContext.lookup(jmsQConnFactoryName);
    javax.jms.QueueConnection qConn = (javax.jms.QueueConnection)qConnFactory.createConnection();
    javax.jms.QueueSession qSession = qConn.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
    javax.jms.Queue q = ( javax.jms.Queue)serverContext.lookup(jmsQName);
    weblogic.jms.extensions.WLMessageProducer qSender = (weblogic.jms.extensions.WLMessageProducer) qSession.createProducer(q);
    qSender.setUnitOfOrder("MyUnitOfOrder");
    javax.jms.ObjectMessage message = qSession.createObjectMessage();
    HashMap<String, Object> map = new HashMap<String, Object>();
    map.put("something", "SomeObject");
    message.setObject(map);
    qSender.send(message);
    } catch (Exception e) {           
    Steps followed:
    1. Post a message from "server1"
    2. Message picked up by "server2"
    3. Everything fine
    4. Shutdown "server2"
    5. Post a message from "server1"
    6. ERROR: "hashed member of MyAppJMSModule!MyDistributedQ is MyAppJMSModule!MyJMSServer-2@MyDistributedQ which is not available"
    WebLogic version : 10.3.5
    Is there a way (other than configuring Path Service ) to make this code work "with unit of order" for a UDQ even if some member servers go down ?
    Thanks very much for your time.

    If you want to avoid use of the Path Service, then the alternative is to make the destination members highly available. This will help ensure that the host member for a particular UOO is up.
    One approach to HA is to configure "service migration". For more information see the Automatic Service Migration white-paper at
    http://www.oracle.com/technology/products/weblogic/pdf/weblogic-automatic-service-migration-whitepaper.pdf
    In addition, I recommend referencing Best Practices for JMS Beginners and Advanced Users
    http://docs.oracle.com/cd/E17904_01/web.1111/e13738/best_practice.htm#JMSAD455 to help with WL configuration in general.
    Hope this helps,
    Tom

  • Reading messages from all distributed queues on a cluster (WLS 9.2)

    Hi,
    I have a following problem with distributed queues on WebLogic Server 9.2 MP1.
    Here's a brief description of my setup:
    I've got a cluster called 'myCluster', and two cluster nodes on it, 'nodeA' and 'nodeB'. I also have two JMS servers, 'jmsA' and 'jmsB'. Then I have a jms module 'myModule' with a subdeployment 'mySubdeployment' targeted on jms servers 'jmsA' and 'jmsB'. I have a jms connection factory 'TestFactory' that is targeted on myCluster (default targetting), and a jms queue 'TestQueue' (Uniform Distributed Queue) using subdeployment 'mySubdeployment' (targeted to 'jmsA' and 'jmsB').
    Now, the queue 'TestQueue' is used as a location where messages are stored when the system has met a problem in the environment that is preventing the normal handling of messages. Messages are kept in this queue until the problem is over, that's when the system administrator uses a browser application that requests the system to read the messages and handle them normally.
    The problem is that the cluster node which gets the request seems to be able to read only its own queue and the messages on the other nodes queue are left untouched. I know that I could send a message to the another node for example via topic 'purge_your_messages', but that's not suitable for this case. I need to sort the messages by their ids (set as a message property) and because of that I need exactly one node executing the purge.
    Any advice?
    - jj
    Edited by: user5736915 on 10-Dec-2008 14:10

    Browsers and receivers always attach to a single member of a distributed destination.
    WebLogic MDBs, on the other hand, automatically handle the task of attaching receivers to every member, and are quite simple to code and use these days. If you have the option of using WL MDBs, I recommend using them. (There's no equivalent for browsers.)
    Spring won't do the same OOTB, but there does appear to be a work-around for the Spring receiver issue (albeit not for browsers - just receivers). Here's a sample Spring impl that attaches a subscription to each and every member of a distributed topic:
    http://sleeplessinslc.blogspot.com/2011/12/weblogic-jms-partitioned-distributed.html.
    If the above isn't helpful, and you must cycle through every message on every server in the cluster, then you'll need write special case code to check each separately. There are two common options for enumerating the destinations and working with each one - the JMX mbean "message management" APIs (WLST Jython scripting or Java based) and the weblogic.jms.extensions destination availability APIs.
    HTH,
    Tom

  • How to process one message at a time on a distributed queue

    I have a situation where I need to execute/process a task of a type
              asynchronously and this should be done one at a time. To do that I am thinking of setting
              up a distributed queue (for load balancing and failover). Now I have
              this requirement that only one task should be processed at one time. So
              for example if two messages (m1 followed by m2) are sent to distributed
              queue and I have the distributed queue which points to two physical
              queues on two different instances of weblogic(wl1 and wl2), the
              distributed queue will likely send m1 to wl1 and m2 to wl2 (assuming
              distributed queue is setup with round robin policy). If m1 has started
              executing/processing in my MDB on wl1, I do not want start processing
              m2 on wl2 untill m1 has been processed by wl1. Is it possible to do
              this on weblogic 8.1 JMS?
              If this is not supported I was thinking of implementing a database
              based locking framework and each mdb will use that framework to check
              if a task of a particular type is being processed before processing a
              new task. Also in this case I will need to use max. 1 mdb for each
              queue on each weblogic server.
              --Navjeet                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hello navjeet,
              I don't think there are any parameters that you can set on a distributed queue to ensure messages are handled in the sequential manner you describe so it looks like you will have to implement your own locking mechanism.
              In reposponse to your other question you can set the number of MDbeans in the free pool to 1 (or the number of queues you have) in the MDBean deployment descriptor.
              see:
              http://e-docs.bea.com/wls/docs81/ejb/message_beans.html#1120592
              Cheers,
              Hoos

Maybe you are looking for