persist « Database « JSP-Servlet Q&A





1. session vs database persistence    coderanch.com

Hi All, I have a mvc jsp servlet application. There are several long running database transactions over multiple jsp pages. The question is, which is the best way(practice) to apply persistence? either 1) save the database objects in the session and then apply them to the data base when the transaction is finished(using some object relational mapping technique) or 2)set Connection.setAutoCommit(false) ...

3. How to encrypt a database entry when using javax.persistence package?    coderanch.com

Hi, I was wondering is there any way of encrypting a data entry that you persist to a database using the javax.persistence package. For example the following SQL statement would be used to enter the data directly into the database using JDBC: INSERT INTO usertable (username, password) VALUES ( 'user1', AES_ENCRYPT( 'pass1', 'encryptText' ) ); But using javax.persistence package, how is ...