WSO2 SOA Enablement Server Remoting lets you call methods on remote objects without dealing with the low-level complexities of doing so. The reason for making an object remote is so it can be accessed from another application domain.
Generally, any public Java object can be made remote. They must be published as Web services in WSO2 SOA Enablement Server, best done by the runtime publishing API. These remote objects are described by WSDL files, which are generated automatically They can be instantiated in two ways: shared instantiation and per-client instantiation. In shared instantiation, there is only one instance of the remote object, which is then shared by any number of clients. This is the usual means of instantiation. In per-client instantiation, each client has his own instance of the remote object. Because there could be more than one instance of the object, and these instances can be in different states at different times, we say these instances are stateful. The lifetime of a stateful Web service is controlled by the server-side through setting the time to live (TTL) value.
A proxy is created when a client looks up a remote object, during invocation. This proxy represents the remote object for the client. It handles the communication between the client and the instance of the remote object. You can think of the proxy as an ambassador from the remote object.
To use WSO2 SOA Enablement Server to make your objects remote, you can embed WSO2 SOA Enablement Server in your application. In this case, you can manage WSO2 SOA Enablement Server from within the application.
Messages are carried between a client and a remote object by transports. WSO2 SOA Enablement Server supports a wide variety of transport protocols. The process of communicating a message with a transport can be customized by using interceptors.
Objects are normally passed as arguments, by value. This means the object is copied and moved from remote object to client, or vice-versa. However, remote references allow you to pass arguments by reference, instead. This is useful because:
Some objects cannot function when copied in their entirety and moved; for example, an object referring to a file on a local drive.
Some objects are too large to be copied and moved efficiently around a busy network.
Changing an object that has been passed by value has no effect on the original object.