Each instance of org.jboss.remoting.Client is associated with a unique
sessionId, which is transmitted with each invocation. In particular, if you
call Client.invoke(), the invocation is wrapped in an instance of
org.jboss.remoting.InvocationRequest, which carries the sessionId to the
server, where it is passed to
org.jboss.remoting.ServerInvocationHandler.invoke().
If you want to add additional application information, you can pass an
arbitrary map. E.g.,
| Map metadata = new HashMap();
| metadata.put("user", "monkeyman");
| Object o = ... ;
| client.invoke(o, metadata);
|
and your ServerInvocationHandler can retrieve the map as follows:
| public Object invoke(InvocationRequest invocation) throws Throwable
| {
| Map metadata = invocation.getRequestPayload();
| System.out.println("user: " + metadata.get("user");
| ...
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127279#4127279
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127279
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user