or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

connection-pooling.mdembedded-broker.mdindex.mdjms-client.mdmanagement-monitoring.mdmessages-destinations.mdnetwork-clustering.mdpersistence-storage.mdsecurity.mdspring-integration.mdtransport-protocols.md

connection-pooling.mddocs/

0

# Connection Pooling

1

2

ActiveMQ provides enterprise-grade connection pooling implementations for high-performance applications requiring efficient resource management.

3

4

## Capabilities

5

6

### Modern Pooling Implementation

7

8

```java { .api }

9

public class PooledConnectionFactory implements ConnectionFactory, JNDIStorableInterface, Service {

10

public void setConnectionFactory(ConnectionFactory connectionFactory);

11

public void setMaxConnections(int maxConnections);

12

public void setMaximumActiveSessionPerConnection(int maximumActiveSessionPerConnection);

13

public Connection createConnection() throws JMSException;

14

public void start() throws Exception;

15

public void stop() throws Exception;

16

}

17

```

18

19

### XA Transaction Support

20

21

```java { .api }

22

public class JcaPooledConnectionFactory extends PooledConnectionFactory {

23

public void setTransactionManager(TransactionManager transactionManager);

24

public XAConnection createXAConnection() throws JMSException;

25

}

26

```

27

28

### Legacy Pooling

29

30

```java { .api }

31

public class org.apache.activemq.pool.PooledConnectionFactory extends org.apache.activemq.jms.pool.PooledConnectionFactory {

32

public void setMaxConnections(int maxConnections);

33

public void setConnectionFactory(ConnectionFactory connectionFactory);

34

}

35

```