[Remoting] - behavior on failure
by login4jbr
Greetings.
The org.jboss.remoting.Client class offers the invoke() and invokeOneWay() methods to do calls to the server side.
If an error (not produced by my code) occurs during the call, for example:
* The call is not delivered to the server.
* The call's return value is not delivered to the client.
Can I be SURE that a Throwable will be thrown to the client side?
Something may/must happen in the server side?
Analogously the org.jboss.remoting.callback.InvokerCallbackHandler interface offers the handleCallback() method to do callbacks to the client side.
If an error (not produced by my code) occurs during the call, for example:
* The callback is not delivered to the client side.
Can I be SURE that a HandleCallbackException will be thrown to the server side?
Something may/must happen in the client side?
Thanks a lot for the help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025628#4025628
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025628
19Â years, 1Â month
[JBoss Portal] - Re: access to outer request/session from within portlet
by Antoine_h
hello,
this get the dispatched request, which seem not be usefull in my case (retrieve the session for setting a whole portal session parameter, that is the locale for all the portlet).
I did this, through the PortletRequest, PortletInvocation and AbstractInvocationContext class.
Not sure it is full correct, but it works. If someone has an comment on this ?
may be another way to get the http session ?
| private static final Logger log = Logger
| .getLogger(MyClass.class);
|
| public static final HttpServletRequest getOuterRequest(
| PortletRequest request) {
| PortletInvocation portletInvocation = (PortletInvocation) request
| .getAttribute(ContextDispatcherInterceptor.REQ_ATT_COMPONENT_INVOCATION);
| // return portletInvocation.getDispatchedRequest();
|
| // Get the context of the invocation
| InvocationContext invocationContext = portletInvocation.getContext();
|
| // Try to cast the context of invocation to an AbstractInvocationContext
| AbstractInvocationContext abstractInvCtxt = null;
| if (invocationContext != null) {
| if (invocationContext instanceof AbstractInvocationContext) {
| abstractInvCtxt = (AbstractInvocationContext) invocationContext;
| } else {
| log
| .warn("The InvocationContext is not of instance of AbstractInvocationContext !");
| log.warn("The InvocationContext is : " + invocationContext
| + " // " + invocationContext.getClass().getName()
| + " // " + invocationContext.toString());
| }
|
| } else {
| log.warn("The invocationContext is null !");
| }
| HttpServletRequest httpServletRequest = null;
| if (abstractInvCtxt != null) {
| // The AbstractInvocationContext exists : try to retrieve the client
| // httpServletRequest.
| httpServletRequest = abstractInvCtxt.getClientRequest();
| if (httpServletRequest == null) {
| log.warn("The HttpServletRequest is null !");
| }
| } else {
| log.warn("The AbstractInvocationContext is null !");
| }
| return httpServletRequest;
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025615#4025615
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025615
19Â years, 1Â month