>From: "Ryan Wynn" <[EMAIL PROTECTED]> 
>
> I noticed that in Clay's ComponentConfigBean$WatchDog the following is 
> used to close the open URLConnections: 
> 
> private void close() { 
> if (connections == null) { 
> return; 
> } 
> 
> for (int i = 0; i < connections.length; i++) { 
> connections[i] = null; 
> } 
> 
> connections = null; 
> } 
> 
> Is dereferencing these enough or would it be better to explicitly call 
> close() on the inputstreams associated with the connections? 

Opening and closing the input streams is the job of the "Parser".  They use the 
URL object versus the URLConnection.

There are a couple of  flavors:

1) 
http://svn.apache.org/viewvc/shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/ClayXmlParser.java?view=markup

2) 
http://svn.apache.org/viewvc/shale/framework/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/ClayTemplateParser.java?view=markup

The "Watch Dog" uses the URLConnection to find the last modified time-stamp.

Gary

Reply via email to