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.