Re: Pause a MDB?

Variation of (2): Additionally configure a
          redelivery delay on the destination (via the console or mbeans). This
          reduces spin, but is not viable if the queue sees heavy use (many messages
          per second), or if message order is important.
          Or (3) have MDB "pause" itself using "wait()" or "sleep()". (Just make
          very
          sure that the MDB pool size is smaller than the execute thread pool size,
          or you will run out of threads.)
          Tom
          Bill Nixon wrote:
          > I have an application that consume messages from a JMS queue via a
          > MDB. At certain times, I'd like to be able to pause the MDB or queue,
          > i.e. stop the container from invoking onMessage(). Once some critical
          > processing has completed, I'd like to unpause.
          >
          > Two solutions that we have tossed around are:
          >
          > 1. Undeploy and then redeploy the MDB. (Not very elegant or production
          > ready).
          >
          > 2. In onMessage(), using a Read-Mostly Entity Bean, check for the
          > condition and if "pausing" then don't acknowledge the message, forcing
          > the message to be redelivered. (Bad design that conceptually is a busy
          > wait).
          >
          > Any other options or suggestions?
          >
          > Thanks in advance.
          

          Peter Lee wrote:
          > Have you tried using JMX to call weblogic.management.runtime.
          > JMSDestinationRuntimeMBean.pause()/resume()?
          This prevents sends, not receives, and so doesn't apply here.
          >
          > If you are integrating with foreign JMS providers via the message bridge,
          > you can use weblogic.management.runtime.RuntimeMBean.
          > MessagingBridgeRuntimeMBean.start()/stop(), or you may find that you
          > need to call weblogic.management.configuration.MessagingBridgeMBean.
          > setEnabled(boolean).
          Good point.
          >
          > Srini <[email protected]> wrote:
          >
          >>Hi Tom,
          >>
          >>Do you know if this (Pausing the MDB) is implemented, or not yet? If
          >>it's implemented, can you please indicate the version?
          >>
          >>Anyone else has any better solution apart from introducing a wait or
          >>sleep (assuming that BEA has not implemented this enhancement as yet)?
          >>
          >>
          >>Please help!
          >>Srini
          >
          >
          

