Pass by reference/value?

Ive been reading lots of litrature on this and im still none the wiser!
public interface Zoo extends Remote {
    public Animal getAnimal(String animalName) throws RemoteException;
}When called from the client... will this code return a copy of the Animal, or a reference(stub?) to the Animal that resides on the server??
I would like my system to return a reference, to save copying Animal back to the server once methord calls have been made on it.
If it does ineed return a reference... and I want to call methords on Animal, should Animal also extend Remote??
Thanks,
Tim

timboroo wrote:
Ive been reading lots of litrature on this and im still none the wiser!
public interface Zoo extends Remote {
public Animal getAnimal(String animalName) throws RemoteException;
}When called from the client... will this code return a copy of the Animal, or a reference(stub?) to the Animal that resides on the server?? not possible to know without seeing the Animal class definition.
I would like my system to return a reference, to save copying Animal back to the server once methord calls have been made on it.
If it does ineed return a reference... and I want to call methords on Animal, should Animal also extend Remote??if you want the Animal implementation to exist on the server, such that method calls are actually executed on the server, then yes, it should be remote.

Similar Messages

  • Recursive By reference passing of hashtable value in C#

    Basically, I'm trying to graft a hashtable to to another, and in any other language, I can get it to work...C#, not so much. If anyone could give me some insight on how I should be doing this, I'd appreciate it. This is what I have so far (which doesn't work - it throws an error saying that I can only pass an lvalue by reference - I understand the problem, just not how to solve it).
    private void GraftTables(ref Hashtable mainHash, Hashtable branch)
    try
    foreach (object key in branch.Keys)
    if ( !mainHash.ContainsKey(key) )
    //graft
    mainHash.Add(key, branch[key]);
    else
    GraftTables(ref (Hashtable) mainHash[key], (Hashtable)branch[key]);
    catch (Exception ex)
    throw ex;
    Thanks for any help,
    Chuck Charbeneau
    Lear Corporation
    [email protected]

    If you are trying to do what Ricky described, I don't think you need to use the ref keyword in the first place. I think your method could just be:
    private void GraftTables(Hashtable mainHash, Hashtable branch)
    The key point here is that mainHash is essentially a pointer to a Hashtable object, so you end up pointing to and manipulating the same object inside your function whether you pass it by value or by reference. The only difference in passing it as a reference is that you can modify the pointer itself, for example:
    private void f1(Hashtable h){  h.Add("A", 1);  h = new Hashtable();  h.Add("A", 2);}
    private void f2(ref Hashtable h){  h.Add("A", 1);  h = new Hashtable();  h.Add("A", 2);}
    If I call:
    Hashtable h = new Hashtable();f1(h);object x = h["A"];
    I will get x==1, but if I call:
    Hashtable h = new Hashtable();f2(ref h);object x = h["A"];
    I will get x==2.

  • Subroutine Pass by Value, Pass by Reference using xstring

    Hi,
      I am trying to check the difference between pass by value, pass by reference, pass by return value to a subroutine. When I tried integers as parameters the following functionality worked. When I am using xstring as parameters I am not getting desired results.
      Some one please explain me how the xstring's are passed to a subroutine.
    Here I am giving the code and output of the code.
    data : s_passbyref    type xstring,
           s_passbyval    type xstring,
           s_passbyretval type xstring.
    * Pass by Value, Pass by Reference, Pass by return value - STRINGS
    s_passbyref     = 'ABCD'.
    s_passbyval     = 'ABCD'.
    s_passbyretval  = 'ABCD'.
    write : / 'ByRef :', s_passbyref, 20 'By Val :', s_passbyval, 40 'By Return Value : ', s_passbyretval.
    perform call_str_sub using s_passbyref s_passbyval changing s_passbyretval.
    write : / 'ByRef :', s_passbyref, 20 'By Val :', s_passbyval, 40 'By Return Value : ', s_passbyretval.
    form call_str_sub using ps_passbyref value(ps_passbyval) changing value(ps_passbyretval).
      ps_passbyretval = 'XYZ'.
      ps_passbyref    = 'XYZ'.
      ps_passbyval    = 'XYZ'.
    endform.
    OUTPUT
    ByRef  :  ABCD    By Val : ABCD    By Return Value : ABCD
    ByRef  :               By Val : ABCD    By Return Value :
    Thanks in advance
    Naveen

    try this
    write : / 'ByRef :', s_passbyref, 20 'By Val :', s_passbyval, 40 'By Return Value : ', ps_passbyretval.

  • Arrays are passed by reference or value ?

    Hi peoples,
    I have something interesting here which I need to know. Look into the following classes :
         public class example1 {
         int i[] = {0};
         public static void main(String args[]) {
         int i[] = {1};
         change_i(i);
         System.out.println(i[0]);
         public static void change_i(int i[]) {
         i[0] = 2;
         i[0] *= 2;
         public class example2 {
         int i[] = {0};
         public static void main(String args[]) {
         int i[] = {1};
         change_i(i);
         System.out.println(i[0]);
         public static void change_i(int i[]) {
         int j[] = {2};
         i = j;
    Among the above classes, the class named 'example1' returns the value 4 whereas, the class named 'example2' returns the value 1.
    Any explanations to this one please....
    Cheers,
    Rasmeet

    minglu, you are not doing right.
    i just don't get it why you have i[] as instance variable but never use it ( i[] is declared in every method so each i you refer to in the method is a local varable not member variable that can be shared for the object ).
    your first solution work. but that i = j line is not needed because it has no effect you still cannot change the referrence of i to other int[]. your first soultion just need to be
    public static int[] change_i(int i[]) {
    int j[] = {2};
    return j;
    }anyway, using this solution, the method name will be misleading because the method didnot change i in anyway. i is changed because you assign the return array (j) to i.
    for that second solution also, you didn't use your member variable i at all. what you change is the content of i you pass so the result is correct. but then how is this method different from the first method the original poster posted?
    moreover, java never pass argument to the method by reference it ALWAYS pass by copy.i suppose you define passing by reference in the same way C++ does. all object variable in java is a refernce to Object so passing the variable to method is surely passing the reference to the method but that's not passing by reference. it's passing by copy because what is passed is the copy of the reference to the object, not the reference to the reference to Object. if it is really passing by refernce, then you will be able to change your reference to object to point anywhere because you have the access the address of the reference. but since you don't (you only know where the passed reference is pointing to (you have the COPY of value of reference) but you don't know where the refernce store its value) you can only change the content of the pointed object but not changing the pointed object.
    let me restate this, java always pass by reference.

  • Is it possible to pass a formula value from a sub-report to a main report

    Hi there,
    Im trying to pass a formula value from a Sub-report back upto into my Main report but the value doesnt seem to be getting passed up. Ive tried it the other way around, that is, passing a value from the main report to the sub-report and that works fine.
    Below is an example of what I am trying to do but it is not working. In my sub-report Ive declared a formula variable as,
    formula name=main_subIntRatePageCount
    Shared NumberVar subIntRatePageCount := TotalPageCount;
    and in the Main report Ive declared the formula variable as,
    formula name=subIntRatePageCount
    Shared NumberVar subIntRatePageCount;
    subIntRatePageCount;
    I want the value assigned to "subIntRatePageCount" in my Sub-Report to be available to my Main report.
    The problem I am trying to solve is that the sub-report is spilling over onto two pages, and I need a way of updating the page display on the main report to reflect this. The page display is of format, "displaying page 1 of  3", but its not taking into account the extra page produced by the sub-report, so it should say "displaying page 1 of 4".

    Also thanks Raghavendra, Asha,
    I've tried adding the "whileprintingrecords" statement but that doesnt seem to make any difference.
    I notice that the subReport is being called from my the GroupFooter section of the main report, and I am trying to reference the variable in the main repot in the Page Footer section. Could it be that the variable hasnt been calculated in the Page Footer by the time I calculate it in sub-Report? I thought Crystal Reports does at least 5 passes over the report evaluating all the formulas before it prints the report?
    The problem Im trying to solve is I need to know how many pages my report will have before its completed, so that i can print the statement "displaying page 1 of X", and X is currently not being calculated correctly because the sub-report is printing onto 2 pages and not 1 so the report thinks I have 1 of X pages and not X+1.
    Regards
    Robert.

  • Passing model reference to a page in a Popup

    Hi all,
    I have a BSP Application with MVC. In a view I want to open a new window when clicking in an input field with a JavaScript function:
    function openCatalog (inputField, inspchar) {
        adresse = "catalog.htm";
        document.formInsertMerkmal.fieldname.value = inputField;
        view = window.open(adresse, "Katalogauswahl", "width=400,height=400,left=100,top=200");
        view.focus();
    The catalog.htm is a bsp page with logic in the same application. Opening and closing this page is no problem.
    But how can I pass the reference to the model from the first view, eg. start.htm to the new page catalog.htm. I want to read data from the model and write data back to model attributes.
    Can I pass the modelreference in the url? And how do I read the model in the new window?
    In start.htm I declared the model in the page attributes and can access data from model.
    What Stepps are necessary to do the same in the new window. I don’t want to raise an event in the controller to go to a next page.
    Please help!

    Hi Raja,
    I just begin to develop with BSP. I don't understand exactly  what I must do :
    "in the method IF_BSP_APPLICATION_EVENTS~ON_START instantiate your model class and pass the instantiate model class reference to a attribute of the application class.
    now this can be referenced in the all the pages with application->applicationclassattribute for model."
    You can do an example source code, please.
    Thanks you very much for help.
    Lionel

  • Passing a reference to a type definition to a SubVI

    I have created a type definition that I would like to use across my application. This particular type definition is also the front panel control to my top level VI. I wanted to pass a reference to this control to my SubVi's so that they could dereference as needed and in very rare cases update the values on the front panel. However, as I built the application I noticed that I was breaking the control reference as I updated the type definition. This implies that they type of the reference changes as I change the type definition.
    How do I go about building the reference I need or is there some other way to do this that works just as well. Even if I can't make a reference to the control that is tied to the type definition, I'm willing to pass in a variant who can house the reference as long as I can build the data type (the reference) inside my SubVis.
    Solved!
    Go to Solution.

    Okay, so I tried all three approaches in a SubVI, here's what happened.
    My approach was simply to create a Type Def control, right-click and create a Reference. Then create a control from that reference by right-clicking the output of the reference and selecting the Create Control option. I then pasted this 'cluster' reference into my SubVi, made it an input and then wired up the reference in the parent to the control in the SubVi.
    Result: This breaks when you update the Type Definition.
    Next, Ben's approach (or my best effort at doing what he suggested). I created a control from reference to the type def. I cut it from the parent VI and pasted it into a new type def. I then put the type def in the SubVI and set it as an input.
    Result: This breaks when you update the Type Definition (but it actually takes a bit longer for the error to propogate).
    Finally, Christian's solution (or my best effort). I took the type def reference and put it through a To More Generic Class guy, casting it to a Control Refnum. I put a Control Refnum on the front panel of my SubVI and wired it to a To More Specific Class guy. I created a control of the type def in the subvi, hid it, and created a reference. I wired the reference to the more specific guy and verified I was getting the right data.
    Result: It works!
    It's possible I just didn't understand how to make the reference type def you were referring to Ben. I would prefer a method with less verbage. I pass this refnum into a class which holds it. Since I can't replicate the type exactly prior to run time (i.e. create a control that is exactly a reference to the type definition of my front panel), I have to save the reference as a Control Refnum and cast it every time I need it (i.e. create a control from the typedef, create a reference frome the type def, etc). More verbage than optimal, but still good!
    Thanks for the help.

  • Confused about passing by reference and passing by valule

    Hi,
    I am confuse about passing by reference and passing by value. I though objects are always passed by reference. But I find out that its true for java.sql.PreparedStatement but not for java.lang.String. How come when both are objects?
    Thanks

    Hi,
    I am confuse about passing by reference and passing
    by value. I though objects are always passed by
    reference. But I find out that its true for
    java.sql.PreparedStatement but not for
    java.lang.String. How come when both are objects?
    ThanksPass by value implies that the actual parameter is copied and that copy is used as the formal parameter (that is, the method is operating on a copy of what was passed in)
    Pass by reference means that the actual parameter is the formal parameter (that is, the method is operating on the thing which is passed in).
    In Java, you never, ever deal with objects - only references to objects. And Java always, always makes a copy of the actual parameter and uses that as the formal parameter, so Java is always, always pass by value using the standard definition of the term. However, since manipulating an object's state via any reference that refers to that object produces the same effect, changes to the object's state via the copied reference are visible to the calling code, which is what leads some folk to think of java as passing objects by reference, even though a) java doesn't pass objects at all and b) java doesn't do pass by reference. It passes object references by value.
    I've no idea what you're talking about wrt PreparedStatement, but String is immutable, so you can't change its state at all, so maybe that's what's tripping you up?
    Good Luck
    Lee
    PS: I will venture a guess that this is the 3rd reply. Let's see...
    Ok, second. Close enough.
    Yeah, good on yer mlk, At least I beat Jos.
    Message was edited by:
    tsith

  • Passing a reference / variable to a Custom Component

    Hi, I was wondering if someone could help me.
    It seems like a very simple problem but I cant for the life
    of me seem to work out a solution.
    I have created a Custom Component that extends from the
    UIComponent that consists of a “rev counter” style
    clock face etc….
    I want to use this component multiple times within my
    application – however feed it different data so for example
    each “rev counter” on the page will be displaying
    different data etc…..
    I want to be able to reuse my component and not have to
    create a new component every time I add a “rev counter”
    to my application, therefore I need some way of passing a reference
    / variable to the component (maybe from the <mx /> tag where
    I declare it in the MXML code ??? )
    <mx:Application ….
    xmlns:comps="components.*" …..>
    <comps:RevCounterComp id=”” (add something
    here to reference???) />
    </ mx:Application>
    Doing this will allow me to reuse my ONE custom component
    MANY times feeding it different data (different data provaiders for
    each instance of the single component)
    Hope this makes sense???
    Any help / advice is much appreciated,
    Thanks,
    Jon.

    Jon,
    jmryan's suggestion is the preferred way to go. This way you
    can use the simple MXML syntax that you described in your post.
    If your custom component is defined in ActionScript, you can
    use setters or the creationComplete event to update the component
    when the values are passed in from the tag (they are set *after*
    your constructor runs).
    Even easier, if your component is defined in MXML, you can
    add [Bindable] to your public field and then bind directly to it in
    the custom component's MXML code.
    - Peter

  • Passing multiple single values to a Planning Sequence

    Hi All,
          We are using BEx Analyzer for  planning. We  are passing multiple single values for a single variable , to a IP-planning sequence.  Planning sequence is only taking the last value passed and ignoring the rest.
    Multiple variable values are passed as below:
    Name                            Index                 Value
    VAR_NAME_1     1     ZCC
    VAR_LINES     1     5
    VAR_VALUE_1     1     A10000001
    VAR_VALUE_1     1     A10000002
    VAR_VALUE_1     1     A10000003
    VAR_VALUE_1     1     A10000004
    VAR_VALUE_1     1     A10000005
    These cell references are passed to "command button" through the "Command Range" property.
    The values are calculated correctly but for only one Cost center (last one in the list) , In this case only data for the Cost Center "A10000005"  is processed and rest of the cost centers are ignored.
    What am I missing here? I appreciate your help.
    Patch Levels:
    SAP GUI  7.10 (Patch 16)
    BEx Analyzer 7.X SP 12
    Thank you,
    Math

    Hi Indu Sharma  - I have tried several combinations, but did not work.
    VAR_VALUE_1         
    VAR_VALUE_2         
    VAR_VALUE_3         
    VAR_VALUE_4         
    VAR_VALUE_5 
    VAR_VALUE_1        
    VAR_VALUE_1     
    VAR_VALUE_1        
    VAR_VALUE_1        
    VAR_VALUE_1  
    VAR_VALUE_EXT_1         
    VAR_VALUE_EXT_2         
    VAR_VALUE_EXT_3         
    VAR_VALUE_EXT_4         
    VAR_VALUE_EXT_5 
    Thank you,
    Math

  • How to pass file reference to c

    Hi,
    I want to pass file reference pointer to a dll written in visual c++. How can i do that?

    What do you want to do with that reference in your C code? if you want to access it using OS File IO functions you have to be very careful! You should not mix LabVIEW nodes and OS platforms calls together. It's either one or the other.
    If you can guarantee that what you want to do is configure the Call Library Node (CLN) parameter to Adapt To Type. Then right click on the CLN and select "Create C Source Header" or something to that meaning. Save the resulting file to disk. Open it and copy the function prototype into your C/C++ file. There should be a parameter typed LVRefnum *. Now you can use the LabVIEW manager C function MgErr FRefNumToFD(LVRefNum refNum, File *fdp);
    You need to link your DLL with labview.lib in the cintools directory in order to be able to call the FRefNumToFD() function. The value in the fdp reference is the platform specific file handle, so for Windows this is a HANDLE.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Pass by reference and String

    public class Test {
        static void method(String str) {
            str = "String Changed";
        public static void main(String[] args) {
            String str = new String("My String");
            System.out.println(str);
            method(str);
            System.out.println(str);
    }The output is
    My String
    My String
    How this is possible when objects are passed by reference ?

    > How this is possible when objects are passed by reference ?
    All parameters to methods are passed "by value." In other words, values of parameter variables in a method are copies of the values the invoker specified as arguments. If you pass a double to a method, its parameter is a copy of whatever value was being passed as an argument, and the method can change its parameter's value without affecting values in the code that invoked the method. For example:
    class PassByValue {
        public static void main(String[] args) {
            double one = 1.0;
            System.out.println("before: one = " + one);
            halveIt(one);
            System.out.println("after: one = " + one);
        public static void halveIt(double arg) {
            arg /= 2.0;     // divide arg by two
            System.out.println("halved: arg = " + arg);
    }The following output illustrates that the value of arg inside halveIt is divided by two without affecting the value of the variable one in main:before: one = 1.0
    halved: arg = 0.5
    after: one = 1.0You should note that when the parameter is an object reference, the object reference -- not the object itself -- is what is passed "by value." Thus, you can change which object a parameter refers to inside the method without affecting the reference that was passed. But if you change any fields of the object or invoke methods that change the object's state, the object is changed for every part of the program that holds a reference to it. Here is an example to show the distinction:
    class PassRef {
        public static void main(String[] args) {
            Body sirius = new Body("Sirius", null);
            System.out.println("before: " + sirius);
            commonName(sirius);
            System.out.println("after:  " + sirius);
        public static void commonName(Body bodyRef) {
            bodyRef.name = "Dog Star";
            bodyRef = null;
    }This program produces the following output: before: 0 (Sirius)
    after:  0 (Dog Star)Notice that the contents of the object have been modified with a name change, while the variable sirius still refers to the Body object even though the method commonName changed the value of its bodyRef parameter variable to null. This requires some explanation.
    The following diagram shows the state of the variables just after main invokes commonName:
    main()            |              |
        sirius------->| idNum: 0     |
                      | name --------+------>"Sirius"       
    commonName()----->| orbits: null |
        bodyRef       |______________|At this point, the two variables sirius (in main) and bodyRef (in commonName) both refer to the same underlying object. When commonName changes the field bodyRef.name, the name is changed in the underlying object that the two variables share. When commonName changes the value of bodyRef to null, only the value of the bodyRef variable is changed; the value of sirius remains unchanged because the parameter bodyRef is a pass-by-value copy of sirius. Inside the method commonName, all you are changing is the value in the parameter variable bodyRef, just as all you changed in halveIt was the value in the parameter variable arg. If changing bodyRef affected the value of sirius in main, the "after" line would say "null". However, the variable bodyRef in commonName and the variable sirius in main both refer to the same underlying object, so the change made inside commonName is visible through the reference sirius.
    Some people will say incorrectly that objects are passed "by reference." In programming language design, the term pass by reference properly means that when an argument is passed to a function, the invoked function gets a reference to the original value, not a copy of its value. If the function modifies its parameter, the value in the calling code will be changed because the argument and parameter use the same slot in memory. If the Java programming language actually had pass-by-reference parameters, there would be a way to declare halveIt so that the preceding code would modify the value of one, or so that commonName could change the variable sirius to null. This is not possible. The Java programming language does not pass objects by reference; it passes object references by value. Because two copies of the same reference refer to the same actual object, changes made through one reference variable are visible through the other. There is exactly one parameter passing mode -- pass by value -- and that helps keep things simple.
    -- Arnold, K., Gosling J., Holmes D. (2006). The Java� Programming Language Fourth Edition. Boston: Addison-Wesley.
    ~

  • Pass-by-reference?

    Please tell me if I am wrong and explain how it actually works!
    But i think there is pass-by-reference..
    Part of Frame.java
    SplashPanel splashpanel = new SplashPanel(this);Part of SplashPanel.java
    public class SplashPanel extends JPanel{
         private Frame frame;
         public SplashPanel(final Frame frame) {
              this.frame = frame;I am newbie in Java and programming at all, so sorry if i am wrong.

    That's not pass by reference. That's passing a reference by value.
    Primitives are passed by value.
    References are passed by value.
    Objects are not passed at all--not by reference, not by value.
    Java is always pass-by-value. Always.
    Always. Always. Always.
    http://javadude.com/articles/passbyvalue.htm
    http://java.sun.com/developer/JDCTechTips/2001/tt1009.html#tip1
    http://www.javaranch.com/campfire/StoryPassBy.jsp
    http://www.javaworld.com/javaworld/javaqa/2000-05/03-qa-0526-pass.html
    http://www-106.ibm.com/developerworks/library/j-praxis/pr1.html
    http://www.cs.toronto.edu/~dianeh/tutorials/params/
    http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#38698
    http://radio.javaranch.com/channel/val/2004/05/21/1085125887000.html
    There is exactly one parameter passing mode in Java -- pass by value -- and that helps keep things simple.
    -- James Gosling, "The Java Programming Language, Second Edition"
    (James Gosling being the father of Java)

  • Objects pass by reference?

    Can some explain why this doesn't behave like I expect please?
    var obj:Object = null;
    recursionTest(0, obj);
    trace("obj: " + obj);
    private function recursionTest(iterations:int, obj:Object):void
              trace("call recursion test: " + iterations);
              if (iterations == 0)
                        obj = new Object();
                        trace("set obj: " + obj);
              else
                        recursionTest(iterations - 1, obj);
    actual output:
    call recursion test: 0
    set obj: [object Object]
    obj: null
    expected output:
    call recursion test: 0
    set obj: [object Object]
    obj: [object Object]

    I think I now understand why this is happening
    var obj:Object = null;
    recursionTest(0, obj);
    trace("obj: " + obj);
    private function recursionTest(iterations:int, obj2:Object):void
              trace("call recursion test: " + iterations);
              if (iterations == 0)
                        obj2 = new Object();
                        trace("set obj: " + obj2);
              else
                        recursionTest(iterations - 1, obj2);
    we create a reference (obj) and assign it to null
    as part of calling the function a new reference (obj2) is created and it points towards the target of the passed in reference (obj)
    so we have obj pointing to null and obj2 pointing to null
    now if we assign a new object obj2 this simply makes the reference obj2 point towads the newly created object and doesn't affect the obj reference in anyway. obj is still pointing towards null.
    now consider
    var obj:Object = new Object();
    obj.a = 3;
    recursionTest(0, obj);
    trace("obj: " + obj.a);
    private function recursionTest(iterations:int, obj2:Object):void
              trace("call recursion test: " + iterations);
              if (iterations == 0)
                        obj2.a = 5;
                        trace("set obj: " + obj2.a);
              else
                        recursionTest(iterations - 1, obj2);
    we create a reference (obj) and assign it a new object
    as part of calling the function a new reference (obj2) is created and it points towards the target of the passed in reference (obj)
    so we have obj pointing to an object and obj2 pointing to the same object obj is pointing to
    now we assign a value to one of the properties of the object obj2 is pointing to but obj2 is pointing to the same object as obj and so the object obj is pointing to has changed.

  • Xml pass by reference

    Hi,
    Sorry if this is a little confusing...
    We pass a clob into a stored proc, load it into a DOM, parse it and insert some data. We then get two NodeLists and pass those to another function within the same package. The following is recursive: For every node in the first node list, we insert some data into the db, get the new sid/id, send the new sid and second nodelist to another method and update the xml using xpath. However, when we come out of the updating method, the nodelist is unchanged. All parameters have a direction of IN OUT. I believe this is happening because the Java engine passes objects by value and not by reference. Is there any way around this?

    Hi,
    Sorry if this is a little confusing...
    We pass a clob into a stored proc, load it into a DOM, parse it and insert some data. We then get two NodeLists and pass those to another function within the same package. The following is recursive: For every node in the first node list, we insert some data into the db, get the new sid/id, send the new sid and second nodelist to another method and update the xml using xpath. However, when we come out of the updating method, the nodelist is unchanged. All parameters have a direction of IN OUT. I believe this is happening because the Java engine passes objects by value and not by reference. Is there any way around this?

Maybe you are looking for