Non-persistent Queues and JMS API

Hi,
Is it possible to use non-persistent queues via JMS API. My application will always get an NullPointerException when trying to create a queue receiver i.e.
QueueReceiver rec = qsession.createReceiver(queue);
Any ideas and thx in advance,
Wolfgang

Mark,
          If you want this persistent behavior for non-persistent messages, presumably
          for performance reasons, use a persistent QOS backed by a JMS server with
          a file store that has synchronous-writes-disabled. As long as the O/S and/or
          hardware
          doesn't crash, no data will be lost, even if the WebLogic server is killed.
          See the JMS performance whitepaper on dev2dev.bea.com for details.
          Tom
          Mark wrote:
          > If you define a queue to be non-persistent, then all data is lost in the event
          > of a hardware or software failure.
          > What about in the case of a clean shutdown of the weblogic server hosting the
          > queue?
          > Are the messages held in the queue, paged to disk and restored when the server
          > is restarted?
          

Similar Messages

  • Sun ONE Message Queue and JMS

    Is Sun ONE Message Queue software a reference implementation or a
    product?

    Sun ONE Message Queue is a product. It is a production implementation of the JMS
    specification. Sun ONE Message Queue software performs the function of a message
    broker, essentially serving as a common denominator enabling the exchange of
    information between applications. A number of competing products perform this same
    function, but Sun ONE Message Queue software adds the availability of JMS APIs to
    promote an open, industry-standard interface to messaging middleware, thus
    promoting the platform interoperability of Java while also enabling developers of
    business applications to write to only a single interface. In and of itself, this does not
    make Sun ONE Message Queue software unique since other MOM products also
    conform to the JMS specification. However, the combination of JMS with high
    performance, low cost, ease of use, and Sun's world class distribution and support
    channels makes Sun ONE Message Queue software a highly competitive product.

  • Porting varray data from one db to another remote db using queues and jms

    We are trying to port a varray from one db to another db using queues and java jms. The varray is embedded in an object type (necessary according to oracle docs). The varray, embed object, and the queues are identical between the 2 dbs. We have used the capabilities in jdeveloper to generate the necessary classes to access the embed object and its payload the varray.
    However, when we attempt this:
    public void publish( com.wgint.sql.EaiType payload )
    throws JMSException, SQLException
    Connection dbConnection = ((AQjmsSession)session).getDBConnection();
    AdtMessage message = ((AQjmsSession)session).createAdtMessage();
    message.setAdtPayload( payload );
    ( (AQjmsTopicPublisher) publisher ).publish( publisher.getTopic(),
    message,
    agents );
    we get a ora-00902 error, invalid datatype. I cannot find a single example on technet or the internet in which someone has done something similar. I do not know if it is feasible or not.
    Steve

    Do you really need JMS to do this? If not, just let the AQ layer propagate your messages from your local to your remote queue. See the online doc how to do this.

  • Configuration for JMS Adapter Sensor action and JMS Queue sensor action..!!

    Hi,
    Id like my BPEL process to send an XML message to JMS on Websphere,I was able to do this through a JMS adapter.But I would more like to add sensors into my process which would really do the same thing - send an XML message to JMS Q.
    Now I understand that there are two ways to do this,JMS Queue and JMS Adapter - thorugh bpel sensor action.
    I am able to use JMS Queue and it works fine , but adds its own xml tags to the message,Is there any way I could send only my xml payload as a message to the queue??
    Also could any1 tell me what is the configuration for JMS Adapter sensor action?
    Any suggestions how do I go about it??

    Hey Anirudh,
    Thanx for the response :-)
    All these hold good when I have an AQ adaptor right,But the thing is I want to send a message to a 'JMS' queue with out actually using an adapter configuration wizard and everythng..So I resolved to JMS queue Sensor action..Heres the xml snippet from the sensorAction.xml files which is generated..
    <actions targetNamespace="http://xmlns.oracle.com/Test_JMS_Logging" xmlns="http://xmlns.oracle.com/bpel/sensor" xmlns:tns="http://xmlns.oracle.com/Test_JMS_Logging" xmlns:pc="http://xmlns.oracle.com/bpel/sensor">
    <action name="JMS_LogEntry" publishName="" publishType="JMSQueue" enabled="true" filter="" publishTarget="jms/L_Queue">
    <property name="JMSConnectionFactory">jms/L_QueueCF</property>
    <sensorName>ActivitySensor_JMS</sensorName>
    </action>
    </actions>
    This works grt and adds messages to the queue..But adds its own header info according to the sensor.xsd loacted at the Oracle_home\bpel\system\xmllib\ folder.
    Right now the XML message added to the Queue is:-
    <actionData xmlns="http://xmlns.oracle.com/bpel/sensor">
    <header>
    <sensor sensorName="ActivitySensor_JMS" classname="oracle.tip.pc.services.reports.dca.agents.BpelActivitySensorAgent" kind="activity" target="AddLEntr
    y" xmlns:pc="http://xmlns.oracle.com/bpel/sensor" xmlns:ns2="http://www.ulrhome.com/2008/10/L_Entry" xmlns:tns="http://xmlns.oracle.com/Test_JMS">
    <activityConfig evalTime="completion">
    <variable outputDataType="string" outputNamespace="http://www.w3.org/2001/XMLSchema" target="$WriteL_Produce_Message_InputVariable/L_Entry/ns2:L_Entry/ns2:LCName"/>
    </activityConfig>
    </sensor>
    <instanceId>950016</instanceId>
    <processName>Test_JMS</processName>
    <processRevision>v2009_04_15__40833</processRevision>
    <domain>default</domain>
    <timestamp>2009-04-15T11:21:23.596-04:00</timestamp>
    <midTierInstance>app01.ulrhome.com:9700</midTierInstance>
    </header>
    <payload>
    <activityData>
    <activityType>scope</activityType>
    <evalPoint>completion</evalPoint>
    <durationInSeconds>0.011</durationInSeconds>
    <duration>PT0.011S</duration>
    </activityData>
    <variableData>
    <dataType>12</dataType>
    <data>
    <ns0:LCName xmlns:ns0="LC_Test1http://www.ulrhome.com/2008/10/L_Entry">LC_Test1</ns0:LCName>
    </data>
    <queryName/>
    <target>$WriteL_Produce_Message_InputVariable/L_Entry/ns2:L_Entry/ns2:LCName</target>
    <updaterName>AddL_Entry</updaterName>
    <updaterType>scope</updaterType>
    </variableData>
    </payload>
    </actionData>
    My requirement is that I need to add a sensor to the BPEL process which posts 'Only my payload message to the JMS queue'..
    What I would want the message in the Queue to be is : -
    <data>
    <ns0:LCName xmlns:ns0="LC_Test1http://www.ulrhome.com/2008/10/L_Entry">LC_Test1</ns0:LCName>
    </data>
    Also while creating a Sensor action I get another option as JMS Adaptor,I am not sure of what value to type in this wizard..Heres what I keyed in..M sure this is not right..Cos it dosnt work :-)
    <action name="SensorAction_JMS" publishName="" publishType="JMSAdapter" enabled="true" filter="" publishTarget="jms/LoggingQueue">
    <property name="JMSConnectionName">Log</property>
    </action>
    </actions>
    Could any 1 tel me what values are the right values..And does JMS Adapter mean that I have to create a JMS Apator in the project and give that connection name as a Value..
    I am not finding sufficiant Documentation for 'JMS Adapter' so M clueless and right now any help will be appriciated :-)
    Regards,
    Akshatha.

  • How to mark ALBPM messages as non-persistent?

    Hi,
    When using the WLS JMS Server, persistence for the messages sent through the queue is not required since ALBPM uses the JMS Queue as a dispatching mechanism only. However, since the messages sent to the Queue are marked as “Persistent”, you must mark the Queue as “Store Enable”. This will allow the WLS JMS Server to accept messages that are marked as “Persistent”. Is there any setting by which we can make these messages as non-persistent so that queues don't have to be store enabled?
    Regards,
    Xavier

    The idea behind this is to increase the speed by using non-persistent queue.
    Please help.
    Regards,
    Xavier

  • MapMessage and JMS Event Generator

    Hello
    I need to set up a WLI JMS event generator that will consume a JMS MapMessage. It appears that the only message types supported by a JMS event generator are xml, rawData, string and none.
    I've already tried each of these and for each I get a message saying "Cannot publish non-TextMessage to channel of type String" or "Cannot publish non-ByteMessage to channel of type ...".
    I have sent MapMessage types using WLI's JMS controls. Is there a way to consume a MapMessage type via an event generator?
    Thanks
    Tom

    Bishu thanks, Channel type is defined as String, Message on JMS queue are of type String. Also can you elaborate on "JMS event generator check the type of message you want to process." that you mentioned. I have not found this option while configuring JMS EG. (We are using ver. 8.1 sp 5)
    This was working fine in local env. But when we configured message bridge between MQ queue and JMS queue, we startted getting error messages. I am trying to find out how does MQ stores messages. Doing integrations with MQ has been real headache for us.

  • Propagate JMS Request Queue to JMS response in Topic

    Hi guys
    I trying to create a composite application that give me the response for one request queue and receive the response in a topic JMS, but I cant propagate the received response to the composite application. I have the response in the mediator but the BPEL process are waiting for the response.
    I working in SOA Suite 11.1.1.2 and WLS 10.2
    My composite have a main BPEL process and 2 mediators with Adapters to JMS Queue and JMS Topic
    Someone know what I´m doing wrong???
    Thanks.

    Hi,
    The problem as described seems like it is specific to BPEL -- you might want to try posting to the BPEL forum at BPEL
    Tom

  • JMS ignoring settings to send a message as non-persistent

    I'm trying to send a BUFFERED (as opposed to PERSISTENT) message using JMS. I
    would expect the Oracle implementation of JMS to map the JMS
    non-peristent delivery mode in the Oracle BUFFERED delivery mode.
    However, try as I might JMS always sends messages as
    persistent, sample below. Is there any way I can send a BUFFERED AQ message
    using JMS?
    import javax.jms.*;
    import oracle.jms.*;
    import oracle.xdb.*;
    public class jmsbuftest
    public static void main (String args [])
    throws java.sql.SQLException, ClassNotFoundException, JMSException
    try
    String ora_sid = "***";
    String host = "***";
    String schema = "***";
    String password = "***";
    String queueName = "***";
    int port = 1521;
    Enqueue(ora_sid, host, schema, password, queueName, port);
    System.out.println("You should see 3 messages in " + queueName.
    They should be buffered but are persistent instead");
    catch (Exception ex)
    System.out.println("Exception: " + ex);
    public static void Enqueue(String ora_sid, String host,
    String schema, String password, String queueName, int port)
    QueueConnectionFactory qc_fact = null;
    QueueConnection q_conn = null;
    QueueSession q_sess = null;
    java.sql.Connection db_conn = null;
    Queue queue = null;
    AdtMessage adt_msg = null;
    QueueSender q_sender = null;
    oracle.xdb.XMLType xtype = null;
    String data = null;
    try
    qc_fact = AQjmsFactory.getQueueConnectionFactory(host,
    ora_sid, port, "thin");
    q_conn = qc_fact.createQueueConnection(schema, password);
    q_sess = q_conn.createQueueSession(true,
    Session.CLIENT_ACKNOWLEDGE);
    q_conn.start();
    db_conn = ((AQjmsSession)q_sess).getDBConnection();
    queue = ((AQjmsSession)q_sess).getQueue(schema, queueName);
    q_sender = q_sess.createSender(queue);
    adt_msg = ((AQjmsSession)q_sess).createAdtMessage();
    data = "<bolek>olek</bolek>";
    xtype = oracle.xdb.XMLType.createXML(db_conn, data);
    adt_msg.setAdtPayload(xtype);
    //try sending a buffered message, different ways, none of them
    works!
    ((AQjmsQueueSender)q_sender).send(queue, adt_msg,
    DeliveryMode.NON_PERSISTENT, 1,
    AQjmsConstants.EXPIRATION_NEVER);
    q_sender.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
    ((AQjmsQueueSender)q_sender).send(queue, adt_msg,
    DeliveryMode.NON_PERSISTENT, 1,
    AQjmsConstants.EXPIRATION_NEVER);
    adt_msg.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT);
    ((AQjmsQueueSender)q_sender).send(queue, adt_msg,
    DeliveryMode.NON_PERSISTENT, 1,
    AQjmsConstants.EXPIRATION_NEVER);
    q_sess.commit();
    q_sess.close();
    q_conn.close();
    catch (Exception e)
    System.out.println("Exception: " + e);
    }

    I believe you need to use the Oracle specific methods with "buffer"in their name,
    ie. (AQjmsProducer) bufferSend and (AQjmsProducer) bufferPublish. (Page 11-15 of Oracle® Streams Advanced Queuing User's Guide and Reference 10g Release 2 (10.2) )
    So far I've been producing my buffered messages in PL/SQL. I'm receiving them using (AQjmsConsumer) .bufferReceive.
    These require using the (now recommended) generic objects (not specific to Queue or Topic) ConnectionFactory, Connection, Session, MessageProducer.
    I have tried to send buffered messages, and got close, but not got it to work. My core code is:
    ConnectionFactory cfact = AQjmsFactory.getConnectionFactory(args[1], args[0], Integer.parseInt(args[2]), args[3]);
    Connection conn = cfact.createConnection(SCHEMANAME, SCHEMAPWD); // user& password
    // Send buffered probably needs non-transacted session
    Session sess = conn.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
    conn.start();
    Queue queue = ((AQjmsSession)sess).getQueue(SCHEMANAME, QUEUENAME);
    AQjmsProducer q_sender = (AQjmsProducer) sess.createProducer(queue);
    q_sender.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
    TextMessage txtmsg = sess.createTextMessage();
    txtmsg.setText("Cars Distribution");
    txtmsg.setJMSType("glopt");
    txtmsg.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT);
    q_sender.bufferSend(queue, txtmsg, 1,600);
    Unfortunately I get errors :
    JMS-204: An error occurred in the AQ JNI layer
    JMS-242: Illegal attempt to enqueue message with both immediate visibility and three phase enqueue process.
    It looks like I need to set visibility immediate, but I don't know how to do that in JMS. The AQjmsProducer.bufferSend API documentation says "When the in-memory queue is used, the enqueue operation is required to be in immediate visibility mode"
    The queue create for this example was:
    exec DBMS_AQADM.DROP_QUEUE_TABLE('DBEVENTQ_TABLE', force => true);
    begin DBMS_AQADM.CREATE_QUEUE_TABLE(
    Queue_table => 'DBEVENTQ_TABLE',
    Queue_payload_type => 'SYS.AQ$_JMS_TEXT_MESSAGE',
    Multiple_consumers => FALSE,
    message_grouping => DBMS_AQADM.NONE,
    Compatible => '10.0'
    end;
    begin DBMS_AQADM.CREATE_QUEUE(
    Queue_name => 'DBEVENTQ',
    Queue_table => 'DBEVENTQ_TABLE',
    Queue_type => DBMS_AQADM.NORMAL_QUEUE,
    Max_retries => 5,
    Retry_delay => 0,
    retention_time => 0 /* dont retain messages */
    end;
    exec DBMS_AQADM.START_QUEUE ('DBEVENTQ');
    If you get past this JMS-242: Illegal attempt to enqueue message with both immediate visibility and three phase enqueue process, please tell me.
    Regards, David

  • How to create and use dynamic queue in JMS

    Plz tell me how to create and use a dynamic queue in jms and can reciever file lookup it as it lookup any server configurred queue(written in the server).

    Hi,
    We can use Azure File services to do this, for more information, please have a look at this article:
    http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx. The Azure File service exposes file shares using the standard SMB 2.1 protocol. Applications running in Azure can now easily share files between
    VMs using standard and familiar file system APIs like ReadFile and WriteFile.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Consumers for distributed queues -- writing the JMS API

    Hi,
    I have Created a cluster MS_01 and MS_02.
    JmsServer-MS01 for MS_01 and JmsServer-MS02 for MS_02.
    Also have create a distributed queue called DistributedQueue-0 and a distributed connection factory called ConnectionFactory-0.
    I have been successfully able to loadbalance sending of messages using the cluster address.
    When i try to consume messages the consumers gets pinned to a MS_01. (As expected)
    I am looking for ways where in using JMS API i can read messages from both the manages instances.
    Appreciate any help.
    thanking you all in advance.
    Regards
    Girish Subbaramu.

    Hi,
    For consuming messages from a distributed queue, by far the best option is to use a WebLogic MDB, which has internal code designed to work well with WebLogic distributed destinations. When a distributed queue runs in the same cluster as the MDB, the MDB service will ensure that there's an MDB deployment instance that is locally servicing each queue member -- even when the queue members migrate between servers, or when they are added or removed due to configuration changes. When the MDB is communicating with a distributed queue in a remote cluster, an MDB running on a single server will automatically set up consumers for each remote member and will dynamically react to member up/down add/remove events.
    If you must use a straight javax.jms client, then I think there are two basic options. The first option is to ensure that that there are more than enough consumers to provide full coverage, and periodically close and re-open the consumers. The periodic close and re-open forces the consumers to load-balance again, and therefore helps handle the case when new destination members become available after the consumers have all attached. The second option is to create consumers directly on each member rather than on the distributed queues logical name (each member has a unique name that's advertised in JNDI).
    Hope this helps,
    Tom

  • JMS event generator only gets non-transactional queue msg

    Hi,
    I have created a JMS event generator to listen to a particular queue. It seems to work perfectly fine if, when posting a message to the queue that the JMS EG is listening to, the queue created is a non-transactional queue, i.e. queueConnection.createQueueSession(false, ...).
    However if I created a transactional queue to post message to the JMS EG, i.e. queueConnection.createQueueSession(true, ...), then the JMS EG can't seem to see the message. I checked in the WLI Admin console, JMS EG section, and there are no messages read by the particular JMS EG after I have posted the msg to the queue.
    My question is: is there a known limitation on the JMS EG that it can only read from a non-transactional JMS queue, or is this a bug? (I am using weblogic 8.1 sp2).
    Thanks
    Regards,
    xlfhk

    Hi,
    sorry, just discovered it's my mistake. Instead of using the transaction created when calling queueConnection.createQueueSession(true, ...), and committing that, I created a JTA transaction artificially wrapping the entire chunk of code.
    As a result, I ended up with a pair of transactions that are nested (I think ...), and the external transaction's commit was called when the nested JMS transaction hasn't been committed yet. As a result, no commit ever took place (I think again ...).
    I have now tried calling queueSession.commit() after sending the message. It seems to work fine. Thanks for the help.
    Regards,
    xlfhk.

  • Configure backout queue and Dead letter queue in weblogic JMS provider

    Hi,
    How to configure the JMS backout queue and dead letter queue in weblogic JMS provider in weblogic application server console?
    Any links or documents are highly appreciated.
    Thanks.

    Thanks anon. When i say backout message the poisonous message , A poison message is one which cannot be processed by a receiving MDB application. If a poison message is encountered, the JMS MessageConsumer and ConnectionConsumer objects can requeue it according to two queue properties, BOQUEUE, and BOTHRESH.
    Normally this happens in the websphere MQ . Where we will configure the backout queue and dead letter queue.
    The dead letter queue was always used in MQSeries (the last time I used MQ) to store messages that arrived at the queue manager but the queue didn't exist. For eample, if the message was address to queue manager X and queue Y, it would arrive via a channel at manager X. If the receiver channel discovered there was no queue Y, it would be placed in the dead letter queue.
    The backout queue, on the other hand, is more of an application-level thing (at least in terms of MQ). When an MQ client cannot process the message for some reason, it can back it out for later processing (back to it's original queue).If it's backed out too many times (the threshold can be configured), it gets moved to the backout queue.
    The Dead Letter Queue behaves the same as a Backout. I treat the Dead Letter Queue as the Crematorium for messages that cannot be recovered in the Error or Backout queues and have some last, non-business specific data that need be collected. Once the info is captured, the message is put down for good. Backout is good for analyzing messages for data that may need to be recovered to completely reprocess or be sent back to an application area for them to decision on.
    How we configure these in weblogic server both Backout and Deadletter queue , whether this is a simple queue in which we will set the error destination in case of any poisonous message so that it will logged in those queue?
    Thanks.

  • JMS api jar??? and implementations

    Is there a simple JMS api jar??? Kind of like the SAX/DOM in j2sdk1.4, where you can change the implementation. I am very confused on how to get started with a client that is not J2EE. Say I have a swing client. How do I do some JMS??? I would assume, I would use the client implementation provided by the JMS vendor, but I am looking at all the open source JMS vendors at
    http://java-source.net/open-source/jms
    When I look at the api's there is no ConnectionFactory like in the Java tutorial for JMS. ie. I can't find the apis. I feel like this is a really dumb question, but it can't be that hard.

    yes, I tried openJMS also. They had this site
    http://openjms.sourceforge.net/usersguide/jars.html
    and guess what, when you click on the jms jar, it leads you to a page with absolutely no jars.
    I also tried uberMQ, and something else. Any JMS setup would be good at this point. I did find a j2ee spec jar from geronimo. Why in the world don't they have one jar that everyone uses instead of everyone typing up their spec jar. This seems like bad way to do it when you want all the companies implementing the same api....I mean, what if I grab a non-spec compliant jms api jar and don't know it.
    Anyways, still just trying to get setup with as minimal a footprint as possible.
    thanks,
    dean

  • Sending message to a JMS queue and making DB update through a single container managed transaction

    Can we use container managed transactions to send message to JMS queue and make DB updates in a sigle transaction. If yes then do we need 2pC license. I am using weblogic 6.0 SP2 and my database driver do not supports XA

    If your JMS provider is XA compliant, you can.
    If you are using WebLogic 6.0 JMS, it supports 2PC.
    The JDBC resource that does not support XA can participate in the global transaction
    creating a TXDataSource and setting "enable two-phase commit"=true in the Configuration
    panel.
    About the JMSConnectionFactory, on the console, in WebLogic 6.0, in the "Transaction"
    tab folder, set "User Transactions Enabled"=true.
    In your code, use non-transacted sessions.
    For 2pc protocol, you need a license or you'll get an exception.
    Sergi
    Manoj Bansal <[email protected]> wrote:
    Can we use container managed transactions to send message to JMS queue and
    make DB updates in a sigle transaction. If yes then do we need 2pC license.
    I am using weblogic 6.0 SP2 and my database driver do not supports XA

  • JMS API and resume download

    Hi!
    Does the JMS API or the Sun Java System Message queue support "resume download" functionality in case there is a probleb in the connection of the client application. From what I have read, the Enterprise Edition of the Sun Java System Message Queue supports this. The standard version does not support this. Is this right?
    Thanks in advance! :)

    Reading messages from a queue is transactional, so if your code commits the transaction then the message is consumed. If your code fails to commit the transaction the message remains on the queue and may be re-read.
    There's nothing in the JMS API which allows you to automatically re-establish a lost connection however - if required you need to write the code to do this yourself.

Maybe you are looking for