-->
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.  [ 2 posts ] 
Author Message
 Post subject: how to bypass auto db connect at startup?
PostPosted: Thu Aug 10, 2006 11:15 am 
Newbie

Joined: Wed Mar 08, 2006 10:33 pm
Posts: 16
Location: Brazil
Hi,

Can someone give me a hint as to how I can bypass the auto-db connect when my app starts up? (Using cp30 pooling)

The scenario is this:
* The app is being started for the 1st time (installed), and a setup wizard collects db connection details.

* After the connection properties are loaded, THEN I want the app to connect to the db.

Any ideas?
Thanks very much...
Stan


Top
 Profile  
 
 Post subject: solution...
PostPosted: Thu Aug 10, 2006 4:04 pm 
Newbie

Joined: Wed Mar 08, 2006 10:33 pm
Posts: 16
Location: Brazil
I guess it cannot be done because the Spring JPA needs the jdbc details to build a Hibernate entity manager at spring context init time.

My workaround: re-write the jdbc.properties file in the class path every time the app starts up, using connecting details copied from a remote property (xml) file which is user configurable.

The 1st time the app starts, it can connect to an embedded demo db, have the db connect details configured by a install-wizard, then restart and connect to the production db.

I would have liked to have the app start with no db connection, but it doesn't seem possible with spring jpa + hibernate, where I have the datasource & entity mgr configured in xml.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.