Mastering PowerBuilder

HomePrevious Lesson: Jaguar and COM/MTS code validation
Next Lesson: Monitoring Connection Caches/Packages at Runtime in Jaguar CTS

PowerBuilder Data Types and Jaguar CTS

Every programming or scripting language has basic data types that are common, such as integer and string, as well as unique types that have no equivalent type in other languages. When components are passing information from one language to another, they must do so with data types that are common between them. This also holds true for public instance variables of components.

You can use PowerBuilder standard data types (except for the ANY), structures, and auto-instantiated custom class (non-visual) user objects that have been deployed as Jaguar components. These data types can be used for public instance variables as well as for the arguments and return values of public methods. Private and protected instance variables and methods can use all data types supported by PowerBuilder. If a PowerBuilder NVO is not auto-instantiated, you cannot pass its reference to a Jaguar method.

The PowerBuilder ANY data type is specific to PowerScript and not supported in the IDL of a component. CORBA does have a datatype called ANY, but it is not currently supported within Jaguar and is not semantically equivalent to the PowerBuilder ANY. You must exclude the PowerBuilder ANY data type from the component interface definition, but you can use it within the component.

Objects created within Jaguar components can be passed back to clients, but these objects must be installed Jaguar components. If you try to pass back a PowerBuilder object that is not a Jaguar component, you will get a runtime error. To use a component that was passed back from the server, the client must have the corresponding Jaguar proxy.

The PowerBuilder 7.0 Jaguar Component Generator allows you to specify in the project that errors should be reported if the ANY data type or system data types are used in the interface. System data types such as DataStore or Transaction and visual data types such as DataWindow are not legal for passing between Jaguar methods. Only system data types are reported as errors because you may pass or return other Jaguar components. If this option is not set, then those methods and public instance variables that used the unsupported types will not be included in the IDL generated for the component and are not accessible by the client.

As mentioned earlier, the restriction on these variable types applies only to public methods and instance variables, not for protected, private methods and variables.
HomePrevious Lesson: Jaguar and COM/MTS code validation
Next Lesson: Monitoring Connection Caches/Packages at Runtime in Jaguar CTS