Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [TENEO] Detect failed login
[TENEO] Detect failed login [message #720569] Tue, 30 August 2011 20:32 Go to next message
Waldi  is currently offline Waldi Friend
Messages: 60
Registered: July 2009
Member
Hi,

In my Application I need a login by the user. Everything works fine but if the User type in a wrong username or password I haven't the possibility to catch the Exception and display a info dialog.

The Exception occur at the moment that i call:
try {
	hbds.initialize();
} catch (Exception e) {
	//Need to find out a failed login
}finally {
	System.out.println(hbds.getMappingXML());
}

But my code don't run in the catch block. Is there another possibilityto detect a failed login?

Waldi
Re: [TENEO] Detect failed login [message #720595 is a reply to message #720569] Tue, 30 August 2011 21:56 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hmm, I think you mean that you use the user login to login directly to the database? (and that fails?). I normally use a
fixed username/pwd for a database connection and have a separate table with users/pwds.
In any case if you use the login to login to the database, then to do a pre-check, I would create a normal sql
connection before initializing the datastore.

gr. Martin

On 08/30/2011 10:32 PM, Waldi wrote:
> Hi,
>
> In my Application I need a login by the user. Everything works fine but if the User type in a wrong username or password
> I haven't the possibility to catch the Exception and display a info dialog.
>
> The Exception occur at the moment that i call:
> try {
> hbds.initialize();
> } catch (Exception e) {
> //Need to find out a failed login
> }finally {
> System.out.println(hbds.getMappingXML());
> }
> But my code don't run in the catch block. Is there another possibilityto detect a failed login?
>
> Waldi


--

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
Previous Topic:[TENEO] Discard changes on resource
Next Topic:(no subject)
Goto Forum:
  


Current Time: Fri Apr 26 07:52:14 GMT 2024

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

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

Back to the top