Hello,

I am rather new to this, so please excude my ignorance. I am developing an application 
that needs frequent read access to data in a database and infrequent write access. 
Hence I am using entity beans to access this data. For performance reasons, I will be 
using session beans as a wrapper around the entity beans. Now I have a few questions:

1. I dont need a remote interface for my entity beans. If I do not specify the 
ejb-ref, will that suffice? How should my session beans instantiate the entity beans? 
Should the entity beans have ejb-local-ref mappings, and must the session beans use 
JNDI to instantiate the entity beans, or can the session beans directly call the 
constructor of the home interface - new MyEJBHome()?  

2. Can the home interface object be a singleton and simultaneously be used (without 
any synchronization) by multiple session beans?

3. My application is a web application, servicing client requests. Though I can 
instantiate a session bean per request, this would be expensive since I do not want to 
have to refill properties from the entity bean/database for every request, unless 
there has been a change. I would like to share (stateful) session and entity beans 
across client requests (with proper synchronization, of course, so that one bean is 
used by one client at any point of time). How does JBoss manage the session/entity 
bean cache? Should I do application level caching (that sounds rather silly). I am 
using commit option A, btw, for the entity beans.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3852997#3852997

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3852997


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to