Your pool shouldn't be a problem (unless you have a lot of users all
trying to do this at the same time).
Are you calling the finder from a session bean, or directly from UI? If
directly from the UI, step one is going to be to change that so that the
finder gets called from a session bean which passes back some sort of
value objects to the UI. Accessing entities from the UI is bound to
hurt, because each call will be its own transaction.
For CMP, once you're calling from a session bean, look at the read-ahead
element in jaws.xml (CMP1.1) or jbosscmp-jdbc.xml (CMP2.0). This should
help tremendously.
If it's a BMP bean, the behavior should be pretty much linear. Sorry,
not much you can really do about that, other that have a session bean
that goes directly against the data to make value objects. Make _sure_
you call 'close' on all jdbc objects that you use in an EJB! This is
what tells the connection that it can go back into the pool. The
standard way to do this is
--------------------------------------------------------
Connection conn = null;
PreparedStatement stmt = null;
ResultSet res = null;
try {
//get the connection, use it, etc.
} catch (SQLException sqle) {
//whatever you do to handle it
} finally {
if (conn!= null) try {conn.close();}catch (SQLException e1) {}
//same jive for stmt and res
}
--------------------------------------------------------
A lot of people create utility methods for the cleanup stuff that goes
in the finally block.
hth,
danch
Jon Swinth wrote:
> I have a few finders that bring back 100 - 500 beans. As the number of beans
> returned climbs, there is a point (i.e. number of beans) where everything
> slows down significantly. I get a notification in the log that says the pool
> for my bean is overloaded and "You should change pool parameters." Now I
> have been on a two day search to find out how. The only reference in the
> forums was this guy who has the same issue, but nobody responded:
>
> http://main.jboss.org/forums/thread.jsp?forum=61&thread=13772&message=3711392
>
> _______________________________________________________________
>
> Have big pipes? SourceForge.net is looking for download mirrors. We supply
> the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>
--
=========================================================================
Disclaimer:
All statements are my own, personal opinions and have nothing to do
with the opinions of employer, wife, or cat. They may not have anything
to do with objective reality, as a matter of fact. Your Milage May Vary,
Excludes Delivery Charges, etc.
=========================================================================
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user