On Tue, 29 Jun 1999, Aravind Selvaraje wrote:
> Most of the cases and examples that I have seen so far pass either
> objects or primitive types as parameters to the finder functions. What I
> would like to do is to perform a late selection criteria passed thro'
> from the caller. How can I do this with both BMP and CMP ?
Well, with BMP you could just pass in a SQL "where" clause and concatenate
it onto the tail of the SQL you're using for the finder.
With CMP, nothing springs readily to mind. Anybody else?
> What are the implications on EJB Server scalability and other issues if
> one adopts this approach ?
I don't know that there'd necessarily be any significant impact. You'd
probably not be able to use stored procs or prepared statements with this
approach, which may have a moderate to severe impact on your performance,
depending on how well your DB handles dynamic SQL. With any kind of
dynamic query, you have to be careful to constrain the number of tables,
conditions, and columns a user can pick from -- it's not hard for a naive
user to bring a system to its knees through injudicious choice of query
parameters.
HTH,
Tom
============================================================================
Tom Valesky -- [EMAIL PROTECTED] -- http://www.patriot.net/users/tvalesky
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".