empire-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Weidele <daniel.weid...@gmail.com>
Subject EmpireDB and EJB
Date Fri, 12 Aug 2016 14:51:22 GMT
Dear fellows,

I have almost successfully integrated EmpireDb into JavaEE transaction
management. I created a separate class DBManager which gets injected with a
connection from the JavaEE connection pool, and instantiates and holds a
DBDatabase. The DBManager itself is an EJB, which can then be retrieved
with the @EJB annotation. I would like to get rid of the DBManager and make
my subclass of DBDatabase the EJB holding the connection itself - however,
I cannot achieve this, as all the methods of DBDatabase are declared as
final - this is not compliant to EJB.

Another issue is this "registry" mechanism of DBDatabase - this registry is
exactly what servlet container takes care of - with precise scopes rather
than some static cache which I cannot really configure - so I would like to
get rid of this (or rather have it optional in the constructor), and let
the servlet container take care of the DBDatabase pooling.

Does anyone have experiences with EmpireDb & EJB - or maybe someone
achieved to make this work nicely together already, and could advise?


*Daniel K.I. Weidele, **M.Sc. B.Sc.*

View raw message