Ca peut peut-etre aider  ...

----- Original Message ----- 
From: "Emmanuel Venisse" <[EMAIL PROTECTED]>
To: "Maven Users List" <[EMAIL PROTECTED]>
Sent: Thursday, December 04, 2003 3:58 PM
Subject: Re: maven site : "Too many open files"


> I'll apply the Nicolas patch for reduce a little open files.
> 
> Emmanuel
> 
> ----- Original Message ----- 
> From: "Joakim Erdfelt" <[EMAIL PROTECTED]>
> To: "Maven Users List" <[EMAIL PROTECTED]>
> Sent: Thursday, December 04, 2003 1:55 PM
> Subject: Re: maven site : "Too many open files"
> 
> 
> > Nicolas De Loof wrote:
> > > I get troubles generating doc-site in a (big) webapp :
> > >
> > > I get lot's of
> > >
> > > "Caught java.io.IOException: Too many open files processing
> xref/com...."
> >
> > Move the jxr plugin to the top of the <reports> section in your
> > project.xml.  It worked for our 4500+ java file project.
> > (and we are using Maven 1.0-rc1 on a solaris system)
> >
> > It's not 100% jxr's fault, nearly all of the plugin's appear to leak
> > file descriptors (according to solaris truss).  jxr is just
> > particullarly agressive with them.
> >
> > /* Joakim Erdfelt - Cingular Wireless */
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
Index: JavaFileImpl.java
===================================================================
RCS file: 
/home/cvspublic/maven-plugins/jxr/src/main/org/apache/maven/jxr/pacman/JavaFileImpl.java,v
retrieving revision 1.2
diff -u -r1.2 JavaFileImpl.java
--- JavaFileImpl.java   2 Oct 2003 00:18:52 -0000       1.2
+++ JavaFileImpl.java   4 Dec 2003 10:45:38 -0000
@@ -62,6 +62,8 @@
  */
 public class JavaFileImpl extends JavaFile
 {
+    
+    private Reader reader;    
 
     /**
      * Create a new JavaFileImpl that points to a given file...
@@ -92,8 +94,9 @@
     private void parse()
         throws IOException
     {
-
-        StreamTokenizer stok = this.getTokenizer();
+    StreamTokenizer stok = null; 
+    try {
+        stok = this.getTokenizer();
 
         while (stok.nextToken() != StreamTokenizer.TT_EOF)
         {
@@ -144,7 +147,13 @@
             }
 
         }
-
+    }
+    finally {
+        stok = null;
+        if (this.reader != null) {
+            this.reader.close();
+        }
+    }
     }
 
     /** Get a StreamTokenizer for this file.  */
@@ -157,7 +166,7 @@
             throw new IOException(this.getFilename() + " does not exist!");
         }
 
-        FileReader reader = new FileReader(this.getFilename());
+        this.reader = new FileReader(this.getFilename());
 
         StreamTokenizer stok = new StreamTokenizer(reader);
         //int tok;

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to