US2018113754A1PendingUtilityA1

System and method for dynamic proxy generation

47
Assignee: SAP SEPriority: Jul 29, 2005Filed: Mar 24, 2017Published: Apr 26, 2018
Est. expiryJul 29, 2025(expired)· nominal 20-yr term from priority
G06F 9/45504G06F 9/548G06F 9/547
47
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

A system and method are described in which skeletons and/or stubs are manipulated based on deployment information. For example, a method according to one embodiment of the invention comprises: compiling source code to generate program code executable on an application server comprised of a plurality of different virtual machines, the program code containing stubs and/or skeletons; analyzing the program code to identify stubs and/or skeletons generated for objects which are located within the same virtual machine and/or the same physical machine; removing the stubs and/or skeletons for those objects which are located in the same virtual machine and/or same physical machine to generate modified program code; and deploying the modified program code.

Claims

exact text as granted — not AI-modified
1 . (canceled) 
     
     
         2 . A system comprising:
 one or more computer processors;   one or more computer memories storing instructions, the instructions configuring the one or more computer processors to perform operations for analyzing and modifying program code at runtime, the operations including:
 detecting that a method call has been made by a first object and directed to a second object; 
 based on a determination that the method call is a remote method call and a determination that a static stub created prior to runtime does not exist to handle the remote method call, generating a dynamic proxy during the runtime to handle the remote method call. 
   
     
     
         3 . The system of  claim 2 , wherein the dynamic proxy includes a plurality of method reference objects that correspond to a plurality of methods of the second object. 
     
     
         4 . The system of  claim 3 , wherein the dynamic proxy includes a classloader configured to find a method reference object of the plurality of method reference objects that corresponds to the remote method call. 
     
     
         5 . The system of  claim 4 , wherein the invocation handler handles the remote method call by using the parameters of the method reference object to make the remote call via a skeleton associated with the second object. 
     
     
         6 . The system of claim of  claim 5 , the operations further comprising, based on a determination that a static skeleton created prior to the runtime does not exist to handle the remote method call, generating a dynamic skeleton during the runtime to handle the remote method call, the dynamic skeleton serving as the skeleton associated with the second object. 
     
     
         7 . The system of  claim 1 , the operations further comprising, based on a determination that the method call is a local method call, directly invoking the local method call on the second object without using a skeleton associated with the second object. 
     
     
         8 . The system of  claim 1 , the operations further comprising, based on a determination that the method call is a local method call, directly invoking the local method call on the second object without using a stub associated with the first object. 
     
     
         9 . A computerized method for analyzing and modifying program code, the method comprising:
 detecting, by one or more hardware processors at runtime, that a method call has been made by a first object and directed to a second object; and   based on a determination that the method call is a remote method call and a determination that a static stub created prior to the runtime does not exist to handle the remote method call, generating by the one or more processors a dynamic proxy during the runtime to handle the remote method call.   
     
     
         10 . The method of  claim 9 , wherein the dynamic proxy includes a plurality of method reference objects that correspond to a plurality of methods of the second object. 
     
     
         11 . The method of  claim 10 , wherein the dynamic proxy includes a classloader configured to find a method reference object of the plurality of method reference objects that corresponds to the remote method call. 
     
     
         12 . The method of  claim 11 , wherein the invocation handler handles the remote method call by using the parameters of the method reference object to make the remote call via a skeleton associated with the second object. 
     
     
         13 . The method of claim of  claim 12 , the operations further comprising, based on a determination that a static skeleton created prior to the runtime does not exist to handle the remote method call, generating a dynamic skeleton during the runtime to handle the remote method call, the dynamic skeleton serving as the skeleton associated with the second object. 
     
     
         14 . The method of  claim 9 , the operations further comprising, based on a determination that the method call is a local method call, directly invoking the local method call on the second object without using a skeleton associated with the second object. 
     
     
         15 . The method of  claim 9 , the operations further comprising, based on a determination that the method call is a local method call, directly invoking the local method call on the second object without using a stub associated with the first object. 
     
     
         16 . A non-transitory machine readable medium embodying a set of instructions that, when executed by a processor, causes the processor to perform operations for analyzing and modifying program code at runtime, the operations comprising:
 detecting that a method call has been made by a first object and directed to a second object; and   based on a determination that the method call is a remote method call and a determination that a static stub created prior to the runtime does not exist to handle the remote method call, generating a dynamic proxy during the runtime to handle the remote method call.   
     
     
         17 . The non-transitory machine readable medium of  claim 16 , wherein the dynamic proxy includes a plurality of method reference objects that correspond to a plurality of methods of the second object. 
     
     
         18 . The non-transitory machine readable medium of  claim 17 , wherein the dynamic proxy includes a classloader configured to find a method reference object of the plurality of method reference objects that corresponds to the remote method call. 
     
     
         19 . The non-transitory machine readable medium of  claim 18 , wherein the invocation handler handles the remote method call by using the parameters of the method reference object to make the remote call via a skeleton associated with the second object. 
     
     
         20 . The non-transitory machine readable medium of claim of  claim 19 , the operations further comprising, based on a determination that a static skeleton created prior to the runtime does not exist to handle the remote method call, generating a dynamic skeleton during the runtime to handle the remote method call, the dynamic skeleton serving as the skeleton associated with the second object. 
     
     
         21 . The non-transitory machine readable medium of  claim 16 , the operations further comprising, based on a determination that the method call is a local method call, directly invoking the local method call on the second object without using a skeleton associated with the second object.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.