Trace:
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Last revision Both sides next revision | ||
jvx:server:lco:call_events [2020/06/15 10:43] cduncan |
jvx:server:lco:call_events [2020/06/26 12:26] cduncan |
||
---|---|---|---|
Line 2: | Line 2: | ||
~~Title: Server-Side Call Events~~ | ~~Title: Server-Side Call Events~~ | ||
- | If you call a server-side function or an action, usually you don't need more than the result on the client (UI). If you have complex business logic on server side, or if you call multiple server-side functions or actions in one single call, it would be useful to have server-side events with call information. Sometimes it's really helpful to do something after a single or all calls, e.g., cleanup of states, commit or rollback connection(s) (if you don't use autocommit). | + | If you call a server-side function or an action, usually you don't need more than the result on the client (UI). If you have complex business logic on server side, or if you call multiple server-side functions or actions in one single call, it would be useful to have server-side events with call information. Sometimes it's really helpful to do something after a single or all calls, e.g., cleanup of states, commit, or rollback connection(s) (if you don't use autocommit). |
Our JVx server implementation has some events which could be useful for your application. We've defined the interface javax.rad.server.ICallHandler with following methods: | Our JVx server implementation has some events which could be useful for your application. We've defined the interface javax.rad.server.ICallHandler with following methods: | ||
Line 30: | Line 30: | ||
</file> | </file> | ||
- | The difference is that ServerContext always returns the call handler for the Master session and SessionContext returns the call handler for the current session. | + | The difference is that ServerContext always returns the call handler for the master session and SessionContext returns the call handler for the current session. |
If you register listeners for the ICallHandler of MasterSession, they will be notified about all calls in your application. All other sessions will be notified about own calls. | If you register listeners for the ICallHandler of MasterSession, they will be notified about all calls in your application. All other sessions will be notified about own calls. |