Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo/Hibernate]Check for running DB
[Teneo/Hibernate]Check for running DB [message #127206] Thu, 17 July 2008 14:27 Go to next message
Eclipse UserFriend
Originally posted by: felixostertag.web.de

Hi again,
short question:
is there any possibility to check if a database is running and if not,
start one?
right now, if there is no DB running, an exception is thrown in the
hbds.initialize() method. but bad enough i can't catch it in a try/catch
block. (i traced the exception down to the buildSessionFactory, but lost
it then).
is there any (easy ;) ) way to check, (starting is no problem) or do i
have to start it always, just in case?

thx
felix
Re: [Teneo/Hibernate]Check for running DB [message #127233 is a reply to message #127206] Thu, 17 July 2008 16:27 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Felix,
No I don't know another method than creating your own sql connection and see if it fails. I am not
sure but it is even possible that it will take a while before it fails (because of timeout settings).

I crossposted to the emf newsgroup, that's where support for Teneo is now given.

gr. Martin

Felix wrote:
> Hi again,
> short question:
> is there any possibility to check if a database is running and if not,
> start one?
> right now, if there is no DB running, an exception is thrown in the
> hbds.initialize() method. but bad enough i can't catch it in a try/catch
> block. (i traced the exception down to the buildSessionFactory, but lost
> it then).
> is there any (easy ;) ) way to check, (starting is no problem) or do i
> have to start it always, just in case?
>
> thx
> felix
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo/Hibernate]Check for running DB [message #127246 is a reply to message #127233] Fri, 18 July 2008 08:56 Go to previous message
Eclipse UserFriend
Originally posted by: felixostertag.web.de

thx for your quick answer martin. then i stick with this solution, at
least for testing.

Martin Taal wrote:

> Hi Felix,
> No I don't know another method than creating your own sql connection and see
if it fails. I am not
> sure but it is even possible that it will take a while before it fails
(because of timeout settings).

> I crossposted to the emf newsgroup, that's where support for Teneo is now
given.

> gr. Martin

> Felix wrote:
>> Hi again,
>> short question:
>> is there any possibility to check if a database is running and if not,
>> start one?
>> right now, if there is no DB running, an exception is thrown in the
>> hbds.initialize() method. but bad enough i can't catch it in a try/catch
>> block. (i traced the exception down to the buildSessionFactory, but lost
>> it then).
>> is there any (easy ;) ) way to check, (starting is no problem) or do i
>> have to start it always, just in case?
>>
>> thx
>> felix
>>
Re: [Teneo/Hibernate]Check for running DB [message #620121 is a reply to message #127206] Thu, 17 July 2008 16:27 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Felix,
No I don't know another method than creating your own sql connection and see if it fails. I am not
sure but it is even possible that it will take a while before it fails (because of timeout settings).

I crossposted to the emf newsgroup, that's where support for Teneo is now given.

gr. Martin

Felix wrote:
> Hi again,
> short question:
> is there any possibility to check if a database is running and if not,
> start one?
> right now, if there is no DB running, an exception is thrown in the
> hbds.initialize() method. but bad enough i can't catch it in a try/catch
> block. (i traced the exception down to the buildSessionFactory, but lost
> it then).
> is there any (easy ;) ) way to check, (starting is no problem) or do i
> have to start it always, just in case?
>
> thx
> felix
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo/Hibernate]Check for running DB [message #620122 is a reply to message #127233] Fri, 18 July 2008 08:56 Go to previous message
Felix is currently offline FelixFriend
Messages: 11
Registered: July 2009
Junior Member
thx for your quick answer martin. then i stick with this solution, at
least for testing.

Martin Taal wrote:

> Hi Felix,
> No I don't know another method than creating your own sql connection and see
if it fails. I am not
> sure but it is even possible that it will take a while before it fails
(because of timeout settings).

> I crossposted to the emf newsgroup, that's where support for Teneo is now
given.

> gr. Martin

> Felix wrote:
>> Hi again,
>> short question:
>> is there any possibility to check if a database is running and if not,
>> start one?
>> right now, if there is no DB running, an exception is thrown in the
>> hbds.initialize() method. but bad enough i can't catch it in a try/catch
>> block. (i traced the exception down to the buildSessionFactory, but lost
>> it then).
>> is there any (easy ;) ) way to check, (starting is no problem) or do i
>> have to start it always, just in case?
>>
>> thx
>> felix
>>
Previous Topic:Re: org.eclipse.emf.mwe?
Next Topic:JPA Temporal annotation doesn't work for EReference features
Goto Forum:
  


Current Time: Tue Apr 07 08:43:40 GMT 2020

Powered by FUDForum. Page generated in 0.02237 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top