Can I create a new Queue/Topic in client application?

In sun's JMS turorial the application client sends messages to the queue, which is created administratively, using the j2eeadmin command. Can I create a new destination(queue or topic) in my client's code?
Thanks very much.

Thank you very much, flhood. This is my first time to gain aid from website except my school's BBS.
But I still cann't solve the problem, here is my code, can you help me to check it if there is anywhere that I might do wrong?( I omit the try/catch part)
QueueConnectionFactory queueConnectionFactory =null;
QueueConnection queueConnection =null;
QueueSession queueSession =null;
Queue queue =null;
Queue tempQueue =null;
QueueSender queueSender =null;
TextMessage message =null;
final int NUM_MSGS;
Context jndiContext =null;
jndiContext =new InitialContext();
queueConnectionFactory =(QueueConnectionFactory)jndiContext.lookup("QueueConnectionFactory");
queueConnection =queueConnectionFactory.createQueueConnection();
queueSession =queueConnection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
queueConnection.start();
queue =queueSession.createQueue("MyQueue");
tempQueue =queueSession.createTemporaryQueue();(Actually I don't know why I shall need a tempQueue if I have the queue.)
queueSender =queueSession.createSender(queue);
message =queueSession.createTextMessage();
NUM_MSGS=10;
for (int i =0;i <NUM_MSGS;i++){
message.setText("This is message "+(i +1));
System.out.println("Sending message:"+message.getText());
queueSender.send(message);
These codes run well if I lookup in the JNDI for the existing queue "MyQueue", but when I try to make it dynamically, the resutlt shows(I only use texteditor+j2sdk1.4+j2ee1.3.1):
Java(TM) Message Service 1.0.2 Reference Implementation (build b14)
Sending message:This is message 1
Exception occurred:javax.jms.InvalidDestinationException: No Destination found f
or name: MyQueue
I use deloytool to check the destionation, of course the "MyQueue" hasn't been created, but I use try/catch to brace these two line:
queue =queueSession.createQueue("MyQueue");
queueSender =queueSession.createSender(queue);
Nothing gain.
They are really puzzling me!

Similar Messages

  • How can I create a new pattern?

    How can I create a new pattern?

    Sorry but is this doesn't appear to be a question about Apple Remote Desktop, Apple's software for managing networked Macs and the topic of this forum. I'd suggest you post in the forum for the version of Mac OS X you're running.
    Regards.

  • Solution to create scrolling "news" on website which client can update

    Hello all,I'd like to create a news scroller for a client
    website i am building where they can update the content in a MySQL
    database and the results get pulled ino the site into a scroller
    feature that will transition through all the topics listed. 
    Can anyone point me in the right direction or assit me in getting
    started?  I realize that Java is probably the best solution
    but wasn't sure if Spry might also be a possiblity.  Thanks in
    advance for the help..Josh Henry

    What I use is pretty simple and it suits me fine and the look
    and feel
    was ok'ed by the deisgner and seems to please people using
    this site
    (www.brittanyclub.org)
    a div with a auto over flow as exampled below
    .GeneralNews {
    overflow: auto;
    left: 5px;
    top: 180px;
    right: 340px;
    position: relative;
    height: 342px;
    width: 300px;

  • HT1918 If you are locked out of your account and you dont use that email address anymore, can you create a new account without losing your music library

    If you are locked out of your Itunes account and you no longer use the same email address, can you create a new account without losing your music library

    Just to let you know that I DIDNT swear in the last post. It was bleeped for using non offensive language. Just letting you know. (And @moderator this subnote isnt "off topic", its just letting colleagues know I'm not in the habit of swearing - something that the search and replace word-bot actaully makes it look worse than it is!!)
    Many thanks - please dont delet this footnote (again)
    Dom

  • How can I create a new iCloud account for a familiy member having a new iDevice and reuse one of my aliases for it

    Hi there,
    I moved into iCloud from the very beginning and started with one iCloud account for me and my family, making use of email aliases for family members. Now the number of personal iDevices grows and I want to create a new and separate iCloud Account for my son. The pity is, that I reserved his full name already as alias address on my initial iCloud account. If I now delete this alias, can I create a new account with the former alias as new primary email address?
    Or is there at least any transfer procedure supported for aliases between different accounts?
    Thanks for your help, lauterbachj

    Couldn't agree more... the folks who are getting penalized for this are the early adopters of .Mac/iCloud dating from the days when the only way to implement a "family" account was to use aliases. Now all my kids' / my wife's name aliases sit in my account, unable to move. I guess the good news is that if I delete them nobody else will get them, but this seems a pretty poor consolation.
    Would it really be so difficult to implement a "move this alias to another iCloud account" option that requires the "sender" and "receiver" to exchange some sort of code to implement the transation in order to prevent fraud?

  • TS2756 How can i create a new usb connection (service)  on my iMac for sharing internet from my iPhone5 ( i seem have to deleted it )

    How can i create a new usb connection (service)  on my iMac for sharing internet from my iPhone5 ( i seem have to deleted it )
    i know its not a problem whit my carrier o data plan or sharing preferences on the ipone because when i use it un my laptop it works perfectly through
    the usb and even works on the Imac through wifi and bluethood tethering but NOT through usb!!.
    the problem is that trying to make it work i deleted the "profile" usb iphone on the network prefereces panel. Now i only have 3 options: ethernet / wifi / bluetooth
    but not the usb iPhone i used to have.
    And when i try to add a new one i dont get a USB option.
    can some one help me please??
    this is how it looks (after the bluetooth PAN i used to have USB iPhone option)

    The question would be more appropriate in the Mac forums as it is not really related to the iPhone.

  • IPad2 and a new MacBook running Lion, Both Devices use the same Apple ID which is a Hotmail eMail id. Can I create a new iCloud eMail Id and use iCloud eMail and continue to use my Hotmail Id for my Apple Id and use it for iTunes, iCloud

    I have an iPad2 and a new MacBook running Mountain Lion. Both Devices use the same Apple ID which is a Hotmail eMail id. Can I create a new iCloud eMail Id and use iCloud eMail and continue to use my current Hotmail Id for my Apple Id for iTunes, iCloud.
    Note, I will use both Hotmail and iCloud eMail.

    Welcome to the Apple Community.
    In order to change your Apple ID or password for your iCloud account on your iOS device, you need to delete the account from your iOS device first, then add it back using your updated details. (Settings > iCloud, scroll down and hit "Delete Account")

  • How can I create a new ring tone for my iPhone 4?

    How can I create a new ring tone for my iPhone 4? I followed the Garage Band process and ended up with the ring tone I want as a AAC audio file. It got stored in my iTunes a a song rather than a ring tone. How do I make it a ring tone vs. a song? I tried dragging it t the Ring Tone category at the bottom of the ITunes list, but it won't alloow me to move it?

    There's also an easy to use Applescript over at Doug's Applescripts for iTunes. It automates the whole thing. All you do is set the start and stop time on a file in iTuens and run the script. It will do everything else.
    Make Ringable v1.1
    http://dougscripts.com/475

  • Admin Tool can not create any new database or model [nqserror 46131]

    Hi everyone!
    I can not create anything new in each layer on the admin tool. It marks unknown error.
    When I try to import metadata it send the message: [nqserror 46131] unresolved hostname, everything in online mode. I can modify everything offline, then replace the rpd and I can create reports in Answers. But I need to do all of these online mode.
    Everything else works well (Answers, Dashboards, Publisher). The server name is correctly put in the instanceconfig.xml.
    OBIEE Version: 11.1.1.6.0 (upgrade recently from 11.1.1.5). The scheduler does not start since migration.
    Server OS: Red hat enterprise edition
    Regards,
    Edgar Tercero
    Edited by: 958457 on 11-sep-2012 12:04
    Edited by: 958457 on 11-sep-2012 14:13

    Thanks but it not solve my problem.
    I detect no problem in my enviroment variables in the bi-init.sh
    This is what my admin tool log says:
    [OracleBIServerComponent] [ERROR:1] [] [] [ecid: ] [tid: 690] [nQSError: 43113] Message returned from OBIS. [[
    [nQSError: 46131] Unresolved host name: vrnmobiee. Could not get details about the specified host]]

  • Can I create a new itunes account and synch my iPod to it?

    I have an iTunes account, but have only bought music and apps on it for my son's iPod Touch.
    Now I have my own iPod Touch and we want to have separate accounts. I already synched my new iPod to my own account - the one where all his music is.
    What can I do at this point to let my son have his own account with all the music/apps he has purchased?
    Can I create a new account and synch my iPod to that? Can I change the email address on the first account to my son's email?

    Yes but you will need to authorize your computer for purchases on the old iTunes account.

  • I can't create any new reminders on my iPhone 5S with iOS 8.

    Hi.
    I have a 16 GB iPhone 5S with iOS 8.1.3. The problem I have is that I can't create any new reminders, at all. The problem started with my iPhone 4 (which I had before this phone), and I was using iOS 7 when the problem arose (but it didn't start immediately after I switched to iOS 7).
    One day when I had the iPhone 4, I noticed that all my reminders had disappeared, and that I couldn't create any mew ones because the New List + button is grayed out. I didn't try to fix it until I got my 5S. I got to the "Scheduled" list and was able to type in a reminder (I thought I was a genius). But then when the time I'd set for the reminder actually came around, nothing happened, and when I checked Reminders, the reminder I'd entered was gone.
    I tried using Siri to set a reminder but she said she couldn't.
    I've tried Googling it, but it just says to press the + button to make a new list, and then start typing.
    I recently got a MacBook Air which I synced up to my phone, and all my old reminders from my iPhone 4 are there, and I can create new reminders. Except they don't show up on my phone (which I think they're supposed to do, right?). They do show up on my computer, though.
    I've taken to emailing myself things I need to remember, which is fine, I guess, but sometimes they get buried in my inbox.
    Any help would be fantastic!
    Also, if you'd like me to clarify anything, I'm happy to do so because I don't know how much sense this makes.
    Thanks so much!

    I have exactly the same problem. I discovered it yesterday.
    I have a 16 GB iPhone 4 with iOS 7.1.2, just to note that we both are using different devices and different iOS versions. I will add here some screenshots of the problem.
    Main view of the application when opened (the only tappable elements here are the search bar and the clock icon on the top):
    Result of tapping the search bar and searching for an existing reminder:
    Result of tapping the clock for showing scheduled reminders:

  • HT4527 My laptop hard drive crashed; can I create a new itunes account and get my library from my ipod?

    My laptop crashed and I did not have all of my itunes library backed up. Can I create a new itunes account on a new computer and move my library from my ipod to this new itunes?

    Follow the steps given here to get your iPod synced to your new computer without data loss...
    https://discussions.apple.com/docs/DOC-3141

  • I can not create a new user account on eprint

    i can not create a new user account on eprint. I have been trying for over an hour and it repeats telling me that my email addresses are not entered correctly, however they match. ? 

    I have tried to create an account via ePrintCenter and it seems that the published application has several flaws in interpreting the provided input.
    1) In the Filed for last Name I enter my last name, which consist of only Alph Characters. The form however thinks that there is some sort of special character and rejects my Input.
    2) E-Mail address. is not identical; OK, so I do a quick OCR on the E-Mail and guess what they are identical. Again the form Fails to recognize this.
    3) Enter a password (2 Fields) and a third is displayed which is marked as "*required" but is not labeled as to what the required info could possibly be. Or is it a 3 password confirmation box, who knows.
    All I know is that a simple registration is a major pain with this HP site.
    Any Help as to how to alleviate this would of course be greatly appreciated.

  • It wants to verify my account and won't take the password, how can I create a new one or verify the existing one?

    I cloud wants to verify my account and won't take the password, how can I create a new one or verify the one it won't take?

    If you can't remember the password, reset it at...
    iForgot.com

  • Can I create a new album in the photos then delete  the photo fro the camera roll and it still stay in the album if so I do I do this?

    Can I create a new album and moved the pictures out of the camera roll into it then delete the pictures from camera roll and they still be in the aalbum if so how do I do this?

    Hey Nyanza,
    Clean out your Camera Roll the same way you'd clean out your still camera: sync to your computer. iTunes will move the photos to iPhoto (Mac) and give you the option of deleting them from Camera Roll. Do so. You can sync them back on once they are organized in iPhoto. Do you really need 3000 images?
    If you are on a PC, it's a little more difficult as there is no photo app on the PC to make it easy. Save the pictures to My Pictures like you would your regular still camera. Organize into albums. Sync the albums back on via iTunes.

Maybe you are looking for

  • Mac Mini doesn't chime at start-up...

    ...it's been doing this for a few days now. i'm positive the computer is not muted when i turn it off, and the internal speaker works when i play music through itunes. any ideas? thanks in advance. Mac Mini Intel Core Duo   Mac OS X (10.4.7)  

  • Tax Calculation in PO

    hi all,      Can you send the code for Tax Calculation for Purchase Order or  Can you tell the procedure for Tax Calculation in PO. Thanx & Regards Rami Reddy

  • Multiple albums only on iPod

    Hello I looked through some threats couldn't find the exact answer to my question tho, so I have about 5 albums that are by a music label and are music mixes I.e. With more than one artist per album. In iTunes I sorter them with album name "x" and al

  • BPF dont open the data region set for Excel Template

    Hi experts, i have a BPF which contain a step where i put in the entity dimension a current view type "inherit from data region". This dimension have a security "READ ONLY". Well when i open this BPF, with a user (who is OWNER in the Entity dimension

  • Aggregation Table Question

    Guys, Firstly let me say hello to the community. I am relatively new to OBIEE and can I apologise up front if some of my questions seem a little too straight forward. I am trying to setup some aggregation on my tables. I have 4 tables: Actual Summary