Hi vata2999 ,
That's a kind of strange as it should not be that way. Do you use the
for accessing the connection? In general you need the JDBC connection to be wrapped to managed the Narayana integration for you. Please consider reading our blogpost at https://jbossts.blogspot.com/2017/12/narayana-jdbc-transactional-driver.html and maybe rather see the quickstart about use of JDBC with standalone Narayana here https://github.com/jbosstm/quickstart/tree/master/transactionaldriver/transactionaldriver-standalone or you can consider Agroal integration (Narayana team blog: Narayana integration with Agroal connection pool).
It seems to me that you are likely not using an XA Connection. Please can you provide some details of you obtained the connection to PostGres? Is it using DBCP2 or using transactional driver? If you are using transactional driver then there is this quickstart: quickstart/README.md at master · jbosstm/quickstart · GitHub
to overcome this issue I added below settings to hibernate and changed NarayanaXADataSourceWrapper to ManagedDatasource
DataSourceXAConnectionFactory dataSourceXAConnectionFactory = new DataSourceXAConnectionFactory(tm, ds); PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(dataSourceXAConnectionFactory, null); poolableConnectionFactory.setDefaultAutoCommit(false); GenericObjectPool<PoolableConnection> connectionPool = new GenericObjectPool<>(poolableConnectionFactory); poolableConnectionFactory.setPool(connectionPool); return new ManagedDataSource<>(connectionPool, dataSourceXAConnectionFactory.getTransactionRegistry());