Similar Messages

  • Suspending/Pausing a MDB's Consumption Programmatically

    Hey guys
    I have come across a lot of forums saying that there are new methods available from Weblogic 9 that enable the suspension of a MDB's consumption but I can not find any examples of it. Does anyone by any chance have an example of this?
    I am using Weblogic 10.3. Is it possible? I have been stuck on this for a while now and I really have no where to turn... Java code would be so awesome right now. All I am trying to do is emulate what happens when you click on Suspend MDB in the console of weblogic so that messages can be added to the queue and not get processed then once resumed (maybe from the console) the MDB would carry on processing the messages.
    Thanks for any help

    Thanks Albert, with your help I have come to a solution
    Here is an example of the code I think is the best option:
    import java.util.Hashtable;
    import javax.management.MBeanServerConnection;
    import javax.management.ObjectName;
    import javax.management.remote.JMXConnector;
    import javax.management.remote.JMXConnectorFactory;
    import javax.management.remote.JMXServiceURL;
    import javax.naming.Context;
    public class StopTheBean implements Runnable{
         public void stopTheBean() {
              Thread runner = new Thread(this);
              runner.start();
         public void run() {
              try {
                   String hostname = "127.0.0.1";
                   String portString = "7001";
                   String username = "weblogic";
                   String password = "weblogic";
                   String protocol = "t3";
                   Integer portInteger = Integer.valueOf(portString);
                   int port = portInteger.intValue();
                   String jndiroot = "/jndi/";
                   String mserver = "weblogic.management.mbeanservers.runtime";
                   JMXServiceURL serviceURL = new JMXServiceURL(protocol, hostname, port, jndiroot + mserver);
                   Hashtable<String, Object> h = new Hashtable<String, Object>();
                   h.put(Context.SECURITY_PRINCIPAL, username);
                   h.put(Context.SECURITY_CREDENTIALS, password);
                   h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES, "weblogic.management.remote");
                   h.put("jmx.remote.x.request.waiting.timeout", new Long(10000));
                   JMXConnector connector = JMXConnectorFactory.connect(serviceURL, h);
                   MBeanServerConnection connection = connector.getMBeanServerConnection();
                   Hashtable<String, String> prop = new Hashtable<String, String>();
                   prop.put("Name", "SuspendBean_SORBModule!SORBOrderRequest_Q");
                   prop.put("Type", "MessageDrivenEJBRuntime");
                   prop.put("ServerRuntime", "Local_Admin");
                   prop.put("ApplicationRuntime", "SuspendMDBEAR");
                   prop.put("EJBComponentRuntime", "SuspendMDB.jar");
                   ObjectName beanName = new ObjectName("com.bea", prop);
                   connection.invoke(beanName, "suspend", null, null);
                   System.out.println("MDB Stopped");
                   connector.close();
              } catch (Exception e) {
                   System.out.println(e.toString());
    }Here is another example using a web service instead of a new thread:
    import java.util.Hashtable;
    import javax.jws.*;
    import javax.management.MBeanServerConnection;
    import javax.management.ObjectName;
    import javax.management.remote.JMXConnector;
    import javax.management.remote.JMXConnectorFactory;
    import javax.management.remote.JMXServiceURL;
    import javax.naming.Context;
    @WebService
    public class StopTheBean {
         @WebMethod
         public void beginTheSuspend() {
              try {
                   String hostname = "127.0.0.1";
                   String portString = "7001";
                   String username = "weblogic";
                   String password = "weblogic";
                   String protocol = "t3";
                   Integer portInteger = Integer.valueOf(portString);
                   int port = portInteger.intValue();
                   String jndiroot = "/jndi/";
                   String mserver = "weblogic.management.mbeanservers.runtime";
                   JMXServiceURL serviceURL = new JMXServiceURL(protocol, hostname, port, jndiroot + mserver);
                   Hashtable<String, Object> h = new Hashtable<String, Object>();
                   h.put(Context.SECURITY_PRINCIPAL, username);
                   h.put(Context.SECURITY_CREDENTIALS, password);
                   h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES, "weblogic.management.remote");
                   h.put("jmx.remote.x.request.waiting.timeout", new Long(10000));
                   JMXConnector connector = JMXConnectorFactory.connect(serviceURL, h);
                   MBeanServerConnection connection = connector.getMBeanServerConnection();
                   Hashtable<String, String> prop = new Hashtable<String, String>();
                   prop.put("Name", "SuspendBean_SORBModule!SORBOrderRequest_Q");
                   prop.put("Type", "MessageDrivenEJBRuntime");
                   prop.put("ServerRuntime", "Local_Admin");
                   prop.put("ApplicationRuntime", "SuspendMDBEAR");
                   prop.put("EJBComponentRuntime", "SuspendMDB.jar");
                   ObjectName beanName = new ObjectName("com.bea", prop);
                   connection.invoke(beanName, "suspend", null, null);
                   System.out.println("MDB Suspended");
                   connector.close();
              } catch (Exception e) {
                   System.out.println(e.toString());
    }First of all, it has to be on its own thread separate from the MDB otherwise the thread will just hang... Secondly I know the context can be used to get the MBeanServer but it gives errors on authorization. That's why it has to be done this way, so that you can set the username and password to be used. The alternative way looks like this for anyone that is interested:
    InitialContext ctx = new InitialContext();
    MBeanServer server = (MBeanServer) ctx.lookup("java:comp/env/jmx/runtime");And to further this post, these two sections of code return the exact same thing. So if you are struggling with getting the object name of the message bean you can find out what that is with the first of the next two sections of code:
                   ObjectName[] bob = (ObjectName[]) server.getAttribute(new ObjectName("com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean"), "Services");
                   for (ObjectName objectName : bob) {
                        ObjectName serverrt = (ObjectName) server.getAttribute(objectName, "ServerRuntime");
                        ObjectName[] apprt = (ObjectName[]) server.getAttribute(serverrt, "ApplicationRuntimes");
                        for (ObjectName appName : apprt) {
                             if (appName.toString().contains("SuspendMDBEAR")) {
                                  ObjectName[] comprt = (ObjectName[]) server.getAttribute(appName, "ComponentRuntimes");
                                  ObjectName[] ejbrt = (ObjectName[]) server.getAttribute(comprt[0], "EJBRuntimes");
                                  for (ObjectName ejbName : ejbrt) {
                                       server.invoke(ejbName, "suspend", null, null);
                   Hashtable<String, String> prop = new Hashtable<String, String>();
                   prop.put("Name", "SuspendBean_SORBModule!SORBOrderRequest_Q");
                   prop.put("Type", "MessageDrivenEJBRuntime");
                   prop.put("ServerRuntime", "Local_Admin");
                   prop.put("ApplicationRuntime", "SuspendMDBEAR");
                   prop.put("EJBComponentRuntime", "SuspendMDB.jar");
                   ObjectName beanName = new ObjectName("com.bea", prop);
                   server.invoke(beanName, "suspend", null, null);I will REPEAT, the immediate above two sections do the exact same thing. Please note, the variable "server" in these two sections of code refers to the MBeanServer.
    Here are some useful attributes that can be retrieved from the MDB:
                   connection.getAttribute(beanName, "ConnectionStatus");
                   connection.getAttribute(beanName, "Destination");
                   connection.getAttribute(beanName, "EJBName");
                   connection.getAttribute(beanName, "HealthState");
                   connection.getAttribute(beanName, "JmsClientID");
                   connection.getAttribute(beanName, "JMSConnectionAlive");
                   connection.getAttribute(beanName, "LastException");
                   connection.getAttribute(beanName, "LastExceptionAsString");
                   connection.getAttribute(beanName, "MDBStatus");
                   connection.getAttribute(beanName, "Name");
                   connection.getAttribute(beanName, "Parent");
                   connection.getAttribute(beanName, "ProcessedMessageCount");
                   connection.getAttribute(beanName, "SuspendCount");
                   connection.getAttribute(beanName, "Type");I think they all return as Strings. Just check it before you use it!
    I hope this helps anyone that was in my position!
    ENJOY

  • Dynamically undeploying MDBs

              Hi,
              I am using Weblogic 6.1 SP4 - Integrating with MQ5.2 using IBM MQ Classes.
              I have an MDB which points to a MQ Queue. MDB takes the message and delegates
              to specific Java Classes which parse the XML (body of the message) into Java Objects
              and save them into database.
              I have implemented Container Managed transactional MDBs. Before processing the
              message I am checking to see if the database connection is available. If the
              database connection is not available, I am rolling back the message into the Queue.
              The problem is that this is getting into a loop, till the database connection
              is available. (MDB picks up the message and checks up for database connectivity
              and rolls back into the queue).
              The solution that I have thought of doing is to check upto 5 times (just a count
              I have decided), after which I will undeploy the MDBs dynamically. Then I will
              start a new Thread (Thread class) which will check if the database connection
              is available and once the connection is available, I will redeploy the MDB to
              process the message again.
              I have following questions here:
              (1) How to dynamically undeploy & re-deploy MDB
              (2) How can I check Redelivered Count. I know that I can use Message.getJMSRedelivered
              (), which will return me a boolean stating the message is redelivered. If I
              can't check for Redelivered count, then if getJMSRedelivered() is "true", then
              I will undeploy the MDB.
              (3) Will there be any issues/problems in the solution discussed above.
              Thanks in advance for any help.
              Regards,
              Venkatesan.
              

    As I wrote below, I think there is a way, but I don't
              know how. For programmatically undeploying the MDB,
              I suggest posting your needs to the "ejb" newsgroup, which has
              more experience in this area. (I mentioned this already
              in another part of this email thread.)
              Tom
              Sastry wrote:
              > Hi Tom,
              >
              > Is there any way to use weblogic 7.0 JMX API's to suspend a MDB so that it won't
              > process any messages from the queue until the next destination like oracle database
              > connection is up and running.
              >
              > Thanks
              > Sastry
              >
              > Tom Barnes <[email protected]> wrote:
              >
              >>9.0 - I don't know the official release date, but I
              >>imagine its in the latter half of 2004. For now,
              >>there is undeploying the MDBs, or shutting down JMS.
              >>
              >>Tom
              >>
              >>Mikhail Stolpner wrote:
              >>
              >>
              >>>Yes. Exactly.
              >>>What next release do you mean? Is it 8.1SP2 or 9.0?
              >>>
              >>>Thank you very much,
              >>>Mikhail
              >>>
              >>>"Tom Barnes" <[email protected]> wrote in message
              >>>news:[email protected]...
              >>>
              >>>
              >>>>Clarification. You can pause "produces", but not "consumes",
              >>>>using the console or programmatically via JMX.
              >>>>I assumed you meant to pause "consumes".
              >>>>
              >>>>Tom Barnes wrote:
              >>>>
              >>>>
              >>>>
              >>>>>Hi Mikhail,
              >>>>>
              >>>>>There is no direct way. In 7.0 and later you can
              >>>>>programmatically shutdown
              >>>>>the entire JMS server, while leaving the WL server up,
              >>>>>by setting the JMS server mbean's "target"
              >>>>>field to null.
              >>>>>
              >>>>>Note that you can have multiple JMS server's per WL
              >>>>>server.
              >>>>>
              >>>>>Tom
              >>>>>
              >>>>>P.S. A rich featured pause capability is planned
              >>>>>for the next release. This includes the ability
              >>>>>to pause an MDB, as well as an entire destination
              >>>>>in various ways.
              >>>>>
              >>>>>Mikhail Stolpner wrote:
              >>>>>
              >>>>>
              >>>>>
              >>>>>>Hi Tom,
              >>>>>>
              >>>>>>Do you know if there is a way to programmatically pause Weblogic
              >>
              >>Queue?
              >>
              >>>>>>Thanks,
              >>>>>>Mikhail
              >>>>>>
              >>>>>>"Tom Barnes" <[email protected]> wrote in message
              >>>>>>news:[email protected]...
              >>>>>>
              >>>>>>
              >>>>>>
              >>>>>>>Hi,
              >>>>>>>
              >>>>>>>A "redelivered count" requires a vendor extension - JMS does
              >>>>>>>not provide one. Check the MQ doc to see if there is one.
              >>>>>>>
              >>>>>>>Another option is programmatically pause MQ - I'm not sure
              >>>>>>>if there is a way to do this. Again - check the MQ doc.
              >>>>>>>
              >>>>>>>Another option is to simply block the MDB in a try/sleep()
              >>>>>>>retry loop until the database connection comes back up.
              >>>>>>>
              >>>>>>>As for programmatically undeploying the MDB, I suggest
              >>>>>>>posting your needs to the "EJB" newsgroup, which has
              >>>>>>>more experience in this area.
              >>>>>>>
              >>>>>>>Tom
              >>>>>>>
              >>>>>>>Venkatesan wrote:
              >>>>>>>
              >>>>>>>
              >>>>>>>
              >>>>>>>
              >>>>>>>>Hi,
              >>>>>>>>I am using Weblogic 6.1 SP4 - Integrating with MQ5.2 using IBM
              >>
              >>MQ
              >>
              >>>>>>
              >>>>>>Classes.
              >>>>>>
              >>>>>>
              >>>>>>
              >>>>>>>>I have an MDB which points to a MQ Queue. MDB takes the message
              >>
              >>and
              >>
              >>>>>>
              >>>>>>delegates
              >>>>>>
              >>>>>>
              >>>>>>
              >>>>>>>>to specific Java Classes which parse the XML (body of the message)
              >>>
              >>>into
              >>>
              >>>
              >>>>>>Java Objects
              >>>>>>
              >>>>>>
              >>>>>>
              >>>>>>>>and save them into database.
              >>>>>>>>I have implemented Container Managed transactional MDBs. Before
              >>>>>>
              >>>>>>
              >>>>>>processing the
              >>>>>>
              >>>>>>
              >>>>>>
              >>>>>>>>message I am checking to see if the database connection is available.
              >>>>>>
              >>>>>>
              >>>>>>If the
              >>>>>>
              >>>>>>
              >>>>>>
              >>>>>>>>database connection is not available, I am rolling back the message
              >>>>>>>>into
              >>>>>>
              >>>>>>
              >>>>>>the Queue.
              >>>>>>
              >>>>>>
              >>>>>>
              >>>>>>>>The problem is that this is getting into a loop, till the database
              >>>>>>
              >>>>>>
              >>>>>>connection
              >>>>>>
              >>>>>>
              >>>>>>
              >>>>>>>>is available. (MDB picks up the message and checks up for database
              >>>>>>
              >>>>>>
              >>>>>>connectivity
              >>>>>>
              >>>>>>
              >>>>>>
              >>>>>>>>and rolls back into the queue).
              >>>>>>>>The solution that I have thought of doing is to check upto 5 times
              >>>>>>>>(just
              >>>>>>
              >>>>>>
              >>>>>>a count
              >>>>>>
              >>>>>>
              >>>>>>
              >>>>>>>>I have decided), after which I will undeploy the MDBs dynamically.
              >>>>>>>>Then
              >>>>>>
              >>>>>>
              >>>>>>I will
              >>>>>>
              >>>>>>
              >>>>>>
              >>>>>>>>start a new Thread (Thread class) which will check if the database
              >>>>>>
              >>>>>>
              >>>>>>connection
              >>>>>>
              >>>>>>
              >>>>>>
              >>>>>>>>is available and once the connection is available, I will redeploy
              >>>
              >>>the
              >>>
              >>>
              >>>>>>MDB to
              >>>>>>
              >>>>>>
              >>>>>>
              >>>>>>>>process the message again.
              >>>>>>>>
              >>>>>>>>I have following questions here:
              >>>>>>>>
              >>>>>>>> (1) How to dynamically undeploy & re-deploy MDB
              >>>>>>>> (2) How can I check Redelivered Count. I know that I can use
              >>>>>>
              >>>>>>
              >>>>>>Message.getJMSRedelivered
              >>>>>>
              >>>>>>
              >>>>>>
              >>>>>>>>(), which will return me a boolean stating the message is
              >>>
              >>>redelivered.
              >>>
              >>>
              >>>>>>If I
              >>>>>>
              >>>>>>
              >>>>>>
              >>>>>>>>can't check for Redelivered count, then if getJMSRedelivered()
              >>
              >>is
              >>
              >>>>>>
              >>>>>>"true", then
              >>>>>>
              >>>>>>
              >>>>>>
              >>>>>>>>I will undeploy the MDB.
              >>>>>>>> (3) Will there be any issues/problems in the solution discussed
              >>>>>>
              >>>>>>
              >>>>>>above.
              >>>>>>
              >>>>>>
              >>>>>>
              >>>>>>>>Thanks in advance for any help.
              >>>>>>>>
              >>>>>>>>Regards,
              >>>>>>>>Venkatesan.
              >>>>>>>>
              >>>>>>>>
              >>>>>>>
              >>>
              >
              

  • Deactivating MDB using JMX

    Hi All,
    I have a requirement to deactivate a MDB from its own onMessage method , when it detects some error.
    This is the piece of code I was using:
    DeployerRuntimeMBean deployer = DeployerRuntime.getDeployerRuntime();
                   deployer.deactivate("MDBName", null, null);
    I was able to pause the MDB by running the above code in our developer environment where there is only the admin server . When I tested this in our UAT environment I was getting a null pointer exception. In UAT environment we are having an admin server + a cluster . There is only a single managed server in the cluster and the MDB is targeted to the cluster.
    Any clue why this error is happening.
    TIA
    -Atheek

    If you need to access this from a managed server, you could use one of
    the getDeployerRuntime methods that connects as a client to the admin
    server:
    http://e-docs.bea.com/wls/docs100/javadocs/weblogic/management/deploy/DeployerRuntime.html
    Tony
    Tony wrote:
    The DeployerRuntimeMBean only exists on the admin server:
    http://e-docs.bea.com/wls/docs100/javadocs_mhome/weblogic/management/runtime/DeployerRuntimeMBean.html
    Tony
    Atheek Rahuman wrote:
    Hi All,
    I have a requirement to deactivate a MDB from its own onMessage method , when it detects some error.
    This is the piece of code I was using:
    DeployerRuntimeMBean deployer = DeployerRuntime.getDeployerRuntime();
                   deployer.deactivate("MDBName", null, null);
    I was able to pause the MDB by running the above code in our developer environment where there is only the admin server . When I tested this in our UAT environment I was getting a null pointer exception. In UAT environment we are having an admin server + a cluster . There is only a single managed server in the cluster and the MDB is targeted to the cluster.
    Any clue why this error is happening.
    TIA
    -Atheek

  • Need suggestion on  implementing JMS message error recovery

    Hi,
    Our application has a JMS topic where we publish application events. Now, there can be scenarios where the consumers cannot process the message due to some infrastructure issues and would error out. We need a way so that those messages can be reprocessed again later. we are thinking of the following design for JMS message error recovery
    1. Use a persistent TOPIC (this would ensure guaranteed delivery)
    2. Configure a error destination on JMS topic e.g a jms queue
    3. Have an error handling MDB listening to the Error destination. An error handling MDB would dequeue the errored messages from error destination and persist it to a Data base "error" table..
    4. Provide a mechanism to republish those messages to topic (e.g a scheduler or admin ui or a command line utility) .. The messages would deleted from database "error" table and published to topic again....
    A. Are there any issues with the above design which we need to handle?
    B. Are there any additional steps required in a Cluster environment with a distributed topic and distribute error destination? (our error mdb will have one-copy-per-application setting)
    B. From a performance angle, Is it OK to use persistent TOPIC ? Or will it better to persist the message to the db table and then publish it as a non persistent message ... ? (But i guess the performance should be more or less the same in both of these approaches)
    C. Are there any other recommended design patterns for error recovery of JMS messages
    Please advise.
    Regards,
    Arif

    Thanks Tom !
    We may not be able to go with the approach of delaying/pausing redelivery of the messsage because
    1. Pausing entire MDB approach: Our MDB application consumes messages generated by different producers and our MDB needs to continue processing the messages even if messages corresponding to one producer is erroring out
    2. Redelivery delay : This would only delay the retry of an errored message. But there would still be a problem if the message fails during all retries (i.e redelivery limit count). We don't want to lose this message. In our case, It is possible that a particular message cannot be processed due to unavailability of a third party system for hours or may be a day.
    Basically, i am looking on approaches for a robust and performant error recovery/retry framework for our application (refer details in my first post on this thread) while fully making use of all features provided by middleware (WLS). Please advise.
    Regards,
    Arif

  • AQ JMS Bridge in WebLogic 9.2

    I have configured a JMS Bridge that has source target as an AQ(which is referred to by a local weblogic jndi name - followed the robert patric framework) and the destination as a JMS queue. I can see the error logs prointed on the adminserver.logs when the bridge is started and the error is printed on and on.
    error log:
    ####<May 25, 2010 1:51:19 PM CDT> <Info> <MessagingBridge> <hostname_replaced> <osmdev03> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274813479568> <BEA-200033> <Bridge "AQ_2_JMS_WLBridge" is obtaining connections to the two adapters.>
    ####<May 25, 2010 1:51:19 PM CDT> <Trace> <eis/jms/WLSConnectionFactoryJNDIXA> <hostname_replaced> <osmdev03> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1274813479569> <000000> <<May 25, 2010 1:51:19 PM CDT> Info: AQ_2_JMS_WLBridge : Source connection created to AIA_OSM_OUT_QUEUE>
    ####<May 25, 2010 1:51:19 PM CDT> <Trace> <eis/jms/WLSConnectionFactoryJNDIXA> <hostname_replaced> <osmdev03> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1274813479613> <000000> <<May 25, 2010 1:51:19 PM CDT> Info: AQ_2_JMS_WLBridge : Connection started to AIA_OSM_OUT_QUEUE>
    ####<May 25, 2010 1:51:19 PM CDT> <Info> <Common> <hostname_replaced> <osmdev03> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274813479614> <BEA-000628> <Created "1" resources for pool "eis/jms/WLSConnectionFactoryJNDIXA", out of which "1" are available and "0" are unavailable.>
    ####<May 25, 2010 1:51:19 PM CDT> <Trace> <eis/jms/WLSConnectionFactoryJNDIXA> <hostname_replaced> <osmdev03> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1274813479615> <000000> <<May 25, 2010 1:51:19 PM CDT> Info: null : Target connection created to oracle.communications.ordermanagement.WebServiceQueue>
    ####<May 25, 2010 1:51:19 PM CDT> <Trace> <eis/jms/WLSConnectionFactoryJNDIXA> <hostname_replaced> <osmdev03> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1274813479617> <000000> <<May 25, 2010 1:51:19 PM CDT> Info: null : Connection started to oracle.communications.ordermanagement.WebServiceQueue>
    ####<May 25, 2010 1:51:19 PM CDT> <Info> <Common> <hostname_replaced> <osmdev03> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274813479618> <BEA-000628> <Created "1" resources for pool "eis/jms/WLSConnectionFactoryJNDIXA", out of which "1" are available and "0" are unavailable.>
    ####<May 25, 2010 1:51:19 PM CDT> <Info> <MessagingBridge> <hostname_replaced> <osmdev03> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274813479618> <BEA-200032> <Bridge "AQ_2_JMS_WLBridge" is configured to disallow degradation of its quality of service in cases where the configured quality of service is unreachable.>
    ####<May 25, 2010 1:51:19 PM CDT> <Info> <MessagingBridge> <hostname_replaced> <osmdev03> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274813479618> <BEA-200030> <Bridge "AQ_2_JMS_WLBridge" is configured to work in "Exactly-once" mode, and it is actually working in "Exactly-once" mode.>
    ####<May 25, 2010 1:51:19 PM CDT> <Info> <MessagingBridge> <hostname_replaced> <osmdev03> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274813479618> <BEA-200028> <The bridge "AQ_2_JMS_WLBridge" has started transferring messages.>
    ####<May 25, 2010 1:51:19 PM CDT> <Trace> <eis/jms/WLSConnectionFactoryJNDIXA> <hostname_replaced> <osmdev03> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1274813479618> <000000> <<May 25, 2010 1:51:19 PM CDT> Error: AQ_2_JMS_WLBridge : Failed to create consumer AIA_OSM_OUT_QUEUE>
    ####<May 25, 2010 1:51:19 PM CDT> <Trace> <eis/jms/WLSConnectionFactoryJNDIXA> <hostname_replaced> <osmdev03> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1274813479619> <000000> <<May 25, 2010 1:51:19 PM CDT> Info: AQ_2_JMS_WLBridge : Connection closed to AIA_OSM_OUT_QUEUE>
    ####<May 25, 2010 1:51:19 PM CDT> <Warning> <MessagingBridge> <hostname_replaced> <osmdev03> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274813479619> <BEA-200026> <Bridge "AQ_2_JMS_WLBridge" encountered some problems in one of its adapters or underlying systems. It stopped transferring messages and will try to reconnect to the adapters shortly. (The exception caught was javax.resource.ResourceException: Error setting message listener.)>
    ####<May 25, 2010 1:51:19 PM CDT> <Trace> <eis/jms/WLSConnectionFactoryJNDIXA> <hostname_replaced> <osmdev03> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1274813479621> <000000> <<May 25, 2010 1:51:19 PM CDT> Info: null : Connection closed to oracle.communications.ordermanagement.WebServiceQueue>
    ####<May 25, 2010 1:51:19 PM CDT> <Info> <MessagingBridge> <hostname_replaced> <osmdev03> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274813479621> <BEA-200020> <Bridge "AQ_2_JMS_WLBridge" is stopped.>
    Thanks
    Matt

    Hi Kapil,
              WebLogic JMS doesn't distinguish between "incoming" and "outgoing" queues - they're both application queues as far as WebLogic is concerned. Either queue can be paused/resumed.
              You might interesting in knowing that WL also supports pausing/resuming MDBs both administratively and automatically on failure. For information, see "Configuring Suspension of Message Delivery During JMS Resource Outages" in the MDB developer guide.
              Tom

  • How to stop and start MDBs to listen for JMS messages

    Hello! This might be more of an architecture question rather than a technical questing, but I post it here, in the lack of a better place...
    For several years I have been using Webster and Webster MQ to send messages back and forth to clients. The architecture for the middleware platform has been designed around the functionality of ListenerPorts. Listenerports is a Webster functionality that let you "stop" and start to listen to JMS messages for a given MDB either by admin console, or by JMX.
    The arhitecture we used was something like this :
    1.Client sends a persistent message to a queue. (order)
    2. An MDB pics up the order message, calls a SessionBean that "fronts" the IIOP back end system.
    This is quite "out of the box" architecture, but we used the Listenerports to solve a stability problem for our back end system.
    The backEnd system was quite unstable, so the EJB threw an exception (typically because of timeout or connection refused) back to the MDB.
    The Listenerport was "defined" to handle 3 errors before stopping, so the MDB resent the message twice before the listenerport automatically stopped. The nice thing about this feature was that the client could continue to send orders, and was not bothered when the back end system was down.
    When the backEnd system was up and running, we could start the listenerport and it was all back to normal state. We even had a start script that checked the state of the listenerport every 30 minute, and started it automatically if it was stopped, making the admin task of starting the MDB unnecessary..
    Now.. Why am I telling this story..
    I would like to know how this could be done using "clean" J2EE technologies..That is..Not using any technology that is not portable..
    I`m playing with glassfish at home, and it struck me that there is nothing in the J2EE spec that defines the functionality described above ? Am i missing something ?
    I Do not want to stop My application because the back end system is down? That is the only way (i know of) that i can "stop" to listen for messages..
    I can put all the messages on an error queue when the backbend system is down, but that would lead to more code just to handle the error messages. Maybe the easiest way to solve this is to "move" (programmatically) all messages from the error queue over to the "standard" queue every XX minute, but somehow that sounds "wrong"
    Can anyone give me some advice to how this problem situation should be solved ? I`m interested in the solution both from an architectural perspective and from a more technical perspective..
    Best regards
    Hans-Jacob Melby

    Breakpoints, whether normal or conditional, are just meant for debugging of your code.  I had the sense from your question that the pausing you want to do is a part of normal operation of your code.  I would NOT recommend using a breakpoint for that situation.  It would bring up the block diagram showing the breakpoint when it occurs.  A user besides the programmer would not know what to do in that case.
     Yes, both the inner and outer loops would have shift registers.
    Putting a case structure with a small while loop inside the "Pausing Case" is doable.  It just depends on what you are doing or waiting for while the program operation is "paused".

  • Foreign JMS vs. Remote MDB

    Hi,
              I have a JMS scenario that I'm hoping to get some input on. The system architecture is as follows:
              One WebLogic 8.1 SP5 domain with a JMS server
              One WebLogic 9.2 MP1 domain with no JMS server
              We'd like to consume a JMS message that's sitting on a queue in the 8.1 domain by code running on the 9.2 domain.
              Without configuring a JMS server in the 9.2 domain (which we'd like to avoid), the two obvious options are:
              1. An MDB running on the 9.2 server that connects to a queue on the 8.1 server
              2. An MDB running on the 9.2 server that connects to a foreign JMS server locally which in turn is linked to the 8.1's JMS server
              Does anyone have any suggestions, experience from this or a similar scenario?
              The main areas that I'd be interested in are:
              - Inter domain compatability
              - Any problems with Transactions, XA
              Many thanks,
              Eoin

    Hi,
              I think your approach is fine - inter-version compatibility is supported for both JMS and XA. You'll need to ensure that all 9.1 and 8.1 WL domain names are unique, ditto for all 8.1 WL server names, 8.1 WL store names, plus 8.1 JMS server names (even across different domains).
              "1" and "2" are essentially the same in that "Foreign JMS" is simply a mapping from the local JNDI naming service to a remote JMS service . "2" tends to be preferable as it can simplify administration once configured. For more information, see the "Integrating Remote JMS Providers" FAQ linked off of this page: "http://edocs.bea.com/wls/docs92/messaging.html".
              FYI There are advantages in using 9.x and later JMS - not only does it have a broader set of features, but it also has more sophisticated message management (use the console to pause/resume dests, view individual messages, etc), and significantly higher performance. Also, 9.x MDBs do a better job of connecting to remote 9.x distributed destinations than 8.1 MDBs - as they automatically ensure that all component destinations get serviced.
              Tom

  • 20sec pause at the end of the preloader...

    what am i doing wrong. my preloader works and the page isn't
    anything fancy just once it gets to the end of the preloader it has
    like a 20s pause. also once it's loaded when i click on buttons
    that open new pages running movie clip objects it pauses just
    before it goes. I am using comands like gotoAndPlay and onRelease
    for those. What should i do to get smooth animation.
    --tyler

    While that's happening, run this DTrace script:
    #!/usr/sbin/dtrace -s
    #pragma D option quiet
    profile:::profile-1001hz
    / arg0 /
        @addr[ arg0 ] = count();
    dtrace:::BEGIN
        printf( "Begin\n" );
    dtrace:::END
        printa( "%@u %a\n", @addr );
    }Start that right before you end your other DTrace script. You might want to redirect the output of that script to a file. Let that run for a good 20 or 30 seconds, break it. If you can't break it, don't worry because it'll just be collecting more data about what's going on and you can break it when your system starts responding again.
    FWIW, I suspect a memory paging issue of some sort. So, it would help to see the output from:
    echo ::memstat | mdb -k

  • Can I monitor JMS traffic (not the contents) for MDBs?

    WL 9.2.2 on AIX 5.3.
    I have an EAR deployed to our domains that a third-party vendor developed. It has MDBs that are configured to be persistent. Messages appearing on the queue are read quickly and sent elsewhere. I thought that I should be able to go to the Monitoring page of the JMS queue and see some information about traffic, even though I can't see the actual messages. When I go to the Monitoring tab for the queue, the list is always empty, even though I'm pretty sure messages are being processed through the queue.
    An engineer from the vendor said that "So all the messages that were sent and acknowledged are never persisted in the filestore and hence you cannot view those messages from the weblogic console". I certainly believe him that I wouldn't be able to view the contents of messages after they are removed from the store, but I would assume that the traffic history is still kept.
    Am I misunderstanding what I should be able to see here?

    You can see certain attributes something like "Messages High" and "Consumers Current", "Consumers High", but no copies of messages would be kept. If consumers are active and always reading off messages as they come in, then "Messages High" will likely not even increment. If you want to see the messages you could pause consumption of the queue, which should not block production of messages. Then you should be able to see messages start "queueing up" until you unpause comsumption.

  • Full GC causing application pauses

    We have a J2EE application that has been giving us some problems. When the application first starts up it runs fine. Over time we start seeing pauses in the application that seem to be caused by garbage collection pausing the application. We see GC log statements like the following:
    [Full GC[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor109]
    [Unloading class sun.reflect.GeneratedSerializationConstructorAccessor108]
    [Unloading class sun.reflect.GeneratedSerializationConstructorAccessor101]
    [Unloading class sun.reflect.GeneratedSerializationConstructorAccessor105]
    [Unloading class sun.reflect.GeneratedSerializationConstructorAccessor103]
    [Unloading class sun.reflect.GeneratedSerializationConstructorAccessor110]
    [Unloading class sun.reflect.GeneratedSerializationConstructorAccessor104]
    [Unloading class sun.reflect.GeneratedSerializationConstructorAccessor102]
    [Unloading class sun.reflect.GeneratedSerializationConstructorAccessor107]
    [Unloading class sun.reflect.GeneratedSerializationConstructorAccessor106]
    457267K->266956K(510336K), 3.5484916 secs]
    Sometimes the unloading class info is displayed, sometimes it is just the Full GC statment.
    We are running WAS 5.1, IBM (Sun) 1.4.1
    The app contains EJBs (session, entity and MDB) as well as a JCA adapter for communication with an outside vendor (TCP/IP Sockets)
    The app has 500MB allocated for memory. That seems like a lot of memory for this application. Is there anything that could be causing the pauses to increase in frequency and tme? I've checked through the code for hashmap and arraylist handling to make sure we were not holding on to objects once placed into the sets.
    Any suggestions would be most appreciated.

    There are another options:
    1) Buy more memory for your server (it is cheap right?). Larger heap - less GC pause.
    2) Update your JVM. Tiger has much better scalability and ergonomics.
    3) Setup permgen size.

  • Disable autmatic mdb message process on server start

    How can i disable the automatic MDB message processing when the server is started. I want to manually start(control) the the MDB message processing after the server startup. The application ear contains ejb modules and web module. is it possible to stop an ejb module in an application. I know, we can stop the entire application.
    there is a parameter in weblogic application descriptor which delays the message processing till the server is fully started. then also it's not possible to stop/delay further.
    the deployment scenario is weblogic+websphere MQ configured as mq foreign server.
    pls help. thanks

    WL JMS provides a programmatic or administrative option for this purpose. The feature is called "destination suspend/resume", and it can be set before shutdown so as to start the destination in a "consumption paused" state after restart. MQ may provide a similar administrative option. I'm not sure if there's a simple way to do what you want with MDBs directly - you might want to try posting to the WebLogic EJB forum, but if MQ doesn't provide an option, perhaps you can forward the MQ messages into WebLogic JMS destinations (either using an MDB or a Messaging Bridge), and then change your MDB to use the WebLogic JMS destinations.
    Tom

  • Will weblogic support 2 Phase support for MDB (Container Managed)

    The Transaction is not rolling back when i am throwing an EJB exception during the update of the database
              Followed the below steps
              0) Created a XAConnectionPool (Oracle XA thin Driver)
              1) Created a DataSource for the above pool
              2) Created a QueueConnection factory with XA checked
              3) Deployed a MDB with Transaction Support as Required
              4) When the Database is throwing an exception the message is not rolled back /
              Any idea why this is happening?Will Weblogic 81 supports Container Management for MDB for 2PC transactions?
              i have Oracle driver in the weblogic start classpath and using getting the connection to the DB from the weblogic pool

    - Of course WebLogic supports 2PC - and has for years.
              - There's no need to configure a JMS connection factory - the MDB's default choice is transaction capable.
              - See MDB doc for details on how to configure transactional MDBs.
              (hint: two descriptor settings are required)
              http://edocs.bea.com/wls/docs81/ejb/message_beans.html
              - FYI: You may want to consider upgrading to 9.1:
              * Can pause MDBs
              * Can pause destinations
              * Can view individual messages on the console
              * much higher file store performance
              * JDBC LLR option (faster than pure XA 2PC)
              * MDB transaction batching (speeds up XA - documentation is missing but will be in place soon)

  • My animated gif keeps pausing in captivate and flash

    Hi guys, thanks for your help.
    I made an animated gif in Photoshop CS4 and inserted it as an animation into captivate 6. The animation works (I played it several times by opening it with internet explorer and safari). But when I open it in Captivate the animation goes black for a split second-several times, before it reappears-several times. It gives it almost a "reloading" or pause look when I play it. The same in flash, but in Adobe Flash CS4 Professional the timeline shows black dots once in a while, as you can see in the screen shot below.
    See those black dots? I will insert a picture of what happens, when the player lands on one of those black dots:
    It's the same animation, but only shows a little. Like I said, it plays fine when I open it with an internet browser, it plays fine when I play it in photoshop, but it just won't work with flash or captivate.
    Any thoughts? Thanks so much!! I really appreciate your help guys!
    Nat

    No problem. Building a simple animation in Flash isn't that bad. You could save each "frame" as an image from PhotoShop and then import these into Flash and place one frame at the time on a keyframe in the flash timeline (press F6 to insert a keyframe).
    If you want your animation to loop then you don't have to do anything as this is the default behavior. If you want it to stop at the last frame you insert a command in ActionScript to stop it. Select the last keyframe and hit F9 and type stop() in the ActionScript window.
    Good luck!
    www.cpguru.com - Adobe Captivate Widgets, Tutorials, Tips and Tricks and much more..

  • MDB Timeouts and transaction behavior

    Hi, thanks in advance for any help with this.
    We have a MDB where we have set the timeout to five minutes. In a particular case this timeout is being reached but even though the MDB times out the transaction and sends the message for redelivery the original transaction that was processing the message continues until something happens from an application standpoint to cause that original transaction to complete. This means that we have the same message processed twice under these circumstances.
    I would have expected that if a transaction timed out that the transaction would have been terminated and therefore our processing would have stopped. Is there a way to force this behavior or do we have to put an alarm in our code and kill ourselves such that we never encounter the transaction time out?
    Thanks,
    Sue Shanabrook

    I should have mentioned that we are using container managed transactions.

