If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > JAVA > Incorrect login via JSP actually attempting TWO Oracle logins?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-11-11, 12:57
Skywarpgold Skywarpgold is offline
Registered User
 
Join Date: May 2011
Posts: 4
Incorrect login via JSP actually attempting TWO Oracle logins?

I really don't know if this is the appropriate place to post this question (I already got rejected from the Oracle forum), but I've run into a very interesting problem.

I administer a website that runs on Apache Tomcat 6.0, using JSP pages, and interfaces with an Oracle 10g database using the JDBC Thin client driver. We require our users to log in before they can gain access to the website, so we decided to let Oracle manage most of that. Each user has an Oracle account, and we have it set for their accounts to become locked after three failed logins.

When I test this out using SQL Plus or SQL Worksheet, accounts do indeed become locked after three failed logins, which is great. However, when I create a connection in our JSP page, accounts become locked after only two failed logins. After some extensive testing by changing the # of failed logins allowed in Oracle, it seems as if the connection via JSP actually tries to log in TWICE. Here is my connection code:

Code:
DriverManager.registerDriver((Driver) Class.forName("oracle.jdbc.driver.OracleDriver").newInstance());
conn = DriverManager.getConnection(dataBase, oracleID, tempPass);
conn.close();
That is wrapped inside of a try/catch block that catches the SQLExceptions, so I can figure out if the account is valid or not.

I have worked around the issue by setting the # of failed logins to 5, but that does not follow the letter of our requirement, so I am wary to keep it this way.

Does anyone know why the getConnection() function seems to attempt two logins instead of one? At least Oracle is tracking it that way. So bizarre!

Thanks!
Reply With Quote
Reply

Tags
failed login, jsp, lock account, oracle 10g

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On