You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@batchee.apache.org by "Romain Manni-Bucau (Jira)" <ji...@apache.org> on 2020/03/06 14:30:00 UTC
[jira] [Commented] (BATCHEE-137) Make the
JPAPersistenceManagerService extensible
[ https://issues.apache.org/jira/browse/BATCHEE-137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17053463#comment-17053463 ]
Romain Manni-Bucau commented on BATCHEE-137:
--------------------------------------------
Hi [~chberger], wonder what it would bring since both the tx and em providers are already pluggable so the extension points you are asking are already there ([https://github.com/apache/geronimo-batchee/blob/master/jbatch/src/main/java/org/apache/batchee/container/services/persistence/JPAPersistenceManagerService.java#L827]).
> Make the JPAPersistenceManagerService extensible
> ------------------------------------------------
>
> Key: BATCHEE-137
> URL: https://issues.apache.org/jira/browse/BATCHEE-137
> Project: BatchEE
> Issue Type: Improvement
> Components: jbatch-core
> Affects Versions: 0.5-incubating
> Reporter: Christian Berger
> Priority: Major
>
> Hi BatchEE-Team,
> right now it's quite difficult to extend the JPAPersistenceManagerService. It would be very helpful if you could change the visibility of the member variables to protected.
> {code:java}
> // in the original version both members are private
> protected EntityManagerProvider emProvider;
> protected TransactionProvider txProvider;{code}
> Furthermore, please do the same for performRollback
> {code:java}
> protected Exception performRollback(Object tx, Exception originalException) {
> try {
> txProvider.rollback(tx, originalException);
> } catch (Exception exceptionDuringRollback) {
> LOGGER.log(Level.SEVERE,
> "Got an Exception while rolling back due to another Exception. Printing Rollback Exception and re-throwing original one",
> exceptionDuringRollback);
> }
> return originalException;
> }{code}
> Thank you in advance
--
This message was sent by Atlassian Jira
(v8.3.4#803005)