Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Alternative to an Entity Bean

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I want to authenticate a user's id and password.

1. The user enter the id and password in a Jsp.
2. jsp directed the request to a servlet
3. Servlet create an instance of session bean and
call one of its method "validate user"
4. Validate user method is creating an instance of "User Entity
bean" for verification and returns true or false.

My question is " is there any other alternative to Entity bean (other than
Hibernate) to verify user e.g Can I do it writing JDBC code?
if yes , where should i write the JDBC code, in another session bean
or in a simple DAO Java class?
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes you can use anything that can access a database or even some other means, if the data isn't in a database.

If you use JDBC, I would definitely put it in a seperate DAO POJO Java class.

For another example, say you used JBoss and Tomcat, with JBoss you can create a Security Domain that uses a simple properties file, database, or LDAP, then have your WebApp use that Security Domain and you are set.

Mark
 
Ghazala Islam
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How about transaction processing? SQLException is enough to take care of transaction in a multiuser environment?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic