开发者

Stateful EJB not being passivated when the client VM is abruptly terminated

开发者 https://www.devze.com 2023-03-22 04:13 出处:网络
I have an stateful session bean deployed on Jboss 4.3 with the following config on jboss.xml: <ca开发者_开发百科che-config>

I have an stateful session bean deployed on Jboss 4.3 with the following config on jboss.xml:

<ca开发者_开发百科che-config>
      <idle-timeout-seconds>7200</idle-timeout-seconds>
      <remove-timeout-seconds>8000</remove-timeout-seconds>
</cache-config>

IE:

The bean should be passivated after 2 hours of IDLE and removed after 2 hours and 15 minutes.

The problem is: when the client VM is abruptly terminated the bean is neither passivated nor removed.

Is there a way to avoid this?


A container may only passivate a stateful session bean instance when the instance is not in a transaction.

A container must not passivate a stateful session bean with an extended persistence context unless the following conditions are met:

  • All the entities in the persistence context are serializable.
  • The EntityManager is serializable.

Any interceptor classes associated with the stateful session bean must be Serializable.

The references can possibly restrict the bean from getting passivated.

0

精彩评论

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