Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<property name="customImportOrderRules"
value="STANDARD_JAVA_PACKAGE###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STATIC"/>
<property name="standardPackageRegExp" value="^java\."/>
<property name="specialImportsRegExp" value="^javax\."/>
<property name="specialImportsRegExp" value="^(javax|jakarta)\."/>
<property name="sortImportsInGroupAlphabetically" value="true"/>
<property name="separateLineBetweenGroups" value="false"/>
</module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,9 @@ public static void main(String[] args) throws Exception {
System.out.println();
System.out.println(">>> Spring bean example started.");

// Initialize Spring factory.
ClassPathXmlApplicationContext ctx =
new ClassPathXmlApplicationContext("org/apache/ignite/examples/misc/springbean/spring-bean.xml");

try {
// Initialize Spring factory (closed automatically, which stops the local cluster node).
try (ClassPathXmlApplicationContext ctx =
new ClassPathXmlApplicationContext("org/apache/ignite/examples/misc/springbean/spring-bean.xml")) {
// Get ignite from Spring (note that local cluster node is already started).
Ignite ignite = (Ignite)ctx.getBean("mySpringBean");

Expand All @@ -81,9 +79,5 @@ public static void main(String[] args) throws Exception {
System.out.println(">>> Check all nodes for output (this node is also part of the cluster).");
System.out.println(">>>");
}
finally {
// Stop local cluster node.
ctx.destroy();
}
}
}
6 changes: 6 additions & 0 deletions modules/calcite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@
<groupId>org.apache.calcite</groupId>
<artifactId>calcite-core</artifactId>
<version>${calcite.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Arg name="threadpool">
<Arg>
<New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
<Set name="minThreads">5</Set>
<Set name="maxThreads">10</Set>
Expand Down Expand Up @@ -76,17 +76,6 @@
</Arg>
</Call>

<Set name="handler">
<New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
<Set name="handlers">
<Array type="org.eclipse.jetty.server.Handler">
<Item>
<New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
</Item>
</Array>
</Set>
</New>
</Set>

<Set name="stopAtShutdown">false</Set>
</Configure>
17 changes: 2 additions & 15 deletions modules/clients/src/test/resources/jetty/rest-jetty-ssl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">

<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Arg name="threadpool">
<Arg>
<!-- Default queued blocking thread pool -->
<New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
<Set name="minThreads">10</Set>
Expand All @@ -38,7 +38,7 @@
</Call>
</New>

<New id="sslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory">
<New id="sslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory$Server">
<Set name="keyStorePath"><SystemProperty name="CLIENTS_MODULE_PATH"/>/src/test/keystore/server.jks</Set>
<Set name="keyStorePassword">123456</Set>
<Set name="keyManagerPassword">123456</Set>
Expand Down Expand Up @@ -77,18 +77,5 @@
</New>
</Arg>
</Call>

<Set name="handler">
<New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
<Set name="handlers">
<Array type="org.eclipse.jetty.server.Handler">
<Item>
<New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
</Item>
</Array>
</Set>
</New>
</Set>

<Set name="stopAtShutdown">false</Set>
</Configure>
14 changes: 1 addition & 13 deletions modules/clients/src/test/resources/jetty/rest-jetty.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">

<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Arg name="threadpool">
<Arg>
<!-- Default queued blocking thread pool -->
<New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
<Set name="minThreads">20</Set>
Expand Down Expand Up @@ -61,17 +61,5 @@
</Arg>
</Call>

<Set name="handler">
<New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
<Set name="handlers">
<Array type="org.eclipse.jetty.server.Handler">
<Item>
<New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
</Item>
</Array>
</Set>
</New>
</Set>

<Set name="stopAtShutdown">false</Set>
</Configure>
17 changes: 2 additions & 15 deletions modules/clients/src/test/resources/jetty/router-jetty-ssl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">

<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Arg name="threadpool">
<Arg>
<!-- Default queued blocking thread pool -->
<New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
<Set name="minThreads">10</Set>
Expand All @@ -38,7 +38,7 @@
</Call>
</New>

<New id="sslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory">
<New id="sslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory$Server">
<Set name="keyStorePath"><SystemProperty name="CLIENTS_MODULE_PATH"/>/src/test/keystore/server.jks</Set>
<Set name="keyStorePassword">123456</Set>
<Set name="keyManagerPassword">123456</Set>
Expand Down Expand Up @@ -77,18 +77,5 @@
</New>
</Arg>
</Call>

<Set name="handler">
<New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
<Set name="handlers">
<Array type="org.eclipse.jetty.server.Handler">
<Item>
<New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
</Item>
</Array>
</Set>
</New>
</Set>

<Set name="stopAtShutdown">false</Set>
</Configure>
14 changes: 1 addition & 13 deletions modules/clients/src/test/resources/jetty/router-jetty.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">

<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Arg name="threadpool">
<Arg>
<!-- Default queued blocking thread pool -->
<New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
<Set name="minThreads">20</Set>
Expand Down Expand Up @@ -61,17 +61,5 @@
</Arg>
</Call>

<Set name="handler">
<New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
<Set name="handlers">
<Array type="org.eclipse.jetty.server.Handler">
<Item>
<New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
</Item>
</Array>
</Set>
</New>
</Set>

<Set name="stopAtShutdown">false</Set>
</Configure>
8 changes: 4 additions & 4 deletions modules/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,15 @@
</dependency>

<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
<groupId>org.eclipse.jetty.ee11</groupId>
<artifactId>jetty-ee11-servlets</artifactId>
<version>${jetty.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
<groupId>org.eclipse.jetty.ee11</groupId>
<artifactId>jetty-ee11-webapp</artifactId>
<version>${jetty.version}</version>
<scope>test</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public <T> T createIfInClassPath(GridKernalContext ctx, boolean mandatory)
try {
Class.forName(cls);
}
catch (ClassNotFoundException e) {
catch (ClassNotFoundException | LinkageError e) {
if (mandatory)
throw componentException(e);

Expand Down Expand Up @@ -263,7 +263,7 @@ private <T> T createOptional0(@Nullable GridKernalContext ctx) throws IgniteChec
try {
cls = Class.forName(clsName);
}
catch (ClassNotFoundException ignored) {
catch (ClassNotFoundException | LinkageError ignored) {
try {
cls = Class.forName(noOpClsName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,10 @@ private void startHttpProtocol() throws IgniteCheckedException {
log.debug("Failed to initialize HTTP REST protocol (consider adding ignite-rest-http " +
"module to classpath).");
}
catch (LinkageError e) {
U.warn(log, "Failed to initialize HTTP REST protocol (consider adding ignite-rest-http " +
"module and its dependencies to classpath).", e);
}
catch (NoSuchMethodException | InvocationTargetException | InstantiationException | IllegalAccessException e) {
throw new IgniteCheckedException("Failed to initialize HTTP REST protocol.", e);
}
Expand Down
8 changes: 4 additions & 4 deletions modules/core/src/test/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
limitations under the License.
-->

<web-app xmlns="http://java.sun.com/xml/ns/javaee"
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee
https://jakarta.ee/xml/ns/jakartaee/web-app_6_1.xsd"
version="6.1">

<!-- Declare listener for web sessions caching. -->
<listener>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
import org.apache.ignite.compute.ComputeTaskName;
import org.apache.ignite.compute.ComputeTaskSplitAdapter;
import org.jetbrains.annotations.Nullable;
import org.springframework.beans.factory.support.AbstractBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.core.io.ClassPathResource;

/**
Expand All @@ -43,7 +43,8 @@ public class GarHelloWorldTask extends ComputeTaskSplitAdapter<String, String> {
/** {@inheritDoc} */
@Override public Collection<? extends ComputeJob> split(int gridSize, String arg) throws IgniteException {
// Create Spring context.
AbstractBeanFactory fac = new XmlBeanFactory(
DefaultListableBeanFactory fac = new DefaultListableBeanFactory();
new XmlBeanDefinitionReader(fac).loadBeanDefinitions(
new ClassPathResource("org/apache/ignite/spi/deployment/uri/tasks/gar-spring-bean.xml", getClass().getClassLoader()));

fac.setBeanClassLoader(getClass().getClassLoader());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
import org.apache.ignite.compute.ComputeJob;
import org.apache.ignite.compute.ComputeJobResult;
import org.apache.ignite.compute.ComputeTaskSplitAdapter;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.core.io.ClassPathResource;

/**
Expand All @@ -32,7 +33,9 @@
public class GridUriDeploymentTestTask1 extends ComputeTaskSplitAdapter<Object, Object> {
/** */
public GridUriDeploymentTestTask1() {
XmlBeanFactory factory = new XmlBeanFactory(new ClassPathResource("spring1.xml", getClass().getClassLoader()));
DefaultListableBeanFactory factory = new DefaultListableBeanFactory();
new XmlBeanDefinitionReader(factory).loadBeanDefinitions(
new ClassPathResource("spring1.xml", getClass().getClassLoader()));

factory.setBeanClassLoader(getClass().getClassLoader());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
import org.apache.ignite.compute.ComputeJob;
import org.apache.ignite.compute.ComputeJobResult;
import org.apache.ignite.compute.ComputeTaskSplitAdapter;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.core.io.ClassPathResource;

/**
Expand All @@ -35,7 +36,8 @@ public class GridUriDeploymentTestTask2 extends ComputeTaskSplitAdapter<Object,

/** */
public GridUriDeploymentTestTask2() {
XmlBeanFactory factory = new XmlBeanFactory(
DefaultListableBeanFactory factory = new DefaultListableBeanFactory();
new XmlBeanDefinitionReader(factory).loadBeanDefinitions(
new ClassPathResource("org/apache/ignite/spi/deployment/uri/tasks/spring2.xml",
getClass().getClassLoader()));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
import org.apache.ignite.compute.ComputeJob;
import org.apache.ignite.compute.ComputeJobResult;
import org.apache.ignite.compute.ComputeTaskSplitAdapter;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.core.io.ClassPathResource;

/**
Expand All @@ -35,7 +36,8 @@ public class GridUriDeploymentTestTask9 extends ComputeTaskSplitAdapter<Object,

/** */
public GridUriDeploymentTestTask9() {
XmlBeanFactory factory = new XmlBeanFactory(
DefaultListableBeanFactory factory = new DefaultListableBeanFactory();
new XmlBeanDefinitionReader(factory).loadBeanDefinitions(
new ClassPathResource("org/apache/ignite/spi/deployment/uri/tasks/spring9.xml",
getClass().getClassLoader()));

Expand Down
Loading
Loading