Method for dynamically generating a wrapper class
First Claim
1. A method for processing an invocation using a dynamically generated wrapper, comprising:
- receiving an invocation by a wrapper object, the wrapper object instantiated from a wrapper class, the wrapper class extended from a superclass which implements a wrapper interface that includes a pre-invocation handler and a post-invocation handler, the invocation directed to a wrapped resource adapter by an application;
initiating pre-processing by the wrapper object, wherein the pre-processing code includes calling the pre-invocation handler, wherein the pre-invocation handler is configured to execute server-side code, wherein the server-side code includes transaction processing code;
calling the wrapped resource adapter by the wrapper object;
receiving a result from the wrapped resource adapter by the wrapper object;
initiating post-processing by the wrapper object, wherein post-processing including calling the post-invocation handler, wherein the post-invocation handler is configured to perform post-processing server side tasks, wherein the post-processing server-side tasks include transaction management; and
provide the result to the application;
wherein the superclass has a member variable to hold a vendor object, a non-argument constructor to instantiate the wrapper object, and an init method to initialize the wrapper object.
2 Assignments
0 Petitions
Accused Products
Abstract
Dynamically generating a wrapper object to intercept transmissions between a vendor object and an application program and performs server side tasks. To dynamically generate the wrapper at runtime in memory, the application server receives a vendor class, performs reflection on the vendor class, generates a wrapper class, and creates an instance of the wrapper class. In operation, the dynamically generated wrapper object receives a call placed to a method of the wrapped object, initiates pre-processing tasks to be performed, calls the method on the wrapped object, receives a result from the method invocation against the wrapped object, initiates post-processing tasks to be performed, and transmits the wrapped result back to the application program. The pre-processing tasks may include execution of a pre-invocation handler. The post-processing tasks may include execution of a post-invocation handler.
43 Citations
23 Claims
-
1. A method for processing an invocation using a dynamically generated wrapper, comprising:
-
receiving an invocation by a wrapper object, the wrapper object instantiated from a wrapper class, the wrapper class extended from a superclass which implements a wrapper interface that includes a pre-invocation handler and a post-invocation handler, the invocation directed to a wrapped resource adapter by an application; initiating pre-processing by the wrapper object, wherein the pre-processing code includes calling the pre-invocation handler, wherein the pre-invocation handler is configured to execute server-side code, wherein the server-side code includes transaction processing code; calling the wrapped resource adapter by the wrapper object; receiving a result from the wrapped resource adapter by the wrapper object; initiating post-processing by the wrapper object, wherein post-processing including calling the post-invocation handler, wherein the post-invocation handler is configured to perform post-processing server side tasks, wherein the post-processing server-side tasks include transaction management; and provide the result to the application; wherein the superclass has a member variable to hold a vendor object, a non-argument constructor to instantiate the wrapper object, and an init method to initialize the wrapper object. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A method for dynamically generating a wrapper object, comprising:
-
receiving a resource adapter class at an application server; performing reflection on the resource adapter class to identify interfaces implemented by the resource adapter class; dynamically generating a wrapper class at runtime that extends from a superclass, wherein the superclass implements a wrapper interface that includes a pre-invocation handler and a post-invocation handler, and the wrapper class implements the interfaces identified through reflection; instantiating a wrapper object from the wrapper class; initiating pre-processing by the wrapper object, wherein the pre-processing code includes calling a pre-invocation handler, wherein the pre-invocation handler is configured to execute server-side code, wherein the server-side code includes transaction processing code; and providing the wrapper object to an application that requires support for the interfaces implemented by the resource adapter class; wherein the superclass has a member variable to hold a vendor object, a non-argument constructor to instantiate the wrapper object, and an init method to initialize the wrapper object. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
-
-
23. A method for processing an invocation using a dynamically generated wrapper, comprising:
-
receiving an invocation by a wrapper object, the wrapper object instantiated from a wrapper class, the wrapper class extended from a superclass which implements a wrapper interface that includes a pre-invocation handler and a post-invocation handler, the invocation directed to a wrapped resource adapter by an application; initiating pre-processing by the wrapper object, wherein the pre-processing code includes calling the pre-invocation handler, wherein the pre-invocation handler is configured to execute server-side code, wherein the server-side code includes transaction processing code; calling the wrapped resource adapter by the wrapper object; receiving a result from the wrapped resource adapter by the wrapper object; initiating post-processing by the wrapper object, wherein post-processing including calling the post-invocation handler, wherein the post-invocation handler is configured to perform post-processing server side tasks, wherein the post-processing server-side tasks include transaction management; and provide the result to the application; wherein the wrapper object is dynamically generated at runtime by a wrapper factory on an application server; wherein the superclass has a member variable to hold a vendor object, a non-argument constructor to instantiate the wrapper object, and an init method to initialize the wrapper object.
-
Specification