WildFly with Oracle UCP and Hibernate

38 views
Skip to first unread message

Stephan Mankart

unread,
Feb 23, 2026, 11:32:32 AM (5 days ago) Feb 23
to WildFly

Hi all, 

we are struggling with the following setup: WildFly 37, Java 17, Hibernate.

We recently noticed that there is a problem with transaction management when we integrate UCP in our application code and expose it via JNDI. Methods annotated as @transactional don’t roll back cleanly in case there are nested transactional methods, because some part is committed midway through the steps when an error occurs.

Then we saw the following post in this group: WIldfly with Oracle UCP, FCF and TAC and with this approach the transaction issue is resolved.

However, when discussing some configuration details with my favorite non-human friend, it pointed out that:

  • You are mixing Oracle UCP with WildFly’s own connection pooling, which leads to double pooling and reduces the effectiveness of RAC features such as Fast Connection Failover (FCF).

 My questions now are:

  1. Is the above statement about double pooling correct?
  2. How big of a problem is the “reduced effectiveness”?
  3. Is there another way of getting UCP and hibernate to work with WildFly 37? Getting the first approach “UCP via application code” to work seems to be very cumbersome because the UCP DataSource created in this way doesn’t get enlisted in WildFly’s transaction manager (Narayana).


Any pointers/ experiences welcome! 

Thanks,

Stephan 

Stephan Mankart

unread,
Feb 23, 2026, 12:10:18 PM (5 days ago) Feb 23
to WildFly

Sorry, I didn't find any hint regarding moderation. @admins: pls close this threat.

Scott Marlow

unread,
Feb 25, 2026, 5:24:33 AM (4 days ago) Feb 25
to Stephan Mankart, WildFly
From a Google search I asked if ucp has a data source class and it does have one that directly uses the ucp pool:

"
Configuration Methods
UCP data sources can be configured using several methods depending on the environment: 
  • Programmatic: Applications can directly use UCP's PoolDataSource or PoolXADataSource interfaces and their setter methods to configure pool properties in Java code.
"

However I'm unsure of how well Oracle ucp PoolDataSource integrates with the WildFly (Narayana) transaction manager if the double buffering isn't used.  The WildFly (IronJacamar) connection pool does integrate fine with Narayana so perhaps the double pooling is okay.

Anyway the only way to avoid the double buffering would be to change how the WildFly Persistence container obtains the Data source to substitute the UCP PoolDataSource for the WildFly Data source object.  While it sound interesting to eliminate the double pooling it doesn't sound likely to be a robust solution as compared to the double buffered configuration you use now.

Scott


--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/wildfly/0068da72-39ed-4cac-814f-7884a1b4acd7n%40googlegroups.com.

Tom Jenkinson

unread,
Feb 27, 2026, 4:19:34 AM (yesterday) Feb 27
to WildFly
Hi Stephan,

Here are a couple of upstream issues raised for UCP work: https://issues.redhat.com/browse/WFLY-13715 https://issues.redhat.com/browse/JBJCA-1410

Maybe https://github.com/wildfly/wildfly-proposals/pull/329/changes can help a bit to explain what is expected to go on with UCP?

Thanks,
Tom
Reply all
Reply to author
Forward
0 new messages