[jboss-cvs] JBoss Messaging SVN: r6337 - trunk/examples/jms/common/src/org/jboss/jms/example.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Apr 7 07:32:54 EDT 2009
Author: ataylor
Date: 2009-04-07 07:32:54 -0400 (Tue, 07 Apr 2009)
New Revision: 6337
Modified:
trunk/examples/jms/common/src/org/jboss/jms/example/JMSExample.java
Log:
example fix
Modified: trunk/examples/jms/common/src/org/jboss/jms/example/JMSExample.java
===================================================================
--- trunk/examples/jms/common/src/org/jboss/jms/example/JMSExample.java 2009-04-07 11:29:18 UTC (rev 6336)
+++ trunk/examples/jms/common/src/org/jboss/jms/example/JMSExample.java 2009-04-07 11:32:54 UTC (rev 6337)
@@ -103,7 +103,19 @@
File jndiFile = new File(jndiFilename);
log.info("using " + jndiFile + " for jndi");
Properties props = new Properties();
- props.load(new FileInputStream(jndiFile));
+ FileInputStream inStream = null;
+ try
+ {
+ inStream = new FileInputStream(jndiFile);
+ props.load(inStream);
+ }
+ finally
+ {
+ if(inStream != null)
+ {
+ inStream.close();
+ }
+ }
return new InitialContext(props);
}
More information about the jboss-cvs-commits
mailing list