a really great place to discuss or get information on this topic is sun's 
EJB-INTEREST mailing list. the archives are full of extensive and mostly 
very competent postings regarding this very design issue (CMP vs BMP vs 
direct SQL) and many other general ejb design questions.

regards,

robert


At 09:10 04.04.00 , Alex Paransky wrote:
>But using stateless session beans to execute SQL means you have to embed the
>SQL commands in to your code.  This breaks the model that CMP is trying to
>achieve.  If someone is to move your bean in to a different environment they
>might not be able to alter the code to make changes to the SQL.
>
>Suppose that someone is trying to adapt your Employee bean to be used in
>their enterprise system.  They follow the CMP procedure with their EJB
>server to map Employee attributes to columns in their own table.  However,
>they are not able to do the same with the session bean which has SQL in it.
>
>I suppose that the bean's environment can be used to hold the specific SQL,
>with parameter replacements, however, this seems out of place with the CMP
>model.
>
>
>
>
>
>
>

(-) Robert Krüger
(-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH
(-) Brüder-Knauß-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665401, Fax: 06151 665373
(-) [EMAIL PROTECTED], www.signal7.de


Reply via email to