Purush,
If you want to go straight to the DB from your session bean I would recommend using 
the Data Access Object pattern and
go from your servlets --> DAO --> DB. Also in your EJB, you should go EJB --> DAO --> 
DB.

In my situation I have to go to the database and pull the quote info from my quote 
entity bean. There may thousands of
quotes. It takes too long to iterate through all of the beans to just get a "dirty 
copy" for a non-critical report. So I
go straight to the DB. As long as you are not modyfing the DB, you can read it from 
DAO. This is what I understand. And
technically if you were modyfing it straight from the servlet (bad practice) you would 
have to turn the db-isShared flag
on which could hurt your performance if you were using it prior.

Chris

-----Original Message-----
From: Purushotham Das K [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 11, 2000 7:43 AM
To: [EMAIL PROTECTED]
Subject: JDBC or entity


hi folks,


        I am in a dilemma whether to go for JDBC from the session bean
directly or use an entity bean for querying the database . Can some one tell
me which I should use and when should i go for either of them and also which
will be more efficient performance-wise.

Thanks in advance
Purush

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

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