`
cywhoyi
  • 浏览: 421245 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论
文章列表
模仿一般数据库连接池的配置,看了BoneCP的源代码实现,里面关于BoneCPConfig类的实现,采用了ThreadPoolExecutor的实现方式,然后就想到采用spring的注入方式,ThreadPoolExecutor在异步处理方面做得相当好。 那么接下来看下实现方式! stpe1: spirng.xml <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...
TC SERVER是一个spring组织改装过的tomcat,提供的开发版里面支持程序的性能分析, 最直接的一个功能是能以图形的方式显示出一个请求里面每个 方法及SQL所耗费的时间, 这对调优程序有较大的帮助,各位可以在本机进行程序调试时使用。 vFabric tc Server 是构建和运行 Java Spring 应用程序的最佳平台,为企业用户提供所需的轻量级服务器,满足其操作管理、高级诊断和关键任务支持功能等业务需求。 作为 Apache Tomcat 的替换产品,vFabric tc Server 可以确保已针对 Tomcat 进行认证的现有自定义构建应用程序和商业软件应用程序 ...
 因公司的有些项目采用hibernate的ORM框架,并且遗留下来的数据越来越多,势必需要备份或者分表,hibernate本身不支持对于分库分表的共享操作,google公司开源一个共享组件,地址:https://github.com/hibernate/hibernate-shards 现有公司的方式,采用同库水平分表的方式,那采用的分表条件是时间+其它条件,主要按时间维度进行分表,那么同样tb_user表,变为tb_user2012、tb_user2013... import org.hibernate.EmptyInterceptor; import org.hibernate.S ...
Servlets are the main component for handling server side logic in Java and the new3.0 specification introduces some very interesting features with asynchronous processsing being one of the most important. Async processing can be leveraged in order to develop highly scalable web applications. Web 2.0 ...
Some time ago a user of Java-monitor, the forum of our JCG partner, Kees Jan, spotted that his system was forcing a large number of full Garbage Collections despite the fact that the overall memory utilization was low. A rough estimation for the cause of the problem suggested a potential call to Sys ...
Sometimes Vector is better; sometimes ArrayList is better; sometimes you don't want to use either. I hope you weren't looking for an easy answer because the answer depends upon what you are doing. There are four factors to consider: API Synchronization Data growth Usage patterns Let's explo ...
Here we are going to discuss the concepts of Heap and Stack in Java.First and foremost thing to remember about the stack and heap is that they are generic terms for ways in which memory is allocated. They can be implemented in different ways.
If you have ever asked yourself questions like these:– “How do I invoke a method, having only it’s name in a String?”- “How do I list all the attributes in a class dynamically?”- “How do I write a method that resets the state of any given object to default values?” Then you have probably already he ...
Software testing aims at checking the correctness of a program. But how can you check the correctness of your tests? Quis custodiet ipsos custodes? Mutation analysis can help you evaluate the quality of a test suite. The basic principle of mutation analysis is to insert faults into a program, then ...
 Terrocotta - 基于JVM的Java应用集群解决方案前言越来越多的企业关键应用都必须采用集群技术,实现负载均衡(Load Balancing)、容错(Fault Tolerance)和灾难恢复(Failover)。以达到系统可用性(High Availability)和可伸缩性(Scalability)的要求。关于J2EE集群技术的基本原理和常用实现方式,TheServerSide.com有一篇经典的文章:http://www.theserverside.com/tt/articles/article.tss?l=J2EEClusteringCSDN上,陶建风先生在他的博客中也作了 ...
n Java world,  JSON is becoming de facto standard for data exchange format over XML because of its ease of use and efficiency in terms of transferring it. If you don’t know about JSON, it is Javascript object notation, a text based data exchange format which is collection of name-value where name ...
HashSet and HashMap in JavaHashSet vs HashMap is a classical Java Collection interview question which focuses on What are 
During interviews, you can face this question differently, if you are giving telephonic round than it's mostly fact based i.e. you need to mention key points about both interfaces, while in face to face interviews or during written test, you might be ask to write code to sort objects using Comparator ...
We know that Queue follows First-In-First-Out model but sometimes we need to process the objects in the queue based on the priority. For example, let’s say we have an application that generates stocks reports for daily trading session and it processes a lot of data and takes time to process it. So ...
Java 5 introduced Thread pool in Java in form of Executor framework, which allows Java programmer to decouple submission of task to execution of task. If you are doing server side programming in Java than Thread pool is an important concept to maintain scalability, robustness and stability of syste ...
Global site tag (gtag.js) - Google Analytics