OTMQ- Issue on creating temporary Queues

Hi,
I'm experiencing some issues when trying to create a temporary queue by using Oracle Tuxedo Message Queue. What is happening is:
1- I call tpqattach without any queuename and setting the qattachctl parameters:
     qattachctl.attachmode = TMQ_ATTACH_TEMPORARY;
    qattachctl.qtype = TMQ_ATTACH_PQ;
2- The tpqattach runs successfully (return is different than -1) but it does not set my queue name with the temporary queue name that has been assigned for my process.
Is there any parameter that I'm missing in order to create a temporary queue? How can I get the temp queue name?
Thanks in advance,
Brunno Attorre

Hey Bob,
Thanks for the answer!
That's exactly it.
Thank you,
Brunno Attorre

Similar Messages

  • What port numbers are used when creating temporary queues

    Using the following code as an example, what port(s) are used when creating temporary queues? Is it a range of ports? Is it random? And is it configurable? If you have any insight on this, please let me know. Thanks.
    QueueConnection con = connectionFactory.createQueueConnection();
    QueueSession session = con.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);
    TemporaryQueue replyQueue = session.createTemporaryQueue();

    The only ports I know about are the defaults ports:
    JMS 7676
    IIOP 3700
    Are these the only ports that are used, even for temporary queues?

  • CCE Admin Page issues while creating Precision Queue

    Hi,
    I am using CCE administration page to create attributes and precision queue's. I have no issues creating Attributes and assign them to an agent.
    But when i am creating precision queue's, upon saving i get the error(Attached), Please give me some insight... i am sure it is something related to DB. but its proven that i have the db working connection which is allowing me to add attributes and assigning attributed to agent.
    I am using UCCE v 9.0.4

    Thanks Dave... That fixes
    On side A - i get the error while creating attribute as, Is this any bug too?
     Error occurred
    Cannot connect to the back-end system; make sure the distributor, logger and router services are running.

  • Temporary queue - what am I doing wrong?

    I have two different apps - one server and many clients, both are working with OpenMQ 4.2 on SP1 Vista x86.
    Conception is:
    1. Server has an one permanent queue to whom clients send auth requests.
    2. Each time client prepares authorization request it creates temporary queue, where response from server should arrive - one queue per each client.
    3. Name of this temporary queue is attached to authorization request.
    But it doesn't work =((((((((
    Piece of code on client dedicated to temp queue:
    dataQueue = session.createTemporaryQueue();
    dataQueueName = dataQueue.getQueueName();then DataQueueName is being sent to server as simple String message (something like temporary_destination://queue/***.***.***.***/61253/1 )property where it tries to use this queue:
    // processing received message...
    dataQueue = new com.sun.messaging.Queue(receivedString);But it doesn't work, Connection not created exception occurs.
    What am I doing wrong?
    Thanks to everybody for your future answers.

    thanks for your answer!
    I've tried to work with autocreated queues as you wrote and it works, great =)
    but I have a problem when adopting your example
    Queue tmp = m.getJMSReplyTo();
    there is type mismatch here, tmp is an +com.sun.messaging.Queue+ object, but method +getJMSReplyTo()+ returns +javax.jms.Destination+ =(
    Edited by: GlebHappy on 17.11.2008 0:11                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • When Broker Restarts None of the Temporary Queues Are Created

    Somehow when the broker restarts none of the temporary queues are getting recreated. The queues were created successfully the 1st time and the applications were happily exchanging messages. Things just fall apart when the broker restarts.
    I'm able to reproduce this problem consistently by doing the following:
    1. Start imqbrokerd (mq start)
    2. Start client application
    3. Shutdown imbrokerd (mq stop)
    4. Start imqbrokerd (mq start)
    After the producers in the client application have reconnected the following messages are displayed in the console. I'm only able to get the client app to work again is if I restart the client apps.
    [02/Mar/2009:23:01:01 CST] attempting to set Message Bytes Limit to 10485760K for destination temporary_destination://queue/192.168.20.14/49823/1 [Queue]
    [02/Mar/2009:23:01:01 CST] attempting to set Message Size Limit to 10240K for destination temporary_destination://queue/192.168.20.14/49823/1 [Queue]
    [02/Mar/2009:23:01:01 CST] [B1065]: Accepting: [email protected]:57123->jms:37646. Count: service=9 broker=9
    [02/Mar/2009:23:01:01 CST] [B2083]: Unable to create destination temporary_destination://queue/192.168.20.14/49823/1 [Queue], autocreation is forbidden
    Do you guys have any idea on what's going on? Does anybody know of an existing workaround?
    Environment:
    - OpenMQ 4.3
    - CentOS 5.2
    - Sun JDK 1.6_05
    - Spring 2.5.5
    - Camel 1.3.0
    I also looked at the code and found only one location where the error message is used. I still need to figure our how I can get the conditional expression to evaluate to false.
    share/java/com/sun/messaging/jmq/jmsserver/core/Destination.java
    1395 if (!DestType.isAdmin(type) && !canAutoCreate(DestType.isQueue(type),type) && !BrokerMonitor.isInternal(destination)) {
    1396 throw new BrokerException(
    1397 Globals.getBrokerResources().getKString(
    1398 BrokerResources.W_DST_NO_AUTOCREATE,
    1399 getName()),
    1400 BrokerResources.W_DST_NO_AUTOCREATE,
    1401 (Throwable) null,
    1402 Status.FORBIDDEN);
    -bash-3.2$ /tmp/openmq-4.3/mq/bin/imqcmd query bkr -t q -n MYQUEUE -u admin
    Password: admin
    Querying the broker specified by:
    Host Primary Port
    localhost 7676
    Version 4.3
    Instance Name imqbroker
    Broker ID
    Primary Port 7676
    Broker is Embedded false
    Instance Configuration/Data Root Directory /tmp/openmq-4.3-data/var/mq
    Current Number of Messages in System 202
    Current Total Message Bytes in System 317483
    Current Number of Messages in Dead Message Queue 201
    Current Total Message Bytes in Dead Message Queue 316444
    Log Dead Messages true
    Truncate Message Body in Dead Message Queue false
    Max Number of Messages in System unlimited (-1)
    Max Total Message Bytes in System unlimited (-1)
    Max Message Size 70m
    Auto Create Queues true
    Auto Create Topics true
    Auto Created Queue Max Number of Active Consumers unlimited (-1)
    Auto Created Queue Max Number of Backup Consumers 0
    Cluster ID
    Cluster is Highly Available false
    Cluster Broker List (active) mq://192.168.1.123:7676/
    Cluster Broker List (configured)
    Cluster Master Broker
    Cluster URL
    Log Level DEBUG
    Log Rollover Interval (seconds) 604800
    Log Rollover Size (bytes) 268435456
    Successfully queried the broker.
    I also tried versions 4.4 and 4.2 and received the same behavior :(

    The application is inside an app server but we're not using a resource adapter as we're using Spring and Camel to hide the JMS details. Spring (JMSComponent) manages the connection directly. (We current don't have any JMS connection pooling as well.)
    <bean id="jmsTransactionManager" class="org.springframework.jms.connection.JmsTransactionManager">
    <property name="connectionFactory" ref="jmsConnectionFactory" />
    </bean>
    <bean id="jmsConnectionFactory" class="com.norvax.framework.jms.OpenMQConnectionFactory">
    <property name="openmqBrokerConfiguration">
    <props>
    <prop key="imqBrokerHostName">$remoting{openmq.hostName}</prop>
    <prop key="imqBrokerHostPort">$remoting{openmq.hostPort}</prop>
    <prop key="imqReconnect">true</prop>
    </props>
    </property>
    </bean>
    <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
    <property name="connectionFactory" ref="jmsConnectionFactory" />
    </bean>
    I'm going to write a very basic producer using Spring without using Camel and see if I'll get the same behavior. I'd like to see if the way Camel uses JMS is what's making OpenMQ broker to deny creation of temporary queues.
    Thanks,
    Jeff

  • Issues occurred while creating DataBase Queue for AQ adapter in SOA

    Hi All,
    I am new to AQ adapters,I am trying to create database queue with in the custom user but I got ora-01031 insufficient privileges,actually I follow the below two links
    http://askmesoa.blogspot.in/2012/09/working-with-aq-adapter-in-soa.html
    http://jamessmith73.wordpress.com/oracle-fusion-middleware/oracle-soa-bpm-11g-blogs/soa-10g/soa-hands-on-4/
    When I trying to execute the following code I got ora-01031 insufficient privileges.
    BEGIN
    DBMS_AQADM.CREATE_QUEUE_TABLE (
    queue_table => 'aq_user.msg_qt'
    , queue_payload_type => 'aq_user.message_type'
    DBMS_AQADM.CREATE_QUEUE (
    queue_name => 'msg_queue'
    , queue_table => 'aq_user.msg_qt'
    , queue_type => DBMS_AQADM.NORMAL_QUEUE
    , max_retries => 0
    , retry_delay => 0
    , retention_time => 1209600
    , dependency_tracking => FALSE
    , comment => 'Test Object Type Queue'
    , auto_commit => FALSE
    DBMS_AQADM.START_QUEUE ('msg_queue');
    END;
    Can anybody help me out how to solve the issue
    Regards
    Mani

    Hi Anuj,
    While I execute I had given aq_user1 only still I am geeting the same isssue.
    BEGIN
    DBMS_AQADM.CREATE_QUEUE_TABLE (
    queue_table => 'aq_user1.msg_qt'
    , queue_payload_type => 'aq_user1.message_type1'
    DBMS_AQADM.CREATE_QUEUE (
    queue_name => 'msg_queue'
    , queue_table => 'aq_user1.msg_qt'
    , queue_type => DBMS_AQADM.NORMAL_QUEUE
    , max_retries => 0
    , retry_delay => 0
    , retention_time => 1209600
    , dependency_tracking => FALSE
    , comment => 'Test Object Type Queue'
    , auto_commit => FALSE
    DBMS_AQADM.START_QUEUE('msg_queue');
    END;
    Regards
    Mani

  • Issue on configuring WTC queue Bridge

    Hi all,
    Currently I'm trying to configure a Queue Bridge from a JMS queue to a Tuxedo Queue and I'm experiencing some problems.
    The situation right now is the following:
    1- I've sucesfully created the JMS source Queue under the JMS section of my WebLogic.
    2- Created the WTC service, connecting to my Tuxedo Domain.
    3- Created the redirect from the JMS to the Tuxedo Queue.
    4- Created the Queue Bridge.
    The issue right now is, even though my JMS queue is working and have some messages in it, the WTC Queue Bridge fails to initialize with the following error:
    <Error> <WTC> <BEA-180095> <The tBridge could not initialize the JMS sourceName queue.>
    Any idea on why it's not being able to initialize? I've configured my Source Name with the JNDI name of the JMS Queue:
    weblogic.jms.Jms2TuxQueue
    Thanks in advance,
    Brunno Attorre

    Hi Todd,
    Regarding the OTMQ functionality, we were hoping to be capable of using the tpattach, tpdeatach, tpenqplus, tpdeqplus, etc..This mostly due to the fact that, when using a OTMQ, we need touse the non-active queues, temporary queues and other functionalities that are provided by these methods...
    Anyway, I think a solution for this from our side would be to implement a JNI call although, as you`ve stated before, this is not officially suported by the JATMI interface.
    If you see any other solution for these functionalities, I`d be very grateful if you could share them with us.
    Thanks very much!
    Brunno Attorre

  • Is there a way to create "temporary" tables in SAP database?

    Hello,
    Is there a way to create temporary tables in ABAP?
    Here is our scenario:
    1. Invoke a custom RFC that creates a temporary table and returns the name of the table.
    2. Invoke another custom RFC and pass this table name as parameter. This RFC internally does some INNER JOIN with the temporary table.
    3. Invoke the third RFC to delete the temporary table.
    Note that the name of the table cannot be static. We have many users using our application simultaneously and connecting to the SAP server.
    I would appreciate it if you could point me in the right direction.
    Thank you in advance for your help.
    Peter

    I just ran into a similar issue.  While only calling the select statement 2 times, each time had so many entries in the 'for all entries' list, that the compiler converted this into about 700 calls to the select.  Now since the select joined three real tables on the database, the trace shows this one select as being the slowest item in this application.
    I think that happened because 'for all entries' gets converted to an 'IN' clause, and then the total number of characters in any SQL statement has an upper limit.   So the compiler must make the select statement over and over until it covers all entries in the 'for all entries' list.  Is that correct?
    Since every database I ever saw has the concept of db temporary tables, I have used db temp tables many times for this sort of thing.
    The ABAP compiler could determine that more than one IN statement will be need, then use an alternate: write all the FOR ALL ENTRIES to a db temp table, then join on the db temp table, then drop db temp table.  Since the compiler does this sort of thing, no application code needs change to get the speed boost.

  • Unable to create temporary backing file

    My program is throwing out the error:
    temporary open: /var/tmp/BDB20825: Too many open files
    unable to create temporary backing file
    This happens after my program has been running for about 4 hours. The program appears to run out of file descriptors. The listing of /proc/<PID>/fd shows hundreds of lines naming the same file (/var/tmp/BDB20825), like this:
    lrwx------ 1 zobell users 64 Jul 28 14:41 622 -> /var/tmp/BDB20825 (deleted)
    That file does not exist. I suspect that someone is deleting but failing to close the file. A few open file descriptors with this deleted file occur slowly in the early hours, but not at a fast enough rate to bring the program down when it does. It looks like there is a sudden flood at the end.
    The program repeats this error slowly, and is stuck inside the db code. Here is the gdb backtrace I am seeing every time I interrupt:
    (gdb) where
    #0 0x00e74410 in __kernel_vsyscall ()
    #1 0x003d51dd in ___newselect_nocancel () from /lib/libc.so.6
    #2 0x002e5d39 in __os_sleep () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #3 0x002e43f1 in __os_openhandle () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #4 0x002e52ad in __os_open () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #5 0x002c0357 in __db_tmp_open () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #6 0x002c006c in __db_appname () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #7 0x002d50c9 in __memp_bhwrite () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #8 0x002d4a27 in __memp_alloc () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #9 0x002d62ec in __memp_fget () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #10 0x00232003 in __bam_new_file () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #11 0x002abc79 in __db_new_file () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #12 0x002abaff in __db_open () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #13 0x002a5d15 in __db_open_pp () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #14 0x0080644c in Db::open () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb_cxx-4.6.so
    #15 0x0053ebbe in DbXml::DbWrapper::open (this=0x405bbee0, txn=0x0, type=DB_BTREE, flags=65537, mode=0) at Transaction.hpp:62
    #16 0x00549247 in CacheDatabase (this=0x405bbed8, env=0x9c5a848, type=DB_BTREE, compare=0) at CacheDatabase.cpp:28
    #17 0x005497e2 in DocDatabase (this=0x405bbed8, env=0x9c5a848, compare=0) at CacheDatabase.cpp:46
    #18 0x00584ced in DbXml::Manager::createDocDatabase (this=0x9c5a830, compare=0) at Manager.cpp:694
    #19 0x00519467 in DbXml::CacheDatabaseMinderImpl::verify (this=0xfffffdfe, entry=@0x6ac2f790, cid=-514) at CacheDatabaseMinder.hpp:31
    #20 0x00519398 in DbXml::CacheDatabaseMinderImpl::findOrAllocate (this=0x6ac5b4f0, cid=1, allocate=true) at CacheDatabaseMinder.cpp:71
    #21 0x00518e59 in DbXml::CacheDatabaseMinder::findOrAllocate (this=0x6acd9fa0, mgr=@0x9c5a830, cid=1, allocate=true) at CacheDatabaseMinder.cpp:21
    #22 0x0055b12d in LazyDIResults (this=0x6acd9f98, context=0x6acd9fa0, contextItem=0x4979abc0, expr=@0x9ce5de8, txn=0x0, flags=0) at /devel/tfm/developers/szobell/berkeley-db-xml/dbxml-2.4.16/dbxml/include/dbxml/XmlManager.hpp:80
    #23 0x0052f9cd in DbXml::QueryExpression::execute (this=0x9ce5de8, txn=0x0, contextItem=0x4979abc0, context=@0xbfcb0e04, flags=0) at /devel/tfm/developers/szobell/berkeley-db-xml/dbxml-2.4.16/dbxml/include/dbxml/XmlQueryContext.hpp:86
    #24 0x00565a3a in DbXml::XmlQueryExpression::execute (this=0x0, contextItem=@0xfffffdfe, context=@0xbfcb0e04, flags=4294966782) at /devel/tfm/developers/szobell/berkeley-db-xml/dbxml-2.4.16/dbxml/include/dbxml/XmlValue.hpp:186
    #25 0x0805af4b in XmlRecordWithCounts::ExtractQueryString (this=0xbfcb0dd0, select=@0xbfcb0e2c, result=@0xbfcac1d0, qDocument=0xbfcb0e14) at src/XmlRecordWithCounts.cpp:401
    #26 0x080585f6 in OdRecord::GetRequiredContent (this=0xbfcb0dd0, name=@0xbfcac1e0, origin=@0xbfcac1d0, dest=@0xbfcac1c0, type=@0xbfcac1b0, dist=@0xbfcac198, totalCount=@0xbfcac194, route=@0xbfcac1a0, qDocument=0x0) at src/OdRecord.cpp:143
    #27 0x0804d9c3 in ProcessOd (fpPrivate=0x8e11098, odDb=@0xbfcb0dd0, fdDb=@0xbfcb0d20) at src/BuildFdDb.cpp:263
    #28 0x0804f4c8 in ProcessOneDest (fpPrivate=0x8e11098, odDb=@0xbfcb0dd0, fdDb=@0xbfcb0d20, dest={static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<No data fields>}, Mp = 0x9da758c "LAX"}, static Sempty_rep_storage = {0, 0, 69041, 0}}) at src/BuildFdDb.cpp:464
    #29 0x080501cd in main (argc=6, argv=0xbfcb10c4) at src/BuildFdDb.cpp:589
    At this time, the program is trying to extract fields out of an XmlDocument that is the result of a query. The program uses a pre-calculated XmlQueryExpression to extract a specific field. This may not be the best way to extract a field from a document, given the apparent overhead of needing a temporary file!
    My program queries two database files (OD.dbxml and FD.dbxml.new), and uses the information to add records to the second file. The databases are rather big:
    bash-3.2$ ls -l /tmp/*dbxml*
    -rw-rw---- 1 zobell users 5233745920 Jul 28 14:42 /tmp/FD.dbxml.new
    -rw-rw---- 1 zobell users 6539427840 Jul 13 10:16 /tmp/OD.dbxml
    (I keep them in /tmp because everywhere else uses NFS and performance is awful with NFS.)
    My environment:
    Red Hat Enterprise Linux Client release 5.3 (Tikanga) 32 bit.
    Berkeley DB XML 2.4.16, C++ interface.
    Disk space should not be an issue:
    bash-3.2$ df /tmp /var
    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/mapper/VolGroup00-tmp
    28948572 13044384 14409968 48% /tmp
    /dev/mapper/VolGroup00-root
    144742920 5333544 131938272 4% /
    I ran this program about a year ago and did not see this issue. I have made a few changes and linked to the newer version of the XML database since then. Any help is appreciated.

    I have more information about this problem.
    If I "disable" the routine __os_zerofill() in os_fzero.c, by having it always return (0), I no longer get an exception and my application appears to run smoothly. However, I have not determined what in this routine leads to the exception. And, I have no idea what the short and long term consequences of "disabling" this routine will be....
    -Coralie

  • Webutil failed to create temporary folder using Get_work_area()

    Friends,
    We have been migrating from 6i to 10g AS 3-tier environment. We have been using get_work_area() procedure to create temporary folders to transfer report output PDF files for printing. Intially we could able to transfer the files and from there we used webutil_host.blocking to issue the print command. It was working fine. Now webutil is failing to create the temporary folder in the server which was mapped as c:\temp in the webutil.cfg file. We are unable to find the reason behind this failure. Please put your comments for this.
    Apart from this if anybody is having solution to print the file to the local printer, please provide the step for that approach.
    Regards,
    KB

    In case /tmp directory is automatically deleted, is it possible to configure a custom directory for alsbTempJars dir in OSB to assure it is never deleted?Add the -Djava.io.tmpdir=newTempDir parameter in the JAVA_PROPERTIES section of the setDomainEnv.sh script. This new location should be outside of the /tmp dir to avoid being cleared by any process.
    I think best soultion would be to have alsbTempJars automatically created whenever /tmp is purged.Doing it on the fly may not be possible however you may anytime raise an enhancement request with support and if prod dev approves it, you may get a fix.
    Regards,
    Anuj

  • The distribution agent failed to create temporary files in 'C:\Program Files\Microsoft SQL Server\110\COM' directory. System returned errorcode 5.

    One of my replication job failed with below error, which means job failed because of permission issue on the folder. To resolve that, I have granted the permission and it started working fine. Now the question is as my job was running fine since long time
    without any issue then how suddenly the permission of the folder got omitted automatically? I am sure that no one deleted the permission from the folder and as the server is part of SQL cluster no failover occurs.
    Error:-The distribution agent failed to create temporary files in 'C:\Program Files\Microsoft SQL Server\110\COM' directory. System returned errorcode 5.
    Rahul

    Hi Rahul,
    Error code 5 indicates that the error is "access is denied."  Please make sure that the COM folder is excluded from any antivirus scan that occurs on the system.
    If the issue still persists, I recommend you use
    Process Monitor to find out a bit more about the accounts and access requests involved. Then grant write permission to the exact COM folder for the account that is running the SQL Server Agent service. For more details, please review the following similar
    thread.
    http://www.sqlservercentral.com/Forums/Topic1364832-1550-1.aspx
    Thanks,
    Lydia Zhang
    If you have any feedback on our support, please click
    here.

  • Distribution agent failed to create temporary files in

    Hello,
    we are configured transnational replication in sql server 2005 location, all replication jobs are running fine,
    while we checking sql server errorlog showing below error :
    Distribution agent failed to create temporary files in  'C:\Program Files\Microsoft SQL Server\100\COM' directory. System returned errorcode 5.
    NOte: normally we are configured replication 2005 [90] , but while see the above error it shows [100] comparability level . 

    Hi,
    If the account that is running SQL Server Agent does not have write access to the COM folder, the Distribution Agent will fail
    when it is running as a job. If you run the Distribution Agent from a command line by using an account that does not have write access to the COM folder, the same failure will occur.
    To work around this
    issue, grant write permissions to the COM folder for the account that is running the SQL Server Agent service. If you run the Distribution Agent from a command line, grant write permissions to the COM folder for the account that you use to run the Distribution
    Agent.
    For more information, please go through the below URL:
    http://support.microsoft.com/kb/956032/en-us  

  • How to bind Temporary Queue to Context in FioranoMQ

    I have two JMS clients sending messages to each other via FioranoMQ.
    And one client creates a temporary queue, for example
    Temporary Queue auction1Queue = qSession.createTemporaryQueue();
    My question is how to bind this auction1Queue to Context? so that the client on the side can lookup
    I don't use the usual way of set/getJMSReplyTo() to message because it will change the logic of my program.
    With SonicMQ, I just simply bind it like this
    jndi.bind("auction1", auction1Queue);
    then the other side just need to jndi.lookup("auction1")
    and with ActiveMQ it is even simpler
    Both side just need to lookup for the same name like that
    jndi.lookup("dynamicQueues/auction1");
    http://activemq.apache.org/jndi-support.html
    But FioranoMQ does not support both of the above operations.
    I don't really know how to do the same thing with FioranoMQ.
    Hope that somebody can help me.
    Thank you very much
    Edited by: dannytrinh1 on Apr 16, 2009 5:53 AM

    How to look up for temporary queue by using temporary queue name using JNDI context. I am getting lookup faild error" for temporary queue. While trying to bind this temporary queue name to jndi , it is throwing an exception as: notsupported exception. I am using ActiveMQ 5.2.
    See below sample code...
    tq = session.createTemporaryQueue();
    jndiContext.bind("queue.MyTempQueue",tq);

  • Cannot receive message on temporary queue

    I am executing the following code in a web application.
              It is sending a message to a JMS queue. The MDB
              listening to that queue processes the message
              and posts a reply to the temporary queue specified in
              the JMS Reply to field. The queue browser code below
              shows that the message is in the queue, but the receive
              times out and returns null. My question is why can't the
              receiver get the message?
              Am I missing something?
              Thanks in advance,
              -Doug.
              =====WEBAPP SIDE===========
              QueueConnection connection = null;
              QueueSession session = null;
              QueueSender sender = null;
              QueueReceiver receiver = null;
              Queue respQueue = null;
              try
              connection = QUEUE_CON_FACTORY.createQueueConnection();
              connection.start();
              session = connection.createQueueSession(false, Session.CLIENT_ACKNOWLEDGE);
              TextMessage textMessage = session.createTextMessage();
              textMessage.setText(xmlInput);
              if (wait)
              respQueue = session.createTemporaryQueue();
              textMessage.setJMSReplyTo(respQueue);
              receiver = session.createReceiver(respQueue);
              sender = session.createSender(INPUT_QUEUE);
              sender.send(textMessage);
              if (wait)
              QueueBrowser qB = session.createBrowser(respQueue);
              Enumeration enum = qB.getEnumeration();
              while (enum.hasMoreElements())
              Message msg = (Message) enum.nextElement();
              LOG.debug("msg = " + msg);
              return ((TextMessage) receiver.receive(10000)).getText();
              return DEFAULT_RESPONSE;
              =======MDB side============
              QueueConnection queueConnection = QUEUE_CON_FACTORY.createQueueConnection();
              queueConnection.start();
              QueueSession queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
              TextMessage textMsg = queueSession.createTextMessage();
              textMsg.setText(buffer.toString());
              QueueSender queueSender = queueSession.createSender((Queue)getReplyDestination());
              queueSender.send(textMsg);
              queueSender.close();
              QueueBrowser qB = queueSession.createBrowser((Queue)bpelCtx.getReplyDestination());
              Enumeration enum = qB.getEnumeration();
              while (enum.hasMoreElements())
              Message msg = (Message) enum.nextElement();
              LOG.debug("msg = " + msg);
              queueSession.close();
              queueConnection.close();
              ==== LOG ====
              [DEBUG] 2006-01-16 14:51:17,780 MDB - msg = TextMessage[ID:N<192225.1137444677780.0>, <unique-id-response xmlns
              ="htt...]
              [DEBUG] 2006-01-16 14:51:27,374 WEBAPP -
              msg = TextMessage[ID:N<192225.1137444677780.0>, <unique-id-response xmlns="htt..
              .]

    At first glance, this looks like a standard design to me. Does the same problem occur when there are no browsers?
              Tom
              (Performance note: It is quite CPU-intensive to continually create and close connections/temporary destinations/sessions/consumers/producers. Cache and/or pool them for re-use when possible. Use a cached anonymous producer on the MDB for sending replies [pass null for the dest when creating it, and specify the dest as a send parameter].)

  • MDBs responding via Temporary Queue

    Hello,
    I've been attempting to get this working in test code, but i seem to be missing something. I want a message producer to send a message to an administered queue, have the message processed by a Message Driven Bean, and have the bean post a response back to a temporary queue that was setup in the original producer. All over the net i find statements that this can be done and is reasonably normal, but i have not found a single code snippet to this effect, nor can i apparently get it to work on my own. I am using JMS with J2EE 1.3 on websphere 5.0.
    Within the message producer, i create the temporary queue and pass it in the JMSReplyTo field.
    <code>
    TemporaryQueue tempq = queueSession.createTemporaryQueue();
    message.setText("Temporary Queue Test Message");
    message.setJMSReplyTo(tempq);
    queueSender.send(message);
    </code>
    The MDB sees the message and onMessage is called normally. From within the MDB code, i have the temporary queue object (i print out the name of the queue in the message ReplyTo field with toString() to confirm) and i have the MDB context from getMessageDrivenContext() supplied by javax.ejb. Unfortunately, javax.ejb.MessageDrivenContext is not the same or similar to javax.naming.Context.
    To send a message, i need the send() method from the QueueSender interface, which is generated from the QueueSession interface, which is generated from the QueueConnection interface, which is generated from a QueueConnectionFactory, and is ultimately reliant upon javax.naming.Context. So, i have the (temporary) queue object, but see no method to put a message on it for consumption by the creator of the temporary queue. (messages on temporary queues can only be consumed by the creator of said queue. if no other producer can use it, too, perhaps i am missing the point on temporary queues)
    I can easily get the MDB to fire off messages to other administered queues. How do i get it to respond with a message on a temporary queue?
    Could somebody please enlighten me?
    thanks,
    cam

    Thanks Andreas, your answer sent me off on new trails to read, but something is still missing. I hope that you (or anybody else) is able to see what i do not.
    Your code was J2EE 1.4 (beta), but Websphere 5.0 still uses J2EE 1.3.1. I was able to translate most of your code back to the older form but some doesn't fit, which may be part of my problem (as shown below).
    I have connection factories and queues already setup on the server. they work fine as far as all other non-temporary queue usage is concerned.
    Using your code, here's some of the problems i have crossed while trying to sort this out
    public void onMessage(Message inMessage)
      Destination dest = (Destination) ctx.lookup("jms/t0");
      MessageProducer producer = session.createProducer(dest);
      producer.send(msg);
    }My first question is how are you looking up a temporary (i.e. dynamically created) queue with some hard-coded string ("jms/t0")? I assume that your string was meant to be arbitrary but it must still represent the destination, which is the temporary queue that doesn't have a hardcodable name (AFAIK). I have tried using the name inMessage.getJMSReplyTo().toString(), which in my case gives me "queue://WAS_localhost_server1/AMQ.10000009?persistence=1", but this only throws a NamingException (not found) when trying to do a lookup() on it.
    If you already had the Destination object from inMessage.getJMSReplyTo().toString(), why would you bother to go through a String lookup just to get the object again? (for use in the createProducer() call)
    To get past the above naming exception, i commented out the Destination getting line and used the object from the getJMSReplyTo() message method. In 1.3.1, the equivalent Producer line looks like:
    QueueSender producer = session.createSender(replyTo);which is pretty much like what i already had. Unfortunately, an error is reported that it is unable to open the specified queue. (J2CA0056I: The Connection Manager received a fatal connection error from the Resource Adaptor for resource JMS$MyMDBConnectionFactory$JMSManagedConnection@580144656. The exception which was received is MQJMS2008: failed to open MQ queue)
    I double checked to make sure both the creator of the temporary queue and the MDB were both using the same administered Connection Factory. They are. I don't know if it's relevant.
    Any further ideas?
    Thanks,
    cam

Maybe you are looking for