-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Hook method call on two phase persistence unit bootstrap
PostPosted: Mon Nov 27, 2017 10:30 am 
Newbie

Joined: Mon Nov 27, 2017 10:12 am
Posts: 2
Hi everyone

I belong to a software team that developed a Java EE 7 application that is using JPA 2.1 (hibernate 4.3.7 implementation) and deployed as a war archive on Wildfly 10.1.0. This application uses a H2 database, that is started in server mode through a setup method present in another java module, and we want to integrate this component into the war bundle. To have success with this integration, we need to invoke this setup method before the two-phase persistence unit bootstrap executed by the application server, because of the validation process. How can implement a hook to call this setup method that start the H2 database?


Top
 Profile  
 
 Post subject: Re: Hook method call on two phase persistence unit bootstrap
PostPosted: Mon Nov 27, 2017 11:16 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
I think this is a question for the Wildfly team. Basically, you'd have to setup the H2 DataSource so that it is configured by the Application Server. By the time Hibernate bootstraps, the DataSource will be already initialized.

However, there is nothing in Hibernate you could use to achieve this goal, hence you need to ask the question on the Application Server forum.


Top
 Profile  
 
 Post subject: Re: Hook method call on two phase persistence unit bootstrap
PostPosted: Mon Nov 27, 2017 3:32 pm 
Newbie

Joined: Mon Nov 27, 2017 10:12 am
Posts: 2
Thank's Vlad, I will post this question on the Wildfly forum site.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.