The scenario we have:
We will have multiple JVMs running across the internet, that will access some EntityBean objects. For eg: CustomerAccount.
 
The interactions:
The interactions maybe occasionally write. But a large part will be read operations. Like 'getName()' , getCompanyName,  getAddress .. and stuff like that.
 
Problems:
Using the EJB model, if we have a CustomerAccount EntityBean, every method invocation on that bean from a different JVM will be over RMI.  Now that will be a lot of traffic, and very slow. We accept the slowness when we have to make updates/write operations into the object, but not for the hundreds of 'query/get' like methods.
 
To solve this, we'll ultimately have to implement some interface to the EntityBean that will be a bunch of all the 'get/query' methods of the EntityBean, and send the interface & the relevant
data copy down to the remote client. That way, we can prevent all the RMI invocations.
 
But doing this, we've essentially overridden the good things in EJB, and end up reinventing stuff.
So, my question to you EJB experts is :
Is our understanding of EJB/ RMI - as described in the argument above , flawed  ?
 
How do we solve our problem, and still use all the good things offered by an EJB container like persistence, scalability , Object querying, naming integration, etc.
 
Thanks in advance,
Natraj


Natraj Gujran
Member of Technical Staff
Phone: (650) 622 0905      Email: [EMAIL PROTECTED]
iSharp
 

Reply via email to