You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by James McGill <ja...@ableengineering.com> on 2010/08/26 23:43:28 UTC

MyPortal issue, service error in one portlet causes stack trace in a different portlet

I make two portlets.  One of them calls a service.  If that service has an
error, it causes another portlet to render a stack trace.

I put steps to reproduce in a Jira ticket.

https://issues.apache.org/jira/browse/OFBIZ-3903

This is 9.04.  Maybe I'm just doing something wrong.  Is there some way to
flush the dispatcher?  I hope someone can look at this and explain what's
going on.

-- 
James McGill
Phoenix AZ

Re: MyPortal issue, service error in one portlet causes stack trace in a different portlet

Posted by Scott Gray <sc...@hotwaxmedia.com>.
On 27/08/2010, at 11:25 AM, David E Jones wrote:

> On Aug 26, 2010, at 5:13 PM, James McGill wrote:
> 
>> On Thu, Aug 26, 2010 at 2:43 PM, James McGill <
>> james.mcgill@ableengineering.com> wrote:
>> 
>>> 
>>> https://issues.apache.org/jira/browse/OFBIZ-3903
>>> 
>>> 
>> I found that by adding TransactionUtil.rollback(); after seeing an error
>> result from the Dispatcher, I can at least hide the problem.
> 
> It looks like you're getting into why this happens. Screen rendering is done within a big single transaction. If you want parts of the screen to fail independently of other parts of the screen, they need to be in a separate transaction (ie pause the original, start new, commit/rollback new, resume original). Just rolling back a failed transaction and leaving the rest of the screen hanging is probably not a good idea.
> 
> -David

Perhaps we should add a require-new-transaction attribute to the screen element?

Regards
Scott

Re: MyPortal issue, service error in one portlet causes stack trace in a different portlet

Posted by David E Jones <de...@me.com>.
On Aug 26, 2010, at 5:13 PM, James McGill wrote:

> On Thu, Aug 26, 2010 at 2:43 PM, James McGill <
> james.mcgill@ableengineering.com> wrote:
> 
>> 
>> https://issues.apache.org/jira/browse/OFBIZ-3903
>> 
>> 
> I found that by adding TransactionUtil.rollback(); after seeing an error
> result from the Dispatcher, I can at least hide the problem.

It looks like you're getting into why this happens. Screen rendering is done within a big single transaction. If you want parts of the screen to fail independently of other parts of the screen, they need to be in a separate transaction (ie pause the original, start new, commit/rollback new, resume original). Just rolling back a failed transaction and leaving the rest of the screen hanging is probably not a good idea.

-David


Re: MyPortal issue, service error in one portlet causes stack trace in a different portlet

Posted by James McGill <ja...@ableengineering.com>.
On Thu, Aug 26, 2010 at 2:43 PM, James McGill <
james.mcgill@ableengineering.com> wrote:

>
> https://issues.apache.org/jira/browse/OFBIZ-3903
>
>
I found that by adding TransactionUtil.rollback(); after seeing an error
result from the Dispatcher, I can at least hide the problem.


-- 
James McGill
Phoenix AZ