Using Session EJBs only

hi,

This is for web project. I want to use Session EJBs only, for data access logic i'll write my own normal java DAO classes. I don't want to use entity beans. The session EJBs(containg business logic) will call my DAO classes as any other java class would do. In addition i may have to run the application on more than one database.

Q. What classes in addition to session beans, do i have to deploy in application server ?

Q. Please comment on how this approach will affect performance ?

[516 byte] By [sallua] at [2007-9-28 16:53:05]
# 1

Q1: You need to supply your DAO classes with the session bean code in the EJB JAR file. You can just add the class files to the JAR or create a library JAR and add that to the EJB JAR file. The important thing is for your DAO classes to be in the application classpath.

Q2: Performance can benefit from such a scheme when your application has a relatively non-complex schema, and your database access logic is not too complicated. Of course, your DAO classes must be carefully coded as well.

vgiannadakisa at 2007-7-12 14:11:46 > top of Java-index,Other Topics,Patterns & OO Design...