<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=sgarlatm" rel="nofollow">Matthew Sgarlata</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-860?redirect=false" rel="nofollow">SPR-860</a></strong> and commented</p>
<p dir="auto">I want to be able to see the arguments to and return values of the methods in my service and DAO objects.  The TraceInterceptor did not support this functionality, so I wrote it and prepared a patch for potential inclusion in Spring.  With no configuration parameters specified, log messages will appear as they did in Spring 1.0.2.  The new enterMessageTemplate and exitMessageTemplate properties allow for customization.</p>
<p dir="auto">In my application I set my enterMessageTemplate to "Entering $unqualifiedTargetClassName.$methodName($arguments)" and my exitMessageTemplate to "$unqualifiedTargetClassName.$methodName($arguments) returned $returnValue".  This results in log output such as:</p>
<p dir="auto">DEBUG (TraceInterceptor:invoke) - Entering OwnerUpdaterServiceImpl.getOwnerMetricsByUser(39,-1,5,database1110394538812,org.apache.catalina.session.StandardSessionFacade@1dbe1c9)<br>
DEBUG (TraceInterceptor:invoke) - Entering OwnerUpdaterDAOImpl.getOwnerMetricsByUser(39,-1,5,database1110394538812)<br>
DEBUG (JdbcTemplate:query) - Executing SQL query [select mc.metricid, mc.scorecardnodeid, mc.updatetype, mc.datatype, mc.aggregationtype, mc.equation, mc.lastreminded, mc.calendarid, sn.scorecardnodename, sn.scorecardrootnodeid, mc.calendarperiodid, ms.score, mv.actualvalue, sn.weighting, mv.goal, mc.goal as mgoal, mv.base, mc.base as mbase, mv.metricvalueid, s.organizationnodeid, mc.periodalias, mc.startdate, mc.enddate, cal.calendarname from ((((((select m.*, cp1.calendarperiodid, cp1.startdate, cp1.enddate, cp1.periodalias from metrics m, calendarperiods cp1, calendarperiods cp2 where m.calendarid = cp1.calendarid and cp2.calendarperiodid=? and ( (cp1.startdate &gt;= cp2.startdate and cp1.startdate &lt;= cp2.enddate) or (cp1.enddate &gt;= cp2.startdate and cp1.enddate &lt;= cp2.enddate) or (cp1.startdate &lt; cp2.startdate and cp1.enddate &gt; cp2.enddate) ) ) mc left outer join metricvalues mv on (mc.metricid = mv.metricid and mc.calendarperiodid = mv.calendarperiodid)) left outer join metricscores ms on (mc.metricid = ms.metricid and mc.calendarperiodid = ms.calendarperiodid)) left join scorecardnodes sn on (mc.scorecardnodeid = sn.scorecardnodeid)) left join scorecards s on (sn.scorecardrootnodeid = s.scorecardrootnodeid)) left join scorecardnodeownerusers sou on (mc.scorecardnodeid = sou.scorecardnodeid)) left join calendars cal on (mc.calendarid = cal.calendarid) where sou.userid = ? order by sn.scorecardnodename]<br>
DEBUG (StatementCreatorUtils:setParameterValue) - Setting SQL statement parameter value: columnIndex 1, parameter value [39], valueClass [java.lang.Integer], sqlType unknown<br>
DEBUG (StatementCreatorUtils:setParameterValue) - Setting SQL statement parameter value: columnIndex 2, parameter value [-1], valueClass [java.lang.Integer], sqlType unknown<br>
DEBUG (TraceInterceptor:invoke) - OwnerUpdaterDAOImpl.getOwnerMetricsByUser(39,-1,5,database1110394538812) returned []<br>
DEBUG (TraceInterceptor:invoke) - OwnerUpdaterServiceImpl.getOwnerMetricsByUser(39,-1,5,database1110394538812,org.apache.catalina.session.StandardSessionFacade@1dbe1c9) returned []</p>
<p dir="auto">PS - I know service objects shouldn't have HttpSessions passed to them, I just haven't had time to factor that out of the code at my new company yet!</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 1.2 RC1</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/10636/TraceInterceptorPatch.txt" rel="nofollow">TraceInterceptorPatch.txt</a> (<em>7.07 kB</em>)</li>
</ul>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398053977" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/5329" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/5329/hovercard" href="https://github.com/spring-projects/spring-framework/issues/5329">#5329</a> TraceInterceptor enhancements (<em><strong>"duplicates"</strong></em>)</li>
</ul>
<p dir="auto">1 votes, 2 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=vychtrle" rel="nofollow">Joseph Vychtrle</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7910?redirect=false" rel="nofollow">SPR-7910</a></strong> and commented</p>
<p dir="auto">Hi,</p>
<p dir="auto">I've been thinking if it is possible to handle Multipart request that is not an Action request. There is a reason why it seems impossible to me :</p>
<p dir="auto">only ActionRequest implements getFile() kind of methods</p>
<p dir="auto">What if I don't use a html form to upload a file and I don't want a view to be rendered after action request, which happens always after the action phase.</p>
<p dir="auto">What if I want to create a post request (with file(s)) by ajax and use <code class="notranslate">@ResourceMapping</code> handler. How do I get it out of ResourceRequest ?</p>
<p dir="auto">Thank you very much for your thoughts.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0.5</p>
<p dir="auto"><strong>Reference URL:</strong> <a href="http://forum.springsource.org/showthread.php?p=341724" rel="nofollow">http://forum.springsource.org/showthread.php?p=341724</a></p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398108185" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12318" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12318/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12318">#12318</a> Add multipart request support to portlet resource requests (<em><strong>"duplicates"</strong></em>)</li>
</ul>
<p dir="auto">1 votes, 0 watchers</p>