Method for generating calling convention transformation process
AssigneeHitachi, Ltd.
InventorsNobuyuki Yamamoto, Jun Yoshida
Life of this patent
Estimating the term…
Abstract
It is checked, by referring to a deployment descriptor and type information of a component, whether the calling convention to be used by a caller component is the same as the calling convention to be used by a callee component, and if different, a class and an object of a proxy for performing a calling convention transformation process is generated.
Claims5
A method for generating a calling convention transformation process to be executed in response to a call from a first component deployed in a first execution environment to a second component deployed in a second execution environment in a computer system for deploying components in execution environments, the component containing an application program and information necessary for execution of the application program, wherein:
- a call or a call reception of a component conforms with a local or remote calling convention and a calling interface, in the local calling convention a call procedure is an object call using a programming language and the calling interface inherits a predetermined local convention interface, and in the remote calling convention, a call procedure is a distributed object call and the calling interface inherits a predetermined remote calling convention interface;
- said first component stores a first deployment descriptor and first type information including method information of a first calling interface, the first deployment descriptor including a logical name for referring to said second component, a type of a first calling convention with which a call to said second component conforms, and a name of the first calling interface with which the call to said second component conforms;
- said second component stores a second deployment descriptor, second type information including method information of a second calling interface, and third type information including method information of a third calling interface, the second deployment descriptor including a name of the second calling interface for receiving a call in accordance with the local calling convention and a name of the third calling interface for receiving a call in accordance with the remote calling convention;
- if the first calling convention is the local calling convention, the first calling interface and the second calling interface are the same and the first type information and the second type information are the same, whereas if the first calling convention is the remote calling convention, the first calling interface and the third calling interface are the same and the first type information and the third type information are the same;
- when said second component is deployed in the second execution environment, the second component is assigned a physical name unique in the network for each calling interface of said second component, and the second execution environment generates an object identifier for referring to said second component for each calling interface of said second component and registers the object identifier in a physical name manager in correspondence with the physical name;
- and
- when said first component is deployed in the first execution environment, said first component is given the physical name corresponding to the logical name so as to permit reference to said second component,
- wherein the method for generating a calling convention transformation process comprises steps of:
- acquiring the type of the first calling convention by referring to the first deployment descriptor by using an input logical name;
- acquiring the registered object identifier by referring to the physical name manager by using the physical name corresponding to the logical name and acquiring a type of a second calling convention with which a calling interface conforms, a call reception at said second component corresponding to the acquired object identifier conforming with the calling interface, by referring to an inherited interface name in type information of the calling interface;
- and
- comparing the type of the first calling convention with the type of the second calling convention, respectively acquired at said steps recited above, and if the types are different, generating a proxy object for transformation of the calling convention.
An apparatus for generating a calling convention transformation process to be executed in response to a call from a first component deployed in a first execution environment to a second component deployed in a second execution environment in a computer system for deploying components in execution environments, the component containing an application program and information necessary for execution of the application program, wherein:
- a call or a call reception of a component conforms with a local or remote calling convention and a calling interface, in the local calling convention a call procedure is an object call using a programming language and the calling interface inherits a predetermined local convention interface, and in the remote calling convention, a call procedure is a distributed object call and the calling interface inherits a predetermined remote calling convention interface;
- said first component stores a first deployment descriptor and first type information including method information of a first calling interface, the first deployment descriptor including a logical name for referring to said second component, a type of a first calling convention with which a call to said second component conforms, and a name of the first calling interface with which the call to said second component conforms;
- said second component stores a second deployment descriptor, second type information including method information of a second calling interface, and third type information including method information of a third calling interface, the second deployment descriptor including a name of the second calling interface for receiving a call in accordance with the local calling convention and a name of the third calling convention for receiving a call in accordance with the remote calling convention;
- if the first calling convention is the local calling convention, the first calling interface and the second calling interface are the same and the first type information and the second type information are the same, whereas if the first calling convention is the remote calling convention, the first calling interface and the third calling interface are the same and the first type information and the third type information are the same;
- when said second component is deployed in the second execution environment, the second component is assigned a physical name unique in the network for each calling interface of said second component, and the second execution environment generates an object identifier for referring to said second component for each calling interface of said second component and registers the object identifier in a physical name manager in correspondence with the physical name;
- and
- when said first component is deployed in the first execution environment, said first component is given the physical name corresponding to the logical name so as to permit reference to said second component,
- wherein the apparatus for generating a calling convention transformation process comprises:
- a unit which acquires the type of the first calling convention by referring to the first deployment descriptor by using an input logical name;
- a unit which acquires the registered object identifier by referring to the physical name manager by using the physical name corresponding to the logical name and acquires a type of a second calling convention with which a calling interface conforms, a call reception at said second component corresponding to the acquired object identifier conforming with the calling interface, by referring to an inherited interface name in type information of the calling interface;
- and
- a unit which compares the type of the first calling convention with the type of the second calling convention, respectively acquired at said steps recited above, and if the types are different, generates a proxy object for transformation of the calling convention.
Dependencies are inferred from the claim text.