易截截图软件、单文件、免安装、纯绿色、仅160KB

java存储过程的创建与调用

create or replace procedure updateProject is  
begin  
  update project p set p.total_intend_gather =   
  (select sum(ig.gather_sum) from intend_gather ig where ig.project_number=p.project_number);  
    
  update project p set p.total_actual_gather =   
  (select sum(ag.gahter_sum) from actual_gather ag where ag.project_number=p.project_number);  
    
  update project p set p.total_invoice=  
(select sum(invoice.invoice_sum) from invoice invoice  
 where invoice.intend_id in  
 (select ig.intend_id  from intend_gather ig where ig.project_number=p.project_number));  
   
end updateProject; 
Session session = this.getSession();  
Transaction tx =null;  
try {  
    tx = session.beginTransaction();  
    Connection con = session.connection();  
    String procedure = "{call updateproject() }";  
    CallableStatement cstmt = con.prepareCall(procedure);  
    cstmt.executeUpdate();  
    tx.commit();  
 
} catch (Exception e) {  
   tx.rollback();  


相关文档:

Java自定义多线程服务器

// multi.MultiServer.java
package multi;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.net.Socket;
public class MultiServer {
private int port = 8000;
private int backlog = 42;
private ServerSocket server_socket;
private Thread ......

HTTPs in java dev @IBM

      最近在开发一个小的ESB系统,会在这里粘一些觉得会用的到的文章。
出自:www.ibm.com.cn MattTowers 2002年10月08日
摘要
使用 HTTPS(Hypertext Transfer Protocol Secure 安全超文本传输协议)并非你所想的那样简单直接。如果你曾经尝试在 Java 客户端和 HTTPS 服务器之间进行安全的通 ......

Java options Some Useful XX Options

http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp
Categories of Java HotSpot VM Options
 

Standard options recognized by the Java HotSpot VM are described on the Java Application Launcher reference pages for Windows
, Solaris
and Linux
. This document deals exclusively wit ......

java DOM 注意事项

1.  W3C把标签内的文本部分也定义成一个Node
2. 
Element对象代表的是XML文档中的标签元素
,继承于Node,亦是Node的最主要的子对象
3.  Attr实际上是包含在Element中的,它并不能被看作是Element的子对象,因而在DOM中Attr并不是DOM树的一部分,所以Node中的  getparentNode(),getpreviousSiblin ......

java中与(&)和或(|)运算

System.out.println(2|0); //0010 0000 =>0010 = 2
System.out.println(2|1); //0010 0001 =>0011 = 3
System.out.println(3|2); //0011 0010 =>0011 = 3
System.out.println(3&2); //0011 0010 =>0010 = 2
/*
  在java中0代表假, 1代表真
  00011|0010  从右到左比较0|1 = 1, 1|0 = ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号