[
https://issues.apache.org/jira/browse/TOMEE-2228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jonathan S Fisher updated TOMEE-2228:
-------------------------------------
Description:
Given the code:
{code}
@ApplicationScoped
public class MyClass {
public void processConversationScopedInit(@Observes
@Initialized(TransactionScoped.class) Object payload) {}
public void processConversationScopedDestroyed(@Observes
@Destroyed(TransactionScoped.class) Object payload) {}
}
{code}
One would expect these events to fire. Although not specifically mandated in
the spec, it does encourage portable extensions to fire @Initialized(X.class)
where X is a custom scope.
Also, not sure if this is a bug or not, but it appears the TransactionScope may
leak upon Container shutdown:
https://github.com/apache/tomee/blob/master/container/openejb-core/src/main/java/org/apache/openejb/cdi/OpenEJBLifecycle.java#L284
* https://docs.jboss.org/cdi/spec/1.1/cdi-spec.html#request_context
* TOMEE-1282
* TOMEE-1315
was:
Given the code:
{code}
@ApplicationScoped
public class MyClass {
public void processConversationScopedInit(@Observes
@Initialized(TransactionScoped.class) Object payload) {}
public void processConversationScopedDestroyed(@Observes
@Destroyed(TransactionScoped.class) Object payload) {}
}
{code}
One would expect these events to fire. Although not specifically mandated in
the spec, it does encourage portable extensions to fire @Initialized(X.class)
where X is a custom scope.
* https://docs.jboss.org/cdi/spec/1.1/cdi-spec.html#request_context
* TOMEE-1282
* TOMEE-1315
> CDI Event should fire when TransactionScope is created
> ------------------------------------------------------
>
> Key: TOMEE-2228
> URL: https://issues.apache.org/jira/browse/TOMEE-2228
> Project: TomEE
> Issue Type: Bug
> Components: TomEE Core Server
> Affects Versions: 7.0.5
> Reporter: Jonathan S Fisher
> Priority: Major
>
> Given the code:
> {code}
> @ApplicationScoped
> public class MyClass {
> public void processConversationScopedInit(@Observes
> @Initialized(TransactionScoped.class) Object payload) {}
>
> public void processConversationScopedDestroyed(@Observes
> @Destroyed(TransactionScoped.class) Object payload) {}
> }
> {code}
> One would expect these events to fire. Although not specifically mandated in
> the spec, it does encourage portable extensions to fire @Initialized(X.class)
> where X is a custom scope.
> Also, not sure if this is a bug or not, but it appears the TransactionScope
> may leak upon Container shutdown:
> https://github.com/apache/tomee/blob/master/container/openejb-core/src/main/java/org/apache/openejb/cdi/OpenEJBLifecycle.java#L284
> * https://docs.jboss.org/cdi/spec/1.1/cdi-spec.html#request_context
> * TOMEE-1282
> * TOMEE-1315
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)