Hello,

    I'm trying to configure hibernate+hikarip connection pool for TOMEE.

    I made it work without issues (at first sight), by configuring everything in the persistence.xml, basically as described in the answer to this stackoverflow question:

https://stackoverflow.com/questions/49366198/how-to-configure-hikaricp-via-tomee-xml

    I would rather configure it through TOMEE data sources, as I'm used to, in the conf/tomee.xml or conf/context.xml

    I've attempted to do so, also helping myself with https://github.com/brettwooldridge/HikariCP/wiki/JNDI-DataSource-Factory-(Tomcat,-etc.)

    But I didn't manage to. I got errors like described in the stackoverflow question, but also some others.

    I have two questions:

1. is it supported to specify the connection purely through the
   persistence.xml without any datasource in the tomee.xml? Will
   UserTransactions, container-managed transactions work as expected?
2. could I configure tomee+hibernate+hikaricp through a tomee
   datasource? If so, how? (One reason I'd rather have a datasource is
   also so that it's possible to edit the  JDBC configuration (eg IP,
   password, connection pool size..) without redeploying the
   application (because the persistence.xml is in the war)

    Thank you!

Emmanuel


Reply via email to