I'm very unsure about entity beans and simultaneous threads.
I read everywhere: entity beans are multi threaded. So i believe that many clients access my database together. I don't see why client B can not enter my entity bean when another client is using it.
I hope when it comes to transactions, that only the database is used to let it work. For example, every client is allowed to do stuff in it's own transaction, and it's the database who decides when the concurrency became too much to handle.
Anyway. I may test it one day because these issues are not clear. If it does not work, what could be a good alternative? Stateless session? The problem is, i need, for each database i use, a specific instance (of my persistency object which is now wrapped into the entity bean). The details of those database (structure) is the same, only the name (datasource) differs.
I can not deploy twice one bean with different env parameters on one computer. Does not work. It's useless to make statefull session beans because there's no state per client, but state per database. I could make for each database one statefull bean and put it public, like in the app context, and let many clients use the same statefull bean, but i think it wont work because the container will dispatch those concurrent calls to many instances.
If re-entrant is what they say in that thread, has j2ee a setting to express what i mean?