Reentrant Help!

Hi all! I hope everyone is well today,
Just to start off, I'm running Labview 8.2 on XP. Because of my company's concerns I have added images of a simplified
version of the vi that represents san example of what I'm trying to do.
That being said, here's my dilemma:
I am trying to call a subvi more than once simultaneously in my main vi. The only variable that will be shared is a single array, and it will only be read from, not written to, so there shouldn't be any data handling errors. The subvi that is to be called is set up as a reentrant, and the help file indicates that this is the proper method of handling this kind of repeated calling and simultaneous usage of a subvi. However, when I try to call the subvi a second time before the first call has finished executing, the second call will not execute until the first has finished. The help file indicated that this is what would happen if a subvi was called when it was NOT a reentrant. Can someone please help me trouble shoot this problem? I can't figure out if it is an incosistency in Labview or if I'm overlooking something! If this is not the proper method of calling a subvi more that once simultaneously, I'm more than willing to change my operations. Thanks,
Ryan
PS: To clarify, Reenrant.jpg is the "mainvi" here, and is the example of what I'm trying to do. Reentrant.jpg is the "subvi" that I'm trying to make simultaneous calls to.
Attachments:
Reentrant Execution.JPG ‏90 KB
Reentrant.JPG ‏29 KB

Valcon,
Even if you label a vi re-entrant it will still follow all the flow control rules of labview.  So it will still wait for the error cluster, etc. to be passed out of the vi before moving on in the program.  In the context of your program there it won't change anything to make it reentrant, since your while loop is going to wait for all of its contents to execute before moving on to the next iteration.
They way I like to handle this is instead of calling the reentrant vi in the normal way, call it by vi server.    Instead of plopping your subvi on the diagram like normal, open a vi reference to the vi and choose the run vi method.  Then instead of waiting for your vi to finish executing before moving on, it will launch the vi in a seperate thread and move on without waiting for it to finish executing. 
-Devin
I got 99 problems but 8.6 ain't one.

