A while back I made EoD SQL Query objects pool friendly if you construct them with a DataSource (which is the preferred way of doing things). This has a very interesting side effect, since now instead of:
... UserQuery myQuery = QueryTool.createQueryImplementation(UserQuery.class); User myUser = myQuery.getUser(); myQuery.close(); ...
You can do something really cool:
public interface UserQuery extends BaseQuery {
public static UserQuery QUERY = QueryTool.getQuery(UserQuery.class);
...
}
Since the Query automatically closes any Connection when it’s finished being used, and they are totally thread safe, this is a much much better way of doing things. The “getQuery” method was added this morning as a shorthand for “createQueryImplementation”. In other news, there is a new version of the software.