You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to activate a bean annotated with @JobScoped but this annotation is ignored during deployment phase (bean is not registered at all)
@JobScoped
@Named
public class MyDTO {...}
@Dependent
@Named
public class MyBatchlet implement Batchlet {
@Inject MyDTO jobScopedInstance;
}
results is a deployment error due to unresolvable injection point.
Using a @Produces will make compilation passing the deployment phase, but during runtime the jobScopedField is managed as a @Dependent scoped bean.
public class ObjectProducer
{
@Produces
@JobScoped
@Named("jobscoped")
MyDTO jobScopedField = new MyDTO();
JBeret registers its custom scopes using service loader via BatchCDIExtension; I suppose the same should be done during deployment.
I attached a reproducer; remove comments from ObjectProducer class to let the (failing) test run.
I'm trying to activate a bean annotated with
@JobScoped
but this annotation is ignored during deployment phase (bean is not registered at all)results is a deployment error due to unresolvable injection point.
Using a
@Produces
will make compilation passing the deployment phase, but during runtime thejobScopedField
is managed as a@Dependent
scoped bean.JBeret registers its custom scopes using service loader via
BatchCDIExtension
; I suppose the same should be done during deployment.I attached a reproducer; remove comments from
ObjectProducer
class to let the (failing) test run.Best regards
Luca Basso Ricci
quarkus-jberet-scope-problem.zip
The text was updated successfully, but these errors were encountered: