Creating topics and queues programatically

Hi,
Here i my scenario.
1. I have created the required number of queues and topics using the SunOne MQ's imqcmd command.
2. I want to use the jndi apis to register the jndia names for these queues in the appserver. How do we do this?
3. How to make an entry in the server.xml file programatically?
Note:- i do no t want to use the asadmin-utility for this.
i want to use the standard api's available to do this task.
Pls help
regards
raghu

Hi Raghu,
You appear to have created various topics and queues
on a MQ broker via the imqcmd command (independent
of app server).
For JMS clients to access/use the above topics/queues,
JMS resources of type javax.jms.Topic and javax.jms.Queue
need to be created and exposed to app server's JNDI
context.
Running this command:
asadmin create-jms-resource ...
Creates a new jms-resource entry in server.xml and
the command:
asadmin reconfig ...
Creates the actual java object and introduces it into
app server's JNDI context. (A server restart does this too).
You mention that you want to do the above from your code.
I don't think it is possible to programatically add new
resources into server.xml. If there was a way, I wouldn't
recommend it be done from J2EE applications since JMS resource
management is an administrative task. Note that using
JNDI to bind an object from an application (I haven't tried it
in app server) may appear to work but this resource is not
persisted across restarts since it is not in server.xml.
Why do you want to do this ? Why does your application need to do
what asadmin already does today ?
Perhaps if I can better understand why you want to do this I can
help suggest other solutions.
regards,
-isa

