Skip to content

Commit

Permalink
Use @dependent because other scopes may not be allowed on some servers.
Browse files Browse the repository at this point in the history
This is because Servlet 3.0 explicitly forbids using other CDI qualifiers on servlets. Although it seems that this restriction was removed, some servers still abide it.
Fixes #489
Signed-off-by:Ondro Mihalyi <mihalyi@omnifish.ee>
  • Loading branch information
OndroMih committed May 9, 2024
1 parent d629e8a commit 5c26b97
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
import jakarta.enterprise.concurrent.ManagedScheduledExecutorService;
import jakarta.enterprise.concurrent.ManagedThreadFactory;
import jakarta.enterprise.concurrent.ManagedThreadFactoryDefinition;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.context.Dependent;
import jakarta.enterprise.inject.spi.CDI;
import jakarta.inject.Inject;
import jakarta.servlet.annotation.WebServlet;
Expand Down Expand Up @@ -82,7 +82,7 @@
priority = 6
)
@WebServlet("/AnnotationServlet")
@ApplicationScoped
@Dependent
public class AnnotationServlet extends TestServlet {

private static final long serialVersionUID = 1L;
Expand Down

0 comments on commit 5c26b97

Please sign in to comment.