开发者

EJB 2.1 stateful session bean

开发者 https://www.devze.com 2023-03-31 00:06 出处:网络
I have one scenario, I wrote business methods in stateful session beans using local interfaces. User can access the application in that time suddenly the database server is off. Again user re开发者_J

I have one scenario, I wrote business methods in stateful session beans using local interfaces.

User can access the application in that time suddenly the database server is off. Again user re开发者_JAVA百科start database listeners and again logged same application. Can I get same stateful client instance or created new instance?


Lifecycle of stateful bean may be (in 99.9% cases it is) independent of persistence layer. I do not see any relation between shutting down database server and destroying stateful beans (assuming that you do not implement such relation explicitly). Bear in mind that beans live on application server not in a database.


If your server is up and running, and your beans haven't been removed, this is very possible.

its important to note that the beans by nature are independent of the DB. The server EJB container is what handles them.

0

精彩评论

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

关注公众号