-
1. Re: Many open files jndi.properties by JBoss AS 5 process
jaikiran Apr 30, 2014 6:43 AM (in response to petepl)How did you narrow it down to jndi.properties being left open? Is there some specific code you found that was causing this issue?
-
2. Re: Many open files jndi.properties by JBoss AS 5 process
petepl Apr 30, 2014 7:47 AM (in response to petepl)Actually I was thinking about it and I suspect that the problem is when I call Datasource from object Context:
Piece of code is here:
public static Connection setDataSource(String dataSourceName) throws SQLException, NamingException {
Context initContext = new InitialContext();
Context envContext = (Context)initContext.lookup("java:");
DataSource ds = (DataSource)envContext.lookup(dataSourceName);
Connection connection = ds.getConnection();
connection.setAutoCommit(false);
return connection;
}
I have found that context should implicity close, but not always
More information here: http://docs.oracle.com/javase/tutorial/jndi/ldap/close.html
Anyway do you think that it could cause a problem ?
-
3. Re: Many open files jndi.properties by JBoss AS 5 process
petepl May 29, 2014 9:48 AM (in response to petepl)Finally we increase limit of maximum number of opened files per process on our server to 2048. After 3 weeks we noticed that the same problem showed up.
Anyone can help ?