Can I set up a message-listener on a temporary destination?

//Given session exists
Topic tempTopic = session.createTemporaryTopic();
TopicSubscriber receiver = session.createSubscriber(tempTopic);
//Topic is a named topic defined using Admin tool.
TopicPublisher sender = session.createPublisher(topic);
session.setMessageListener(new TempTopicListener());
Message msg = session.createObjectMessage();
msg.setJMSReplyTo(tempTopic);
sender.send(msg);
class TempTopicListener implements MessageListener
public void onMessage(Message mess) {
When a client responds to the above send message using the getJMSReplyTo() would TempTopicListener
be notified?
It looks like it should be because it was created off the
same session...
Would the above work. Basically, I want to be able to
recieve messages on this temporary topic.

It will work, there is an example of this in the tutorial:
http://java.sun.com/products/jms/tutorial/1_3-fcs/doc/j2eeapp4.html#1023543

Similar Messages

  • Can't set up Verizon Messages

    Installed Verizon Messages on my Windows 8 computer. Received the security code via text, entered it, and was greeted with this message:
    Only once did I actually see the Message+ window on the left. Every other time I've tried this it's immediately brought up this error message after entering my code. Tried several times, hasn't worked yet.

    I have the same problem. Have you resolved it? If so, how?

  • How to set adapter specific message attributes on Pi 7.1 inside a Java map.

    Hello,
    how can I set adapter specific message attributes in a Java mapping on PI 7.1.? The TransformationInput grants access to the DynamicConfiguration but the TransformationOutput doesn't. I have found threads refering to the old way of implementing Java mappings (e.g. Get dynamic filename in a Java Mapping (NOT UDF)). But there doesn't seem to be one refering to the actual PI.
    Kind regards,
    Heiko

    Using DynamicConfiguration from the TransformationInput works.

  • How to set a welcome message for a user when he is login

    in my server i am creatin a user "john" in solaris10 box when ever he logins in to the server he should get a message like "welcome john" what is the option to set the message ....
    how can i set a welcome message for a user in solaris
    please guide me the process how i can do
    Thanks in Advance

    THANK YOU FOR YOUR REPLY
    i have checked it out in /etc/motd
    its working fine but the message is coming for every user when they login
    i want message lilke
    if john is looged in
    than message like "welcome john"
    can u please tell me the procedure where to change in /etc/profile and /etc/.login

  • How can I set up a new account without auto deleting messages on the server?

    Ive got accounts on COMCAST.NET (are those imap accounts?) and when I created a user account on Thunderbird for one of them the autocreate process immedaitely started downloading messages from my server before I was able to set the "keep messages on server" flag. (Its been a few months, forgive me if I am not using the exact right option text but you get the idea.)
    How can I create a Thunderbird account that will download all the message on my server (comcast.net) and leave them all there?
    That's the only thing keeping me from switching to Thunderbird. Please help - comcast's online web client is not the most bug free thing in the world.
    (Note, I am setting up a new win7 system, had been using OE 6 on winXP. I assume I am better off trying this than running OE in XP in a virtual window - and even if I moved my old message bases from XP I still need to create an account that won't immediately start downloading/deleting messages from my server before I can configure it not to.)
    Any help appreciated.

    Comcast only offers POP accounts, and one way to set up the account and enter all the settings before it connects to the mail server, might be to do it Offline:
    https://support.mozilla.org/en-US/questions/991539#answer-547878
    The server settings are given [http://customer.comcast.com/help-and-support/internet/setting-up-thunderbird/ here], but the method is for Online account setup.

  • Is there a way that iTunes can act as a Radio Alarm Clock? I have found the radio station I enjoy listening to in the iTunes Radio List. Is there anyway iTunes (and my Mac) can be set to come-on and start playing that Radio Station from Sleep mode at spec

    Is there a way that iTunes can act as a Radio Alarm Clock?
    I have found the radio station I enjoy listening to in the iTunes Radio List. Is there anyway iTunes (and my Mac) can be set to come-on from Sleep mode and start playing that Radio Station at specific times of the day?
    Any App or plug-in that does that?
    Many thanks
    Kevin

    Turning your Mac into a clock radio.
    1.  In iTunes create a playlist that contains just the radio station you want to wake up to.
    2.  Export the playlist (as .m3u works well).  Get Info on your playlist file and look at the Open With entry to make sure it points to iTunes, VLC or some other app that will stream your station.
    3.  In iCal create an event entry at the time you want to wake up.
    4.  Right (or Control) click on your wakeup event and select Get Info.
    5.  For "alarm" select Open File.
    6.  Now under Open File there will be a place to add the file to open.  It will probably be some default entry (like iCal).  Click on it will allow you to select "other."  Then use the file dialog to select your playlist file.
    Your Mac will wake you up at the appointed time.  You don't need to keep iCal running.  If you want to put you Mac to sleep for the night then there is one more thing you need to do.  Open System Preferences to Energy Saver and click on the Schedule button.  Check Start up or wake and set the wake up time to slightly before your iCal alarm time.
    Dan

  • How do I use GarageBand as a amp/speaker to listen to my Electronic Drum set? I have a MIDI-USB cord already but I can't figure out how to listen to my set through the software using my computer speakers?

    How do I use GarageBand as a amp/speaker to listen to my Electronic Drum set? I have a MIDI-USB cord already but I can't figure out how to listen to my set through the software using my computer speakers?

    If you want to listen to the sounds of your drum set, you should use an audio cable and connect it to the computer's line-in, then create a real instrument track.
    If you use a Midi/USB interface, you'll have to create a software instrument track and select one of GB's drumsets as the instrument. Hopefully your drumset's midi notes are mapped to the right sounds in GB.

  • I recently bought a new macbook pro and set it up using the migration assistant and my mac mini.  I can't get the text message forwarding feature to work with both computers.

    I recently bought a new macbook pro and set it up using the migration assistant from my mac mini.  I can't get the text message forwarding feature to work with both computers.  It keeps saying that I only have 2 devices setup, my iPad and my macbook pro.  When I mess with the setting on my mac mini, it goes from saying that that is one of the devices to my macbook pro being the 2nd device.  I think that something happened as a result of my using the migration assistant and now it thinks that my macbook pro and my mac mini are one and the same computer.  Any ideas?

    Thanks, Sig.
    The old computer is a 2.6 Ghz Intel Core 2 Duo
    The new one is a 2.3 GHz intel core i7
    In going over this, thanks to "tallking it out" with you, I did discover the Text Edit problem.  Because I've still been unable to get the new computer text size (fonts or whatever) to match the old computer, I did not notice that the curser is now different--the line midway down the curser has to be placed on the line I am working upon, otherwise the edits go elsewhere on the page.  Now, with a bit of difficulty, I am able to get Text Edit to work correctly.
    If you have any ideas as to why my menu bar and Text Edit type are still so slow, I'd love to have them. 
    (I went through the process you suggested earlier, re my Trackpad preferences, and found no improvement.)

  • I have three iPhones using the same iTunes account, can we set something so that we are not all getting everyones txt messages to all phones?

    I have three iPhones using the same iTunes account, can we set something so that all our txt messages are not appearing on all phones?

    Settings > Messages > Receive At...
    Any iPhone that lists the same email will receive the same texts. This has to be changed in order to stop receiving on all devices.

  • How can I set up email so that if I delete a message on the iPhone it deletes it on my mac

    How can I set up my email so that if I delete a message on my Mac it will also be deleted on my iPhone 6 and iPad

    Why would you want that?
    Doing so would defeat the purpose of syncing the email account.
    Simply move the message to a folder or leave it in the inbox.

  • Can you set isolation levels of message-driven bean transactions?

    The problem: I have 3 different message-driven beans which each get a different type of message, except for a field that is common to all. That field is used as the primary key of an entity object. The message-driven beans configured to use a container managed transaction. Each message-driven bean, in processing the message, first does a lookup by primary key to see if the object associated with the key exists, and if it does not, it requests the entity's home object to create it. After that, they do further processing. The problem is that sometimes all the beans simultaneously get a message, resulting in each bean checking for the entity object at about the same time, and if they fail to find it (because none of them has created it yet), each creates an object, all with the same primary key. This is not caught until the beans start to complete their onMessage method, which I believe results in the container committing the transaction. One of the transactions will be committed successfully, while the other two will fail, get rolled back, and then be retried with the same message. The second time through, the other beans will find the entity object (since it has been created and committed) and they will complete correctly. In the end, they right thing occurs, except that there is a troubling exception or 2 in the log telling about the constraint violation (with the primary key) and the rollback. If it was just me, that would be fine, but our customer does not like to see exceptions in the log; that indicates to him that something is wrong.
    So, I am looking for someway to make sure that the actions of the message-driven beans are serialized. One suggestion from a colleague was to set the isolation level of the transactions being used by the container in processing the message-driven beans' onMessage method. However, the documentation does not mention any way to do this for a message-driven bean. Suggestions?
    Is the use of a UserTransaction a better way to do this? If I acquire a UserTransaction within the onMessage method of a message-driven bean, can I set its isolation level? How would this work? When I get a UserTransaction, does each client get a different transaction, or do they all get the same one?

    (1) The WebLogic JMS "unit-of-order" feature is a heavily adopted feature that was specifically designed to handle similar use cases - see the JMS developer guide for extensive documentation. In your use case, if "key" is used to define UOO, then there's no limit on the number of keys that can be processed concurrently, but messages for any particular key will be processed single-threaded in the order in which they were first submitted.
    Note that if you're using distributed destinations, the UOO feature is still fully supported - but the developer and/or administrator needs to decide whether to configure the destination to use "hash" or "path service" based routing (the JMS UOO edoc outlines the trade-offs).
    (2) Another alternative is to use a single MDB with max-beans-free-pool that processes all three types (as the other poster suggested). I think this assumes all MDBs run on the same JVM.
    (3) Another alternative is to use multiple queues, with a single MDB on each Q. Where some sort of hash algorithm is used to determine which Q is for the key. This approach is a "hand-coded" variant of the approach in (1) with "hash" based routing enabled...
    (4) If all MDBs actually do run in the same JVM, a third alternative is to use code the application to use a common lock to protect each key, eg, something like:
    // assume MyLock is simply a class with a "reference counter"
    // assume some global "staticHM" hash map that is all MDBs can access
    onMessage() {
    MyLock lock = null;
    key= msg.getKey();
    synchronized(staticHM) {
    lock = staticHM.get();
    if (lock = null) {
    lock = new lock();
    staticHM.put(key, new lock());
    lock.incRefCount();
    try {
    synchronized(lock) {
    // only one onMessage will be able to lock a particular key at a time
    do your work;
    } finally {
    synchronized(staticHT) {
    if (lock.defRefCount() == 0) staticHM.remove(lock);
    if (lock = null) staticHM.put(key);
    If multiple threads get a message with the same key, then only one thread at a time will work on the key.
    Hope this helps,
    Tom

  • How can I set a signature on my text messages?

    How can I set a signature on my text messages?

    I have iphone4, recently changed my phone number.  Prior to the change all of my outgoing sms showed my name and phone number.  Since I changed the number have not been able to show the new number on outgoing texts. So I don't understand why my number showed before but unable to add it now.....?
    I lost a lot of data when I changed the number so I performed a back-up restore, which restored the data I lost.  But now my text messages are showing my old phone number.....!!
    Any idea how I can change so the new number is displayed?
    I use texting a lot more than I do email with my phone. 

  • How can I set up a rule to delete all messages older than 6 months left in Apple Mail's main inbox?

    How can I set up a rule to delete all messages older than 6 months left in Apple Mail's main inbox?
    I have created other rules to move some of my daily messages into specific folders and I don't wish to auto-delete those.
    Just the general stuff that keeps piling up in my me.com main email box.  Mail such as FB announcements and other low priority stuff I want to look at before deleting but don't want to keep longer than a week or month.
    TIA
    thokitts

    Thanks, but I am looking for a more automated solution than hand marking emails as junk. I might as well move them to the trash myself.
    Again, these are emails I want to receive and quickly read, but not keep longer than a week or month or so. By setting a rule to toss any older than 30 days back then my Mail program (and thus my hard drive) won't be wasting so much space. For example, currently I have over 6000 read messages, with their attachments, in my main email box. I'd rather not have to physically attend to sorting the one I don't want out.
    The one I do keep for other reasons get moved into other folders.
    It seems this should be possible.
    thokitts

  • How can I set my phone to delete messages after a certain period of time? 6 months, 1 year??? It is taking up over 4GB on my phone.  I don't want to delete everything just the oldest ones.

    How can I set my phone to delete messages after a certain period of time? 6 months, 1 year??? It is taking up over 4GB on my phone.  I don't want to delete everything just the oldest ones.

    If you update to iOS 8, you can select that in Settings>Messages>Keep Message and then select your option. If you don't update to iOS 8, you'll need to do it manually.

  • New ipad3, just getting started, trying to get on facetime but when I try to set up a message appears saying my email address is already in use. I am now stuck and I can't get any further! Help please!

    New ipad3,just getting started,trying to get on FaceTime but when I try to set up a message appears saying my email address is already in use. I can not get any further, help please

    Millietrixie-
    Are you trying to call yourself to test FaceTime?  If so, you must have a second E-Mail address registered with your Apple ID.  In other words, there must be a different E-Mail address on each unit.
    Fred

Maybe you are looking for

  • Appending ns1: in Every field[MAPPING PROBLEM]

    Hi All, I am facing a strange problem when generating the output XML file. The file is generating in XML format with an additional ns1 in each line. Any idea on this guys. <b> <ns1:iABC xmlns:ns1="http://www.ABC.com/xmlschema/ABC/"> <ns1:header>     

  • Can't install OS10.4 due to error message

    I thought mrtotes had solved my last question and somewhat it did, but not all, so here is my additional problem and will give you the steps I took on my imac to get to this question, 1. Erased + added zeros, switched to install but no destination di

  • No error in PL/SQL, but error in Apex

    Hi All. I have configured the code from the How-to on uploading a spreadsheet to suit my own needs. It is the cut and paste method. In SQL developer I run: BEGIN conversion_upload.process_text('Argentina     Peso     0.3243000     3.0836 Australia   

  • Auto Login Error

    So I downloaded from the Microsoft site an auto log in file that way I wouldn't have to enter a password in for 8.1. Had I known that upgrading to 8.1 would force me to input a password then I would not have bothered with the irritant. Thing is somet

  • How to replace ws_filename_get function module to file_open_dialog

    how to replace ws_filename_get function module to file_open_dialog