<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Done... <a class="moz-txt-link-freetext" href="https://issues.jboss.org/browse/JBRULES-2928">https://issues.jboss.org/browse/JBRULES-2928</a><br>
<br>
Chris<br>
<br>
On 16/03/2011 18:33, Edson Tirelli wrote:
<blockquote
cite="mid:AANLkTinPh4Q49x7HpVTkq0UCuEexn=6kh6NhmAD_3jd_@mail.gmail.com"
type="cite">
<div><br>
</div>
This is JCI code that we inline. We should probably check if
there is a new JCI version that fixes the problem if it is indeed
a problem.
<div><br>
</div>
<div> Can I ask you please to open a JIRA with the info you
reported here?</div>
<div><br>
</div>
<div> Thanks,</div>
<div> Edson<br>
<br>
<div class="gmail_quote">2011/3/16 Greg Barton <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:greg_barton@yahoo.com">greg_barton@yahoo.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
Yes, but it's not a full blown leak. Wrapping stream use in
a try/finally block is best. Feel free and open a JIRA to
fix it. There may be other instances.<br>
<div class="im"><br>
--- On Wed, 3/16/11, Chris Selwyn <<a
moz-do-not-send="true"
href="mailto:chris@selwyn-family.me.uk">chris@selwyn-family.me.uk</a>>
wrote:<br>
<br>
> From: Chris Selwyn <<a moz-do-not-send="true"
href="mailto:chris@selwyn-family.me.uk">chris@selwyn-family.me.uk</a>><br>
</div>
> Subject: Re: [rules-users] Open file leak in Drools
Compiler<br>
> To: "Rules Users List" <<a moz-do-not-send="true"
href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>><br>
> Cc: "Greg Barton" <<a moz-do-not-send="true"
href="mailto:greg_barton@yahoo.com">greg_barton@yahoo.com</a>><br>
> Date: Wednesday, March 16, 2011, 12:18 PM<br>
<div>
<div class="h5">> Isn't it regarded as bad practice to<br>
> rely on the finalize() method<br>
> called by the garbage collector to release such
resources?<br>
><br>
> Chris<br>
><br>
> On 16/03/2011 17:04, Greg Barton wrote:<br>
> > Only if garbage collection never runs. Then<br>
> you'd already be in trouble. :)<br>
> ><br>
> > --- On Wed, 3/16/11, Chris Selwyn<<a
moz-do-not-send="true"
href="mailto:chris@selwyn-family.me.uk">chris@selwyn-family.me.uk</a>> <br>
> wrote:<br>
> ><br>
> >> From: Chris Selwyn<<a
moz-do-not-send="true"
href="mailto:chris@selwyn-family.me.uk">chris@selwyn-family.me.uk</a>><br>
> >> Subject: [rules-users] Open file leak in
Drools<br>
> Compiler<br>
> >> To: "Drools users"<<a
moz-do-not-send="true"
href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>><br>
> >> Date: Wednesday, March 16, 2011, 11:49 AM<br>
> >> I am running Drools (actually JBoss<br>
> >> Rules 5.1.0 ) in Glassfish.<br>
> >><br>
> >> My deployable is an EJB that uses a<br>
> >> StatelessKnowledgeSession to run<br>
> >> some rules that I get from a
KnowledgeAgent that<br>
> has a<br>
> >> Changeset with a<br>
> >> .drl in it.<br>
> >> Therefore, I have placed the drools
compiler into<br>
> the<br>
> >> deployable and it<br>
> >> all appears to work.<br>
> >><br>
> >> Glassfish has a clever little mechanism
that, when<br>
> you<br>
> >> unload a<br>
> >> deployable that had some open streams, it
tells<br>
> you all<br>
> >> about it (and<br>
> >> kindly closes them).<br>
> >><br>
> >> Glassfish is reporting that InputStreams
are being<br>
> left<br>
> >> open that were<br>
> >> opened in the isPackage() method of<br>
> >><br>
>
org.drools.commons.jci.compilers.EclipseJavaCompiler.<br>
> >> That method has the following code in it:-<br>
> >><br>
> >> <br>
> <br>
> >> final InputStream is =<br>
> >><br>
>
pClassLoader.getResourceAsStream(ClassUtils.convertClassToResourcePath(pClazzName));<br>
> >> <br>
> <br>
> >> if (is != null) {<br>
> >> <br>
> <br>
> >> return false;<br>
> >> <br>
> <br>
> >> }<br>
> >><br>
> >> So, when "is" is not null (i.e. open), it
is<br>
> forgotten<br>
> >> about and not closed.<br>
> >><br>
> >> Isn't this a potential file handle leak?<br>
> >><br>
> >> Chris Selwyn<br>
> >><br>
> >>
_______________________________________________<br>
> >> rules-users mailing list<br>
> >> <a moz-do-not-send="true"
href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
> >> <a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-users"
target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
> >><br>
> ><br>
> ><br>
> ><br>
> >
_______________________________________________<br>
> > rules-users mailing list<br>
> > <a moz-do-not-send="true"
href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
> > <a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-users"
target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
> ><br>
> ><br>
> > -----<br>
> > No virus found in this message.<br>
> > Checked by AVG - <a moz-do-not-send="true"
href="http://www.avg.com" target="_blank">www.avg.com</a><br>
> > Version: 10.0.1204 / Virus Database: 1498/3509
-<br>
> Release Date: 03/15/11<br>
> ><br>
><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-users"
target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
Edson Tirelli<br>
JBoss Drools Core Development<br>
JBoss by Red Hat @ <a moz-do-not-send="true"
href="http://www.jboss.com">www.jboss.com</a><br>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<p class="avgcert" color="#000000" align="left">No virus found in
this message.<br>
Checked by AVG - <a moz-do-not-send="true"
href="http://www.avg.com">www.avg.com</a><br>
Version: 10.0.1204 / Virus Database: 1498/3511 - Release Date:
03/16/11</p>
</blockquote>
</body>
</html>