[
https://issues.apache.org/jira/browse/ARTEMIS-5089?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aleh Balakhanau updated ARTEMIS-5089:
-------------------------------------
Description:
I've noticed that there are some netty resources remained in jvm when
application is undeployed from app server (tested on Glassfish 7.0.18, Payara
server 6.2024.8, Wildfly 33.0.2 Final)
I have a code example copied from activemq-artemis-examples project.
{code:java}
private Session session;
private MessageProducer producer;
private ActiveMQConnection connection;
private ActiveMQConnectionFactory connectionFactory;
public void publish() {
String activemqBrokerUrl =
"tcp://localhost:61617?useGlobalPools=false&consumerWindowSize=0";
String activemqUsername = "admin";
String activemqPassword = "admin";
try {
connectionFactory = new
ActiveMQConnectionFactory(activemqBrokerUrl, activemqUsername,
activemqPassword);
connection = (ActiveMQConnection)
connectionFactory.createConnection();
connection.start();
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
Queue queue = session.createQueue("jms/test");
producer = session.createProducer(queue);
ObjectMessage message = session.createObjectMessage();
message.setStringProperty("Hello", "World");
producer.send(message);
producer.close();
session.close();
connection.close();
connectionFactory.close();
} catch (JMSException ex) {
log.error("JMSException", ex);
}
} {code}
(tried also to add FastThreadLocal.destroy() after connectionFactory.close()
line)
was:I've noticed that there are some netty resources remained in jvm when
application is undeployed from app server (tested on Glassfish 7.0.18, Payara
server 6.2024.8, Wildfly 33.0.2 Final)
> TBD Netty resources remain in memory when application is undeployed from app
> server.
> ------------------------------------------------------------------------------------
>
> Key: ARTEMIS-5089
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5089
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: JMS
> Affects Versions: 2.36.0, 2.37.0
> Reporter: Aleh Balakhanau
> Priority: Major
>
> I've noticed that there are some netty resources remained in jvm when
> application is undeployed from app server (tested on Glassfish 7.0.18, Payara
> server 6.2024.8, Wildfly 33.0.2 Final)
> I have a code example copied from activemq-artemis-examples project.
> {code:java}
> private Session session;
> private MessageProducer producer;
> private ActiveMQConnection connection;
> private ActiveMQConnectionFactory connectionFactory;
>
> public void publish() {
> String activemqBrokerUrl =
> "tcp://localhost:61617?useGlobalPools=false&consumerWindowSize=0";
> String activemqUsername = "admin";
> String activemqPassword = "admin";
> try {
> connectionFactory = new
> ActiveMQConnectionFactory(activemqBrokerUrl, activemqUsername,
> activemqPassword);
> connection = (ActiveMQConnection)
> connectionFactory.createConnection();
> connection.start();
> session = connection.createSession(false,
> Session.AUTO_ACKNOWLEDGE);
> Queue queue = session.createQueue("jms/test");
> producer = session.createProducer(queue);
> ObjectMessage message = session.createObjectMessage();
> message.setStringProperty("Hello", "World");
> producer.send(message);
> producer.close();
> session.close();
> connection.close();
> connectionFactory.close();
> } catch (JMSException ex) {
> log.error("JMSException", ex);
> }
> } {code}
> (tried also to add FastThreadLocal.destroy() after connectionFactory.close()
> line)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact