Carsten Dräger created WICKET-4718:
--------------------------------------

             Summary: ResourceStreamResource#getResourceStream() is called 
multiple times
                 Key: WICKET-4718
                 URL: https://issues.apache.org/jira/browse/WICKET-4718
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 6.0.0-beta3
         Environment: Mac OS X 10.7.4 Lion, Java 6, IntelliJ Idea 11.1, Tomcat 
7 & Jetty 7.5.0
            Reporter: Carsten Dräger


When a ResourceStreamResource is implemented to return a IResourceStream 
dynamically, by returning a new instance of an extended AbstractResourceStream, 
that ResourceStream is instantiated multiple times when a ResourceLink is 
clicked.

In my case, that ResourceStream returns an AttachmentInputStream from the 
Ektorp library (for CouchDB interaction). This behavior results in multiple 
queries (currently up to four) when I click once on a ResourceLink to that 
resource.

Code Examples
Extended ResourceStreamResource: http://pastebin.com/9BB7LEiV
Extended IResouceStream: http://pastebin.com/Z7GvzGja

--
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


Reply via email to