MDB QUeue example

I looking for a example of a queue in OC4J. AT least I need the configuration for defining the QueueConnectionFactory (there's no example as a queue)

Here's an example of a jms.xml file we use which works with queues. One of them is persistent while the other one is not.
Apart from this file (jms.xml) the rest of the stuff is very similar to the topic example given by Oracle.
A few points to note. Generally just change Topic for Queue in the sample code + don't forget the start the queue with the start() method.
Hope this helps
<?xml version="1.0"?>
<!DOCTYPE jms-server PUBLIC "Orion JMS server" "http://xmlns.oracle.com/ias/dtds/jms-server.dtd">
<jms-server port="9127" host="127.0.0.1">
     <!--Queue bindings, these queues will be bound to their respective JNDI path for later retrieval -->
     <queue-connection-factory location="jms/appointmentQCF" password="admin" port="9127" username="admin">
     </queue-connection-factory>
     <queue-connection-factory location="jms/objectMessageQCF" password="admin" port="9127" username="admin">
     </queue-connection-factory>      
     <queue-connection-factory location="jms/d0012QCF" password="admin" port="9127" username="admin">
     </queue-connection-factory>
     <!-- path to the log-file where JMS-events/errors are stored-->
     <!-- log>
          <file path="../log/jms.log" />
     </log -->
     <queue name="Appointment Queue" location="jms/appointmentQ" persistence-file="../persistence/MDB/appointment.queue" >
          <description>Appointment Queue</description>
     </queue>
     <queue name="Object Message Queue" location="jms/objectMessageQ" >
          <description>Object Message Queue</description>
     </queue>     
     <queue name="D0012 Queue" location="jms/d0012Q" persistence-file="../persistence/MDB/d012.queue" >
          <description>D012 queue</description>
     </queue>
</jms-server>

Similar Messages

  • MDB messagelogger example won't work

    Hi,
    I am trying to run the messagelogger example for MDB on linux. The oc4j verson 9.0.3
    I am getting an error while deploying which says
    "Error deploying file:/oracle/messagelogger-ejb.jar
    homes: Destination and Connection mismatch for MessageDrivenBean
    com.evermind.logger.MessageLogger: they must either both be Topic or
    both be Queue"
    Any suggestions as to what I am doing wrong.
    I have set up the jms.xml and the data-sources.xml file.
    thanks a lot
    Padmaja

    Check this link..
    http://otn.oracle.com/tech/java/oc4j/htdocs/oc4j-known-issues.html
    --Venky                                                                                                                                                                                               

  • MDB queue clean-up?

    Hi there,
    Is there a way to clean up the queue for an MDB? I have a MDB that updates the state of my entity bean and the bean in turn sends out a message. For some reason it works fine the first time the appp is deployed, but when repeated, then the MDB is called three times. I am not sure what is going on. Can any one help?
    Thanks in advance
    -r
    Here is my MDB

    google on "poison messages"

  • MDB on MQSeries queue undeployment

    I just started testing MDBs listening on MQSeries queues. WLS 6.1 and MQ 5.1. I followed
    the instructions in the BEA foreign JMS providers white paper, deployed the MDBs,
    queued messages and things seemed to work. But shutting down the server revealed
    that the undeployment of each MDB was slow. Slower than SSBs or MDBs listening on
    BEA queues. Would appreciate any suggestions about what it could be. Thanks.

    I just started testing MDBs listening on MQSeries queues. WLS 6.1 and MQ 5.1. I followed
    the instructions in the BEA foreign JMS providers white paper, deployed the MDBs,
    queued messages and things seemed to work. But shutting down the server revealed
    that the undeployment of each MDB was slow. Slower than SSBs or MDBs listening on
    BEA queues. Would appreciate any suggestions about what it could be. Thanks.

  • How to limit the number of instances of an MDB?

    Hi,
    I am using jboss 4.0.5 AS, and we have an mdb which listens to the jboss's jms queue. We are using ejb 3.
    we are configuring MDB like this
    @MessageDriven(name="LongProcessMessageBean", activationConfig = {
    @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
    @ActivationConfigProperty(propertyName="destination", propertyValue="queue/examples/OurSampleQueue")
    @ActivationConfigProperty(propertyName="maxSession", propertyValue="1")
    When there are multiple messages to the queue at the same time, it is creating multiple instances of the MDB, i want to limit the MDB instances to 1 ( I used maxSession=1, but it is not working).
    When the messages to the JMS queue are increasing, after certain point it is saying that the unable to allocate memory....threadpool is full.
    any suggestion would be appreciated............
    thanks.

    Hmmmm... I found the cause of the problem. The onMessage() method of the MDB is using some DB backend. This backend was catching an exception and continuing normally, but for some reason, the MDB executed six more times. Something like

  • R2_AQ_JMS MDB deployment Error--Urgent, please help!!

    Deploy a simple MDB to Oracle9iASR2, follow the steps:
    1. Define the MDB in ejb-jar.xml
    <message-driven>
    <description>MDB Queue Listener</description>
    <display-name>QueueListener Message Driven Bean</display-name>
    <ejb-name>QueueListenerMDB</ejb-name>
    <ejb-class>mdb.QueueListenerMDB</ejb-class>
    <transaction-type>Container</transaction-type>
    <message-driven-destination>
    <jms-destination-type>javax.jms.Topic</jms-destination-type>
    </message-driven-destination>
    </message-driven>
    2. Modify the orion-ejb-jar.xml
    <message-driven-deployment
    name="QueueListenerMDB"
    destination-location="jms/SalesTopic"
    connection-factory-location="jms/theTopicConnectionFactory"
    subscription-name="MDBSUB"
    >
    </message-driven-deployment>
    3. define the resource-provider in application.xml
    <resource-provider class="oracle.jms.OjmsContext" name="SalesJMS">
    <description> OJMS/AQ </description>
    <property name="url" value="jdbc:oracle:thin:@dell2400:1521:mydb"></property>
    <property name="username" value="user"></property>
    <property name="password" value="pssword"></property>
    </resource-provider>
    4. Deploy the ear file and got the following error:
    java.lang.NullPointerException
    at com.evermind.server.ejb.MessageDrivenHome.<init>(MessageDrivenHome.java:280)
    at com.evermind.server.ejb.EJBPackageDeployment.bindHomes(EJBPackageDeployment.java:239
    at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:589)
    at com.evermind.server.Application.postInit(Application.java:420)
    at com.evermind.server.administration.ServerApplicationInstallation.finish(ServerApplic
    ationInstallation.java:491)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:80)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
    Any idea on what's the cause of this. It seems that the Oracle 9i's support of MDB differs significantly from R1. The demo sample that works for R1 no longer work for R2. For example, the following DD doesn't seem to work with R2.
    <resource-ref>
    <res-ref-name>jms/Queue/senderQueueConnectionFactory</res-ref-name>
    <res-type>javax.jms.QueueConnectionFactory</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    <resource-env-ref>
    <resource-env-ref-name>jms/Queue/senderQueue</resource-env-ref-name>
    <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
    </resource-env-ref>
    <resource-ref>
    <res-ref-name>jms/Topic/senderTopicConnectionFactory</res-ref-name>
    <res-type>javax.jms.TopicConnectionFactory</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    Please help!! This is very urgent! Thanks in advance!

    <jms-destination_type> tag should be <destination-type> its a oracle error

  • Ni usrp example are not running on window 7 64 bit

    i have installed labview 2012 ,modulation toolkit, mathscript toolkit and usrp device driver 1.2. i am using window 7 64 bit operating system. i am trying to run example of usrp but it was not running it is not able to load NI-MAPro.lvlib files .any other toolkit required to be installed to run examples of ursrp ...please help  i am new to usrp and labview.

    well most example of modulation toolkit and other like  EX FM demod sound card (queue), ex fsk tx,ex pam rx , ex pam tx, psk, QAM  ....allmost all example are creating poblem..whenever i click it start loading file but it is not able load NI_MAPro.lvlib it ask for file path but i donot where these files are located.for example if i click to open FM Demod sound card (queue) example it is not able laod file NI_Mapro.lvlib:fft power spectrum for 1 chan(cdb).vi

  • In OSB, how to poll message from DTAQ(data queue in AS400)??

    Hi,
    In our OSB project, I have a data queue(AS400) in proxy side and Oracle AQ at business side, I can easily connect to Oracle AQ, but I am not able to understand how to connect with DTAQ (data queue). Is there any adapter supporting DTAQ  for OSB. or does OSB support DTAQ?? Please help me out.
    Thanks
    Deb 

    Hi Bolla,
    If I understand correct all you would need to do is in your connectivity map, publish the data to that queue.
    example high level hierarchy
    prj1Data1
    -Indata1 svc
    -Indata1 topic
    -Indata1Translation svc
    -Outdata1Delivery svc
    -queOutdata1
    prj2Data2
    -Indata2 svc
    -Indata2 topic
    -Indata2Translation svc
    -Indata2Delivery svc
    cmData2Out Indata2Delivery publishes to queOutdata1
    Hope this helps and does not add any additional confustion.

  • Windows Message Queue 64-Bit Support

    Just wondering if the Windows Message Queue will ever be updated to support 64-bit Windows?  It is some really neat low level tools on windows but only works fully in 32 bit Windows.
    I'm looking to detect when a window is resized, or has a mouse down event, based on its HWND not VI reference.  This is very easy to do with this library if you don't use 64 bit Windows.  Any other tips on accomplishing this is appreciated.
    EDIT:  Attatched is a VI that runs in LabVIEW 2011 32 bit.  On Windows 7 64-bit the "WM_Size" is not generated when the panel is resized.  The mouse event does get generated for some reason. (this VI relies on VIs in the library linked earlier)
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.
    Attachments:
    Windows Message Queue Example.vi ‏91 KB

    Emily-C wrote:
    Hi Hoovah,
    Are you running into specific issues in your application where LabVIEW events don't meet your needs? 
    Yes specifically when it is not a LabVIEW front panel that I am trying to detect changes to.  I would like to be able to detect when a window is resized like Notepad.  Something not LabVIEW.  This is possible with the Windows Message Queue Library but not with LabVIEW events.
    I think I may have a solution anyway and I'll need more time to test, but I can put this other window (Notepad for example) into a VI, then remove the ability to resize Notepad, but instead resize Notepad when the VI it is in gets resized.  Then I can detect when the window is resized because I can be detecting a Panel Size? event (or Pane) on the VI that Notepad is in.  This is alot of extra headache and things to keep track of but do able.  But this also adds other flexibilities that I think I may prefer.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Queue - 1 Producer and 2 Consumers

    I look for structure Producer-Consumer but i like that my aquisition data posted in queue would be dequeue for 2 consumers (like copies of data).
    In first consumer, the data would be analized e show in graphs. In second consumer, the data would be accumulated until 10 positions (staus queue = 10) and after this, the data would go to file in disk.
    This would be the better solution?
    I would can do it with 2 queues or have other way?
    Thx for any clue...
    Leonardo de S. Cavadas
    Maintenance Engineer and Inspection - Bureau Veritas do Brasil
    Engineer Metallurgist with emphasis in Advanced Materials
    Technologist in Computer Science

    Hello Jaime Rodriguez and Laemmermann,
    Thx for 2 proposes, but i want that all data would be stored in disk and my consumer for show analysis can't limit the process. I think in use discard rotine for put the show loop very fast for dont full queue (example: IF queue full, discard next analisys of data(that include several rotines) for show...until queue status = 50%...is one simple analysis for show only). I will have other aplication for complete analysis the all data). Limit of queue is computer's memory.
    My propose is in VI in attached (Labview 7.1).
    Wait for your good clues. Thx for all.
    Leonardo de S. Cavadas
    Maintenance Engineer and Inspection - Bureau Veritas do Brasil
    Engineer Metallurgist with emphasis in Advanced Materials
    Technologist in Computer Science
    Attachments:
    queue_exemplo.vi ‏68 KB

  • OC4J : configuring queues programmatically than in jms.xml file.

    Hi All,
    I'm using MDB-Queues and OC4J Scheduler in my application deployed in OC4J 10.1.3.1. I need to get rid of the dependency of "jms.xml" (under "<OC4J>\j2ee\home\config") where the queues are defined for the OC4J Scheduler. This is because, I cant always expect my client to add these entries into their app server setting. Can anyone please let me how this can be achieved..?
    Thanks
    Rajasekaran Iyanu

    hi,
    You can enter jms information in jms-server.xml which can be deploy with application and you dont need to configure AS .
    Regards

  • How to get Uniform distributed queue message counts with help of JMX

    Hi,
    Is there any way to get given queue message count, pending message counts using JMX. I can get all queue names and counts using JMX... after that i have to show only selected queue details.
    Thanks,
    -Som

    Hi,
    Following is the WLS snippet from an upcoming WLS JMS message management white paper that you can use to get the message statistics for a given destination.
    With appropriate command line parameters, this script can be used to poll and dump the statistics of any destination on a specified interval.
    Note that the WLST uses JMX API under the cover, so you can easily convert this into a pure JMX java program.
    Hope this helps.
    Kats
    WebLogic JMS Message Statistics Script for weblogic.WLST
    This script can be used for dumping message statistics of a given JMS Destination.
    Based on the arguments, the script creates can print out message statistics
    Usage: java weblogic.WLST msg_statistics.py [options]
    Options:
      username=...           username to connect to WebLogic Server       - defaults to "weblogic"
      password=...           password to connect to WebLogic Server       - defaults to "weblogic"
      url=...                Provider URL of the Administration Server    - defaults to "t3://localhost:7001"
      wlsServerName=...      WebLogic Server Name                         - defaults to "examplesServer"
      jmsServerName=...      JMS Server Name that hosts the destination   - defaults to "examplesJMSServer"
      jmsModuleName=...      JMS Module Name that defines the destination - defaults to "examples-jms"
      jmsDestinationName=... JMS Destination name to get the statistics   - defaults to "exampleQueue"
      pollingIntervalInSeconds=... Time interval between statistics dump  - defaults to "60 secs"
      redirectStdout=...     File name to redirect the stdout of WLST     - defaults to no redirect and the results wil be printed out to stdout.
      help                   Prints out this usage help
    Note that all the defaults are set based WebLogic Examples domain that is part of WebLogic Server installation.
    The "examples" server can be started from "C:/Oracle/Middleware/wlserver_10.3/samples/domains/wl_server" using startWebLogic.sh
    To try this script OOTB, start the "examples" server and run the JMS sample as described below.
    cd :/Oracle/Middleware/wlserver_10.3/samples/domains/wl_server/bin
    . ./setDomainEnv.sh
    cd $WL_HOME/samples/server/examples/src/examples/jms/queue
    javac -d . *.java
    export CLASSPATH=".;$CLASSPATH"
    java examples.jms.queue.QueueSend t3://localhost:7001
    Follow the prompts to populate the queue
    Examples:
      msg_statistics.py - Dump the message statistics of the exampleQueue for every 1 min
      msg_statistics.py user=weblogic pass=weblogic url=t3://localhost:7001
                          wlsServerName=examplesServer jmsServerName=examplesJMSServer
                    jmsModuleName=examples-jms jmsDestinationName=exampleQueue
                    pollingIntervalInSeconds=30
    For more details on JMS Message Management using WLST, see "WebLogic JMS Message Management In a Nutshell" whitepaper.
    from weblogic.jms.extensions import JMSMessageInfo
    from weblogic.messaging.kernel import Cursor
    from javax.jms import TextMessage
    from javax.jms import DeliveryMode
    from java.io import ByteArrayOutputStream
    from java.io import StringBufferInputStream
    from java.util import Properties
    from java.util import Date
    from java.lang import *
    import jarray
    import sys
    # shows_messages() definition
    def dump_statistics(wlsServerName, jmsServerName, jmsModuleName, jmsDestinationName, pollingIntervalInSeconds):
      pollingIntervalInMillis = long(pollingIntervalInSeconds) * 1000L
      domainRuntime()
      cd ('ServerRuntimes')
      spath = wlsServerName + "/JMSRuntime/" + wlsServerName +".jms"
      cd (spath)
      fullDestName=jmsServerName+'/Destinations/'+jmsModuleName +'!'+jmsDestinationName
      cdPathForDestName='JMSServers/'+ fullDestName
      cd (cdPathForDestName)
      while 1:
        print "========================================================================================================================"
        print "Messages     Messages      Messages      Messages      Bytes        Bytes        Bytes           Bytes    "
        print "Current       Pending       High          Received      Current      Pending      High            Received "
        print "Count         Count         Count         Count         Count        Count        Count           Count    "
        print "========================================================================================================================"
        s = "%8d     %8d     %8d     %8d     %8d     %8d     %8d     %d" % (cmo.getMessagesCurrentCount(), cmo.getMessagesPendingCount(), cmo.getMessagesHighCount(), cmo.getMessagesReceivedCount(), cmo.getBytesCurrentCount(), cmo.getBytesPendingCount(), cmo.getBytesHighCount(), cmo.getBytesReceivedCount())
        print s
        print ''
        Thread.sleep(long(pollingIntervalInMillis))
    # Function to handle script arguments of the variety 'n=v', where
    # arguments are placed into a dictionary of nv pairs and returned
    # to the caller
    def argsToDict(args):
      d = {}
      for arg in args:
        #print "arg: " + arg
        pair = arg.split('=', 1)
        #print "pair: " + str(pair)
        if len(pair) == 2:
          # binary argument, store as key pair
          key = pair[0]
          val = pair[1]
          d[key] = val
        else:
          # Unary argument, story with empty (non-null) key
          d[arg] = ''
      print "Arguments: " + str(d)
      return d
    # Returns the value found in the provided map, at the location
    # specified by 'key'; if no entry exists in the map for 'key',
    # the provided default is returned.
    def getValue(dict, key, default=None):
      ret = default
      if dict is not None:
        try:
          ret=dict[key]
        except KeyError:
          pass
      return ret
    # Connect to the target server specified in the provide args
    def connectIfNecessary(argsDict=None):
      # connect if necessary
      if connected == "false":
        user=getValue(argsDict, "user", "weblogic")
        passwd=getValue(argsDict, "pass", "weblogic")
        url=getValue(argsDict, "url", "t3://localhost:7001")
        print "Connecting with [" + user + "," + passwd + "," + url + "]"
        connect(user,passwd,url)
    # Retrieve a positional argument if it exists; if not,
    # the provided default is returned.
    # Params:
    # pos   The integer location in sys.argv of the parameter
    # default  The default value to return if the parameter does not exist
    # returns the value at sys.argv[pos], or the provided default if necesssary
    def getPositionalArgument(pos, default):
      value=None
      try:
        value=sys.argv[pos]
      except:
        value=default
      return value
    # Main
    argsDict = argsToDict(sys.argv)
    redirectOutputFileName = getValue(argsDict, "redirectStdout")
    if redirectOutputFileName is None:
      pass
    else:
      redirect(redirectOutputFileName, 'false')
      print "The output from this program gets written into file " + redirectOutputFileName
      sys.stdout = open(redirectOutputFileName, "w")
    isHelp = getValue(argsDict, "help")
    if isHelp is None:
      pass
    else:
      print __doc__
      exit()
    connectIfNecessary(argsDict)
    wlsServerName = getValue(argsDict, "wlsServerName", "examplesServer")
    jmsServerName = getValue(argsDict, "jmsServerName", "examplesJMSServer")
    jmsModuleName = getValue(argsDict, "jmsModuleName", "examples-jms") 
    jmsDestinationName = getValue(argsDict, "jmsDestinationName", "exampleQueue")
    pollingIntervalInSeconds = getValue(argsDict, "pollingIntervalInSeconds", "60")
    dump_statistics(wlsServerName, jmsServerName, jmsModuleName, jmsDestinationName, pollingIntervalInSeconds)
    disconnect()
    print 'End of script ...'
    exit() 

  • How to send message from one project queue to another project queue

    Hi ,
    In my scenarion I have project where y destination is queue viz queTest.
    In the second project my input is JMS queue . where I to point this project input queue is queTest(first project queue).
    Please suggest me on this as I am working first time in Java CAPS
    Thanks in advance.

    Hi Bolla,
    If I understand correct all you would need to do is in your connectivity map, publish the data to that queue.
    example high level hierarchy
    prj1Data1
    -Indata1 svc
    -Indata1 topic
    -Indata1Translation svc
    -Outdata1Delivery svc
    -queOutdata1
    prj2Data2
    -Indata2 svc
    -Indata2 topic
    -Indata2Translation svc
    -Indata2Delivery svc
    cmData2Out Indata2Delivery publishes to queOutdata1
    Hope this helps and does not add any additional confustion.

  • R2_AQ_JMS deployment Error--Urgent, please help!!

    Deploy a simple MDB to Oracle9iASR2, follow the steps:
    1. Define the MDB in ejb-jar.xml
         <message-driven>
              <description>MDB Queue Listener</description>
              <display-name>QueueListener Message Driven Bean</display-name>
              <ejb-name>QueueListenerMDB</ejb-name>
              <ejb-class>mdb.QueueListenerMDB</ejb-class>
              <transaction-type>Container</transaction-type>
         <message-driven-destination>
         <jms-destination-type>javax.jms.Topic</jms-destination-type>     
         </message-driven-destination>          
         </message-driven>     
    2. Modify the orion-ejb-jar.xml
    <message-driven-deployment
    name="QueueListenerMDB"
    destination-location="jms/SalesTopic"
    connection-factory-location="jms/theTopicConnectionFactory"
    subscription-name="MDBSUB"
    >
    </message-driven-deployment>
    3. define the resource-provider in application.xml
    <resource-provider class="oracle.jms.OjmsContext" name="SalesJMS">
    <description> OJMS/AQ </description>
         <property name="url" value="jdbc:oracle:thin:@dell2400:1521:mydb"></property>
         <property name="username" value="user"></property>
         <property name="password" value="pssword"></property>
    </resource-provider>
    4. Deploy the ear file and got the following error:
    java.lang.NullPointerException
    at com.evermind.server.ejb.MessageDrivenHome.<init>(MessageDrivenHome.java:280)
    at com.evermind.server.ejb.EJBPackageDeployment.bindHomes(EJBPackageDeployment.java:239
    at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:589)
    at com.evermind.server.Application.postInit(Application.java:420)
    at com.evermind.server.administration.ServerApplicationInstallation.finish(ServerApplic
    ationInstallation.java:491)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:80)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
    Any idea on what's the cause of this. It seems that the Oracle 9i's support of MDB differs significantly from R1. The demo sample that works for R1 no longer work for R2. For example, the following DD doesn't seem to work with R2.
    <resource-ref>
    <res-ref-name>jms/Queue/senderQueueConnectionFactory</res-ref-name>
    <res-type>javax.jms.QueueConnectionFactory</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    <resource-env-ref>
    <resource-env-ref-name>jms/Queue/senderQueue</resource-env-ref-name>
    <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
    </resource-env-ref>
    <resource-ref>
    <res-ref-name>jms/Topic/senderTopicConnectionFactory</res-ref-name>
    <res-type>javax.jms.TopicConnectionFactory</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    Please help!! This is very urgent! Thanks in advance!

    Chunming -- There was a change from v1022x to v902. This was required per the changes in the EJB specification as it was finalized. The tag <jms-destination-type> was changed to <destination-type>. If you make this change in your ejb-jar.xml that should work.
    Thanks -- Jeff

  • References with SubVIs

    Hi,
    I have SubVI that should pass data to mainVi and vice versa, while both Vis are running.
    If I have undestood correctly this must be done with references.
    In code subVi is upper left corner of block diagram (Kytta2.vi). My problem is to get for example Kytta2:vi`s value "K Kaannon asema-anturin arvo" connected to main vi`s indicator "Kaannon asema-anturin arvo" and to get values shifted same time while both, mainvi (PARAL2.vi) and subvi(Kytta2.vi) are running.
    I have placed already "Call By Refence Node" in the loop where subvi is, but I don`t what else must be done to get data in and out subvi, while both vis are running.
    Somebody, help?
    PS: I have LabVIEW 6.i
    - Santtu
    Attachments:
    PARAL2.vi ‏447 KB

    Hi Santtu,
    here's an example of how to launch a VI in the background. Please not that the data used for my example is not real. The data type of the "cluster" in my example MUST match the data type in your Sub-VI if you want it to work.
    The best place to look for QUEUE examples are in the examples which are sent with LabVIEW. That's how I learned to use them.
    Having said all this, I'm actually not sure that QUEUES are available in 6.i. I originally read your mail and understood that you have 6.1, but the QUEUE examples are new to 6.1, so it might be that the QUEUE approach isn't available in 6.i. If not (I don't have 6.i, so I can't check) sorry for the confusion.
    Hope this helps
    Shane.
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
    Attachments:
    Launch in background.vi ‏24 KB

Maybe you are looking for