You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Hauke Rabe (Updated) (JIRA)" <ji...@apache.org> on 2011/11/29 10:03:40 UTC

[jira] [Updated] (WICKET-4271) Method AbstractResource#respond is final

     [ https://issues.apache.org/jira/browse/WICKET-4271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hauke Rabe updated WICKET-4271:
-------------------------------

    Description: 
I need a transactional layer between the method call *newResourceResponse(attributes);* and *data.getWriteCallback().writeData(attributes);* cause the ResourceResponse holds a transactional reference which can not be closed until the *data.getWriteCallback().writeData(attributes);*  was called. At this moment there is no ability to do such transactional handling.

For now I have a workaround with a DelegateResource which calls a sendReseponse method inside the respond method

{code}
public void sendResponse(final ResourceResponse resourceResponse)
  {
      final AbstractResource resource = new AbstractResource()
      {

        @Override
        protected ResourceResponse newResourceResponse(final Attributes attributes)
        {
          return resourceResponse;
        }
      };

      resource.respond(attributes);
  }
{code}


  was:I need a transactional layer between the method call *newResourceResponse(attributes);* and *data.getWriteCallback().writeData(attributes);* cause the ResourceResponse holds a transactional reference which can not be closed until the *data.getWriteCallback().writeData(attributes);*  was called. At this moment there is no ability to do such transactional handling.

    
> Method AbstractResource#respond is final
> ----------------------------------------
>
>                 Key: WICKET-4271
>                 URL: https://issues.apache.org/jira/browse/WICKET-4271
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Hauke Rabe
>
> I need a transactional layer between the method call *newResourceResponse(attributes);* and *data.getWriteCallback().writeData(attributes);* cause the ResourceResponse holds a transactional reference which can not be closed until the *data.getWriteCallback().writeData(attributes);*  was called. At this moment there is no ability to do such transactional handling.
> For now I have a workaround with a DelegateResource which calls a sendReseponse method inside the respond method
> {code}
> public void sendResponse(final ResourceResponse resourceResponse)
>   {
>       final AbstractResource resource = new AbstractResource()
>       {
>         @Override
>         protected ResourceResponse newResourceResponse(final Attributes attributes)
>         {
>           return resourceResponse;
>         }
>       };
>       resource.respond(attributes);
>   }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira