I have a general question regarding entity beans, and entity beans with jboss 4.0 in specifically.
Say I have an EJB application supporting large scale DB (say several hundred of thousands of users, allowing several hundred or thousands concurrent). Say there's a table T1 where each user can hold up to several hundred of records, and at all times, logged-in users can query all their related records from that table.
As I understand it - each query like that can cause the application server to create many thousands of instances of entity beans (num of active users x num of records for each user in T1).
My questions are
1. How much would that scenario degrade each server's (in the cluster) performance?
2. Is the following solution an acceptible one - saving the data in T1 as a blob (meaning each user has only one record, with all data as a byte array). This way - every query should create only one entity bean instance.
Is there another solution?
A possible example for this scenario (although I'm not sure probable) would be a large bank in the US, where every client has a table holding all its transaction up to this date, and every client can get a report holding all its transactions whenever he/she likes to.
Thanks a lot
Well, If its just a question of querying out the data, i.e. firing a select statement, using ejbs wont serve your purpose.
I would go for a direct JDBC operation, and only involve ejb when some transaction is being made. Using JDBC one also gets the benifit of exploiting the power of SQL .. where as with ejbs, you will endup with complex ejb-qls going no where.