JAVA´æ´¢¹ý³ÌºÍµ÷ÓÃ
´úÂëÄÚÈÝ
create or replace procedure batchUpdateCustomer(p_age in number) as
begin
update CUSTOMERS set AGE=AGE+1 where AGE>p_age;
end;
ÒÔÉÏ´æ´¢¹ý³ÌÓÐÒ»¸ö²ÎÊýp_age£¬´ú±í¿Í»§µÄÄêÁ䣬ӦÓóÌÐò¿É°´ÕÕÒÔÏ·½Ê½µ÷Óô洢¹ý³Ì£º
´úÂëÄÚÈÝ
tx = session.beginTransaction();
Connection con=session.connection();
String procedure = "{call batchUpdateCustomer(?) }";
CallableStatement cstmt = con.prepareCall(procedure);
cstmt.setInt(1,0); //°ÑÄêÁä²ÎÊýÉèΪ0
cstmt.executeUpdate();
tx.commit();
create or replace produre batchUpdateStudent(a in number) as
begin
update STUDENT set AGE=AGE+1 where AGE>a;
end;
µ÷ÓôúÂëÈçÏ£º
Transaction tx=session.beginSession();
Connection conn=session.connection();
String pd=”...{call batchUpdateStudent(?)}”;
CallableStatement cstmt=conn.PrepareCall(pd);
cstmt.setInt(1,20); //°ÑÄêÁäÕâ¸ö²ÎÊýÉèΪ20
tx.commit()£»
Ïà¹ØÎĵµ£º
¹«Ë¾ÒµÎñ¼±ËÙÀ©ÕÅ£¬¼±ÐèÓвÅÄܵÄͬѧ¼ÓÈëµ½ÎÒÃǵÄÐÐÁÐÖУ¬
×îºÃÄã¶Ô¹¤×÷»ý¼«£¬ÈÏÕæ£¬¸ºÔð
×îºÃÄãÒѾÓÐÔúʵµÄ±à³Ì»ù´¡
×îºÃÄãÒѾÊìÁ·ÕÆÎÕJava¼¼Êõ
×îºÃÄãÖÁÉÙÒÑÓÐÒ»£¬Á½Ä깤×÷¾Ñé
¹¤×÷µØµã£ºº¼ÖÝ
ְλ £ºJava¿ª·¢¹¤³Ìʦ£¨°¢Àï°Í°Í¼¯ÍÅB2B¹«Ë¾ÍøÕ¾¼¼Êõ²¿£©
ÓÐÒâÕßÇë°Ñ ......
JavaµÄ»Øµ÷·½·¨²»ÏñcÄÇÑù¿ÉÒÔÖ±½Ó´«µÝÒ»¸ö·½·¨£¬java´«µÝµÄÊÇÒýÓã¬ËùÒÔjava¶Ô·½·¨»Øµ÷µÄ½â¾ö°ì·¨ÊÇÖ±½Ó´«µÝÒ»¸ö½Ó¿Ú£¬¶Ô½Ó¿Ú½øÐÐʵÏÖ¡£ÏÂÃæÊÇÒ»¸öÀý×Ó
Ê×Ïȶ¨ÒåÒ»¸ö½Ó¿ÚCar£¬ÓÐÒ»¸örunµÄ·½·¨ÉùÃ÷
Java´úÂë
package ocm.callback;
public interface Car {
& ......
Java EE ¸ÅÊö
Javaa EE:·Ö²¼Ê½ ÆóÒµ¼¶Ó¦Óù淶ºÍ±ê×¼
ÍÆÄ£Ê½£º²»ÓÃÇëÇó£¬Ç¿ÖÆÈÿͻ§½ÓÊÜ
Àģʽ£ºÈÿͻ§ÇëÇóºÍÏìÓ¦¡£
¼Ü¹¹£º
ÇáÁ¿¼¶£ºstruct2 /spring /hibernate
Modle1:jsp+JavaBean+DB
Model2(MVC):jsp+servlet+JavaBean+DB
ÖØÁ¿¼¶£ºJsp+servlet+EJB+DB
±íʾ²ã£ºÒµÎñ²ã£º³Ö¾Ã²ã£ºÊý¾Ý¿â£º
JNDI£º²éÕÒ·Ö²¼¶ÔÏóµ ......
1 ÒýÑÔ
JavaµÄÒ»¸öÖØÒªÓŵã¾ÍÊÇͨ¹ýÀ¬»øÊÕ¼¯Æ÷GC £¨Garbage Collection£©×Ô¶¯¹ÜÀíÄÚ´æµÄ»ØÊÕ£¬³ÌÐòÔ±²»ÐèҪͨ¹ýµ÷Óú¯ÊýÀ´ÊÍ·ÅÄÚ´æ¡£Òò´Ë£¬ºÜ¶à³ÌÐòÔ±ÈÏΪJava ²»´æÔÚÄÚ´æÐ¹Â©ÎÊÌ⣬»òÕßÈÏΪ¼´Ê¹ÓÐÄÚ´æÐ¹Â©Ò²²»ÊdzÌÐòµÄÔðÈΣ¬¶øÊÇGC »òJVMµÄÎÊÌâ¡£Æäʵ£¬ÕâÖÖÏë·¨ÊDz»ÕýÈ·µÄ£¬ÒòΪJava Ò²´æÔÚÄÚ´æ ......
1¡¢×÷ÓÃÓòpublic,private,protected,ÒÔ¼°²»Ð´Ê±µÄÇø±ð
×÷ÓÃÓò µ±Ç°Àà ͬһpackage ×ÓËïÀà ÆäËûpackage
public √ √ √ √
protected √ √ √ ×
²»Ð´Ê±Ä¬ÈÏΪfriendly √ √ × ×
private √ × × ×
2¡¢ArrayListºÍVect ......