Similar Messages

  • Can JMS topics and queues be clustered in a WLS 7.0 Cluster?

    We are installing a weblogic 7.0 cluster with 1 admin server and 2 managed
              node servers. Two nodes have been clustered. We are at the point where we
              need to configure JMS. Has any one implemented JMS in WLS 7 clustered
              environment? What are the things to watch out when clustering JMS? Can JMS
              topics and queues be clustered?
              TIA for any helpful hints and comments.
              Regards
              

    "Karim Ali" <[email protected]> wrote:
              >> Has any one implemented JMS in WLS 7 clustered
              >> environment?
              I'm currently working on a project with WLS 7 here at work, involving
              the implementation of BEA's JMS Cluster. So far, I really haven't had
              many hiccups.
              "Karim Ali" <[email protected]> wrote:
              >> What are the things to watch out when clustering JMS?
              At least in WLS 7, the biggest thing that stands out is the lack of
              automatic failover. Also, Message Paging -- make sure you configure
              paging high/low thresholds. Or, if you don't wish for it to occur but
              can't stop the server (very common these days with SLAs), set that
              byte/message high threshold to a very large number (correct me if I'm
              wrong, but I believe BEA recommends 2^63 -1).
              "Karim Ali" <[email protected]> wrote:
              >> Can JMS topics and queues be clustered?
              Well, since Topics and Queues are extensions of the
              javax.jms.Destination interface, the answer is: Yes!
              (SIDE NOTE: most people usually refer to them as a [JMS] "destination"
              -- it avoids a lot of conceptual baggage and plus, less typing!)
              You'll probably want to see this section of BEA's e-docs:
              http://edocs.bea.com/wls/docs70/adminguide/jms.html#config_distributed_destinations
              later,
              Brian J. Mitchell
              BEA Systems Administrator
              TRX
              Atlanta, GA
              email: [email protected]
              office: 404-327-7238
              mobile: 678-283-6530
              

  • Creating a destination queue programatically

    Is there any way to create a Destination Queue for a Connection Factory through my Java program, if I do not want to do it through the Admin console?
    Specifically, is there an API to create a JMS queue?
    Thanks.

    What do you mean by creating Queue for ConnectionFactory? ConnectionFactory is to create connection to the JMS server.
    JMS provides methods like createTopic and createQueue but they are for converting provider specific name into Topic or Queue object for destinations already existing. One can not create physical destinations through these methods. Exception is for temporary destinations. Methods are createTemporaryQueue and createTemporaryTopic. Their life period is that of the connection. They will be garbage collected when the connection is closed.
    Sagar
    http://www.sun.com/software/products/message_queue/

  • Distinguishing between topics and queues

              Hi,
              I have a generic piece of code that takes a javax.jms.Destination that does different
              things depending if the destination is a queue or a topic.
              The problem is that it seems that destinations in Weblogic implement both queue
              and topic:
              instanceof queue <new_JMSTopic_1>
              queue name: <new_JMSTopic_1>
              weblogic.jms.common.InvalidDestinationException: Destination must be a queue,
              ne
              w_JMSTopic_1
              at weblogic.jms.common.Destination.checkDestinationType(Destination.java
              :113)
              at weblogic.jms.client.JMSSession.createBrowser(JMSSession.java:1516)
              at weblogic.jms.client.JMSSession.createBrowser(JMSSession.java:1500)
              at Test.run(Test.java:100)
              at Test.main(Test.java:311)
              Is there anyway for me to programatically distinguish between queues and topics
              as there seems not to be any javadoc on weblogic.jms.common.Destination and instanceof
              does not work? I would prefer not to rely on exceptions.
              I'm using Weblogic 8.1 sp2.
              Thanks
              Riad
              

              Cool. Thanks for your help Tom.
              Riad
              Tom Barnes <[email protected]> wrote:
              >Hi Riad,
              >
              >This has come up before.
              >
              >For now, you may cast dest to weblogic.jms.common.DestinationImpl
              >and call "isQueue()". Normally, only the javadoc'd methods
              >in weblogic.jms.extensions are intended for public use,
              >but for this case we make an exception.
              >
              >In the next release, this method will be exposed through
              >a new public WL JMS API extension:
              >weblogic.jms.extensions.WLDestination,
              >and might not be available otherwise.
              >
              >Tom, BEA
              >
              >P.S. A java tip: The JDK's built-in "javap"
              >is useful for viewing an arbitrary class api.
              >As in "javap weblogic.jms.extensions.JMSHelper".
              >
              >Riad wrote:
              >> Hi,
              >>
              >> I have a generic piece of code that takes a javax.jms.Destination that
              >does different
              >> things depending if the destination is a queue or a topic.
              >>
              >> The problem is that it seems that destinations in Weblogic implement
              >both queue
              >> and topic:
              >> instanceof queue <new_JMSTopic_1>
              >> queue name: <new_JMSTopic_1>
              >> weblogic.jms.common.InvalidDestinationException: Destination must be
              >a queue,
              >> ne
              >> w_JMSTopic_1
              >> at weblogic.jms.common.Destination.checkDestinationType(Destination.java
              >> :113)
              >> at weblogic.jms.client.JMSSession.createBrowser(JMSSession.java:1516)
              >> at weblogic.jms.client.JMSSession.createBrowser(JMSSession.java:1500)
              >> at Test.run(Test.java:100)
              >> at Test.main(Test.java:311)
              >>
              >> Is there anyway for me to programatically distinguish between queues
              >and topics
              >> as there seems not to be any javadoc on weblogic.jms.common.Destination
              >and instanceof
              >> does not work? I would prefer not to rely on exceptions.
              >>
              >> I'm using Weblogic 8.1 sp2.
              >>
              >> Thanks
              >> Riad
              >
              

  • Dynamic topics and queues

    I'd like to know if a JMS client can create a topic or queue dynamically to be used by others JMS clients, or this is a operation which only can be performed by JMS server.
    Thanks in advance.

    I should add that the JMS spec does define an API for creating 'temporary destinations', e.g., using the QueueSession.createTemporaryQueue() method. However these have a few limitations over standard destinations: firstly, they only survive for the lifetime of the connection from which they were created, when the connection is closed the destination is destroyed and the contents is lost; secondly, although producers from any connection can produce messages to a temporary destination, only consumers that belong to the same connection within which the temporary destination was created are able to consume from a given temporary destination. All that said, temporary destinations can often be useful, particularly for handling request/response type interactions - see QueueRequestors too for more info.
    Best regards,
    David Ingham
    Arjuna Technologies - http://www.arjuna.com

  • How to create Bridge connecting distributed Topic to queue

    Hi,
    I am trying to create a bridge which connects distributed topic with JMS queue.
    Both the topic and queue are in the same domain.
    But it is not getting connected. Status is failed.
    Below is the configuration -
    <messaging-bridge>
    <name>DisTopicBridge</name>
    <target>Managed_soa_server01</target>
    <source-destination>DisTopicSource</source-destination>
    <target-destination>QueueSource1</target-destination>
    <selector></selector>
    <quality-of-service>Exactly-once</quality-of-service>
    <qos-degradation-allowed>false</qos-degradation-allowed>
    <durability-enabled>true</durability-enabled>
    <idle-time-maximum>60</idle-time-maximum>
    <async-enabled>true</async-enabled>
    <started>true</started>
    <preserve-msg-property>false</preserve-msg-property>
    </messaging-bridge>
    <jms-bridge-destination>
    <name>DisTopicSource</name>
    <adapter-jndi-name>eis.jms.WLSConnectionFactoryJNDIXA</adapter-jndi-name>
    <classpath></classpath>
    <connection-factory-jndi-name>jndi/TestConnectionFactory</connection-factory-jndi-name>
    <initial-context-factory>weblogic.jndi.WLInitialContextFactory</initial-context-factory>
    <connection-url>t3://xxx.xx.xxx.40:9101</connection-url>
    <destination-jndi-name>jndi/TestDistributedTopic</destination-jndi-name>
    <destination-type>Topic</destination-type>
    </jms-bridge-destination>
    <jms-bridge-destination>
    <name>QueueSource1</name>
    <adapter-jndi-name>eis.jms.WLSConnectionFactoryJNDIXA</adapter-jndi-name>
    <classpath></classpath>
    <connection-factory-jndi-name>jndi/QConnectionFactory</connection-factory-jndi-name>
    <initial-context-factory>weblogic.jndi.WLInitialContextFactory</initial-context-factory>
    <connection-url>t3://xxx.xx.xxx.40:9101</connection-url>
    <destination-jndi-name>jndi/TestQueue2</destination-jndi-name>
    <destination-type>Queue</destination-type>
    </jms-bridge-destination>
    Error in the log:
    <Warning> <MessagingBridge> <server-app-01> <Managed_soa_server01> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <d632395af8efc868:3b2a67dd:13752cfef88:-8000-00000000000d3c66> <1337198463908> <BEA-200026> <Bridge "DisTopicBridge" encountered some problems in one of its adapters or underlying systems. It stopped transferring messages and will try to reconnect to the adapters shortly. (The exception caught was javax.resource.ResourceException: Error setting message listener.)>
    <Info> <MessagingBridge> <server-app-01> <Managed_soa_server01> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <d632395af8efc868:3b2a67dd:13752cfef88:-8000-00000000000d3c67> <1337198463908> <BEA-200020> <Bridge "DisTopicBridge" is stopped.>
    <Info> <MessagingBridge> <server-app-01> <Managed_soa_server01> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <d632395af8efc868:3b2a67dd:13752cfef88:-8000-00000000000d3cb9> <1337198471319> <BEA-200034> <Bridge "DisTopicBridge" is shut down.>
    Is there any special way we have to configure the Bridge while using Distributed topic?

    Hello,
    Please find the more details about the error we are receiving ( BEA-200026 )
    http://docs.oracle.com/cd/E13222_01/wls/docs100/messages/Bridge.html
    BEA-200026
    Warning: Bridge "arg01" encountered some problems in one of its adapters or underlying systems. It stopped transferring messages and will try to reconnect to the adapters shortly. (The exception caught was t.)
    Description
    This message indicates that errors occurred during the process of transferring messages. The bridge stopped its connections to both adapters and will attempt reconnect soon.
    Cause
    There was a problem in receiving or sending messages to one of the sides of the bridge.
    Action
    No action required.
    I would also request you to specify the version of weblogic and verify if the adapter is being deployed properly.
    Please reveiw the bridge document
    http://docs.oracle.com/cd/E11035_01/wls100/bridge/bridgefaq.html
    Can you also check the status of the bridge
    Messaging –> Bridges –> YOUR_Bridge_NAME –> Monitoring [tab]
    Please provide the above required details
    -Vishal Iyer

  • Request-Reply in JMSAdapter SOA 11g using a Topic and a Queue

    Hi All
    We are trying to implement JMS Request\Reply with Tibco EMS Server using JMS Request\Reply. Problem is that Tibco has exposed a topic (where request message has been enqueued) and replies the message is a pre defined JMS queue.
    I am trying to use JMS adapter in SOA 11g (OSB doesnt support request\reply as soon as destination is selected as Topic ) with foreign JMS server setup in weblogic.
    Problem is that when i invoke the composite, it errors out saying that request destination has to be a queue. I tried to find any sample that talks about request-reply with topics but could not find any.
    Is request-reply pattern supported with topics or topic-queue combinations in JMS adapter 11g? Please let u know. Thanks

    Hi All
    The request-reply pattern is working with queues and topics, but not with topic and queue. The issue is with this:
    <adapter-config name="RemoteOSBJMSService" adapter="JMS Adapter"
    wsdlLocation="RemoteOSBJMSService.wsdl"
    xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
    <connection-factory location="eis/JMS/RequestReplyTopic"
    UIJmsProvider="WLSJMS" UiOperationMode="Asynchronous"
    UIConnectionName="chdsez147855d"/>
    <endpoint-activation portType="Reply_ptt" operation="Reply"
    UITransmissionPrimitive="Request-response">
    <activation-spec className="oracle.tip.adapter.jms.inbound.JmsConsumeActivationSpec">
    <property name="PayloadType" value="TextMessage"/>
    <property name="UseMessageListener" value="false"/>
    <property name="DestinationName" value="jms.soa.local.response.q"/>
    </activation-spec>
    </endpoint-activation>
    <endpoint-interaction portType="Request_ptt" operation="Request"
    UITransmissionPrimitive="Request-response">
    <interaction-spec className="oracle.tip.adapter.jms.outbound.JmsProduceInteractionSpec">
    <property name="TimeToLive" value="0"/>
    <property name="PayloadType" value="TextMessage"/>
    <property name="DeliveryMode" value="Persistent"/>
    <property name="DestinationName" value="jms.soa.local.request.topic"/>
    </interaction-spec>
    </endpoint-interaction>
    </adapter-config>
    The connection factory "eis/JMS/RequestReplyTopic" can either hold isTopic as false or true. If i set it to false, it doesnt even let me enqueue and if i set it to true. The reply doesnt arrive.
    Please help!

  • How to limit max number of downloads at once (and create a download queue)

    I just "upgraded" to Mozilla 26.0 last night and was quite irritated that they changed the made it so that I cannot access the old download window. Was it really necessary to get rid of the work-around to get to the old download window?
    Anyway, besides being more visually appealing, it previously downloaded two files at a time, unless I manually forced it to do more. The rest of the files would go into a download queue to wait their turn. After the update, it no longer creates a queue, leading to much slower downloads and it also slows my computer if I download too much.
    Is there any way that I can limit the max number of downloads (unless I want to force it to download more) like I had on the previous version of firefox? I would prefer not to add more any add-ons, so if there is an check-box that I missed somewhere or something in about:config that would allow me to do this it would be better.
    Also, is there any way to pause downloads now?

    Check these 2 articles
    https://support.mozilla.org/en-US/kb/change-firefox-behavior-when-open-file?esab=a&s=how+to+put+a+file+in+download+queue&r=2&as=s
    https://support.mozilla.org/en-US/kb/find-and-manage-downloaded-files?esab=a&s=limit+maximum+number+of+downloads+and+create+a+download+queue&r=1&as=s
    This might help you.
    Thank you.

  • JMS destination and queue in jndi.properties

    I am using activemq to create a very simple jms application.
    But there is a point I have not understand.The administered connection factory object that I use is org.activemq.jndi.ActiveMQInitialContextFactory which is the ActiveMq specific object. Do I have to do the same with the destination object?I read that Destination is also an administered object so I have to use an object of the ActiveMq? Specifically in the jndi properties where I define the queue property the value must be:
    1.an activeMq object
    2.a java class that implements the javax.jsm.Queue interface
    3.a physical name of another server?
    and in the code where I look up the destination object
    Destination destination = (Destination) jndiContext.lookup(queueProp);What exactly will be the queueProp? I would appreciate an example
    Thanking you in advance.

    I've read the documentation but I am afraid I miss some points.
    First of all I use the following code from an example in the net where the <b> activemq.jar is >/b> used and the jndi.properties is not used at all and the following code is working:package jms;
    import org.activemq.ActiveMQConnectionFactory;
    import javax.jms.Connection;
    import javax.jms.DeliveryMode;
    import javax.jms.Destination;
    import javax.jms.ExceptionListener;
    import javax.jms.JMSException;
    import javax.jms.Message;
    import javax.jms.MessageConsumer;
    import javax.jms.MessageProducer;
    import javax.jms.Session;
    import javax.jms.TextMessage;
    * Hello world!
    public class App {
        public static void main(String[] args) throws Exception {
            thread(new HelloWorldBroker(args), true);
            Thread.sleep(1000);
            thread(new HelloWorldProducer(), false);
            thread(new HelloWorldProducer(), false);
            thread(new HelloWorldConsumer(), false);
            Thread.sleep(1000);
            thread(new HelloWorldConsumer(), false);
                   Thread.sleep(1000);
            thread(new HelloWorldConsumer(), false);
            thread(new HelloWorldProducer(), false);
                    Thread.sleep(1000);
                 thread(new HelloWorldProducer(), false);
            thread(new HelloWorldConsumer(), false);
        public static void thread(Runnable runnable, boolean daemon) {
            Thread brokerThread = new Thread(runnable);
            brokerThread.setDaemon(daemon);
            brokerThread.start();
        public static class HelloWorldBroker implements Runnable {
            private final String[] args;
            public HelloWorldBroker(String[] args) {
                this.args = args;
            public void run() {
                org.activemq.broker.impl.Main.main(args);
        public static class HelloWorldProducer implements Runnable {
            public void run() {
                try {
                    // Create a ConnectionFactory
                    ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:61616");
                    // Create a Connection
                    Connection connection = connectionFactory.createConnection();
                    connection.start();
                    // Create a Session
                    Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
                    // Create the destination (Topic or Queue)
                    Destination destination = session.createQueue("TEST.FOO");
                    // Create a MessageProducer from the Session to the Topic or Queue
                    MessageProducer producer = session.createProducer(destination);
                    producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
                    // Create a messages
                    String text = "Hello world! From: " + Thread.currentThread().getName() + " : " + this.hashCode();
                    TextMessage message = session.createTextMessage(text);
                    // Tell the producer to send the message
                    System.out.println("Sent message: "+ message.hashCode() + " : " + Thread.currentThread().getName());
                    producer.send(message);
                    // Clean up
                    session.close();
                    connection.close();
                catch (Exception e) {
                    System.out.println("Caught: " + e);
                    e.printStackTrace();
        public static class HelloWorldConsumer implements Runnable, ExceptionListener {
            public void run() {
                try {
                    // Create a ConnectionFactory
                    ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:61616");
                    // Create a Connection
                    Connection connection = connectionFactory.createConnection();
                    connection.start();
                    connection.setExceptionListener(this);
                    // Create a Session
                    Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
                    // Create the destination (Topic or Queue)
                    Destination destination = session.createQueue("TEST.FOO");
                    // Create a MessageConsumer from the Session to the Topic or Queue
                    MessageConsumer consumer = session.createConsumer(destination);
                    // Wait for a message
                    Message message = consumer.receive(1000);
                    if (message instanceof TextMessage) {
                        TextMessage textMessage = (TextMessage) message;
                        String text = textMessage.getText();
                        System.out.println("Received: " + text);
                    } else {
                        System.out.println("Received: " + message);
                    consumer.close();
                    session.close();
                    connection.close();
                } catch (Exception e) {
                    System.out.println("Caught: " + e);
                    e.printStackTrace();
            public synchronized void onException(JMSException ex) {
                System.out.println("JMS Exception occured.  Shutting down client.");
    }But I want to make it work with jndi.properties.
    So I am trying to use a code where connectionFactory and Destination are loaded from the jndi properties.After experimenting with code
    the following is working
         try {
                   connectionFactory = (ConnectionFactory) jndiContext.lookup("connectionFactory");               
                  Destination destination = (Destination) jndiContext.lookup("QUEUE/MYQUEUE");        
              Connection connection = connectionFactory.createConnection();
              Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);if only I go to the activeqm/bin folder and open the broker.If I did that in the previous code(with no jndi prop)
    there was an exception that was saying that the port was already used.So I do not understand why in the one case opening broker is necessary for the connection and on the other hand it causes a problem.
    Moreover in the case that I invoke broker from bin folder. In this case I would like to ask a question.The activemq.xml is necessary? If yes it is there where we define the queue?
    If not where else apart from the jndi.properties do we define queue?
    Please if is possible provide me with an example of the necessary places that we define a queue.
    Thank you

  • When do VI and queue references become invalid?

    Hi all,
    I have a fairly complicated problem, so please bear with me.
    1)  I have a reentrant SubVI (let's call it VI "Assign") that has an input cluster of (VI ref, queue ref) (let's call the cluster type "Refs").  If the VI ref is invalid (first execution), the VI ref and queue ref are assigned values and are passed on as an output cluster of same type.  (The VI does other things too, but for simplicity only this is important.)
    2)  The VI that calls VI "Assign" (let's call it VI "Store") is not reentrant and has a local variable of type "Refs" that is wired to the input and output of VI "Assign".  This VI effectively stores the references.  The references returned by VI "Assign" are always valid right after the call, but after the problem condition described below, they are invalid at the start of all calls before they are passed to VI "Assign".
    3)  VI "Store" is called by multiple non-reentrant VIs, so the local variables of VI "Assign" retain their values (Has been tested and verified to retain their values).  The VI causing the problem in this case is a template VI of which multiple copies are launched (let's call it VI "Template").
    The problem is that the moment an instance of VI "Template" is closed, the queue reference becomes invalid, although the actual variant value of the reference remains the same.  The VI ref can become invalid or not, depending on small changes, but is always reproducible.  I assume there must be some similarity between VI and queue refs.  After spending some time researching, the Labview help states for the Open VI Ref component "If you do not close this reference, it closes automatically after the top-level VI associated with this function executes."  In this case I assumed it means that the moment the reentrant VI "Assign" finishes, the references will get cleared ??  So I made a non-reentrant VI (let's call it VI "NR Assign") that only assigns values to the references and VI "Assign" now calls this VI (It effectively does what I described VI "Assign" does).  I keep this VI alive by using it in a VI which never terminates and since it never terminates, the references should never become invalid.  Anyone still following?  This didn't solve the problem though.  If I reproduce the same scenario using only one instance of the template VI, it works just fine.  Furthermore, the VI and queue references are never closed, to aid analysis of the problem.  Can anyone shine some light on what happens when a template VI terminates?  Could this be the problem?
    Unfortunately I cannot include the code.
    Thank you whoever is able to make sense of this.
    Christie

    Christie wrote:
    Hi all,
    I have a fairly complicated problem, so please bear with me.
    1)  I have a reentrant SubVI (let's call it VI "Assign") that has an input cluster of (VI ref, queue ref) (let's call the cluster type "Refs").  If the VI ref is invalid (first execution), the VI ref and queue ref are assigned values and are passed on as an output cluster of same type.  (The VI does other things too, but for simplicity only this is important.)
    2)  The VI that calls VI "Assign" (let's call it VI "Store") is not reentrant and has a local variable of type "Refs" that is wired to the input and output of VI "Assign".  This VI effectively stores the references.  The references returned by VI "Assign" are always valid right after the call, but after the problem condition described below, they are invalid at the start of all calls before they are passed to VI "Assign".
    3)  VI "Store" is called by multiple non-reentrant VIs, so the local variables of VI "Assign" retain their values (Has been tested and verified to retain their values).  The VI causing the problem in this case is a template VI of which multiple copies are launched (let's call it VI "Template").
    The problem is that the moment an instance of VI "Template" is closed, the queue reference becomes invalid, although the actual variant value of the reference remains the same.  The VI ref can become invalid or not, depending on small changes, but is always reproducible.  I assume there must be some similarity between VI and queue refs.  After spending some time researching, the Labview help states for the Open VI Ref component "If you do not close this reference, it closes automatically after the top-level VI associated with this function executes."  In this case I assumed it means that the moment the reentrant VI "Assign" finishes, the references will get cleared ??  So I made a non-reentrant VI (let's call it VI "NR Assign") that only assigns values to the references and VI "Assign" now calls this VI (It effectively does what I described VI "Assign" does).  I keep this VI alive by using it in a VI which never terminates and since it never terminates, the references should never become invalid.  Anyone still following?  This didn't solve the problem though.  If I reproduce the same scenario using only one instance of the template VI, it works just fine.  Furthermore, the VI and queue references are never closed, to aid analysis of the problem.  Can anyone shine some light on what happens when a template VI terminates?  Could this be the problem?
    Unfortunately I cannot include the code.
    Thank you whoever is able to make sense of this.
    Christie
    All LabVIEW refnums do get deallocated automatically when the top-level VI in whose hierarchy the refnum was created goes idle (stops executing). You will have to make sure that the creation of a refnum is done inside a VI hierarchy that stays running for the entire time you want to use that refnum.
    Rolf Kalbermatter
    Message Edited by rolfk on 06-27-2007 11:52 AM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • I hope it's Kappy reading this. My HP Laserjet successfully installed but can't create a print queue...

    Hello Kappy - Thank you for persevering with my printer issues. Firstly, I use Firefox, recently updated & as yet have not discovered how to monitor downloads. The software for HP Laserjet 2200 was eventually automaticallly, and therefore correctly, installed.The Add Printer Pane accessed via the + button in the Printer & Scanner window is blank - the Name & Location and Print Using & Add areas are all grayed out, therefore I can't locate the printer driver even though it is in the Printer folder. I messed around with HP Direct Protocol & Line Daemon functions, entering my IP address, just to see if I could locate the printer driver - I could. However, I get a pop-up window which says 'Unable to verify the printer on your network' but it gives me the option of going ahead anyway, which I did. I was able to create a print queue, able to give a print command, the printer window opens, but the printer appears as 'busy', but of course it's not printing. To look at the issue from another perspective: previously I was running 10.5.8 on my old Power Mac G5 and a week before I shifted over the iMac I paused the printer but when tried to resume printing I got a pop-up message saying IPadmin > enter administrator name + password. Which of course I couldn't do - I discovered this was a bug afflicting10.5 & 10.6 operating systems; the only way I could get around it was by re-creating myself as a new administrator, which I did, and got the printer going again. So, if I have a "Network" printer perhaps there's another route to get the driver recognized... What do you think?
    Alex Carr

    Morning Alexander Carr,
    Thanks for using Apple Support Communities.
    Use this article to troubleshoot printer issues in OS X.
    For more information on this, take a look at this article:
    Troubleshooting printer issues in OS X
    http://support.apple.com/kb/ts3147
    Best of luck,
    Mario

  • Error while creating a temp queue (JMSException sayin .Destination dosnt ex

    i will just post part of my code
    Properties env = new Properties();
                        env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.NamingContextFactory");
                        jndiContext = new InitialContext();
                        queueConnectionFactory = (QueueConnectionFactory)jndiContext.lookup("QueueConnectionFactory");
                        queue = (Queue) jndiContext.lookup(queueName);
                   }catch (NamingException e) {
                        System.out.println("JNDI API lookup failed: " + e.toString());
                        System.exit(1);
                   try {
                        queueConnection = queueConnectionFactory.createQueueConnection();
                        queueSession = queueConnection.createQueueSession (false, Session.AUTO_ACKNOWLEDGE);
                        queueConnection.start();
                        queueSender = queueSession.createSender(queue);
                        requestMessage = queueSession.createTextMessage();
                                                                requestMessage.setText("does");
    /* The code works fine  till here , but below as soon as i say  replyQueue = queueSession.createQueue("todo"); , it says the destination dosenot exist. why isnt it creating  a temporary queue for me . Exception thrown is javax.jms.JMSException :
    This Destination Does Not Exist.
                        replyQueue = queueSession.createQueue("todo");
                                            Destination replyDestination = replyQueue;

    createTemporaryQueue() already creates a unique
    destination; you don't need to do anything else.
    Note as we discussed in the previous thread; you
    should not create a temporary destination per
    request; you should create 1 temporary destination
    per consumer/process and reuse it across requests;
    using a correlationID to match requests to
    responses.
    James
    http://logicblaze.com/
    Hello Mr.James,
    pleeeeeeeeeeeeeeease give me one example of how do i create only one temporary queue and differentiate resposes based on CorrelationID, i mean i am just not able to do it , i feel i will have to browse through entire queue matching for CorrelationId's, however u had earlier rejected this approach
    THEN HOW DO I MATCH RESPONSES IN TEMPORARY QUEUES TO MY REQUESTS BASED ON CORRELATIONID , PLEASE GIVE ME AN EXAMPLE

  • Can't create a print queue on OS 10.7 via HP driver installed by Apple

    I've ust bought a reconditioned iMac and am getting applications up and running, but I'm unable to get my HP Laserjet 2200DN printer working. The Add Printer pane (Print & Scan Preferences) remains blank: Name & Location and Print Using & Add areas are all grayed out, therefore I can't locate the printer driver even though it has been installed in the Printer folder. I've messed around with HP Direct Protocol & Line Daemon functions, entering my IP address, just to see if the printer driver could be located - it could. However, I get a pop-up window which says 'Unable to verify the printer on your network' but it gives me the option of going ahead anyway, which I did. I was able to create a print queue, able to give a print command, the printer window opens, but the printer is  'busy', but of course it hasn't been given the command to print  anything.  Any ideas?
    Alex Car

    Morning Alexander Carr,
    Thanks for using Apple Support Communities.
    Use this article to troubleshoot printer issues in OS X.
    For more information on this, take a look at this article:
    Troubleshooting printer issues in OS X
    http://support.apple.com/kb/ts3147
    Best of luck,
    Mario

  • Defining/Creating a JMS Queue in XI

    Scenario: Third party system would post messages in XI Jms queue, the messages would ultimately be sent to SAP.
    Need to create this JMS queue in XI which receives Jms messages from third party.
    Steps done:
    1) Defined Sender Communication Channel 'CC_JMS'
    JNDILookup name:jmsfactory/default/QueueConnectionFactory
    JMSQueue:jmsqueues/default/JMS_queue
    initialcontextfactory:com.sap.engine.services.jndi.InitialContextFactoryImpl
    JNDIServerAddress:<<serverIP>>:50004
    2)Defined sender ID for the outbound interface in SXMSIF
    3) Added job(I've given the name, is it right?) in SXMb_Adm and Defined message filter for that job. activated.
    4)configured message filter for the above sender ID. Queue name XBT1
    5)when checked in adapter monitor for JMS_queue.Shows the following error message
      CC_JMS : Sender channel. Details: Object not found in lookup of JMS_Queue.
    Questions:
    1)Is that the right approach i am following
    2)How do i assign CC_JMS  to JMS_queue
    3)How do i know if JMS_queue is up and running
    thnx
    sunil

    Hi Sunil,
    Please take a look at these..
    http://help.sap.com/saphelp_erp2005/helpdata/en/bc/996b908db7485fabbacb9930714d7e/frameset.htm -- Queue sender and reciever
    http://help.sap.com/saphelp_erp2005/helpdata/en/f4/2d6189f0e27a4894ad517961762db7/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/90/57849e5e3e45d784afc4e3bfa8136f/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/c1/739c4186c2a409e10000000a155106/frameset.htm
    Hope they help!
    cheers,
    Prashanth
    P.S Please mark helpful answers

  • Message Tracking and Queue Viewer access is denied - Exchange 2010

    Hello,
    I am experiencing Message Tracking and Queue viewer problems on my exchange server.
    Message Tracking problem
    When i run message tracking via EMC or powershell, i receive the following error;
    Failed to connect to the Microsoft Exchange Transport Log Search server on computer "myserver.mydomain.com.br". Verify that a valid computer name was used and the Microsoft Exchange Transport Log Search service is started on the target computer. The
    error message is: "Access is denied".
    Exchange Transport Log Search service is confirmed running and have tried by restarting the service
    Logon user is a member of Domain Admins, Enterprise Admins and Exchange Organization Administrators
    Message Tracking Logs are generated properly
    Queue Viewer problem
    When i run Queue viewer, i receive the following error;
    The Queue Viewer operation on computer "myserver.mydomain.com.br" has failed with exception. The error message is: Access is denied. It was running command.............................................................
    My server information are as follow;
    4 Exchange Server 2010 sp3
    2 Mailbox Server and 2 Hub/CAS
    Mail-flow is working fine
    What should I grant permission for a group of users can have access to the Message Tracking ?
    Regards,

    Hi!
    The group rule was created as described below. The error persists!
     [PS] C:\Windows\system32>Get-RoleGroup "Exchange Access Message Tracking" | fl
    RunspaceId                  : 4229f35d-90f1-4c4e-822d-387979921052
    ManagedBy                   : {bancobmg.com.br/Users/Raphael Henrique Duarte Campos}
    RoleAssignments             : {Message Tracking-Exchange Access Message Tracking}
    Roles                       : {Message Tracking}
    DisplayName                 :
    ExternalDirectoryObjectId   :
    Members                     : {bancobmg.com.br/Users/Raphael Henrique Duarte Campos}
    SamAccountName              : Exchange Access Message Tracking
    Description                 :
    RoleGroupType               : Standard
    LinkedGroup                 :
    Capabilities                : {}
    LinkedPartnerGroupId        :
    LinkedPartnerOrganizationId :
    IsValid                     : True
    ExchangeVersion             : 0.10 (14.0.100.0)
    Name                        : Exchange Access Message Tracking
    DistinguishedName           : CN=Exchange Access Message Tracking,OU=Microsoft Exchange Security Groups,OU=Global,DC=ba
                                  ncobmg,DC=com,DC=br
    Identity                    : bancobmg.com.br/Global/Microsoft Exchange Security Groups/Exchange Access Message Trackin
                                  g
    Guid                        : 0957152d-2073-4f75-b40e-63f45eb20f67
    ObjectCategory              : bancobmg.com.br/Configuration/Schema/Group
    ObjectClass                 : {top, group}
    WhenChanged                 : 06/02/2014 16:25:26
    WhenCreated                 : 06/02/2014 16:25:26
    WhenChangedUTC              : 06/02/2014 18:25:26
    WhenCreatedUTC              : 06/02/2014 18:25:26
    OrganizationId              :
    OriginatingServer           : bmg190.bancobmg.com.br
    [PS] C:\Windows\system32>Get-ManagementRoleAssignment "Message Tracking-Exchange Access Message Tracking" | fl
    RunspaceId                   : 4229f35d-90f1-4c4e-822d-387979921052
    User                         : bancobmg.com.br/Global/Microsoft Exchange Security Groups/Exchange Access Message Tracki
                                   ng
    AssignmentMethod             : Direct
    Identity                     : Message Tracking-Exchange Access Message Tracking
    EffectiveUserName            : All Group Members
    AssignmentChain              :
    RoleAssigneeType             : RoleGroup
    RoleAssignee                 : bancobmg.com.br/Global/Microsoft Exchange Security Groups/Exchange Access Message Tracki
                                   ng
    Role                         : Message Tracking
    RoleAssignmentDelegationType : Regular
    CustomRecipientWriteScope    :
    CustomConfigWriteScope       :
    RecipientReadScope           : Organization
    ConfigReadScope              : OrganizationConfig
    RecipientWriteScope          : Organization
    ConfigWriteScope             : OrganizationConfig
    Enabled                      : True
    RoleAssigneeName             : Exchange Access Message Tracking
    IsValid                      : True
    ExchangeVersion              : 0.11 (14.0.550.0)
    Name                         : Message Tracking-Exchange Access Message Tracking
    DistinguishedName            : CN=Message Tracking-Exchange Access Message Tracking,CN=Role Assignments,CN=RBAC,CN=BANC
                                   O BMG SA,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=bancobmg,DC=com,DC=br
    Guid                         : c3768a00-3f36-4532-b586-a06842a85e24
    ObjectCategory               : bancobmg.com.br/Configuration/Schema/ms-Exch-Role-Assignment
    ObjectClass                  : {top, msExchRoleAssignment}
    WhenChanged                  : 06/02/2014 16:25:26
    WhenCreated                  : 06/02/2014 16:25:26
    WhenChangedUTC               : 06/02/2014 18:25:26
    WhenCreatedUTC               : 06/02/2014 18:25:26
    OrganizationId               :
    OriginatingServer            : bmg190.bancobmg.com.br
    How can I identify if there is any setting to be done?
    Thank you!

Maybe you are looking for