Similar Messages

  • Please help: deploy Bean with "No resource available" error for M:N relationship

    Hi all,
    I wonder any one comes across with deploying beans with M:N relationship with
    "No resource available".
    I defined the relationship in ejb-jar.xml and dbms in the
    weblogic-cmp-rdbms-jar.xml, but when I deployed the beans I got
    the following error
    ------ Error message-----
    weblogic.common.ResourceException: No resources available at weblogic.common.internal.ResourceAllocator.reserve(ResourceAllocator.
    java:568) at weblogic.common.internal.ResourceAllocator.reserve(ResourceAllocator.
    java:400) at weblogic.common.internal.ResourceAllocator.reserveNoWait(ResourceAllo
    cator.java:368) at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.j
    ava:166) at weblogic.jdbc.common.internal.ConnectionPool.reserveNoWait(Connection
    Pool.java:127) at weblogic.jdbc.common.internal.RmiDataSource.getPoolConnection(RmiData
    Source.java:194) at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSour
    ce.java:219) at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getConnection(RDBMSP
    ersistenceManager.java:317) at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.createDefaultDBMSTab
    le(RDBMSPersistenceManager.java:1149) at weblogic.ejb20.utils.TableVerifier.verifyTableExistsAndCreateMaybe(Ta
    bleVerifier.java:428) at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.verifyTablesExist(RD
    Unable to deploy EJB: CustomerBean from \ejb:
    Errors encountered ''The Container-Managed Persistence Entity EJB failed while
    creating its SQL Type Map. The error was: Invalid object name 'localcustomer_localsubscription'.
    Severity 16, State 1, Procedure 'IVM_SERVER null', Line 1', 'Error encountered
    while attempting to create Default DBMS Table: 'localcustomer_localsubscription'.
    Error Text: 'weblogic.common.ResourceException: No resource s available'.''
    ---------------End error ----------------------
    ---------------my ejb-jar.xml
    <ejb-jar>
    - <enterprise-beans>
    - <entity>
    <ejb-name>AddressBean</ejb-name>
    <local-home>customer.LocalAddressHome</local-home>
    <local>customer.LocalAddress</local>
    <ejb-class>customer.AddressBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    - <cmp-field>
    <field-name>addressID</field-name>
    </cmp-field>
    - <cmp-field>
    <field-name>street</field-name>
    </cmp-field>
    - <cmp-field>
    <field-name>city</field-name>
    </cmp-field>
    - <cmp-field>
    <field-name>zip</field-name>
    </cmp-field>
    - <cmp-field>
    <field-name>state</field-name>
    </cmp-field>
    <primkey-field>addressID</primkey-field>
    </entity>
    - <entity>
    <ejb-name>CustomerBean</ejb-name>
    <local-home>customer.LocalCustomerHome</local-home>
    <local>customer.LocalCustomer</local>
    <ejb-class>customer.CustomerBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    <abstract-schema-name>CustomerBean</abstract-schema-name>
    - <cmp-field>
    <field-name>customerID</field-name>
    </cmp-field>
    - <cmp-field>
    <field-name>firstName</field-name>
    </cmp-field>
    - <cmp-field>
    <field-name>lastName</field-name>
    </cmp-field>
    <primkey-field>customerID</primkey-field>
    - <query>
    - <query-method>
    <method-name>findByLastName</method-name>
    - <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    - <ejb-ql>
    - <![CDATA[ SELECT OBJECT(o) FROM CustomerBean AS o
      ]]>
    </ejb-ql>
    </query>
    - <query>
    - <query-method>
    <method-name>findByFirstName</method-name>
    - <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    - <ejb-ql>
    - <![CDATA[ SELECT OBJECT(o) FROM CustomerBean AS o
      ]]>
    </ejb-ql>
    </query>
    </entity>
    - <entity>
    <ejb-name>SubscriptionBean</ejb-name>
    <local-home>customer.LocalSubscriptionHome</local-home>
    <local>customer.LocalSubscription</local>
    <ejb-class>customer.SubscriptionBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    <abstract-schema-name>SubscriptionBean</abstract-schema-name>
    - <cmp-field>
    <field-name>type</field-name>
    </cmp-field>
    - <cmp-field>
    <field-name>title</field-name>
    </cmp-field>
    <primkey-field>title</primkey-field>
    - <query>
    - <query-method>
    <method-name>findAllSubscriptions</method-name>
    <method-params />
    </query-method>
    - <ejb-ql>
    - <![CDATA[ SELECT OBJECT(o) FROM SubscriptionBean AS o
      ]]>
    </ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    - <relationships>
    - <ejb-relation>
    <ejb-relation-name>LocalCustomer-LocalAddress</ejb-relation-name>
    - <ejb-relationship-role>
    <ejb-relationship-role-name>LocalCustomer-Has-LocalAddresss</ejb-relationship-role-name>
    <multiplicity>one</multiplicity>
    - <relationship-role-source>
    <ejb-name>CustomerBean</ejb-name>
    </relationship-role-source>
    - <cmr-field>
    <cmr-field-name>addresses</cmr-field-name>
    <cmr-field-type>java.util.Collection</cmr-field-type>
    </cmr-field>
    </ejb-relationship-role>
    - <ejb-relationship-role>
    <ejb-relationship-role-name>LocalAddress-Has-LocalCustomer</ejb-relationship-role-name>
    <multiplicity>many</multiplicity>
    - <relationship-role-source>
    <ejb-name>AddressBean</ejb-name>
    </relationship-role-source>
    - <cmr-field>
    <cmr-field-name>customer</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    </ejb-relation>
    - <ejb-relation>
    <ejb-relation-name>LocalCustomer-LocalSubscription</ejb-relation-name>
    - <ejb-relationship-role>
    <ejb-relationship-role-name>LocalCustomers-Have-LocalSubscriptions</ejb-relationship-role-name>
    <multiplicity>many</multiplicity>
    - <relationship-role-source>
    <ejb-name>CustomerBean</ejb-name>
    </relationship-role-source>
    - <cmr-field>
    <cmr-field-name>subscriptions</cmr-field-name>
    <cmr-field-type>java.util.Collection</cmr-field-type>
    </cmr-field>
    </ejb-relationship-role>
    - <ejb-relationship-role>
    <ejb-relationship-role-name>LocalSubscriptions-Have-LocalCustomers</ejb-relationship-role-name>
    <multiplicity>many</multiplicity>
    - <relationship-role-source>
    <ejb-name>SubscriptionBean</ejb-name>
    </relationship-role-source>
    - <cmr-field>
    <cmr-field-name>customers</cmr-field-name>
    <cmr-field-type>java.util.Collection</cmr-field-type>
    </cmr-field>
    </ejb-relationship-role>
    </ejb-relation>
    </relationships>
    - <assembly-descriptor>
    - <container-transaction>
    - <method>
    <ejb-name>AddressBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    - <container-transaction>
    - <method>
    <ejb-name>CustomerBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    - <container-transaction>
    - <method>
    <ejb-name>SubscriptionBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    ------------------End of ejb-jar.xml---------------
    Please help
    Thanks in advance
    Mike

    Hi Gaurav,
    Other applications used the same the datasource, which I used for this application,
    are running fine.
    I think there is some bug in the wlserver 6.1 to create the join table. I think
    it is the time I should ask the bea wlserver 6.1.
    Mike
    "Gaurav Khanna" <[email protected]> wrote:
    This implies that there are no database connections available. You need
    to
    check if you can log into your database instance. By default there are
    30
    connections specified for an instance in Oracle. FYI.
    "Mike" <[email protected]> wrote in message
    news:[email protected]...
    Hi all,
    I wonder any one comes across with deploying beans with M:Nrelationship with
    "No resource available".
    I defined the relationship in ejb-jar.xml and dbms in the
    weblogic-cmp-rdbms-jar.xml, but when I deployed the beans I got
    the following error
    ------ Error message-----
    weblogic.common.ResourceException: No resources available atweblogic.common.internal.ResourceAllocator.reserve(ResourceAllocator.
    java:568) atweblogic.common.internal.ResourceAllocator.reserve(ResourceAllocator.
    java:400) atweblogic.common.internal.ResourceAllocator.reserveNoWait(ResourceAllo
    cator.java:368) atweblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.j
    ava:166) atweblogic.jdbc.common.internal.ConnectionPool.reserveNoWait(Connection
    Pool.java:127) atweblogic.jdbc.common.internal.RmiDataSource.getPoolConnection(RmiData
    Source.java:194) atweblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSour
    ce.java:219) atweblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getConnection(RDBMSP
    ersistenceManager.java:317) atweblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.createDefaultDBMSTab
    le(RDBMSPersistenceManager.java:1149) atweblogic.ejb20.utils.TableVerifier.verifyTableExistsAndCreateMaybe(Ta
    bleVerifier.java:428) atweblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.verifyTablesExist(RD
    Unable to deploy EJB: CustomerBean from \ejb:
    Errors encountered ''The Container-Managed Persistence Entity EJB failedwhile
    creating its SQL Type Map. The error was: Invalid object name'localcustomer_localsubscription'.
    Severity 16, State 1, Procedure 'IVM_SERVER null', Line 1', 'Errorencountered
    while attempting to create Default DBMS Table:'localcustomer_localsubscription'.
    Error Text: 'weblogic.common.ResourceException: No resource savailable'.''
    ---------------End error ----------------------
    ---------------my ejb-jar.xml
    <ejb-jar>
    - <enterprise-beans>
    - <entity>
    <ejb-name>AddressBean</ejb-name>
    <local-home>customer.LocalAddressHome</local-home>
    <local>customer.LocalAddress</local>
    <ejb-class>customer.AddressBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    - <cmp-field>
    <field-name>addressID</field-name>
    </cmp-field>
    - <cmp-field>
    <field-name>street</field-name>
    </cmp-field>
    - <cmp-field>
    <field-name>city</field-name>
    </cmp-field>
    - <cmp-field>
    <field-name>zip</field-name>
    </cmp-field>
    - <cmp-field>
    <field-name>state</field-name>
    </cmp-field>
    <primkey-field>addressID</primkey-field>
    </entity>
    - <entity>
    <ejb-name>CustomerBean</ejb-name>
    <local-home>customer.LocalCustomerHome</local-home>
    <local>customer.LocalCustomer</local>
    <ejb-class>customer.CustomerBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    <abstract-schema-name>CustomerBean</abstract-schema-name>
    - <cmp-field>
    <field-name>customerID</field-name>
    </cmp-field>
    - <cmp-field>
    <field-name>firstName</field-name>
    </cmp-field>
    - <cmp-field>
    <field-name>lastName</field-name>
    </cmp-field>
    <primkey-field>customerID</primkey-field>
    - <query>
    - <query-method>
    <method-name>findByLastName</method-name>
    - <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    - <ejb-ql>
    - <![CDATA[ SELECT OBJECT(o) FROM CustomerBean AS o
    ]]>
    </ejb-ql>
    </query>
    - <query>
    - <query-method>
    <method-name>findByFirstName</method-name>
    - <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    - <ejb-ql>
    - <![CDATA[ SELECT OBJECT(o) FROM CustomerBean AS o
    ]]>
    </ejb-ql>
    </query>
    </entity>
    - <entity>
    <ejb-name>SubscriptionBean</ejb-name>
    <local-home>customer.LocalSubscriptionHome</local-home>
    <local>customer.LocalSubscription</local>
    <ejb-class>customer.SubscriptionBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    <abstract-schema-name>SubscriptionBean</abstract-schema-name>
    - <cmp-field>
    <field-name>type</field-name>
    </cmp-field>
    - <cmp-field>
    <field-name>title</field-name>
    </cmp-field>
    <primkey-field>title</primkey-field>
    - <query>
    - <query-method>
    <method-name>findAllSubscriptions</method-name>
    <method-params />
    </query-method>
    - <ejb-ql>
    - <![CDATA[ SELECT OBJECT(o) FROM SubscriptionBean AS o
    ]]>
    </ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    - <relationships>
    - <ejb-relation>
    <ejb-relation-name>LocalCustomer-LocalAddress</ejb-relation-name>
    - <ejb-relationship-role>
    <ejb-relationship-role-name>LocalCustomer-Has-LocalAddresss</ejb-relationshi
    p-role-name>
    <multiplicity>one</multiplicity>
    - <relationship-role-source>
    <ejb-name>CustomerBean</ejb-name>
    </relationship-role-source>
    - <cmr-field>
    <cmr-field-name>addresses</cmr-field-name>
    <cmr-field-type>java.util.Collection</cmr-field-type>
    </cmr-field>
    </ejb-relationship-role>
    - <ejb-relationship-role>
    <ejb-relationship-role-name>LocalAddress-Has-LocalCustomer</ejb-relationship
    -role-name>
    <multiplicity>many</multiplicity>
    - <relationship-role-source>
    <ejb-name>AddressBean</ejb-name>
    </relationship-role-source>
    - <cmr-field>
    <cmr-field-name>customer</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    </ejb-relation>
    - <ejb-relation>
    <ejb-relation-name>LocalCustomer-LocalSubscription</ejb-relation-name>
    - <ejb-relationship-role>
    <ejb-relationship-role-name>LocalCustomers-Have-LocalSubscriptions</ejb-rela
    tionship-role-name>
    <multiplicity>many</multiplicity>
    - <relationship-role-source>
    <ejb-name>CustomerBean</ejb-name>
    </relationship-role-source>
    - <cmr-field>
    <cmr-field-name>subscriptions</cmr-field-name>
    <cmr-field-type>java.util.Collection</cmr-field-type>
    </cmr-field>
    </ejb-relationship-role>
    - <ejb-relationship-role>
    <ejb-relationship-role-name>LocalSubscriptions-Have-LocalCustomers</ejb-rela
    tionship-role-name>
    <multiplicity>many</multiplicity>
    - <relationship-role-source>
    <ejb-name>SubscriptionBean</ejb-name>
    </relationship-role-source>
    - <cmr-field>
    <cmr-field-name>customers</cmr-field-name>
    <cmr-field-type>java.util.Collection</cmr-field-type>
    </cmr-field>
    </ejb-relationship-role>
    </ejb-relation>
    </relationships>
    - <assembly-descriptor>
    - <container-transaction>
    - <method>
    <ejb-name>AddressBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    - <container-transaction>
    - <method>
    <ejb-name>CustomerBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    - <container-transaction>
    - <method>
    <ejb-name>SubscriptionBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    ------------------End of ejb-jar.xml---------------
    Please help
    Thanks in advance
    Mike

  • How to allow cleanup actions to be taken by a reentrant clone before it is killed, when viewed via web server, because of a browser close?

    Here is a question I'm having to luck with.  I have a VI, set to be reentrant, which is published via the web server.  The main VI instance is never interacted with: it makes a clone every time someone navigates to the proper URL, and the user interacts with the newly created clone (never the main instance).  A clones is capable of configuring and calling instrument VI's when proper login credentials are entered, which results in browser popups that are controllable on the user's end (though only one user is ever doing this at a time. To clarify, multiple clones can be open simultaneously for login purposes, but only one user is ever interacting with the instruments, which aren't themselves reentrant). 
    If the user clicks my custom logout button in their browser, it is trivial to close these other, independent instruments and clean up properly.  But if the user simply clicks the red X in their browser, there is no graceful shutdown and the instruments which the clone called stay open on the server, when they should be closing.
    My experience so far:
    No panel close? event seems to be triggered in the clone.  The clone simply ceases to be.
    The remote_panel_connections property doesn't seem to work correctly in this instance (I haven't had any luck so far), since it is possible for more than one clone to be active, and the main parent that is spawning the clones stays running but isn't interacted with in any way.
    What I Need:
    A way for the clone VI to recognize that the user has closed their browser, and communicate that it is closing to all active VI's before terminating.
    I would like to avoid forcing the instruments that the clone calls to poll constantly to see if the clone VI is present on the network.  If there is no other solution but this, I would appreciate a suggestion as to the least resource and code intensive way to implement this type of polling, as the instruments are really meant to be totally independent entities after they are called, rather than sub vi's. 
    Thanks for any input, let me know if more information is needed.
    Solved!
    Go to Solution.

    Hey MTdev,
    Panel close? events cannot be triggered on a VI being viewed or controlled remotely. Some more information on that can be found in the help here:http://zone.ni.com/reference/en-XX/help/371361E-01/lvprop/vi_panel_closeq/.  My suggestion would be to set the Title Bar on the front panel of your remote VI to not be visible so that their only option for closing the window is to click the logout button.  Are you using Remote Front Panels(http://zone.ni.com/devzone/cda/tut/p/id/3277) to do this instrument control?  Using remote front panels allows you to manage a lot of the multiple people accesssing at the same-time type issues so it may be something to look into if you are not already using this method.  
    Regards,
    Kevin
    Product Support Engineer
    National Instruments

  • Problems with access to serial port using reentrant code

    Hi,
    I have a VI that send commands and receive answers from an instrument using
    de serial port.
    This VI runs perfectly when used alone.
    However I'm trying run two instances of that VI simultaneously using
    reentrant code and I'm facing some problems.
    Sometimes everything is OK but sometimes, in the process of writing to
    serial port the following error happen:
    Error code 36.
    Invalid refnum device.
    What is this?
    Does someone know how to prevent this?
    Thanks in advance for any help.

    "Paro, Paula [CMPS:2721:EXCH]" wrote:
    >
    > Hi,
    >
    > I have a VI that send commands and receive answers from an instrument using
    > de serial port.
    > This VI runs perfectly when used alone.
    > However I'm trying run two instances of that VI simultaneously using
    > reentrant code and I'm facing some problems.
    > Sometimes everything is OK but sometimes, in the process of writing to
    > serial port the following error happen:
    > Error code 36.
    > Invalid refnum device.
    >
    > What is this?
    > Does someone know how to prevent this?
    >
    > Thanks in advance for any help.
    You can't use reentrant vi's vith serial vi calls without supervising of
    driver.
    Use VISA instead and you have to control the VISA session opening and
    closing. Another word is that the only one serial port sess
    ion should be
    opened at a time.
    Reentrant vi's for serial port without checking serial port session is a
    mistake of program algorithm. Change it in any convenient way.
    Sergey Krasnishov
    Automated Control Systems
    National Instruments Alliance Member
    Moscow, Russia
    [email protected]
    http://acs.levsha.ru

  • Reentrant call to a stateful session bean

    Hi,
    I have a problem that seems to be a very common problem but I
    steel didn't find any solution for it.
    We have a jsp page that call to stateful session been, the
    problem occur when I click twice on any link/button then I get
    java.rmi.RemoteException: Illegal attempt to make a reentrant call to a stateful
    session bean from home:....
    I have tried to set the <allow-concurrent-calls> to true but it doesn't help,
    I am getting this exception no matter the value of this tag.
    I am using WL61 sp2 (the last version) , Does anybody find a solution for that,
    I don't want to use javascript in order to work around this problem.
    Thanks,

    I think this is a different error from concurrent access (when client's
    attempt to access the same bean concurrently WebLogic throws LockTimedOut error
    (or client blocks if allow-concurrent-calls is true)).
    This error probably means that your code attempetd to reenter bean in the same
    transaction - how do you invoke it and what is the stack trace?
    Haim Cohen <[email protected]> wrote:
    Hi,
    I have a problem that seems to be a very common problem but I
    steel didn't find any solution for it.
    We have a jsp page that call to stateful session been, the
    problem occur when I click twice on any link/button then I get
    java.rmi.RemoteException: Illegal attempt to make a reentrant call to a stateful
    session bean from home:....
    I have tried to set the <allow-concurrent-calls> to true but it doesn't help,
    I am getting this exception no matter the value of this tag.
    I am using WL61 sp2 (the last version) , Does anybody find a solution for that,
    I don't want to use javascript in order to work around this problem.
    Thanks, --
    Dimitri

  • Does "Run VI" invoke node work on strict references to REENTRANT VIs?

    I am using LV 6.02 on Windows 2000.
    I am trying to use the "Run VI" invoke node method with a reference to a Reentrant VI, with no success. (It works when VI is not reentrant. Perhaps there is a reason this cannot work. But if not, I wonder if there is a workaround, or if LabVIEW 6.1 has a fix?
    Hopefully the picture of the block diagram I included is sufficient...but I also included the actual code just in case.
    Thanks!
    Steve
    Attachments:
    block_diagram.jpg ‏66 KB
    Parent_VI_Example.vi ‏43 KB
    Prototype_subVI_shell_for_Simplex_Fit.vi ‏40 KB

    Hi, Labviewguru,
    Thanks for taking the time to look at my admittedly messy (flawed) block diagram. I will try to state my ultimate goal:
    You may be familiar with Levinberg-Marquardt nonlinear curve fit in Labview, which is about 5 VIs in a LLB file. In order to change the type of curve fitting, one has to either modify a formula node in the lowest subVI (Target Func and Deriv), or place a different subVI in there. That's fine until I want to have many different sorts of algorithms.
    What I was thinking of doing is instead passing Target Func and Deriv a reference to the VI which would perform the calculations. This would allow me to use the same fitting code to fit different types of data with substantially different methods--without modifyin
    g the low-level fitting code at all.
    I'm not sure this is going to make any sense to you, but thanks again for your help.
    In regards to your answer above, let me clarify somewhat. I had the call by reference node in there to prove that the reference to the VI was "good" and worked fine...this same reference was passed to the invoke node, which didn't have any apparent effect.
    Also, I don't think the path to the VI I am opening the reference to is redundant. It is required to tell the "Open VI reference" which VI to load.
    I agree that using references to pass values around is not generally a good idea: I was using that method for my supposed versatility in the future.
    Thanks,
    Steve

  • Request deallocation function with reentrant clones

    I have a standalone application (Labview version 12) that is processing very large chunks of data. Each batch run can take hours to complete.  I am storing all intermediate data in files to avoid running out of memory but still I am having occasional issues of running out of memory.  I never have an error on the first batch, only on the 2nd or 3rd.  I am experimenting with using the request deallocation function at the end of each batch but I am not clear on how/when it takes affect.
    There are 2 sub VIs that do all the work so I have placed the request deallocation in these with a boolean input to be true the last time it is called.  After the last call, the main application is idle waiting for the user to request another batch so this seems like the logical time to deallocate. These subs are configured as shared clone reentrant. They also have subs 2-3 levels deep.  How does the request for deallocation take effect for reentrant VIs?  Are all clones deallocated or just one?  What about VIs called within a deallocated sub? Are they included in the garbage collection or does each sub VI called have to be deallocated seperatly?

    Hi chiraldude
    I think that if the SubVI is not dynamic, (being part of the application) it will be keep in memory while the top level VI is running. If you load the VI dynamically, the deallocation will be done when all references are closed.
    The last time I poked around with the de-allocate, it only cam e into play when the VI in question was marked for removal from memory. If the sub-VI is part of the app (not dynamic) it will not be marked for removal while the top-level VI is running.
    However, I would like to recomen another tool that might come in very handy with this case, the place element structure.
    http://zone.ni.com/reference/en-XX/help/371361G-01/glang/in_place_element_structure/
    Regarding memory administration, this links might be useful as well
     How Can I Optimize the Memory Use in My LabVIEW VI?
    http://digital.ni.com/public.nsf/allkb/771AC793114A5CB986256CAB00079F57?OpenDocument
    Determining When and Where LabVIEW Allocates a New Buffer
    http://digital.ni.com/public.nsf/allkb/C18189E84E2E415286256D330072364A?OpenDocument
    Warm Regards
    Fabián M.
    Internal Sales Engineer
    National Instruments

  • Javax.naming.LinkException  JNDI error Help please

    Hello All,
    I am trying my first bean on Weblogic 7 and can't seem to get the deployment descriptor correct. The home
    interface is, ObjectIDLocalHome and the full class name is com.oga.gserve.biz.oid.ObjectIDLocalHome. I am
    using the fully qualified class name so that I can do an EJBHomeFactory latter on.
    I have used the WLS console and see my bean in the JNDI tree I also used the following to find it:
    public static void loop(final Context ctx, final String name) throws Exception {
    try {
    String local;
    NamingEnumeration childrenOfNaming = ctx.list(name);
    while (childrenOfNaming.hasMore()) {
    NameClassPair ncPair = (NameClassPair) childrenOfNaming.next();
    System.out.print(ncPair.getName() + " (type ");
    System.out.println(ncPair.getClassName() + ")");
    if (name.length() > 0) {
    local = name + "." + ncPair.getName();
    } else {
    local = ncPair.getName();
    loop(ctx, local);
    } catch (javax.naming.CannotProceedException e) {
    // We are at a leaf, no more children.
    I find ObjectIDLocalHome as type javax.naming.LinkRef, as a leaf of com.oga.gserve.biz.oid
    So I know it exist!
    But why as a javax.naming.LinkRef?
    Now when I try the following:
    String cName = ObjectIDLocalHome.class.getName();
    ObjectIDLocalHome home = (ObjectIDLocalHome) ctx.lookup(cName);
    I get:
    javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException: Unable to resolve
    'java:app.ejb/gs-ejbs.jar#ObjectID/local-home' Resolved: '' Unresolved:'java:app' ; remaining name
    'java:app.ejb/gs-ejbs.jar#ObjectID/local-home'
    What is wrong?
    It must be in one of the .xmls but I can't see it:
    weblogic-ejb-jar.xml
    <?xml version = '1.0'?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN'
    'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>ObjectID</ejb-name>
    <entity-descriptor>
    <pool>
    </pool>
    <entity-cache>
    <cache-between-transactions>False</cache-between-transactions>
    </entity-cache>
    <persistence>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>7.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-use>
    </persistence>
    <entity-clustering>
    </entity-clustering>
    </entity-descriptor>
    <transaction-descriptor>
    </transaction-descriptor>
    <enable-call-by-reference>True</enable-call-by-reference>
    <local-jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-jndi-name>
    </weblogic-enterprise-bean>
    <weblogic-enterprise-bean>
    <ejb-name>OIDServer</ejb-name>
    <stateless-session-descriptor>
    <pool>
    <max-beans-in-free-pool>100</max-beans-in-free-pool>
    <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
    </pool>
    <stateless-clustering>
    </stateless-clustering>
    </stateless-session-descriptor>
    <transaction-descriptor>
    </transaction-descriptor>
    <reference-descriptor>
    <ejb-local-reference-description>
    <ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
    <jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</jndi-name>
    </ejb-local-reference-description>
    </reference-descriptor>
    <local-jndi-name>com.oga.gserve.biz.oid.OIDServerLocalHome</local-jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    ejb-jar.xml
    <?xml version = '1.0'?>
    <!DOCTYPE ejb-jar PUBLIC
    '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
    'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <display-name>OIDRecord</display-name>
    <enterprise-beans>
    <session>
    <description><Session Bean ( Stateless )></description>
    <display-name>OIDServer</display-name>
    <ejb-name>OIDServer</ejb-name>
    <local-home>com.oga.gserve.biz.oid.OIDServerLocalHome</local-home>
    <local>com.oga.gserve.biz.oid.OIDServerLocal</local>
    <ejb-class>com.oga.gserve.biz.oid.OIDServerBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <ejb-local-ref>
    <description><The Entity Bean we get our ID cahce from.></description>
    <ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
    <local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
    </ejb-local-ref>
    </session>
    <entity>
    <description><Entity Bean ( CMP )></description>
    <display-name>ObjectID</display-name>
    <ejb-name>ObjectID</ejb-name>
    <local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
    <local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
    <ejb-class>com.oga.gserve.biz.oid.ObjectIDBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>ObjectIDBean</abstract-schema-name>
    <cmp-field>
    <field-name>id</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>blockSize</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>nextId</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>name</field-name>
    </cmp-field>
    <primkey-field>id</primkey-field>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean AS o]]></ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByName</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean o WHERE o.name = ?1]]></ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>OIDServer</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>ObjectID</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    Thank you for any help,
    Brad

    Hello All,
    I am trying my first bean on Weblogic 7 and can't seem to get the deployment descriptor correct. The home
    interface is, ObjectIDLocalHome and the full class name is com.oga.gserve.biz.oid.ObjectIDLocalHome. I am
    using the fully qualified class name so that I can do an EJBHomeFactory latter on.
    I have used the WLS console and see my bean in the JNDI tree I also used the following to find it:
    public static void loop(final Context ctx, final String name) throws Exception {
    try {
    String local;
    NamingEnumeration childrenOfNaming = ctx.list(name);
    while (childrenOfNaming.hasMore()) {
    NameClassPair ncPair = (NameClassPair) childrenOfNaming.next();
    System.out.print(ncPair.getName() + " (type ");
    System.out.println(ncPair.getClassName() + ")");
    if (name.length() > 0) {
    local = name + "." + ncPair.getName();
    } else {
    local = ncPair.getName();
    loop(ctx, local);
    } catch (javax.naming.CannotProceedException e) {
    // We are at a leaf, no more children.
    I find ObjectIDLocalHome as type javax.naming.LinkRef, as a leaf of com.oga.gserve.biz.oid
    So I know it exist!
    But why as a javax.naming.LinkRef?
    Now when I try the following:
    String cName = ObjectIDLocalHome.class.getName();
    ObjectIDLocalHome home = (ObjectIDLocalHome) ctx.lookup(cName);
    I get:
    javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException: Unable to resolve
    'java:app.ejb/gs-ejbs.jar#ObjectID/local-home' Resolved: '' Unresolved:'java:app' ; remaining name
    'java:app.ejb/gs-ejbs.jar#ObjectID/local-home'
    What is wrong?
    It must be in one of the .xmls but I can't see it:
    weblogic-ejb-jar.xml
    <?xml version = '1.0'?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN'
    'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>ObjectID</ejb-name>
    <entity-descriptor>
    <pool>
    </pool>
    <entity-cache>
    <cache-between-transactions>False</cache-between-transactions>
    </entity-cache>
    <persistence>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>7.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-use>
    </persistence>
    <entity-clustering>
    </entity-clustering>
    </entity-descriptor>
    <transaction-descriptor>
    </transaction-descriptor>
    <enable-call-by-reference>True</enable-call-by-reference>
    <local-jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-jndi-name>
    </weblogic-enterprise-bean>
    <weblogic-enterprise-bean>
    <ejb-name>OIDServer</ejb-name>
    <stateless-session-descriptor>
    <pool>
    <max-beans-in-free-pool>100</max-beans-in-free-pool>
    <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
    </pool>
    <stateless-clustering>
    </stateless-clustering>
    </stateless-session-descriptor>
    <transaction-descriptor>
    </transaction-descriptor>
    <reference-descriptor>
    <ejb-local-reference-description>
    <ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
    <jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</jndi-name>
    </ejb-local-reference-description>
    </reference-descriptor>
    <local-jndi-name>com.oga.gserve.biz.oid.OIDServerLocalHome</local-jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    ejb-jar.xml
    <?xml version = '1.0'?>
    <!DOCTYPE ejb-jar PUBLIC
    '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
    'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <display-name>OIDRecord</display-name>
    <enterprise-beans>
    <session>
    <description><Session Bean ( Stateless )></description>
    <display-name>OIDServer</display-name>
    <ejb-name>OIDServer</ejb-name>
    <local-home>com.oga.gserve.biz.oid.OIDServerLocalHome</local-home>
    <local>com.oga.gserve.biz.oid.OIDServerLocal</local>
    <ejb-class>com.oga.gserve.biz.oid.OIDServerBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <ejb-local-ref>
    <description><The Entity Bean we get our ID cahce from.></description>
    <ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
    <local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
    </ejb-local-ref>
    </session>
    <entity>
    <description><Entity Bean ( CMP )></description>
    <display-name>ObjectID</display-name>
    <ejb-name>ObjectID</ejb-name>
    <local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
    <local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
    <ejb-class>com.oga.gserve.biz.oid.ObjectIDBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>ObjectIDBean</abstract-schema-name>
    <cmp-field>
    <field-name>id</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>blockSize</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>nextId</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>name</field-name>
    </cmp-field>
    <primkey-field>id</primkey-field>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean AS o]]></ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByName</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean o WHERE o.name = ?1]]></ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>OIDServer</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>ObjectID</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    Thank you for any help,
    Brad

  • Javax.naming.LinkException Please Help

    Hello All,
    I am trying my first bean on Weblogic 7 and can't seem to get the deployment descriptor correct. The home
    interface is, ObjectIDLocalHome and the full class name is com.oga.gserve.biz.oid.ObjectIDLocalHome. I am
    using the fully qualified class name so that I can do an EJBHomeFactory latter on.
    I have used the WLS console and see my bean in the JNDI tree I also used the following to find it:
    public static void loop(final Context ctx, final String name) throws Exception {
    try {
    String local;
    NamingEnumeration childrenOfNaming = ctx.list(name);
    while (childrenOfNaming.hasMore()) {
    NameClassPair ncPair = (NameClassPair) childrenOfNaming.next();
    System.out.print(ncPair.getName() + " (type ");
    System.out.println(ncPair.getClassName() + ")");
    if (name.length() > 0) {
    local = name + "." + ncPair.getName();
    } else {
    local = ncPair.getName();
    loop(ctx, local);
    } catch (javax.naming.CannotProceedException e) {
    // We are at a leaf, no more children.
    I find ObjectIDLocalHome as type javax.naming.LinkRef, as a leaf of com.oga.gserve.biz.oid
    So I know it exist!
    But why as a javax.naming.LinkRef?
    Now when I try the following:
    String cName = ObjectIDLocalHome.class.getName();
    ObjectIDLocalHome home = (ObjectIDLocalHome) ctx.lookup(cName);
    I get:
    javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException: Unable to
    resolve 'java:app.ejb/gs-ejbs.jar#ObjectID/local-home' Resolved: '' Unresolved:'java:app' ; remaining
    name 'java:app.ejb/gs-ejbs.jar#ObjectID/local-home'
    What is wrong?
    It must be in one of the .xmls but I can't see it:
    weblogic-ejb-jar.xml
    <?xml version = '1.0'?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN'
    'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>ObjectID</ejb-name>
    <entity-descriptor>
    <pool>
    </pool>
    <entity-cache>
    <cache-between-transactions>False</cache-between-transactions>
    </entity-cache>
    <persistence>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>7.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-use>
    </persistence>
    <entity-clustering>
    </entity-clustering>
    </entity-descriptor>
    <transaction-descriptor>
    </transaction-descriptor>
    <enable-call-by-reference>True</enable-call-by-reference>
    <local-jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-jndi-name>
    </weblogic-enterprise-bean>
    <weblogic-enterprise-bean>
    <ejb-name>OIDServer</ejb-name>
    <stateless-session-descriptor>
    <pool>
    <max-beans-in-free-pool>100</max-beans-in-free-pool>
    <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
    </pool>
    <stateless-clustering>
    </stateless-clustering>
    </stateless-session-descriptor>
    <transaction-descriptor>
    </transaction-descriptor>
    <reference-descriptor>
    <ejb-local-reference-description>
    <ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
    <jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</jndi-name>
    </ejb-local-reference-description>
    </reference-descriptor>
    <local-jndi-name>com.oga.gserve.biz.oid.OIDServerLocalHome</local-jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    ejb-jar.xml
    <?xml version = '1.0'?>
    <!DOCTYPE ejb-jar PUBLIC
    '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
    'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <display-name>OIDRecord</display-name>
    <enterprise-beans>
    <session>
    <description><Session Bean ( Stateless )></description>
    <display-name>OIDServer</display-name>
    <ejb-name>OIDServer</ejb-name>
    <local-home>com.oga.gserve.biz.oid.OIDServerLocalHome</local-home>
    <local>com.oga.gserve.biz.oid.OIDServerLocal</local>
    <ejb-class>com.oga.gserve.biz.oid.OIDServerBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <ejb-local-ref>
    <description><The Entity Bean we get our ID cahce from.></description>
    <ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
    <local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
    </ejb-local-ref>
    </session>
    <entity>
    <description><Entity Bean ( CMP )></description>
    <display-name>ObjectID</display-name>
    <ejb-name>ObjectID</ejb-name>
    <local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
    <local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
    <ejb-class>com.oga.gserve.biz.oid.ObjectIDBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>ObjectIDBean</abstract-schema-name>
    <cmp-field>
    <field-name>id</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>blockSize</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>nextId</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>name</field-name>
    </cmp-field>
    <primkey-field>id</primkey-field>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean AS o]]></ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByName</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean o WHERE o.name =
    ?1]]></ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>OIDServer</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>ObjectID</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    Thank you for any help,
    Brad

    you must pack all .java into one package ,even the client,
    then you can use it normally.
    <Brad@NoWhere> wrote in message news:[email protected]...
    Hello All,
    I am trying my first bean on Weblogic 7 and can't seem to get thedeployment descriptor correct. The home
    interface is, ObjectIDLocalHome and the full class name iscom.oga.gserve.biz.oid.ObjectIDLocalHome. I am
    using the fully qualified class name so that I can do an EJBHomeFactorylatter on.
    >
    I have used the WLS console and see my bean in the JNDI tree I also usedthe following to find it:
    >
    public static void loop(final Context ctx, final String name) throwsException {
    >
    try {
    String local;
    NamingEnumeration childrenOfNaming = ctx.list(name);
    while (childrenOfNaming.hasMore()) {
    NameClassPair ncPair = (NameClassPair)childrenOfNaming.next();
    System.out.print(ncPair.getName() + " (type ");
    System.out.println(ncPair.getClassName() + ")");
    if (name.length() > 0) {
    local = name + "." + ncPair.getName();
    } else {
    local = ncPair.getName();
    loop(ctx, local);
    } catch (javax.naming.CannotProceedException e) {
    // We are at a leaf, no more children.
    I find ObjectIDLocalHome as type javax.naming.LinkRef, as a leaf ofcom.oga.gserve.biz.oid
    So I know it exist!
    But why as a javax.naming.LinkRef?
    Now when I try the following:
    String cName = ObjectIDLocalHome.class.getName();
    ObjectIDLocalHome home = (ObjectIDLocalHome) ctx.lookup(cName);
    I get:
    javax.naming.LinkException: . Root exception isjavax.naming.NameNotFoundException: Unable to
    resolve 'java:app.ejb/gs-ejbs.jar#ObjectID/local-home' Resolved: ''Unresolved:'java:app' ; remaining
    name 'java:app.ejb/gs-ejbs.jar#ObjectID/local-home'
    What is wrong?
    It must be in one of the .xmls but I can't see it:
    weblogic-ejb-jar.xml
    <?xml version = '1.0'?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN'
    'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>ObjectID</ejb-name>
    <entity-descriptor>
    <pool>
    </pool>
    <entity-cache>
    <cache-between-transactions>False</cache-between-transactions>
    </entity-cache>
    <persistence>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>7.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-use>
    </persistence>
    <entity-clustering>
    </entity-clustering>
    </entity-descriptor>
    <transaction-descriptor>
    </transaction-descriptor>
    <enable-call-by-reference>True</enable-call-by-reference>
    <local-jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-jndi-name>
    </weblogic-enterprise-bean>
    <weblogic-enterprise-bean>
    <ejb-name>OIDServer</ejb-name>
    <stateless-session-descriptor>
    <pool>
    <max-beans-in-free-pool>100</max-beans-in-free-pool>
    <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
    </pool>
    <stateless-clustering>
    </stateless-clustering>
    </stateless-session-descriptor>
    <transaction-descriptor>
    </transaction-descriptor>
    <reference-descriptor>
    <ejb-local-reference-description>
    <ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
    <jndi-name>com.oga.gserve.biz.oid.ObjectIDLocalHome</jndi-name>
    </ejb-local-reference-description>
    </reference-descriptor>
    <local-jndi-name>com.oga.gserve.biz.oid.OIDServerLocalHome</local-jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    ejb-jar.xml
    <?xml version = '1.0'?>
    <!DOCTYPE ejb-jar PUBLIC
    '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
    'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <display-name>OIDRecord</display-name>
    <enterprise-beans>
    <session>
    <description><Session Bean ( Stateless )></description>
    <display-name>OIDServer</display-name>
    <ejb-name>OIDServer</ejb-name>
    <local-home>com.oga.gserve.biz.oid.OIDServerLocalHome</local-home>
    <local>com.oga.gserve.biz.oid.OIDServerLocal</local>
    <ejb-class>com.oga.gserve.biz.oid.OIDServerBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <ejb-local-ref>
    <description><The Entity Bean we get our ID cahcefrom.></description>
    <ejb-ref-name>ejb/ObjectIDLocalHome</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
    <local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
    </ejb-local-ref>
    </session>
    <entity>
    <description><Entity Bean ( CMP )></description>
    <display-name>ObjectID</display-name>
    <ejb-name>ObjectID</ejb-name>
    <local-home>com.oga.gserve.biz.oid.ObjectIDLocalHome</local-home>
    <local>com.oga.gserve.biz.oid.ObjectIDLocal</local>
    <ejb-class>com.oga.gserve.biz.oid.ObjectIDBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>ObjectIDBean</abstract-schema-name>
    <cmp-field>
    <field-name>id</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>blockSize</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>nextId</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>name</field-name>
    </cmp-field>
    <primkey-field>id</primkey-field>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean AS
    o]></ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByName</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(o) FROM ObjectIDBean o WHERE o.name
    => ?1]></ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>OIDServer</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>ObjectID</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    Thank you for any help,
    Brad

  • Multiple instances of reentrant VI in a modular way

    Is there a way to have a VI run multiple instances (in parallel) of the same reentrant subVI in a modular way, i.e. the VI needs to call n number of instances? Other than having n copies of the reentrant subVI hardwired in the calling VI (which is obviously not modular, or practical - imagine if I wanted to call 100 instances of the subVI), I am short of ideas.
    All my attempts so far have failed, e.g. a single for loop (n iterations) containing the reentrant sub VI (with an indexed array passing information into the loop required for each instance of the sub-VI), however the loop will not move to the next iteration until the 1st instance of the sub-VI has completed execution (obviously, I suppose). Th
    is is not the desired effect, as I want n instances of the sub-VI running in parallel. Other investigations into VI Servers have been unsuccessful as well.
    Any help would be most appreciated.
    Thanks, Paul

    There was a discussion of this subject a few months back on info-labview. It involved the use of templates. If you do a search of the archives at http://infolv.brianrenken.com/ and specify .vit as the search parameter, you'll find a message from Kyle Gupton. See if his solution is what you are looking for. Good luck.

  • Reentrant VI that uses a functional global

    Hello,
    I currently have an issue with a top-level VI that is reentrant and is using FG's within it. My goal is to create the top-level application and once completed to have a "Launcher" utility that will open N instances of my top-level VI. Unfortunately, I've run into a situation where I am using FG's to tell subVI's that the top-level application is closing and when I close one instance it closes them all. I'm also using a circular buffer action engine (AE) within the top-level VI to store historical data for a waterfall intensity graph and I believe that this will also suffer from different top-level VI instances cross-talking data when I don't want them to. Does anyone have suggestions on how to keep same name FG's in separate top-level VI's from communicating with one another? The picture below shows what I'm trying to do at a high level. The MAST display is my top-level VI and I want to be able to run it N times with different configurations.
    I've read most of Ben's April 8, 2007 community nugget on Action engines and I recall that there was some back and forth between the LVOOP camp on a way to implement AE's in object-oriented architecture that may work for my case. I haven't touched LVOOP though so I was wondering if anyone has other examples to get around my issue or if LVOOP really is the best way to solve it.
    Regards,
    Tim
    Tim Sileo
    RF Field Account Specialist
    National Instruments
    You don’t stop running because you get old. You get old because you stop running. -Jack Kirk, From "Born to Run" by Christopher McDougall.

    tsileo wrote:
    Hello,
    I currently have an issue with a top-level VI that is reentrant and is using FG's within it. My goal is to create the top-level application and once completed to have a "Launcher" utility that will open N instances of my top-level VI. Unfortunately, I've run into a situation where I am using FG's to tell subVI's that the top-level application is closing and when I close one instance it closes them all. I'm also using a circular buffer action engine (AE) within the top-level VI to store historical data for a waterfall intensity graph and I believe that this will also suffer from different top-level VI instances cross-talking data when I don't want them to. Does anyone have suggestions on how to keep same name FG's in separate top-level VI's from communicating with one another? The picture below shows what I'm trying to do at a high level. The MAST display is my top-level VI and I want to be able to run it N times with different configurations.
    I've read most of Ben's April 8, 2007 community nugget on Action engines and I recall that there was some back and forth between the LVOOP camp on a way to implement AE's in object-oriented architecture that may work for my case. I haven't touched LVOOP though so I was wondering if anyone has other examples to get around my issue or if LVOOP really is the best way to solve it.
    Regards,
    Tim
    Thank you for reading! I get a fresh round of energy everytime I learn that a Nugget was helping out.
    Spoiler (Highlight to read)
    I am still accepting Kudos for those Nuggets.
    I am still accepting Kudos for those Nuggets.
    Setting LVOOP to the side...
    I'll speak to both use cases.
    You can use dynamic events inside the cloned sub-VI to register for the close event and a ref to the top level to poll if it is still running.
    THe round robin-buffer.... a queue created in the top level and a ref to same passed to the sub-VIs will create a virtual pipe for each top level that the sub-VIs can fill.
    Re: Uisng an Action Engine...
    YOu could use VI server to create a new instance and pass that ref to the sub-VI that in-turn use Call by Ref nodes to invoke teh AE actions. This is a more complicaed appracoh but should work.
    I avoided that constrct in favor of storing the data that is unique to each "tree" inside the clones themselves and pass a cluser with that data to the AE to operate on and then the Ae returns the sate. Looking back this was a form of "poor man's LVOOP". So before you go this route concider LVOOP and let LV do the work instead of you.
    Ben
    PS: Wow! begging does work. Thank you!!!!
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Reentrant / invariant VIs how to use...

    Hello,
    I have a problem to run a vi reentrant (invariant). I set the vi
    properties to reentrant and tried out two ways to start the vi. The vi
    is intended to open a new little window showing a device name and
    retrieving a measurement value for that device, thats all. I hand over
    a cluster including the attributes (like device name, connection id,...)
    First "call vi per reference":
    That does not work because the vi does not start immediately. A window
    is opened but the vi does not run. Than it is possible to start the vi
    through the vi run button.
    Second "invoke node":
    The "invoke node" works for one device the way i need it. But when a
    hand out other parameters for another device no second window is opened.
    Hope someone can give me some hints.
    Big THX
    Attachement: The expand vi is my reentrant vi.
    Attachments:
    Expand.vi ‏97 KB

    You can't achioeve what you want with a re-entrant VI.  What you
    need is a VI template (Save the VI as a VI template, and it will get
    the *.vit extension).  Simply renaming the file to a vit extension
    won't make it a template.
    Then whenever you open it, LV will generate a new copy of it.
    The reson why you need to do this is because the panel of a reentrant
    VI is decoupled from the code executing.  The panel will load only
    once, but the code can be running in multiple instances in the
    background.  Because of this, the front panel does NOT display any
    of the real-time information of any of the multiple instances
    running.  With a template, each piece of code has it's own
    panel.  They are actually all different VIs, duplicated and
    renamed on-the-fly by LabVIEW so that they can all co-exist, co-execute
    and co-display.
    Hope this helps
    Shane.
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)

  • Call to Reentrant VI trhough SUbVI

    HI,
    I have one doubt related to call to reentrant Vi's. My application(say APP) is calling a reentrant VI(say RA) has a nonrenentrant subVI(say NRB) which again has reentrant VI's(say RC) (hope not much confusing).
    Purpose of VIs
    Reentrant VI RA: As interface for udp read/write operation
    NonReentrant VI NRB: Configures hardware through udp by opening udp port and does some IO operation
    Reentrant VI RC: Does read/write operation through UDP read/write APIs'
    Well my application APP runs perfectly on Windows environment but some of clones of RC remains on memory. On the other hand it does not work on RT target. Since I want to configure my hardware only once therefore NRB has been nonreentrant with function global variable to avoid reopening udp port.
    I am struggling to identify my mistake if at all to have those code workable on RT target and should be flushed out from memory as well.
    Please help if anyone has any clue on this.
    Thanks in Advance
    Vivek
    Well my application APP successfully calls instances to RA and does the hardware configuration which is actually done by NRB through RC. The communication with hardware is through UDP and therefore  

    Hi 
    Could you please share your project with me so that I can look and try to figure out the problem?
    Regards,
    Ashutosh Singh

  • Start Asynchrono​us Call Reentrant

    I've experimented with the new LV 2011 "Start Asynchronous Call" method on reentrant VIs.  I am able to instantiate multiple clones of the VI, but the input data is not propagated to the clone VI.  I have tried a few different 'options' flags on "Open VI Reference."
    Has anyone else observed this behavior?

    Hello Jonathan,
    This is Andrew Brown, an Applications Engineer from National Instruments. I will be happy to work with you to get the Start Asynchronous Call to recognize your inputs. 
    After examining your provided code and creating an example myself, I found one issue with your code. The only flag you should need to use for Asynchronous Call and Collect is x100. That is based off the Open VI Reference and Asynchronously Calling a VI and Collecting the Results documents located within LabVIEW 2011 Help. If you were going to pass in multiple flags, you would want to use the OR operator ( v ) rather than the AND operator ( ^ ). 
    I attached the example code provided by LabVIEW 2011 within the "Asynch Call and Collect.zip" file.
    Based off that code, I wrote my own example that asynchronously calls a subVI multiple times with different inputs. The code for my example is attached as "Multiple Asynch Calls - Diff Inputs.zip" 
    Please let me know if you are still having issues after working with these examples. Thanks, and have a great day!
    Regards,
    Andrew Brown 
    Applications Engineer
    National Instruments
    Attachments:
    Asynch Call and Collect.zip ‏14 KB
    Multiple Asynch Calls - Diff Inputs.zip ‏15 KB
    Asynchronous Call and Collect.JPG ‏58 KB

  • Non-Reentr​ant VI executing in different Process Stacks

    I am creating a DLL which can be called by several different processes on a machine at the same time. If I have a non-reentrant VI in the API, do the same restrictions apply between processes as if they were in the same process? For example, if I call "Get Shorty.vi" which is a non-reentrant VI from 2 places in the same process, at the same time, the first call will start executing, and the second call will wait till the first call is done. When called from 2 different process stacks, there is supposed to be total seperation of memory windows, so logic tells me that this restriction would not apply if that same VI were called from 2 different processes.
    The catch is that the VI Library installed by the run-time engine is used by both processes as well. Would this, in effect, cause the same behavior between 2 calls to the same VI both in process and out?
    Thanks for any help you can provide. This is not a easy to describe concept, so feel free to ask for clarification if needed.
    CyberTazer
    Software Systems Engineer

    I understand that the memory spaces are supposed to be completly seperate. The question is that if 2 processes call the same function in the same dll at the same time... will one process have to wait on the other process to finish before being allowed to execute? My feeling on this is no, it would not have to wait, but I am hoping that someone out there has a more difinitive answer.
    There is no shared memory mechanisms set up in this vi.. ie for persistant data between execution processes. I am not even sure if this is possible with LV dll's, but I thought I would throw that in there since I know it is possible in general.
    Thanks again for your help guys... keep em comming. Hopefully this will help clear up other peoples perceptions on how dll execution is handled in LV if we can nail this down a bit more.
    CyberTazer
    Software Systems Engineer

Maybe you are looking for

  • Why would Finder become sluggish all of a sudden?

    My computer is two years old. Not my first or only Mac yet I am having trouble with the Finder. I noticed about a week or so ago that I could not sync with MobileMe but at the same time, switching apps started taking a long time. Opening apps and eve

  • Bootcamp trouble and iMac will not read DVD-R with Windows

    Hi, I have a late 2011(or maybe early 2012) imac that came with OS X Lion but it's been upgraded to Mountain Lion.. I'd like to bootcamp it and install Windows 8. I've been trying this for a long time now and then i discovered my imac was not bootabl

  • Trouble setting up router

    Hello, there. I'm having a bit of trouble connecting our wireless router. We have a Wireless-B BEFW11S4, version 4, and even though I've followed the instructions precisely (or as precisely as I could), I still can't get it to connect. How exactly is

  • Set datasource location command at runtime

    Post Author: Jamal CA Forum: Semantic Layer and Data Connectivity Dear Folks, I have crystal report 10 and MS access, I need to change my datasource location at runtime without having to type code other than crystal report like VB or C++, Do crystal

  • Condition origin in Header condition type

    Dear Experts, I am on ECC 6.0 and have defined a pricing procedure for PO. I have defined a condition type at the header level ZRB1 for freight. When i create a PO, it does not allow me enter a freight value at the header. The requirement is , e.g, i