• Post Reply Bookmark Topic Watch Topic
  • New Topic

Corba - out Parameters and Holder Classes - SOLVED  RSS feed

 
Jaz Chana
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

I have a question about the

In my idl i have a method defined as follows;



now one of the things I've learned about java and mapping inout and out parameters is the use of holder classes. Java cannot directly map these types and so has to make use of holder classes. If I understand correctly, to use a holder class you must do the following;



However when I do this the number comes out as 0, which is not what I was expecting. All other methods called upon this idl work and the number definately exists as i've seen it in the database. There is an indirect way to reference a jobInfo.number in the idl, which works fine. Unfortunately for this idl there are no more methods with out parameters so using another method with an out paramter is out of the question (haha). What i wanted to rule out was incorrect usage of the holder classes. Is the above correct usage?
 
Jaz Chana
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem was that I wasn't using my holder class correctly. Each holder class has a value property that returns the value of the object that it is 'holding'. So for my example i should have had;

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!