- 博客(30)
- 资源 (2)
- 收藏
- 关注
原创 关于@Transactional(propagation=Propagation.REQUIRES_NEW)不回滚
我写了public class DefaultFooService implements FooService {@Transactional(propagation=Propagation.REQUIRED) getFoo("a", "a"); throw new UnsupportedOperationException(); }@Transactional(prop
2013-05-31 11:05:57 4388
原创 beans.xml Caused by: org.xml.sax.SAXParseException不允许有匹配 "[xX][mM][lL]" 的处理指
beans,xml 出现org.xml.sax.SAXParseException不允许有匹配 "[xX][mM][lL]" 的处理指异常查出应该去掉上面的注释,改成
2013-05-30 15:36:58 1728
原创 jquery获得checkbox是否选中的状态
Concerning boolean attributes, consider a DOM element defined by the HTML markup, and assume it is in a JavaScript variable namedelem:elem.checkedtrue (Boolean) Will change with checkbox
2013-05-30 09:53:36 1472
原创 Caused by: org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection t
今天配置spring的是一直出现错误 Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySessionFactory' defined in URL [file:/D:/Project/.metadata/.plugins/org.ecli
2013-05-29 20:38:48 1677
转载 JDBC CallableStatement Stored Procedure OUT parameter example
For stored procedure returns OUT parameters, it must beRegistered via JDBC CallableStatement.registerOutParameter(index,sqlType).Get it back via CallableStatement.getDataType(index).See code sni
2013-05-29 16:18:17 1216
转载 How to get the HttpServletRequest in Struts 2
In Struts 2 , you can use the following two methods to get the HttpServletRequest object.1. ServletActionContextGet the HttpServletRequest object directly from org.apache.struts2.ServletActionCont
2013-05-29 11:33:59 506
转载 JDBC Transaction example
JDBC Transaction let you control how and when a transaction should commit into database.//transaction block start //SQL insert statement//SQL update statement //SQL delete statement //tran
2013-05-27 09:46:42 691
转载 HowTo configure the C3P0 connection pool
ConfigurationHere is a sample of C3P0 configuration. This is an extract of hibernate.cfg.xml: 1 100 100 0 10 100 --> You also can set extra c3p0 properties using c3p0.properties. Put t
2013-05-25 14:07:29 520
转载 什么是SQL绑定变量,如何实现绑定变量?
1. 认识绑定变量:绑定变量是为了减少解析的,比如你有个语句这样select aaa,bbb from ccc where ddd=eee;如果经常通过改变eee这个谓词赋值来查询,像如下select aaa,bbb from ccc where ddd=fff;select aaa,bbb from ccc where ddd=ggg;select aaa,bbb from
2013-05-18 12:02:53 1146
原创 2013.5.15 面试经历
开始找工作了,面试了几家了,但是总是让等通知,然后就没信儿了,,搞得我现在没有什么动力了,,,唉。。。当初学java也考虑到了工作不好找,但是没想到还是这么不好找,。。。 现在我有点乱了。。。因为一天一天这么过去,到底什么时候能够找到工作呢?有好几次都是聊得挺好,但是又都没有信,总感觉是敷衍我啊。。。 现在公司不怎么爱找新手了,一般都是能直接干活。。。我该怎么办。。。
2013-05-15 21:43:54 487
转载 Understanding Caching in Hibernate – Part Three : The Second Level Cache
In the last posts I already covered the session cache as well as the query cache. In this post I will focus on the second-level cache. The Hibernate Documentation provides a good entry point rea
2013-05-09 16:21:57 702
转载 Understanding Caching in Hibernate – Part One : The Session Cache
Hibernateoffers caching functionality which is designed to reduces the amount of necessary database access. This is a very powerful feature if used correctly. However I have seen a lot of cases and
2013-05-09 16:20:04 618
转载 Understanding Caching in Hibernate – Part Two : The Query Cache
In the last post I wrote on caching in Hibernate in general as well as on the behavior of the session cache. In this post we will have a closer look at theQueryCache. I will not explain the qu
2013-05-09 16:17:42 649
原创 Java EE中的Web项目的目录文件结构
project ----src ----package(各种包类) ----beans.xml ----hibernate.cfg.xml ----log4j.properties ----struts.xml ----WebContent
2013-05-09 12:33:42 1961
转载 分配给单链表的内存储单元地址必须是连续的吗
单链表中结点值与指针在内存中是连续的吗对于同一个结点,值与指针是一块分配的,是连续的。不同结点的内存地址可能相邻也可能跳跃。转自:http://zhidao.baidu.com/question/508898073.html分配给单链表内存单元地址必须是连续的,转自:http://wenku.baidu.com/view/cec105d6b9f3f90f76c61bc1.html
2013-05-09 11:10:45 10882
转载 servlet,filter,listener
Filtering Requests and ResponsesA filter is an object that can transform the header and content (orboth) of a request or response. Filters differ from web components in thatfilters usually do not th
2013-05-09 10:59:14 429
转载 stack and heap
2.5.2. Java Virtual Machine Stacks Each Java Virtual Machine thread has a privateJava Virtual Machine stack, created at the same time as the thread.A Java Virtual Machine stack stores frames (§2
2013-05-09 10:25:17 691
转载 com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost/SQLEXPR
Try running some Java code to test it. Replace {computer-name}\SQLEXPRESS with the domain that you see in the root node of SQL Server Management Studio. When installing SQL Express, you had the option
2013-05-08 14:06:05 2883
转载 SQLserver 通过端口 1433 连接到主机 localhost 的 TCP/IP 连接失败。错误:“Connecti...
最近要学数据库, 老师用的是microsoft sqlserver 2005, 我是学java的, 一直都 JDBC来连oracle数据库的,这次我装了 microsoft sqlserver 2005,想用 JDBC 来连 microsoft sqlserver 2005, 没想出了这样的问题:com.microsoft.sqlserver.jdbc.SQLServerException:
2013-05-08 13:03:31 1730
转载 Server Management Studio报错“请验证实例名称是否正确并且SQL Server已配置为允许远程连接”
在菜单中查看下面找已注册的服务器,点击之后就能看到各种服务器引擎,找到本地服务器组,然后右击创建本地服务器,然后在出来的窗口中把那个名字填成:你的计算机名\实例名(比如我的就是:CAPTAIN-PC\SQLEXPRESS)名字对了就Ok了转自:http://zhidao.baidu.com/question/418313157.html
2013-05-08 10:21:04 1553
原创 Request Encoding ,Page Encoding,Response Encoding 以及中文乱码的原因
首先先把文档给大家贴过来,Request EncodingThe request encoding is the character encoding in which parameters in an incoming request are interpreted. Currently, many browsers do not send a request encodin
2013-05-07 23:09:01 1097
转载 Java线程安全系列(1)--Servlet线程安全
刚才search的时候,竟然发现一篇我很熟悉的文章。仔细一看,哇,竟然是我很早以前写的一篇,被人匿名转载。我现在就干脆再转到我的blog大本营上吧,我觉得对Java新手还是有帮助(原文没有做任何更改,可能有bug,呵呵)。我很久以前的blog(http://chenzhiwu.spaces.live.com/),感觉发布技术文章特不方便,干脆就不用它了。概述在探讨java线程安
2013-05-06 21:06:14 545
转载 SP2-0110: Cannot create save file "afiedt.buf"
We get this error message because we don't have write permission on the current directory. Either start sqlplus from a different directory, or change the editfile entry in sqlplus:SQL>set editfile
2013-05-05 08:12:05 2038
转载 ORA-01109: 数据库未打开 ORA-01034&ORA-27101错误
今天用系统清理工具把系统垃圾清理了一番,结果在打开oracle 数据库时出现了错误:SQL>connect / as sysdba; 已连接。 SQL> shutdown immediate; ORA-01109: 数据库未打开 已经卸载数据库。 ORACLE 例程已经关闭。 SQL> startup; ORACLE 例程已经启动。 Tota
2013-05-04 10:24:58 998
转载 When to use comparable and comparator interfaces in java
You must have been came across the situation where you have to sort a collection of objects by a certain rule. And if you are working on a domain where people are your main entities, you will encounte
2013-05-03 13:22:20 755
原创 Nested Classes嵌套类
The Java programming language allows you to define a class within another class. Such a class is called anested class and is illustrated here:class OuterClass { ... class NestedClass {
2013-05-03 11:03:39 775
转载 Performance considerations for keySet() and entrySet() of Map
First of all, this depends entirely on which type of Map you're using. But since the JavaRanch thread talks about HashMap, I'll assume that that's the implementation you're referring to. And lets assu
2013-05-02 09:54:12 541
转载 Interview stuff about String class in java
All of us must have gone though some common questions related to String class in java. These questions range from immutability to memory leak issues. I will try to cover such questions in this pos
2013-05-01 14:39:52 514
转载 Working with hashCode and equals methods in java
In this post, i will point out my understanding about hashCode() and equals() method. I will talk about their default implementation and how to correctly override them. I will also write about impleme
2013-05-01 13:57:11 593
转载 How hashmap works in java
Most of you will agree that HashMap is most favorite topic for discussion in interviews now-a-days. I have gone through several discussions with my colleagues time to time and it really helped. Now,
2013-05-01 11:27:33 530
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人