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 |
Eclipse User |
|
|
|
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 |
Martin Taal 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 |
Eclipse User |
|
|
|
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 |
Martin Taal 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 |
Felix 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
>>
|
|
|
Goto Forum:
Current Time: Thu Apr 25 21:39:07 GMT 2024
Powered by FUDForum. Page generated in 0.03012 seconds
|