`
qqdwll
  • 浏览: 131375 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论
文章列表
原文 http://www.ibm.com/developerworks/xml/library/x-javaxmlvalidapi.html Validation is a powerful tool. It enables you to quickly check that input is roughly in the form you expect and quickly reject any document that is too far away from what your process can handle. If there's a problem with the da ...
自从J2EE出现以来,就大大简化了在Java下的企业级开发。但是随着J2EE越来越普遍地被应用到各个领域中,开发者们渐渐意识到需要一种方法来标准化应用程序的开发过程,他们采用的方法是标准化应用程序的结构层。在结构层通 ...
Java ClassLoader机制 当JVM(Java虚拟机)启动时,会形成由三个类加载器组成的初始类加载器层次结构:        bootstrap classloader                 |        extension classloader                 |        system classloa ...
看了很多。 觉得这篇文章解释的准确。 其他的贴子好像有误解。 看原帖, 请去 http://www.iteye.com/topic/103804。 本人比较懒, 怕以后找不到就转了。 首先,ThreadLocal 不是用来解决共享对象的多线程访问问题的,一般情况下,通过ThreadLocal.set() 到线程中的对象是该线程自己使用的对象,其他线程是不需要访问的,也访问不到的。各个线程中访问的是不同的对象。 另外,说ThreadLocal使得各线程能够保持各自独立的一个对象,并不是通过ThreadLocal.set()来实现的,而是通过每个线程中的new 对象 的操作来创建的对象,每个 ...
  Java 的 Serialazable 虽然只要要在类上加个申明, 类就可以被Serializable了。 但其实, 它并不是想象中的这么简单。 他会有很多的问题, 这是应为object被Serialaized 之后,可以认为是输出的API了。  那么, 对这个类的修改, 就会产生很多问题。 比如, 删除某些fields, 都可能导致deserializing失败。 下面给出一些系列化要注意的地方。 1.  Serial version UIDs. Every serializable class has a unique identification number associated ...
1.  可以在服务实现中利用 Spring DAO API。Spring DAO 实现了著名的 DAO 设计模式(请参阅 参考资料)。在这个模式中,DAO 提供了一致的数据访问外观。通过传输对象执行数据提取和修改。DAO 封装了实际的数据源,并提供了操作传输对象的方法。 从架构上说,DAO API 隐藏了操作实际数据持久性 API 调用的复杂性。(除了 JPA 之外,Spring 还支持其他 ORM 技术,例如 JDO、Hibernate、iBATIS SQL Maps 和 Apache OJB。)。使用 Spring 的 DAO,可以编写能够轻松适应这些持久性 API 的数据访问代码。 除 ...
1. 可以利用 nio 的 FileChannel 锁。 但它的实现是建立在操作系统之上的。 也就是不能垮平台。 下面是网上流行的一段代码: import java.io.*; import java.nio.channels.*; public class LockFile {   public LockFile() {   }   public static void main(String[] args) throws Exception {     RandomAccessFile raf = new RandomAccessFile(new File(&quo ...
首先, 让我们先了解下DriverManager. 管理一组 JDBC 驱动程序的基本服务。 注:DataSource 接口是 JDBC 2.0 API 中的新增内容,它提供了连接到数据源的另一种方法。使用 DataSource 对象是连接到数据源的首选方法。 作为初始化的一部分,DriverManager 类会尝试加载在 "jdbc.drivers" 系统属性中引用的驱动程序类。这允许用户定制由他们的应用程序使用的 JDBC Driver。例如,在 ~/.hotjava/properties 文件中,用户可以指定: jdbc.drivers=foo.bah.Dr ...
http://www.ibm.com/developerworks/cn/java/j-jndi/ 掌握 J2EE 是件令人生畏的事,因为它包含的技术和缩略语在不断地增长。Java 命名和目录接口(Java Naming and Directory Interface,JNDI)从一开始就一直是 Java 2 平台企业版(JEE)的核心,但是 J2EE 开发新手经常用不好它。本文将消除 JNDI 在 J2EE 应用程序中所扮演角色的神秘性,并展示它如何帮助应用程序从部署细节中解脱出来。 虽然 J2EE 平台提高了普通企业开发人员的生活水平,但是这种提高是以不得不学习许多规范和技术为代价的,这 ...
http://www.ibm.com/developerworks/cn/java/wa-spring2/index.html Naveen Balani 继续他的 Spring 系列,介绍把 Hibernate 事务与 Spring 面向方面编程(AOP)集成的知识。结果是一个可以依靠的持久性框架。 在这个系列的 前一期中,我介绍了 Spring 框架 ...
http://www.ibm.com/developerworks/cn/java/wa-spring1/ 原作者: Naveen Balani (naveenbalani@rediffmail.com), 技术架构师, Webify Solutions 在这由三部分组成的介绍 Spring 框架的系列文章的第一期中,将开始学习如何用 Spring 技术构建轻量级的、强壮的 J2EE 应用程序。developerWorks 的定期投稿人 Naveen Balani 通过介绍 Spring 框架开始了他由三部分组成的 Spring 系列,其中还将介绍 Spring 面向方面的编程(AOP)和控制 ...
原本来自: http://www.ibm.com/developerworks/java/library/j-5things2.html 1. Collections trump arrays Developers new to Java technology may not know that arrays were originally included in the language to head-off performance criticism from C++ developers back in the early 1990s. Well, we've come a long ...
原文来自: http://www.ibm.com/developerworks/java/library/j-5things3.html The Collections classes in java.util were designed to help, namely by replacing arrays and, thus, improving Java performance. As you learned in the previous article, they're also malleable, willing to be customized and extended in ...
转载: http://www.javamex.com/tutorials/threads/ThreadPoolExecutor.shtml   /**      * Creates a new <tt>ThreadPoolExecutor</tt> with the given initial      * parameters and default rejected execution handler.      *      * @param corePoolSize the number of threads to keep in the      * pool ...
原文地址: http://www.eclipsezone.com/eclipse/forums/t61566.html In my time helping people with their Eclipse installs I have seen time after time situations where a crash of Eclipse, the VM or the computer or even just long months of development have started to wear down the stability of the workspace w ...
Global site tag (gtag.js) - Google Analytics