开发者

Websphere 7 - BMP Entity Bean - ejbStore called at end of transaction and not after setter method

开发者 https://www.devze.com 2023-03-14 00:19 出处:网络
We are migrating from Weblogic to Websphere 7. It is a legacy application and contains EJB 2.0 beans. The Entity beans have BMP. The session facade beans make updates to the entity beans but the updat

We are migrating from Weblogic to Websphere 7. It is a legacy application and contains EJB 2.0 beans. The Entity beans have BMP. The session facade beans make updates to the entity beans but the updates are persisted to database (call to ejbStore() methods of entity beans) at the end of the transaction which causes problem as the updates are not visible to other client withing the transaction. In Weblogic there is a setting "delay-updates-until-end-of-tx" which can be set to false. This causes the updates to be persisted without waiting for the end of the transaction. I read that the default behavior of Websphere is to not wait for the end of the transaction but it does not seems to work like that.

I have tried se开发者_StackOverflow社区tting the following JVM arguments as well:

-Dcom.ibm.ws.pm.deferredcreate=false -Dcom.ibm.ws.pm.batch=false

This didn't help either.

Any help on this would be highly appreciated.

Thanks, Dikshit


There are declarative options for CMP, but I don't believe there are options for BMPs. It should be possible to use EJBContextExtension.flushCache() WebSphere Application Server extension method to programmatically force the container to store/flush all outstanding entities:

http://publib.boulder.ibm.com/infocenter/wasinfo/fep/topic/com.ibm.websphere.javadoc.doc/web/apidocs/com/ibm/websphere/ejbcontainer/EJBContextExtension.html

0

精彩评论

暂无评论...
验证码 换一张
取 消