有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

CMT SFSB生命周期回调方法中的java访问资源管理器

在表2中EJB3.1规范的第4.6.1节中,可以发现可以从CMT SFSB的生命周期回调方法中访问资源管理器。但是,同一节:

Accessing resource managers and enterprise beans is disallowed in the session bean methods for which the container does not have a meaningful transaction context and/or client security context.

根据第4.3.15节,SFSB的施工后方法为:

A session bean’s newInstance, setSessionContext, other dependency injection methods, life cycle callback interceptor methods, and afterCompletion methods are called with an unspecified transaction context.

For example, it would be wrong to perform database operations within a stateful session bean’s Post-Construct or PreDestroy lifecycle callback interceptor methods and to assume that the operations are part of the client’s transaction.

所以我的问题是:真相是什么


共 (0) 个答案