[
https://issues.jboss.org/browse/WFLY-4608?page=com.atlassian.jira.plugin....
]
David Lloyd commented on WFLY-4608:
-----------------------------------
The EJB spec has this to say:
{quote}
The {{PostConstruct}} lifecycle callback interceptor methods for a stateless session bean
execute in an
unspecified transaction context. The {{PostConstruct}} lifecycle callback interceptor
methods for a
singleton session bean execute in a transaction context determined by the bean’s
transaction manage-
ment type and any applicable transaction attribute. The {{PostConstruct}} lifecycle
callback intercep-
tor methods for a stateful session bean execute in a transaction context determined by the
lifecycle
callback method's transaction attribute.
{quote}
And likewise:
{quote}
The {{PreDestroy}} lifecycle callback interceptor methods for a stateless session bean
execute in an
unspecified transaction context. The {{PreDestroy}} lifecycle callback interceptor methods
for a single-
ton session bean execute in a transaction context determined by the bean’s transaction
management type
and any applicable transaction attribute. The {{PreDestroy}} lifecycle callback
interceptor methods for a
stateful bean execute in a transaction context determined by the lifecycle callback
method’s transaction
attribute.
{quote}
And, for completeness:
{quote}
The {{PrePassivate}} and {{PostActivate}} lifecycle callback interceptor methods execute
in a trans-
action context determined by the lifecycle callback method's transaction attribute.
{quote}
Omit no-op transaction if lifecycle method is missing
-----------------------------------------------------
Key: WFLY-4608
URL:
https://issues.jboss.org/browse/WFLY-4608
Project: WildFly
Issue Type: Bug
Components: EJB
Affects Versions: 9.0.0.CR1
Reporter: Ivo Studensky
Assignee: Ivo Studensky
Fix For: 10.0.0.Final
LifecycleCMTTxInterceptor creates a no-op transaction even if there is no lifecycle
method defined in the bean.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)