喜欢编程的鱼
oop_ming
全部博文(606)
UML(1)
文本分类(2)
Apache Http serv(2)
JProfiler(3)
Apache Lucene Ma(1)
googleapi(3)
nutch(10)
heritrix(1)
lucene(7)
J2EE模式(2)
行为模式(4)
结构模式(1)
创建模式(3)
FreeMarker(1)
Weblogic(3)
JSF(1)
Ajax(12)
Tomcat(5)
xml(6)
servlet(4)
JSP(19)
css(2)
javascript(30)
html(5)
Flex Builder(10)
NetBeans(0)
eclipse(28)
Linux(24)
windows(2)
Solaris(4)
Memcached(2)
NoSQL(0)
MS SQL(18)
MySQL(13)
Oracle(32)
iBATIS(1)
junit(3)
J2ME(1)
SWT(2)
webservice(17)
quartz(6)
J2EE(11)
J2SE(80)
面试题集(2)
问题集锦(1)
其他(8)
ANT(3)
jboss(1)
hibernate(56)
spring(33)
struts(23)
2011年(10)
2010年(67)
2009年(155)
2008年(386)
时间看来
梦醒潇湘
妤傛ê鍋
a8050366
abin1703
cynthia
Bsolar
1234fifa
dgsucces
belaxx
ousky
xutlong
分类: Java
2009-11-06 14:56:12
@Service@Transactionalpublic class ProcedureMngImpl extends BaseManagerImpl implements ProcedureMng { protected Logger log = LoggerFactory.getLogger(getClass()); @Autowired public void setDao(ProcedureDao dao) { super.setDao(dao); } public ProcedureDao getDao(){ return (ProcedureDao) super.getDao(); } @Override public void execImportOrganization() { String proc = "{call mrpsWap.dbo.spUUM_ImportOrganization()}"; execProcedure(proc); } @Override public void execImportUser() { String proc = "{call mrpsWap.dbo.spUUM_ImportUser()}"; execProcedure(proc); }}
ProcedureDaoImpl.java
public void execProcedure(String proc) { Session s = null; Connection conn = null; CallableStatement st = null; try { s = getSession(); conn = s.connection(); st = conn.prepareCall(proc); st.execute(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (st != null) st.close(); if (conn != null) conn.close(); } catch (SQLException e) { log.error(e.getMessage()); e.printStackTrace(); } } }
上一篇:xfire生成web服务客户端
下一篇:java socket
登录 注册