Maybe you are looking for

  • 15" Macbook Pro will not boot up

    15" Macbook Pro, from late 2007 early 2008. I have tried everything, resetting pram, smu etc. Reseating RAM, removing battery, booting in safe mode, booting from OS disc, booting in target mode, nothing work, seemingly tried everything. The firewire

  • [SOLVED] - USB Pen Drive Unreadable

    I used gparted to create 3 Primary Partitins on my 2GB Kingston Pen Drive. After that I used the following command to change the label of one of the partitions: mkfs.ext3 -L Grub2 /dec/sdb3 After this the pen drive ha become unreadable. It gets liste

  • Query on processing a PDF file using Java mapping

    Hi All, i am trying to process a XML and PDF file using Java mapping, it is successful in XML but unable to do for PDF. below is the code i am using... can any one guide me how to process PDF's.. byte byte1 = 0;      java.io.ByteArrayOutputStream bos

  • Discoverer Desktop 10.1.2.1 cant connect to 11g (11.2.0.2.0) database

    Hi, Has anyone ever come across this problem. Any solutions? Strangely enough, the Discoverer Administrator, Discoverer Plus and Discoverer Viewer connects successfully. OS: Windows XP Pro 64bit SP2 (tried on Windows 7 64bit with no success too) Disc

  • Excel ActiveX: Server Execution Failed Error

    I'm using my own ActiveX VIs to control Excel. I take a text file and create a chart from some of the columns, then print the chart. I'm getting a "server execution failed" error when I call PrintOut on the chart object. I understand this error stems