摘要: 每次在CSDN回贴的时候都会遇到好多关于连接池的贴。自己在测试的时候也发现这个东西,有时候确实比较麻烦。干脆就花了一点时间把他们总结了一下.我机器的环境是 Eclipse3.2 + tomcate5.5+ JDK1.5 +sqlserver2000测试前 首先要确保 sql2000 打了spk3,spk4补丁包。struts中c3p0 连接池的配置。<data-sources > <data-source key="ds" type="com.mchange.v2.c3p0.ComboPooledDataSource"> < 阅读全文
posted @ 2008-06-06 14:28 shine_panda 阅读(1235) 评论(0) 推荐(0) 编辑
摘要: Hibernate映射类型对照表java类型Hibernate映射类型SQL类型java.math.BigDecimalbig_decimalnumericbyte[]binaryvarbinary(blob)boolean(java.lang.Boolean)booleanbitbyte(java.lang.Byte)bytetinyintjava.util.Calendarcalendartimestampjava.sql.Clobclobclobjava.util.Date 或java.sql.Datedatedatedouble(java.lang.Double)doubledoubl 阅读全文
posted @ 2008-06-04 20:56 shine_panda 阅读(4256) 评论(0) 推荐(2) 编辑
摘要: Spring 和 struts 整合的三种方式。1,使用Spring 的 ActionSupport 2, 使用Spring 的 DelegatingRequestProcessor 类。3,全权委托。无论用那种方法来整合第一步就是要为struts来装载spring的应用环境。 就是在 struts 中加入一个插件。struts-config.xml中<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn"><set-property property="con 阅读全文
posted @ 2008-06-02 06:16 shine_panda 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 1,通过Listener加载ApplicationContext<context-param><param-name>contextConfigLocation</param-name><param-value>/WEB-INF/applicationContext.xml</param-value></context-param><listener><listener-class>org.springframework.web.context.ContextLoaderListener</l 阅读全文
posted @ 2008-06-01 15:52 shine_panda 阅读(345) 评论(0) 推荐(0) 编辑
摘要: calendar.js --------------------------------------------------------------------------------<!--document.write("<div id=meizzCalendarLayer style='position: absolute; z-index: 9999; width: 144; height: 193; display: none'>");document.write("<iframe name=meizzCalenda 阅读全文
posted @ 2008-05-31 17:56 shine_panda 阅读(278) 评论(0) 推荐(0) 编辑
摘要: public class Test { public static void main(String[] args) { String str = new String( "1,2,3,4,5,6,7,8,9,11,13,14,1000,1001,1002,1003"); String[] s = str.split(","); int[] num = new int[s.length]; String result = ""; for (int i = 0; i < s.length; i++) { num[i] = Inte 阅读全文
posted @ 2008-05-31 14:11 shine_panda 阅读(534) 评论(0) 推荐(0) 编辑
摘要: Spring通过PropertyEdit(属性编辑器) 可以将字符串转换为真实类型。通过CustomEditorConfigurer ,ApplicationContext 可以很方便的支持自定义PropertyEdit。MyType.javapackage com.cao.spring.applicationContext;public class MyType {private String text;public MyType(String text){this.text = text;}public String getText(){return this.text;}}Depends 阅读全文
posted @ 2008-05-30 20:44 shine_panda 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 在Spring 中最核心的组件是bean工厂,它提供了基本的反向控制和依赖注入的能力。Spring 是一种无侵入性的框架,被bean工厂管理的组件无须知道spring的存在。bean工厂负责打造bean,并注射它们之间的依赖。这些bean会彼此协作。 spring中最基本的BeanFactory接口org.springframework.beans.factory.BeanFactory ,它提供一些工厂的基本方法。packageorg.springframework.beans.factory;importorg.springframework.beans.BeansFaException; 阅读全文
posted @ 2008-05-28 06:03 shine_panda 阅读(1112) 评论(0) 推荐(0) 编辑
摘要: <html><head><title></title></head><body><tableid="editTable"border="1"><tr><td>aaaaaaa</td><td>bbbbbbb</td><td>ccccccc</td></tr><tr><td>ddddddd</td><td>eeeeeee</td 阅读全文
posted @ 2008-05-27 11:49 shine_panda 阅读(8048) 评论(0) 推荐(0) 编辑
摘要: 使用Eclipse生成Hibernate 代码时候工具为我们生成了一个 HibernateSessionFactory 这样的类 来为我们提供获得Session的方法. 但是用这个类的时候我们发现一个问题. 看下面代码Sessionsession1=HibernateSessionFactory.getSession();Sessionsession2=HibernateSessionFactory.getSession();System.out.println(session1+"__"+session2);System.out.print(session1==sessi 阅读全文
posted @ 2008-05-24 06:00 shine_panda 阅读(2368) 评论(0) 推荐(0) 编辑