1. soft lock.(optimistic concurrency) 2. hard lock(pessimistic concurrency)
1. soft lock. in the case of soft lock you have use an extra field called timestamp in your database table. when you are retrieving a record from the database, you need to store its timestamp in a temporary variable and when user hits the update link you have to compare this timestamp with the timestamp of most recent record available in the database. if the timestamp matches you should allow that user to update the record (because during this spawn of time nobody has updated the reocrd) otherwise you should display a message stating that "record is already updated by somone"
2. hard lock in the case of hardlock, while retrieving a record from the database you should use the query in the form of "select ..for .. update". this will prevent another user to modify the record until the first user completes the updation. the query i mentioned above puts a lock on that record.
in most of the cases people prefer to use the first approach. 6. 怎么将数据导出到excel文件 下面这个函数能把table输出转成excel格式 response.setheader("content-disposition","p_w_upload; filename=stats.xls"); 7. 特别字符转换 ; 替换为 ; < 替换为 ; l t; > 替换为 ; g t; " 替换为 ;q u ot; \ 替换为 ;a pos; 8. 用下面的格式在jsp中封装java代码,这样能避免<?xml...必须从头开始的限制,另外在wml中,1. url中的;必须用; a m p;代替, contenttype必须为text/vnd.wap.wml