-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: hibernate querry
PostPosted: Thu Jun 07, 2012 2:11 am 
Newbie

Joined: Thu Jun 07, 2012 2:07 am
Posts: 5
can any1 tell why we use congiguration and sessionfactory and session and transsaction in hibernate?????????


Top
 Profile  
 
 Post subject: Re: hibernate querry
PostPosted: Thu Jun 07, 2012 2:34 am 
Newbie

Joined: Wed Jun 06, 2012 11:47 am
Posts: 6
From a non expert:

Configuration: represent the mappings and other configuration in files (xml or properties), is the in-memory version of that files

SessionFactory: Once a configuration is loaded a SessionFactory may be created. SessionFactories lets create Sessions.

Session: A session is a connection to the data base, in orden to do queries you must first connect to the DB, that is done by obteaining a Session from the SessionFactory, (Remember to close the session or it will keep open and you may run out of connections)

Transaction: The same as in normal SQL, all the statements included in a tranasction are nor reflected until a transaction.comit() is done, and all statements must execute correctly, if one of them fails a exception is thrown, by catching the exception you can do a rollback wich basically mens to undo the previously changes made in the transaction. To resume, or all statements in a transaction are correctly executed or none of them.


Top
 Profile  
 
 Post subject: Re: hibernate querry
PostPosted: Thu Jun 07, 2012 7:33 am 
Newbie

Joined: Thu Jun 07, 2012 2:07 am
Posts: 5
thanks for your concern.


I made a login form.
i entered a username and password by using signup button AND stored it in to database.


after that i want to signin with that details and it will be checked in the DB; if it persists then new page will be generate otherwise not.


Can you tell me about cheking and retrieving of data from DB with the details entered by user????


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.