Publish to JMS Queue Exception

Have a web service based proxy. In a stage in the request pipeline,
Am using a publish action to publish to a JMS queue using a Business Service.
The Business Service is of type "Any SOAP Service" and transport is JMS.
To test the error scenario, Have provided an incorrect queue name in the Business Service configuration.
During testing from the test console, I do see a connection exception in the log.
But the flow of control continues to the next action and stage in the request pipeline and then the response pipeline.
My expectation was that , The Error Handler would be invoked.
Is this the correct behaviour? Is there any configuration that needs to be done? Or should I be using a service callout instead?
Thanks
Raghu
Edited by: user10219846 on Jun 17, 2009 10:32 AM

Yes, you can use Service Callout action and you will see exception raised. However, you can't use Service Callout for one-way operations (like simple message enqueuing) and that could be problem sometimes. Fortunately, you can still use Publish action to get your exception. Just use Routing Options with QoS set to "exactly once" in Request Action.
This behaviour is well documented. You can read this:
http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/modelingmessageflow.html#wp1065307

Similar Messages

  • How to publish a JMS Queue?

    Hi there,
    Does anyone know how to publish a JMS queue? Thanks.
    Edited by: 886478 on Sep 20, 2011 10:17 PM

    Does anyone know how to publish a JMS queue? Thanks.Yes, I do. But rather than write a long posting describing how to use the JMS API. I'd like to invite you to read the JMS tutorial:
    http://download.oracle.com/javaee/1.3/jms/tutorial/index.html
    Look particularly at
    http://download.oracle.com/javaee/1.3/jms/tutorial/1_3_1-fcs/doc/client.html
    Nigel

  • JMS cluster and happen JMS Queue Exception javax.naming.NameAlreadyBoundExc

    Hi,
    Sorry I not sure how to setup JMS cluster in WLS 10.3.2. We have two manager server in two machine. And will join into one cluster. After configure the JMS module & JMS server. We found it only can work in one server. And will faill in another server. And reply the error message as below :
    Any one can help to tell me why one server success. And other is fail !
    javax.naming.NameAlreadyBoundException: JMS_Queue_misdel_a is already bound; rem
    aining name ''
    at weblogic.jndi.internal.BasicNamingNode.bindHere(BasicNamingNode.java:357)
    at weblogic.jndi.internal.ServerNamingNode.bindHere(ServerNamingNode.java:140)
    at weblogic.jndi.internal.BasicNamingNode.bind(BasicNamingNode.java:317)
    at weblogic.jndi.internal.WLEventContextImpl.bind(WLEventContextImpl.jav
    ==> config for JMS
    <jms-server>
    <name>JMS_Server_cim_a</name>
    <target>ebowls05</target>
    <persistent-store xsi:nil="true"></persistent-store>
    <hosting-temporary-destinations>true</hosting-temporary-destinations>
    <temporary-template-resource xsi:nil="true"></temporary-template-resource>
    <temporary-template-name xsi:nil="true"></temporary-template-name>
    <message-buffer-size>-1</message-buffer-size>
    <expiration-scan-interval>30</expiration-scan-interval>
    </jms-server>
    <jms-server>
    <name>JMS_Server_cim_b</name>
    <target>ebowls06</target>
    <persistent-store xsi:nil="true"></persistent-store>
    <hosting-temporary-destinations>true</hosting-temporary-destinations>
    <temporary-template-resource xsi:nil="true"></temporary-template-resource>
    <temporary-template-name xsi:nil="true"></temporary-template-name>
    <message-buffer-size>-1</message-buffer-size>
    <expiration-scan-interval>30</expiration-scan-interval>
    </jms-server>
    <migratable-target>
    <name>ebowls06 (migratable)</name>
    <notes>This is a system generated default migratable target for a server. Do
    not delete manually.</notes>
    <user-preferred-server>ebowls06</user-preferred-server>
    <cluster>ebouatCluster</cluster>
    </migratable-target>
    <migratable-target>
    <name>ebowls05 (migratable)</name>
    <notes>This is a system generated default migratable target for a server. Do
    not delete manually.</notes>
    <user-preferred-server>ebowls05</user-preferred-server>
    <cluster>ebouatCluster</cluster>
    </migratable-target>
    <jms-system-resource>
    <name>JMS_ConnFactory_cim</name>
    <target>ebouatCluster</target>
    <descriptor-file-name>jms/JMS_ConnFactory_cim/JMS_ConnFactory_cim-jms.xml</d
    escriptor-file-name>
    </jms-system-resource>
    <jms-system-resource>
    <name>JMS_Queue_promis</name>
    <target>ebouatCluster</target>
    <sub-deployment>
    <name>JMS_Queue_promis@JMS_Server_cim_a</name>
    <target>JMS_Server_cim_a</target>
    </sub-deployment>
    <sub-deployment>
    <name>JMS_Queue_promis@JMS_Server_cim_b</name>
    <target>JMS_Server_cim_b</target>
    </sub-deployment>
    <descriptor-file-name>jms/JMS_Queue_promis/JMS_Queue_promis-jms.xml</descrip
    tor-file-name>
    </jms-system-resource>
    <jms-system-resource>
    <name>JMS_Template_cim</name>
    <target>ebouatCluster</target>
    <descriptor-file-name>jms/JMS_Template_cim/JMS_Template_cim-jms.xml</descrip
    tor-file-name>
    </jms-system-resource>
    <jms-system-resource>
    <name>JMS_Queue_misdel_a</name>
    <target>ebouatCluster</target>
    <sub-deployment>
    <name>JMS_Queue_misdel_a@JMS_Server_cim_a</name>
    <target>JMS_Server_cim_a</target>
    </sub-deployment>
    <sub-deployment>
    <name>JMS_Queue_misdel_a@JMS_Server_cim_b</name>
    <target>JMS_Server_cim_b</target>
    </sub-deployment>
    <descriptor-file-name>jms/JMS_Queue_misdel_a/JMS_Queue_misdel_a-jms.xml</des
    criptor-file-name>
    </jms-system-resource>
    <jms-system-resource>
    <name>JMS_Queue_misdel_b</name>
    <target>ebouatCluster</target>
    <sub-deployment>
    <name>JMS_Queue_misdel_b@JMS_Server_cim_a</name>
    <target>JMS_Server_cim_a</target>
    </sub-deployment>
    <sub-deployment>
    <name>JMS_Queue_misdel_b@JMS_Server_cim_b</name>
    <target>JMS_Server_cim_b</target>
    </sub-deployment>
    <descriptor-file-name>jms/JMS_Queue_misdel_b/JMS_Queue_misdel_b-jms.xml</des
    criptor-file-name>
    </jms-system-resource>

    1 - JMS clustering is an advanced concept, and, in most cases, uses "distributed queues". In case you haven't already, I highly recommend reading the JMS chapter of the new book "Professional Oracle WebLogic" as well as the related chapters in the JMS Programmer's Guide in the edocs.
    2 - The basic problem below is that you have two different queues that have matching JNDI names, but are in the same cluster.
    3 - The config snippet supplied below does not include the queue configuration. Queue configuration is embedded within the referenced module files.
    4 - Please ensure that you follow configuration best practices, as per: http://download.oracle.com/docs/cd/E15523_01/web.1111/e13738/best_practice.htm#CACJCGHG

  • How to manually flush jms queue

    hi,
              we have some transaction which is stuck in a JMS queue and we want to forcibly clear it from queue.
              please let me know how to go for this
              thanks

    Does anyone know how to publish a JMS queue? Thanks.Yes, I do. But rather than write a long posting describing how to use the JMS API. I'd like to invite you to read the JMS tutorial:
    http://download.oracle.com/javaee/1.3/jms/tutorial/index.html
    Look particularly at
    http://download.oracle.com/javaee/1.3/jms/tutorial/1_3_1-fcs/doc/client.html
    Nigel

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

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

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

  • Need to publish message from database to a JMS Queue using Java

    I need to publish messages to a Websphere JMS Queue whenever any changes happen on a particular column of a table in oracle 11g. For that I have written a trigger on that particular table which in turn will invoke one java procedure. I have written the java procedure using a standalone java class and uploaded the java class as a schema object. While executing the procedure it is throwing error as it is not able to instantiate some of the java classes. I don't know how to provide the reference of different jar files while executing the java class. Can anyone help me on this.

    Welcome to the forum!
    >
    I have written the java procedure using a standalone java class and uploaded the java class as a schema object. While executing the procedure it is throwing error as it is not able to instantiate some of the java classes. I don't know how to provide the reference of different jar files while executing the java class.
    >
    Clarify your statement. First you say 'standalone java class' but then you talk about instantiating java 'classes' and referencing 'different jar files'. If you are executing your Java class inside Oracle then any Java classes that your java class is referencing also have to be loaded into Oracle or it won't be able to reference or execute them.
    How do you plan to ' publish messages to a Websphere JMS Queue '? Where is this queue you are talking about?
    Why are you using a Java procedure and class instead of PL/SQL?
    What is your 4 digit Oracle version (result of SELECT * FROM V$VERSION)?

  • Exception in the XML consuming from JMS Queue

    In the CEP application we have a business flow like we want to consume an xml message from the JMS queue.
    While CEP is consuming the message sometimes we are getting an exception.
    But this issue occurs rarely and we have no idea about the root cause.
    I am attaching the trace of this exception.
    It seems this exception is from weblogic server itself.
    Also this could be an interface problem, since its showing a casting error.
    The Bug description:
    When we send a meter event through SOAP UI in the CEP visualizer when the event is consumed CEP also shows this exception.
    This may not halt the analysis process of the event, but this unwanted piece of code/lines have to be avoided.
    <OutageEvent xmlns:ns1="http://www.accenture.com/INDE"; xmlns:wsa="http://www.w3.org/2005/08/addressing"; xmlns="http://www.accenture.com/INDE"><meterId xmlns="">203</meterId><outageType xmlns="">Permanent Outage</outageType><premiseId xmlns="">1111</premiseId><timeEvent xmlns="">2010-07-30T</timeEvent><heName xmlns="">SAMPLEHE</heName></OutageEvent>
    <Jul 30, 2010 11:01:50 AM IST> <Error> <JMSAdapter> <BEA-2041118> <Setup for JMS task for destination JMS_OI_MeterState_MeterEvent_Queue at provider t3://10.212.182.30:8002 failed with exception: weblogic.jms.common.JMSException: [JMSClientExceptions:055039]A system error has occurred. The error is java.lang.ClassCastException: weblogic.workarea.StringWorkContext
    weblogic.jms.common.JMSException: [JMSClientExceptions:055039]A system error has occurred. The error is java.lang.ClassCastException: weblogic.workarea.StringWorkContext
    at weblogic.jms.client.JMSSession.handleException(JMSSession.java:3121)
    at weblogic.jms.client.JMSConsumer.receiveInternal(JMSConsumer.java:650)
    at weblogic.jms.client.JMSConsumer.receive(JMSConsumer.java:526)
    at weblogic.jms.client.WLConsumerImpl.receive(WLConsumerImpl.java:184)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveMessage(AbstractPollingMessageListenerContainer.java:405)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:308)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)
    at com.bea.core.asyncbeans.internal.DefaultMessageListenerContainer.receiveAndExecute(DefaultMessageListenerContainer.java:59)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:982)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:974)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:876)
    at com.bea.core.asyncbeans.internal.WorkManagerTaskExecutor$1.run(WorkManagerTaskExecutor.java:38)
    at weblogic.work.commonj.CommonjWorkManagerImpl$WorkWithListener.run(CommonjWorkManagerImpl.java:196)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused By: java.lang.ClassCastException: weblogic.workarea.StringWorkContext
    at weblogic.rjvm.MsgAbbrevInputStream.readContext(MsgAbbrevInputStream.java:243)
    at weblogic.workarea.spi.WorkContextEntryImpl.<init>(WorkContextEntryImpl.java:47)
    at weblogic.workarea.spi.WorkContextEntryImpl.readEntry(WorkContextEntryImpl.java:97)
    at weblogic.workarea.WorkContextLocalMap.receiveRequest(WorkContextLocalMap.java:151)
    at weblogic.jms.common.JMSWorkContextHelper.readWorkContext(JMSWorkContextHelper.java:89)
    at weblogic.jms.common.MessageImpl.readExternal(MessageImpl.java:2275)
    at weblogic.jms.common.TextMessageImpl.readExternal(TextMessageImpl.java:354)
    at weblogic.jms.common.JMSConsumerReceiveResponse.readExternal(JMSConsumerReceiveResponse.java:133)
    at weblogic.messaging.dispatcher.DispatcherObjectHandler.readResponse(DispatcherObjectHandler.java:154)
    at weblogic.messaging.dispatcher.DispatcherProxy.unmarshalResponse(DispatcherProxy.java:269)
    at weblogic.messaging.dispatcher.DispatcherProxy.dispatchSyncTranFuture(DispatcherProxy.java:134)
    at weblogic.messaging.dispatcher.DispatcherWrapperState.dispatchSyncTran(DispatcherWrapperState.java:338)
    at weblogic.messaging.dispatcher.DispatcherWrapperState.dispatchSyncNoTran(DispatcherWrapperState.java:386)
    at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncNoTran(DispatcherAdapter.java:59)
    at weblogic.jms.client.JMSSession.receiveMessage(JMSSession.java:886)
    at weblogic.jms.client.JMSConsumer.receiveInternal(JMSConsumer.java:647)
    at weblogic.jms.client.JMSConsumer.receive(JMSConsumer.java:526)
    at weblogic.jms.client.WLConsumerImpl.receive(WLConsumerImpl.java:184)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveMessage(AbstractPollingMessageListenerContainer.java:405)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:308)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)
    at com.bea.core.asyncbeans.internal.DefaultMessageListenerContainer.receiveAndExecute(DefaultMessageListenerContainer.java:59)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:982)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:974)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:876)
    at com.bea.core.asyncbeans.internal.WorkManagerTaskExecutor$1.run(WorkManagerTaskExecutor.java:38)
    at weblogic.work.commonj.CommonjWorkManagerImpl$WorkWithListener.run(CommonjWorkManagerImpl.java:196)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    >
    11:01:50,548 INFO MeterInputConverter : 81 - Accepted the input xml :<?xml version="1.0" encoding="UTF-8" ?><MeterEvent xmlns:inde="http://www.accenture.com/INDE"; xmlns:wsa="http://www.w3.org/2005/08/addressing"; xmlns="http://www.accenture.com/INDE">;
    <meterId xmlns="">103</meterId>
    <outageType xmlns="">RESUME</outageType>
    <premiseId xmlns="">1111</premiseId>
    <timeEvent xmlns="">2010-07-30T</timeEvent>
    <lastGasp xmlns="">false</lastGasp>
    <heName xmlns="">CURRENT</heName>
    </MeterEvent>

    Hi,
    I will forward this to the weblogic JMS team, to see if they have any insight for us.
    Regards,
    Seth

  • 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

  • OC4J 9.0.4: Problem receiving message from JMS queue

    I've created an application which puts XML files in a JMS queue and try to get it out again. The enqueing (sending) is no problem, but when I dequeue from the same queue I receive nothing and if I don't specify a wait time the programs hangs.
    If I create a QueueBrowser I can see there are messages in the queue.
    Can someone tell me what I do wrong?
    Here is the code of my dequeue action:
    public String dequeue(int qName) throws RbsSysException
            final String method = "dequeue(int qName)";
            _log.debug(method);
            QueueConnection queueConnection = null;
            try
                queueConnection = _queueConnectionFactory.createQueueConnection();
                QueueSession queueSession = queueConnection.createQueueSession(false,
                        Session.AUTO_ACKNOWLEDGE);
                QueueReceiver queueRcv = queueSession.createReceiver(getQueue(qName));
                _log.debug("queue = "+ queueRcv.getQueue().getQueueName());
                // Due to bug 3376983 in OC4J We cannot use TextMessage if it exceeds
                // 64 kb. Therefore use ObjectMessage.
                Message msg = queueRcv.receiveNoWait();
                _log.debug("msg = " + msg);
                ObjectMessage objMsg = (ObjectMessage)msg;
                //ObjectMessage objMsg = (ObjectMessage) queueRcv.receiveNoWait();
                _log.debug("objMsg = " + objMsg);
                if (objMsg != null)
                    return (String) objMsg.getObject();
                else
                    return null;
            catch (JMSException je)
                throw new RbsSysException(je);
            finally
                if (queueConnection != null)
                    try
                        queueConnection.close();
                    catch (Exception any)
                        _log.error("Error while closing QueueConnection: ", any);
        }

    Did you implement javax.jms.MessageListener and the method onMessage(Message)?
    If you use onMessage() as wel as receive (or receiveNoWait() or receive(long)), the onMessage() can be called, while the main thread is blocking on a synchronous receive, so make sure you use only one of the two methods: onMessage() or receive.
    Receive() blocks your thread until a message is published. So your program 'hangs' by design. Usually this is used when your program is waiting for a particular message. Otherwise use onMessage().
    ReceiveNoWait() checks if something is in the queue at that very moment, so if nothing is there (yet), the main thread continues.
    Hope this helps,
    Lonneke

  • 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
              

  • Unable to send messag to JMS Queue using Java

    Hi all,
    I am trying to send a string to the JMS queue using java. I am unable to send the message. It is getting failed at the look up for connection factory. I am using the below code for this purpose.
    public static void messageEnqueue(String payload) throws JMSException,
    NamingException,
    IOException {
    Session session = null;
    MessageProducer publisher = null;
    TextMessage message = null;
    Context context = new InitialContext();
    QueueConnectionFactory connectionFactory =
    (QueueConnectionFactory)context.lookup("*java:comp/env/XAConnectionFactoryJNDIName*");
    Connection connection = connectionFactory.createConnection();
    Queue Queue1 =
    (Queue)context.lookup("*java:comp/env/QueueName*");
    session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
    publisher = session.createProducer(Queue1);
    message = session.createTextMessage(Payload);
    connection.start();
    publisher.send(message);
    connection.stop();
    connection.close();
    kindly help on this.
    Thanks
    Edited by: 887737 on Jun 28, 2012 9:47 PM

    887737 wrote:
    Hi EJP,
    This is the Exception I got when I ran the java class directly from Jdeveloper. Can't I run the standalone class directly from Jdeveloper to insert the message into remote queue?
    Exception in thread "main" javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
         at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at javamail.MessageEnqueue.messageEnqueue(MessageEnqueue.java:30)
         at javamail.MessageEnqueue.main(MessageEnqueue.java:51)Hmm. The stack trace doesn't involve any JMS code. Is javamail.MessageEnqueue.messageEnqueue your application? It seems to be doing a JNDI lookup, and you haven't configured JNDI properly. Exactly how to do this depends on what JNDI provider you are using. Earlier in the thread you mentioned you were using WebLogic, so the answer may lie in the WebLogic documentation.
    Nigel

  • QueueBrowser not scaning all messages in JMS queue (ie not showing inprogre

    Hi all,
    I am using JMS in jboss-3.2.3, when scaning for pending messages i am using QueueBrowser.
    But QueueBrowser not scaning all messages in JMS queue (ie not showing inprogress message)
    But i need to know all messages including ongoing messages..
    Antone plz help me
    I am using Queuesender and QueueReceiver ..But some Exception or Error causes my JMS server(QueueReceiver listening for onMessage()) hanged up..and not responding to remaining messages...So i need to find pending messags in JMS queue..How can find?
    Now i am using QueueBrowser to get list of pending msgs in queue... But doesn't contains Message which passed for processing (called onMessage())
    .. But i need to find this also..How can?
    Thanks,
    Thilsen

    You're right in thinking that the behaviour you describe looks wrong.
    Take a look at the QueueBrowser interface which can be used to inspect a queue. You get one using QueueSession.createBrowser(Queue). The QueueBrowser allows you to scan a queue without consuming the messages. However note that the state of the queue may change while you're observing it through the QueueBrowser so what you see might not always be a 100% accurate representation of the queue at any given time.
    Other things to check:
    - message selectors - are you setting a message selector on your queue receiver which is resulting in not all of the messages 'matching'.
    - expired messages - are you setting a time-to-live on the messages that you publish.
    Hope this helps,
    David Ingham
    http://www.arjuna.com

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

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

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

  • Dequeue from JMS Queue 10 at a time and process it.

    Hi,
    I have created a JMS queue in weblogic.
    Say i enqueue 1000 records in the queue at one go.
    Now, i want a bpel process to dequue from it and process it.
    However as per my requirement i want at a time 10 instances being active at a time i.e. 10 records from the queue are being processed at a time.
    Once any one of them finishes, the other will pick up the message.
    1 BPEL instance will process only 1 record from Q at a time
    Please let me know how to achieve this.

    You need to understand here that it is adapter which deques the message from queue and it will deliver it to BPEL for processing which is an async process. So adapter will keep dequeing messages and keep publishing it to BPEL irrespective of whether BPEL process has completed processing.
    You may need to tweak the adapter configuration here. First of all create the synchronous BPEL composite so that both adapter and BPEL work in same transaction -
    https://blogs.oracle.com/adapters/entry/creating_a_synchronous_bpel_composite_using_file_adapter
    You may control the number of threads for inbound JMS adapter using binding property "adapter.jms.receive.threads" in composite.xml
    Regards,
    Anuj

  • Reading Opaque data from jms queue  and decoded  in java embedding

    Hi ,
    Objective:Fetch text message from queue and print it from java embedding in BPEL
    I am fetching text message from a jms queue using JMS adapter in BPEL.Then converting the opaque data(Base64 binary)to string using java embedding.My build got successful but I am getting runtime error at the time of deployment.
    I have added fabric-runtime.jar file into SCA-INF\lib folder as well as project library directory.
    <extensionActivity>
    <bpelx:exec name="Java_Embedding1" version="1.5" language="java">
    <bpelx:exec import="java.io.*"/>
    <bpelx:exec import="oracle.soa.common.util.Base64Decoder"/>
    <![CDATA[//Write your java code below e.g.        
         System.out.println("Hello, World");       
    //   String input = ((Element)getVariableData("Receive1_Consume_Message_InputVariable")).getTextContent();              
      // String inputName = (String)getVariableData("input");     
      String input = (String)getVariableData("Receive1_Consume_Message_InputVariable");            
    //Receive1_Consume_Message_InputVariable.opaque          
          System.out.println("input:"+input);          
          addAuditTrailEntry(input);           
          Base64Decoder Decoder = new Base64Decoder();             
         try {            
          String decoded = Base64Decoder.decode(input);            
          setVariableData("Variable_opaque_decoded",decoded);            
          addAuditTrailEntry(decoded);           
    catch(UnsupportedEncodingException uee)
    uee.printStackTrace();
    }]]>
    </bpelx:exec>
    </extensionActivity>
    Error:
    Error deploying archive sca_JMSToDBInsert_rev1.0.jar to partition "default" on server AdminServer [http://localhost:7001]
    HTTP error code returned [500]
    Error message from server:
    There was an error deploying the composite on AdminServer: Error occurred during deployment of component: BPELProcess1 to service engine: implementation.bpel, for composite: JMSToDBInsert: ORABPEL-05250
    Error deploying BPEL suitcase.
    error while attempting to deploy the BPEL component file "C:\Oracle\Middleware\user_projects\domains\soa_domain\servers\AdminServer\dc\soa_0fb06e23-bac3-4753-aae9-0fc4b54b4dd1"; the exception reported is: java.lang.RuntimeException: failed to compile execlets of BPELProcess1
    This error contained an exception thrown by the underlying deployment module.
    Verify the exception trace in the log (with logging level set to debug mode).
    Check server log for more details.
    Error deploying archive sca_JMSToDBInsert_rev1.0.jar to partition "default" on server AdminServer [http://localhost:7001]
    #### Deployment incomplete. ####
    Error deploying archive file:/C:/SOA Suite/SOA_POC/Client2JMSapps/Client2JMSapps/JMSToDBInsert/deploy/sca_JMSToDBInsert_rev1.0.jar
    (oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)
    Could you guys please help me regarding this?
    Thanks & Regards,
    Souvik
    Edited by: Souvik Pal on Apr 16, 2012 9:40 PM

    You probably want to try the SOA Suite forum for OSB questions.
    SOA Suite
    There is an excellent book also:
    http://jeffdavies.org/
    The documentation goes over the fundamentals, but the book will be better for step by step examples.

Maybe you are looking for