File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes SQLs in home methods of EJB 2.0 CMP Beans Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Architect Certification (SCEA/OCMJEA)
Reply Bookmark "SQLs in home methods of EJB 2.0 CMP Beans" Watch "SQLs in home methods of EJB 2.0 CMP Beans" New topic
Author

SQLs in home methods of EJB 2.0 CMP Beans

Sun Rise
Greenhorn

Joined: Jan 15, 2003
Posts: 2
Is it a good practice to use direct SQL calls using JDBC in ejbHome methods of a EJB 2.0 CMP bean. The EJB specification does not specify anything about this. What are the pros and cons of this approach, any thoughts would be appreciated.
Thanks
Karthi Bala
Ranch Hand

Joined: Jul 27, 2001
Posts: 48
According to blueprints, its not correct.The blueprints advises you to use Data Access Object Pattern to code all JDBC and not directly in the bean.
[ February 03, 2003: Message edited by: Karthi Bala ]

Karthi Bala<br />SCJP 1.2, SCWCD 1.3, SCWCD 1.4, SCDJWS (Awaiting Result)<br /> <br />Where there is a will,there is a WAY.
 
 
subject: SQLs in home methods of EJB 2.0 CMP Beans
 
Threads others viewed
EJB 1.1 Vs EJB 2.0 Question
Converting EJB 1.1 CMP entities to EJB 2.0.
Realistic Utility of Entity Beans
WSAD EJB
O/R Mapping and EJBs
IntelliJ Java IDE