A system and method are described for implementing a smart proxy within an
object-oriented environment. One embodiment of the invention reduces the
number of remote network calls required for creating and removing
enterprise java beans ("EJBs"), thereby improving the efficiency of the
entire system. Specifically, a smart proxy is generated on a remote java
virtual machine ("JVM"), in front of the home object and remote object,
and is configured to handle certain types of remote method invocations at
the client side. In this embodiment, the client is no longer configured
to hold a direct reference to the home or remote objects, or stubs, as in
prior systems. Rather, the client holds a reference to the smart proxy,
which communicates with the home and remote objects on behalf of the
client. In response to a method call on the EJB Object reference, for
example, the proxy will analyze the call, possibly change state, and make
a decision as to whether the call must be forwarded to the home or remote
objects, or whether it can be handled locally by the proxy itself.