[ 
https://issues.apache.org/jira/browse/WW-3462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15081612#comment-15081612
 ] 

ASF subversion and git services commented on WW-3462:
-----------------------------------------------------

Commit 212bbae0fd3e79f4239b16c4646f003c77daaf7f in struts's branch 
refs/heads/master from [~lukaszlenart]
[ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=212bbae ]

WW-3462 Closes connection on report generation end


> connection open after report generation
> ---------------------------------------
>
>                 Key: WW-3462
>                 URL: https://issues.apache.org/jira/browse/WW-3462
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - JasperReports
>    Affects Versions: 2.1.8
>         Environment: jdk1.5.0_16 
>            Reporter: Salva
>             Fix For: 2.3.25, 2.5
>
>   Original Estimate: 20m
>  Remaining Estimate: 20m
>
> If a report generation was called with connection like following code, 
> database connection will not be closed. I suggest to modify doExecute method 
> of org.apache.struts2.views.jasperreports.JasperReportsResult class after the 
> exportReportToBytes, by adding, in case of conn not null, the conn closing.
> struts.xml
> ...
> <action name="report" class="myorg.actions.tests.Report">
>     <result name="success" type="jasper">
>         <param name="location">/test/Report.jasper</param>
>         <param name="connection">myConnection</param>
>         <param name="contentDisposition">attachment</param>
>         <param name="format">PDF</param>
>     </result>
> </action>
> ....
> Action execute method code
> ...
> DataSource ds = (DataSource) ictx.lookup("java:jdbc/myApp");
> myConnection = ds.getConnection();
> ...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to