Themuppeteer
Programmer
Hello guys,
A user has some actions that need to be done on an entity bean, and I put a stateless session bean on top of that.
All my actions have to be rollback-able, and I don't want other people to be able to change the entity bean while I'm busy. A transaction you say! Yes, but the actions that the user does, can take a while, so I would need transactions that take a long while. But I read it is advised not to use long lasting transactions. How should I solve this ?
Another question,
When I have 2 Application servers (we use jboss), and the one serves as backup for the other. Just in case the frst one has a failure, or has to much load, then the second one takes over. I havn't tried this in practice, but I was wondering, if the first server has a lot of load, and he passes some commands to the second application server, and this happens while the first server was in the middle of a long lasting transaction, what will it do then ? Will the second server be informed about the transaction ? Will the whole thing just crash because the first server has the first half of the transaction and the second the second half ? Or what will happen ?
Any reply is highly appreciated.
Best regards,
Greetz,
NOSPAM_themuppeteer@hotmail.com (for mails, remove the NOSPAM_)
"Those who say they understand chess, understand nothing"
-- Robert HUBNER
A user has some actions that need to be done on an entity bean, and I put a stateless session bean on top of that.
All my actions have to be rollback-able, and I don't want other people to be able to change the entity bean while I'm busy. A transaction you say! Yes, but the actions that the user does, can take a while, so I would need transactions that take a long while. But I read it is advised not to use long lasting transactions. How should I solve this ?
Another question,
When I have 2 Application servers (we use jboss), and the one serves as backup for the other. Just in case the frst one has a failure, or has to much load, then the second one takes over. I havn't tried this in practice, but I was wondering, if the first server has a lot of load, and he passes some commands to the second application server, and this happens while the first server was in the middle of a long lasting transaction, what will it do then ? Will the second server be informed about the transaction ? Will the whole thing just crash because the first server has the first half of the transaction and the second the second half ? Or what will happen ?
Any reply is highly appreciated.
Best regards,
Greetz,
NOSPAM_themuppeteer@hotmail.com (for mails, remove the NOSPAM_)
"Those who say they understand chess, understand nothing"
-- Robert HUBNER