I also concern this problem when there is not only single application running to update to the same database. Under this scenerio, is there any people who can suggest me if I can by pass to implement ejbLoad() and ejbStore() in Entity Bean but refresh and update method using business method instead?
Just testing a reply see if the speed is any better
Please investigate commit options B and C, jboss default is A which assumes jboss is the only app accessing your db.
I am also looking for a mechanism to combine the access via EJBs and massive manipulation of data
inside the database for comfort and speed...
Is there any *working* solution to provide the container with some information that the data may
have changed inside the database?
There was also the idea to experiment with the commit options? Any results known?
Commit option B reloads information from the database before each transaction. This will give you what you want but the performance will go down as there will be a lot more database calls.
To set up commit option B define a container configuration in your jboss.xml file with the following (After the enterprise-beans tag)
<container-name>Shared DB BMP</container-name>
Then for your bean in jboss.xml specify that you want to use that container configuration.
I am using BMP with commit type A. My problem is for the SAME row from DB, JBoss may create a few copies of it. So when you find the same bean at different time, you may get a different copy of it. Problem happens when one of the copy is changed by user and it also updated the DB fine, then how can I refresh other copies? Or, how can I make sure the later calls to the bean will always get the updated version of the bean? This seems to be s serious problem in JBoss. Someone told me that Orion only allow one copy and don't have this problem.