JavaÓû§»Øµ÷·½·¨Ïû³ýÈßÓà´úÂë
Ò». ¿´Ò»¶ÎÈßÓàµÄ´úÂë
public String login(HttpServletRequest request){
OperatorService operatorService = new OperatorService();
WebContext webContext= request.getSession().getAttribute("WEB_CONTEXT_KEY");
Connection conn=null;
try{
Conection conn =DBManager.getConnection();
if(webContext.getOperatorName.equals("123")){
// µÇ½³É¹¦
}
}catch(Throwable t){
//¼Ç¼ÈÕÖ¾
//Ìøתµ½Í³Ò»µÄ´íÎóÒ³Ãæ,²»ÄÜÈÃÓû§¿´µ½Òì³£Ò³Ãæ
//¹Ø±ÕConnection
if(conn!=null){
try{conn.close();}cath(SQLException ex){}
}
}
}
public String logOut(HttpServletRequest request){
OperatorService operatorService = new OperatorService();
WebContext webContext= request.getSession().getAttribute("WEB_CONTEXT_KEY");
try{
Conection conn =DBManager.getConnection();
operatorService.logout();
request.getSession().invalidate();
}catch(Throwable t){
//¼Ç¼ÈÕÖ¾
//Ìøתµ½Í³Ò»µÄ´íÎóÒ³Ãæ,²»ÄÜÈÃÓû§¿´µ½Òì³£Ò³Ãæ
//¹Ø±ÕConnection
if(conn!=null){
try{conn.close();}cath(SQLException ex){}
}
}
}
¶þ¡¢¿ÉÒÔ¿´µ½,ºìÉ«²¿·Ö´úÂëÍêÈ«ÊÇÈßÓàµÄ£¬ÏÂÃæÓûص÷·½·¨¼ò»¯Õⲿ·Ö´úÂë
1.Ïȶ¨ÒåÒ»¸ö»Øµ÷³éÏóÀà
public abstract class AppCallback {
/**
* »Øµ÷Ö´Ðз½·¨
*
* @return
*/
public String execute() {
&n
Ïà¹ØÎĵµ£º
create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ
......
µÚÒ»²¿·Ö. Ìáʾ
ÎÒÐèÒª¶ÁÕâƪÎÄÕÂÂð£¿
JavaÀà¼ÓÔØÆ÷¶ÔJavaϵͳµÄÔËÐÐÊÇÖÁ¹ØÖØÒªµÄ£¬µ«ÊÇÈ´³£³£±»ÎÒÃǺöÂÔ¡£JavaÀà¼ÓÔØÆ÷¸ºÔØ
ÔÚÔËÐÐʱ²éÕҺͼÓÔØÀà¡£×Ô¶¨ÒåÀà¼ÓÔØÆ÷¿ÉÒÔÍêÈ«¸Ä±äÀàµÄ¼ÓÔØ·½Ê½£¬ÒÔ×Ô¼ºÏ²»¶µÄ·½Ê½À´
¸öÐÔ»¯ÄãµÄJavaÐéÄâ»ú¡£±¾ÎļòÒªµÄ½éÉÜJavaÀà¼ÓÔØÆ÷£¬È»ºóͨ¹ýÒ»¸ö¹¹Ôì×Ô¶¨ÒåÀà¼ÓÔØÆ÷
µÄÀý×ÓÀ´ËµÃ÷£¬Õâ ......
µÚÒ»²¿·Ö. Ìáʾ
ÎÒÐèÒª¶ÁÕâƪÎÄÕÂÂð£¿
JavaÀà¼ÓÔØÆ÷¶ÔJavaϵͳµÄÔËÐÐÊÇÖÁ¹ØÖØÒªµÄ£¬µ«ÊÇÈ´³£³£±»ÎÒÃǺöÂÔ¡£JavaÀà¼ÓÔØÆ÷¸ºÔØ
ÔÚÔËÐÐʱ²éÕҺͼÓÔØÀà¡£×Ô¶¨ÒåÀà¼ÓÔØÆ÷¿ÉÒÔÍêÈ«¸Ä±äÀàµÄ¼ÓÔØ·½Ê½£¬ÒÔ×Ô¼ºÏ²»¶µÄ·½Ê½À´
¸öÐÔ»¯ÄãµÄJavaÐéÄâ»ú¡£±¾ÎļòÒªµÄ½éÉÜJavaÀà¼ÓÔØÆ÷£¬È»ºóͨ¹ýÒ»¸ö¹¹Ôì×Ô¶¨ÒåÀà¼ÓÔØÆ÷
µÄÀý×ÓÀ´ËµÃ÷£¬Õâ ......
Java»ù´¡-ѧϰʹÓÃAnnotation×¢½â¶ÔÏó
×¢½â(Ò²±»³ÆΪԪÊý¾Ý)ΪÎÒÃÇÔÚ´úÂëÖÐÌí¼ÓÐÅÏ¢ÌṩÁËÒ»ÖÖÐÎʽ»¯µÄ·½·¨,ʹÎÒÃÇ¿ÉÒÔÔÚÉÔºóij
¸öʱ¿Ì·Ç³£·½±ãµØʹÓÃÕâЩÊý¾Ý
1-1:»ù±¾Óï·¨
Java SE5ÄÚÖÃÈýÖÖ±ê×¼×¢½â
@Override:±íʾµ±Ç°µÄ·½·¨¶¨Ò彫¸²¸Ç³¬ÀàÖеķ½·¨.Èç¹ûÄ㲻СÐÄƴд´íÎó,»òÕß·½·¨Ç©Ãû¶Ô²»Éϱ»¸²
¸ÇµÄ·½·¨ ......
2006-01-18 13:53×÷Õߣº³ö´¦£º²©¿ÍÔ°ÔðÈα༣º·½ÖÛ http://dev.yesky.com/178/2278678.shtml ÒýÑÔ
JavaµÄ¶ÑÊÇÒ»¸öÔËÐÐʱÊý¾ÝÇø£¬ÀàµÄʵÀý(¶ÔÏó)´ÓÖзÖÅä¿Õ¼ä¡£JavaÐéÄâ»ú(JVM)µÄ¶ÑÖд¢´æ×ÅÕýÔÚÔËÐеÄÓ¦ÓóÌÐòËù½¨Á¢µÄËùÓжÔÏó£¬ÕâЩ¶ÔÏóͨ¹ýnew¡¢newarray¡¢anewarrayºÍmultianewarrayµÈÖ¸ÁÁ¢£¬µ«ÊÇËüÃDz»ÐèÒ ......