Subject Re: [Firebird-Java] Re: Pooling Connection with FBWrappingDataSource
Author Lucio nuñez
Thank you Roman, so, I´m developing a standalone app, and must be only one connection.

Roman Rokytskyy <rrokytskyy@...> wrote:> ¿How many connections must I have to make a good performance app?

In theory equal to the number of concurrent accesses/transactions. But
experiment yourself. If you develop web application, use JMeter to
emulate site load and change size of the max connections in pool. And
you always can set it to 0, which means "no limit". In this case you
will have as much connections as you need (pool will be able to create
new when needed). But there's drawback - if you have connection leaks,
you will exaust your server.

> ¿How many statements or PreparedStatements per Connection must I do?

As many as you need. If you use JayBird 1.5 from CVS, it will provide
your prepared statement pooling. In this case standard pattern would be:

PreparedStatement stmt = connection.prepareStatement(sql);
try {
...
} finally {
stmt.close();
}

Pool manage your statements and you have to not worry about statement
management (opening, closing, whether they survive commit or not, etc.)

> ¿How many max ResultSets or RowSets must I do?

You always have one per statement. After you finished fetching data,
close it. Anyway, if you will re-use the statement it will be closed
automatically.

Roman



---------------------------------
Yahoo! Groups Links

To visit your group on the web, go to:
http://groups.yahoo.com/group/Firebird-Java/

To unsubscribe from this group, send an email to:
Firebird-Java-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.





---------------------------------
Do You Yahoo!?
Yahoo! Net: La mejor conexión a internet y 25MB extra a tu correo por $100 al mes.


[Non-text portions of this message have been removed]