Skip to content

Commit

Permalink
Revert "feat(CDI) Refs: #29552 (#29678)"
Browse files Browse the repository at this point in the history
This reverts commit 11358b0.
  • Loading branch information
fabrizzio-dotCMS committed Aug 30, 2024
1 parent a74ccb5 commit 5914caf
Show file tree
Hide file tree
Showing 40 changed files with 1,956 additions and 472 deletions.
54 changes: 7 additions & 47 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<shedlock.version>4.33.0</shedlock.version>
<glowroot.version>0.14.1</glowroot.version>
<jackson.version>2.17.2</jackson.version>
<jersey.version>2.28</jersey.version>
<jersey.version>2.22.1</jersey.version>
<graalvm.version>22.3.3</graalvm.version>
</properties>
<dependencyManagement>
Expand Down Expand Up @@ -84,6 +84,11 @@
*****************************
-->

<dependency>
<groupId>com.dotcms</groupId>
<artifactId>ant-tooling</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>com.dotcms.lib</groupId>
<artifactId>dot.aopalliance-repackaged</artifactId>
Expand Down Expand Up @@ -1132,7 +1137,7 @@
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.1.1</version>
<version>2.0.1</version>
</dependency>

<!-- Rest API Documentation -->
Expand All @@ -1147,51 +1152,6 @@
<version>${swagger.version}</version>
</dependency>

<!-- CDI Support -->

<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet-shaded</artifactId>
<version>3.1.9.Final</version>
</dependency>

<dependency>
<groupId>org.glassfish.hk2.external</groupId>
<artifactId>bean-validator</artifactId>
<version>2.5.0-b06</version>
</dependency>

<dependency>
<groupId>org.glassfish.hk2</groupId>
<artifactId>hk2-locator</artifactId>
<version>2.5.0</version>
</dependency>

<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-junit5</artifactId>
<version>2.0.2.Final</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se-core</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se-shaded</artifactId>
<version>3.1.9.Final</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.smallrye</groupId>
<artifactId>jandex</artifactId>
<version>3.0.5</version>
</dependency>

<!--
*****************************
Expand Down
1,141 changes: 1,141 additions & 0 deletions build.xml

Large diffs are not rendered by default.

42 changes: 7 additions & 35 deletions dotCMS/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@
*****************************
-->

<dependency>
<groupId>com.dotcms</groupId>
<artifactId>ant-tooling</artifactId>
</dependency>
<dependency>
<groupId>com.dotcms.lib</groupId>
<artifactId>dot.aopalliance-repackaged</artifactId>
Expand Down Expand Up @@ -1195,11 +1199,12 @@
<artifactId>jersey-common</artifactId>
</dependency>

<!--
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
<artifactId>jersey-cdi2-se</artifactId>
</dependency>

-->
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
Expand Down Expand Up @@ -1407,39 +1412,6 @@
</exclusions>
</dependency>

<!-- Weld CDI -->

<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet-shaded</artifactId>
<version>3.1.9.Final</version>
</dependency>

<dependency>
<groupId>org.glassfish.hk2.external</groupId>
<artifactId>bean-validator</artifactId>
<version>2.5.0-b06</version>
</dependency>

<dependency>
<groupId>org.glassfish.hk2</groupId>
<artifactId>hk2-locator</artifactId>
</dependency>

<dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se-shaded</artifactId>
<scope>test</scope>
</dependency>

<!-- Weld CDI -->

<dependency>
<groupId>io.smallrye</groupId>
<artifactId>jandex</artifactId>
<version>3.0.5</version>
</dependency>

<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-catalina</artifactId>
Expand Down
35 changes: 0 additions & 35 deletions dotCMS/src/main/java/com/dotcms/cdi/CDIUtils.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import java.util.Collections;
import java.util.Map;
import java.util.Optional;
import javax.ws.rs.ext.Provider;

/**
* This decorator reads the annotations on the resources and includes header based on it based on them.
Expand All @@ -32,7 +31,6 @@
*/
@Singleton
@Priority(Priorities.HEADER_DECORATOR)
@Provider
public class HeaderFilter implements ContainerResponseFilter {

private final PermissionsUtil permissionsUtil = PermissionsUtil.getInstance();
Expand Down
2 changes: 0 additions & 2 deletions dotCMS/src/main/java/com/dotcms/rest/api/CorsFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@
import com.dotmarketing.util.Logger;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import javax.ws.rs.ext.Provider;


/**
* @author Geoff M. Granum
*/
@Provider
public class CorsFilter implements ContainerResponseFilter {


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@

import com.dotmarketing.util.Logger;
import java.util.concurrent.atomic.AtomicReference;
import javax.enterprise.context.ApplicationScoped;
import javax.ws.rs.ext.Provider;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.server.spi.AbstractContainerLifecycleListener;
import org.glassfish.jersey.server.spi.Container;

/**
* A new Reloader will get created on each reload there can only be one container at a time
*/
@Provider
@ApplicationScoped
public class ContainerReloader extends AbstractContainerLifecycleListener {
class ContainerReloader extends AbstractContainerLifecycleListener {

private static final ContainerReloader INSTANCE = new ContainerReloader();

private static final AtomicReference<Container> containerRef = new AtomicReference<>();

public static ContainerReloader getInstance() {
return INSTANCE;
}

@Override
public void onStartup(Container container) {
Logger.debug(ContainerReloader.class, "Jersey Container started");
Expand Down
Loading

0 comments on commit 5914caf

Please sign in to comment.