问题描述
如何从 thorntail 2.5.0.Final 中删除 ActiveMQ Artemis 依赖项?我相信这必须在 pom.xml
上使用 <exclusion>
完成,但我不知道要排除什么。
我们使用 JMS 而不是 ActiveMQ。这里的想法是试图提高性能,即使是一点点。
有关如何实现这一目标的任何线索?
编辑 1: 我们想删除它,因为它看起来像是在窃取内存(根据日志):
2021-02-25 15:55:58,315 | INFO | [org.apache.activemq.artemis.core.server] | (ServerService Thread Pool -- 45::) | AMQ221057: Global Max Size is being adjusted to 1/2 of the JVM max size (-Xmx)
编辑 2:
我们还尝试将此代码段添加到 project-defaults.yml
,但它显然不起作用(所有 activemq 日志入口都保留在那里)。
messaging-activemq:
servers:
default:
active: false
编辑 3:
project-defaults.yml
(省略了不相关的部分)
thorntail:
http:
port: 8080
resource-adapters:
resource-adapters:
GenericJMS:
archive: generic-jms-ra.rar
transaction-support: XATransaction
connection-deFinitions:
Tibcopool:
class-name: org.jboss.resource.adapter.jms.JmsManagedConnectionFactory
jndi-name: ${jms.connectionFactoryJndiName}
config-properties:
ConnectionFactory:
value: ${jms.connectionFactoryName}
UserName:
value: ${jms.user}
Password:
value: ${jms.password}
JndiParameters:
value: java.naming.factory.url.pkgs=com.tibco.tibjms.naming;java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory;java.naming.provider.url=tcp://${jms.host}:7222;java.naming.security.principal=${jms.user};java.naming.security.credentials=${jms.password}
min-pool-size: 1
max-pool-size: 5
blocking-timeout-wait-millis: 30000
idle-timeout-minutes: 5
xa-resource-timeout: 300
security:
application:
ejb3:
default-resource-adapter-name: GenericJMS
thread-pools:
default:
max-threads: ${env.EJB_DEFAULT_THREAD_POOL_MAX_THREADS:10}
ee:
global-modules: com.tibco.tibjms
jboss-descriptor-property-replacement: true
annotation-property-replacement: true
deployment:
org.jboss.genericjms.tibco:generic-jms-ra.rar:
messaging-activemq:
servers:
default:
active: false
pom.xml
(省略了不相关的部分):
<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">
<packaging>war</packaging>
<properties>
<failOnMissingWebXml>false</failOnMissingWebXml>
<thorntail.version>2.5.0.Final</thorntail.version>
<thorntail.version.maven.plugin>2.5.0.Final</thorntail.version.maven.plugin>
<version.httpclient>4.5.9</version.httpclient>
<jms.ra.version>2.0.1.Final</jms.ra.version>
<jms.tibco.version>8.3.0.015</jms.tibco.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>bom</artifactId>
<version>${thorntail.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- thorntail dependencies -->
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>jmx</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>ejb</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>ejb-remote</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>jpa</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>jaxrs</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>cdi</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>datasources</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>logging</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>messaging</artifactId>
<exclusions>
<exclusion>
<groupId>org.jboss.spec.javax.jms</groupId>
<artifactId>jboss-jms-api_2.0_spec</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>resource-adapters</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>swagger</artifactId>
<version>${thorntail.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${version.httpclient}</version>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.23</version>
</dependency>
<!-- TIBCO -->
<dependency>
<groupId>org.jboss.genericjms.tibco</groupId>
<artifactId>generic-jms-ra</artifactId>
<version>${jms.ra.version}</version>
<type>rar</type>
</dependency>
<dependency>
<groupId>com.tibco</groupId>
<artifactId>tibcrypt</artifactId>
<version>${jms.tibco.version}</version>
</dependency>
<dependency>
<groupId>com.tibco</groupId>
<artifactId>tibjms</artifactId>
<version>${jms.tibco.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>3.10.0.Final</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>my-project</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>io.thorntail</groupId>
<artifactId>thorntail-maven-plugin</artifactId>
<version>${thorntail.version.maven.plugin}</version>
<configuration>
<showDeprecation>true</showDeprecation>
<useUberJar>true</useUberJar>
<properties>
<use-deployment-logging-config>false</use-deployment-logging-config>
<jms.connectionFactoryName>XAQueueConnectionFactory</jms.connectionFactoryName>
<jms.connectionFactoryJndiName>java:/${jms.connectionFactoryName}</jms.connectionFactoryJndiName>
<jms.connectionFactoryClass>org.jboss.resource.adapter.jms.JmsManagedConnectionFactory</jms.connectionFactoryClass>
<jms.user>user</jms.user>
<jms.password>password</jms.password>
<jms.host>NN.NN.NN.NN</jms.host>
<jms.jndiParameters>java.naming.factory.url.pkgs=com.tibco.tibjms.naming;java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory;java.naming.provider.url=tcp://${jms.host}:7222;java.naming.security.principal=${jms.user};java.naming.security.credentials=${jms.password}</jms.jndiParameters>
</properties>
</configuration>
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)