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
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ jobs:
java-version: ${{ matrix.java }}
distribution: 'temurin'

- name: Install System libaio Packages
run: |
sudo apt-get update
sudo apt-get install -y libaio1 libaio-dev
# use 'install' so smoke-tests will work
# By setting anything to org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory.DISABLED we are disabling libaio loading on the testsuite
- name: Fast Tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@ public class Create extends InstallAbstract {
@Option(names = "--aio", description = "Set the journal as asyncio.")
private boolean aio;

@Option(names = "--aio2", description = "Set the journal as asyncio 2 (Panama FFM).")
private boolean aio2;

@Option(names = "--nio", description = "Set the journal as nio.")
private boolean nio;

Expand Down Expand Up @@ -1010,7 +1013,7 @@ private void setupJournalType() {
aio = false;
}
}
int countJournalTypes = countBoolean(aio, nio, mapped);
int countJournalTypes = countBoolean(aio2, aio, nio, mapped);
if (countJournalTypes > 1) {
throw new RuntimeException("You can only select one journal type (--nio | --aio | --mapped).");
}
Expand All @@ -1023,7 +1026,9 @@ private void setupJournalType() {
}
}

if (aio) {
if (aio2) {
journalType = JournalType.ASYNCIO_2;
} else if (aio) {
journalType = JournalType.ASYNCIO;
} else if (nio) {
journalType = JournalType.NIO;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.apache.activemq.artemis.core.io.SequentialFile;
import org.apache.activemq.artemis.core.io.SequentialFileFactory;
import org.apache.activemq.artemis.core.io.aio.AIOSequentialFileFactory;
import org.apache.activemq.artemis.core.io.aio2.AIO2Helper;
import org.apache.activemq.artemis.core.io.mapped.MappedSequentialFileFactory;
import org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFactory;
import org.apache.activemq.artemis.core.server.ActiveMQMessageBundle;
Expand Down Expand Up @@ -247,7 +248,12 @@ private static SequentialFileFactory newFactory(File datafolder, boolean datasyn
case ASYNCIO:
factory = new AIOSequentialFileFactory(datafolder, maxAIO).setDatasync(datasync);
factory.start();
((AIOSequentialFileFactory) factory).disableBufferReuse();
factory.disableBufferReuse();
return factory;
case ASYNCIO_2:
factory = AIO2Helper.getAIO2SequentialFileFactory(datafolder, maxAIO).setDatasync(datasync);
factory.start();
factory.disableBufferReuse();
return factory;
case MAPPED:
factory = new MappedSequentialFileFactory(datafolder, fileSize, false, 0, 0, null)
Expand Down
13 changes: 13 additions & 0 deletions artemis-distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,19 @@
</build>

<profiles>
<profile>
<id>jdk24onwards</id>
<activation>
<jdk>[24,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>org.apache.artemis</groupId>
<artifactId>artemis-ffm</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</profile>
<profile>
<id>apache-release</id>
<build>
Expand Down
1 change: 1 addition & 0 deletions artemis-features/src/main/resources/features.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
<bundle dependency="true">mvn:com.nimbusds/nimbus-jose-jwt/${nimbus.jwt.version}</bundle>

<bundle>mvn:org.apache.activemq/activemq-artemis-native/${activemq-artemis-native-version}</bundle>
<bundle>mvn:org.apache.artemis/artemis-ffm/${pom.version}</bundle>
<bundle>mvn:org.apache.artemis/artemis-lockmanager-api/${pom.version}</bundle>
<bundle>mvn:org.apache.artemis/artemis-server-osgi/${pom.version}</bundle>
</feature>
Expand Down
231 changes: 231 additions & 0 deletions artemis-ffm/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.artemis</groupId>
<artifactId>artemis-pom</artifactId>
<version>2.55.0-SNAPSHOT</version>
<relativePath>../artemis-pom/pom.xml</relativePath>
</parent>

<artifactId>artemis-ffm</artifactId>
<packaging>jar</packaging>
<name>Apache Artemis FFM</name>

<properties>
<test.stress.time>5000</test.stress.time>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<activemq-surefire-argline>
-Dtest.stress.time=${test.stress.time} --enable-native-access=ALL-UNNAMED
</activemq-surefire-argline>
</properties>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
<scope>provided</scope>
<!-- License: MIT -->
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<!-- License: EPL 1.0 -->
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<profiles>
<profile>
<id>linux</id>
<activation>
<os>
<family>unix</family>
<name>Linux</name>
</os>
</activation>
</profile>
<profile>
<id>non-linux</id>
<activation>
<os>
<family>mac</family>
</os>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>windows</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jdk24onwards</id>
<activation>
<jdk>[24,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>24</release>
</configuration>
<executions>
<execution>
<id>java24-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<compileSourceRoots>
<compileSourceRoot>${project.basedir}/src/main/java24</compileSourceRoot>
</compileSourceRoots>
</configuration>
</execution>
<execution>
<id>java24-test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<compileSourceRoots>${project.basedir}/src/test/java24</compileSourceRoots>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<!-- Do jar creation earlier, before the "test" phase, so that the
multi-release-jar content is visible to any dependent modules,
enabling them to use the relevant classes during their tests. -->
<executions>
<execution>
<id>default-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<archive>
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</archive>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<resources>
<resource>
<directory>${basedir}/target/output/</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.9</version>
<executions>
<execution>
<id>bundle-manifest</id>
<goals>
<goal>manifest</goal>
</goals>
<phase>process-classes</phase>
</execution>
<execution>
<id>default-bundle</id>
<goals>
<goal>bundle</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<instructions>
<Bundle-SymbolicName>org.apache.artemis.ffm</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
<Export-Package>org.apache.artemis.nativo.jlibaio;version="${project.version}"</Export-Package>
<!-- Use ! for exclusion in bnd -->
<Import-Package>!java.lang.foreign,*</Import-Package>
<DynamicImport-Package>*</DynamicImport-Package>
<Require-Capability>
osgi.ee;filter:="(&amp;(osgi.ee=JavaSE)(version=17))"
</Require-Capability>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading