Hello,
I'd like to hear other people's opinion about 2 topics:

1) Is it a bad idea to put plain SQL queries in Session Beans ?

I need somewhere in my code to make generic Sql queries to fill up
some combos with values- since every combo has its own query
I provided a config file in XML with the single query for every combo.

Then I just wrote a method in my Session bean a method like this:

Collection readSQL (String sql, params) {

... execute query with params

....fill up Collection with Resultset

...return Collection
}

is it a clean solution- technically speaking? or do I need to
contact Entity Beans and use their find methods ?

2) Do I need to throw an EJB Exception in a method like
this? or it's enough to handle an SQL Exception ?
If I'm not mistaken throwing an EJBException will kill the transaction....
while handling an SQL Exception would just exit the method
gracefully...

Thanks for your kind attention.
Francesco

===========================================================================
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".

Reply via email to