ITeye博客

而立未立

rockie.yung · 共 37 篇文章

Spring Batch 2. 行话

每一个行业都有自己的行话,SpringBatch也不例外。 Job 一个Job是用于封装一整个批处理的实体。和其它Spring项目一样,一个Job和一个XML配置文件相连。这个文件可能叫任务配置。无论如何,Job是整个层次结构的顶点。 一个Job就是一系列Step的容器。Job可以定义一些属性,如是否可以重新执行。Step会使用Job定义的属性。 Job的定义包含下面几个部分 • 一个简单的名字 • 一系列步骤 • 是否支持重新执行 SpringBatch提供一个基本的实现SimpleJob。可以用下面方式配置一个Job <job id="footballJob"> <step id="pl…

2009-11-27 11:04 · 评论(0)

Spring Batch 1. 介绍

本想翻译一下的,试了一下前几段,实在是太难了,自己能看懂和翻译出来绝对不是同一个等级的。还是把文档中间认为比较有用的部分整理一下,部分使用翻译,部分是自己理解。 SpringBatch是一个批处理的框架。 SpringBatch可以应用于下面业务场景 • 周期性的提交批处理 • 把一个任务并行处理 • 消息驱动 应用分级 处理 • 大规模并行批处理 • 手动或调度使任务失败之后重新启动 • 有依赖步骤的顺序执行(使用工作流驱动扩展) • 处理时跳过部分记录 • 成批事务:为小批量的或有的存储过程/脚本的场景使用 SpringBatch的技术目标有以下几点 • 开发者使用Spring编程模型,…

2009-11-26 16:42 · 评论(0)

写一个最简单的JCA

JCA简介 JCA是Java Connection Architecture的缩写。它是Sun提出的一个标准,用于为连接外部系统定义一个规范。JCA标准定义非常宽泛,几乎泛泛的说了所有东西,但是并没有任何实现。所有JCA更像是一个元标准,具体怎么样需要看Application Server如何实现,也要看JCA提供者如何实现。 一个JCA可以实现的比较简单,也可以实现的比较复杂,但它不可能实现的非常简单。我自己玩了一下,实现一个比较简单的JCA。这只是JCA标准的其中一种用法,还有很多用法。下面只以这种用法来说明,可能和其它用法不是特别一致。 一个比较简单的JCA 只用到3个基本东西,Con…

2009-11-10 16:32 · 评论(0)

我玩Debian

老早就想玩Linux, 只是以前Linux不是很好用, 而且虚拟机也不行. 这段时间有点空, 打算玩一下. 听说Debian还是不错的, 就选他了. 安装Debian 从网上下载了一个网络安装Debian5的iso, 在Windows上装了个VMPlayer. 安装Debian过程一路顺风, 安装完了之后网络也可以在Host和Guest之间访问. VMWare的屏使用不太方便, ssh是必须用的, 安装完之后第一步就是装一个openssh-server, 安装openssh-server只能在VMWare的窗口内安装, 以后就一直可以使用putty来访问了. 可以使用aptitude界面安装…

2009-10-10 09:32 · 评论(0)

从美的脱排安装想到的我们的民族品牌

美的算是一个我以前比较喜欢的牌子。家中有多件美的的东西,像电磁炉、电饭煲。两个月前家里开始装修。脱排本来打算买 Electrolux,后来经不住推销员的磨,加上对美的还比较有好感,就买了美的脱排两件套,抽油烟机和煤气灶。 上周打电话让美的服务人员上门安装。煤气灶顺利安装上。安装抽油烟机的时候发现橱柜中间没有留足够的宽度,抽油烟机宽度 895mm(平常他们应该留 910mm),给我只留了 890mm的宽度。煤气灶安装不给打硅胶,大概美的认为这不是他们的职责或者安装人员偷懒; 煤气灶需要两节 0号还是 1号电池,美的没有附送,安装时也没有有偿提供选项。也就是说即使安装了还是不能用。请美的的人可以…

2009-08-18 07:29 · 评论(1)

Maven 多项目依赖关系

Maven提供了多种依赖关系,这些依赖关系使用起来非常容易出错。这几天看到我们产品项目间的依赖关系使用相当混乱,所以花了几天时间研究了一把。 Maven提供多种项目依赖关系。 compile:这是缺省的依赖关系。不要被它的名字给迷惑了,它并不表示编译时依赖,而是所有都依赖。 provided:如果该库应用服务器提供了,就使用它。 test:只在单元测试使用。 还有其它几种,我觉得并不重要。 如果一个项目打包为Jar。那么根本不存在应用服务器这种情况,直接用缺省依赖关系compile即可。当然如果想更精细控制,向junit,hsqldb,mock这样的库一般可以作为test。 如果一个项目打包…

2009-02-16 05:24 · 评论(1)

完美主义

人或多或少都有些完美主义。完美主义又可分为两种,要求他人完美和要求自己完美。大部分人都是要求他人完美多于要求自己完美。 老爸在老家盖了一栋房子。前几天回家过年,看到房子总感觉不爽。窗户太多,家具就不太好放。楼层太高,买不到这么长的窗帘,换个灯泡还得用梯子。阁楼楼梯太矮,上去的时候的弯腰。有时候没有自来水。 作为程序员,经常碰到需要维护他人的代码。经常抱怨别人的代码写的差,写得复杂,写得难懂。 自己写的代码也会被他人维护 。 也经常被别人骂,那写的是啥吗,当然自己是听不到的。 有时在想,为什么很多小国家有很多了不起的公司,能出来很多了不起的产品。而中国诺大一个国家,却并没有多少。这段时间在瑞典…

2009-02-12 05:22 · 评论(0)

Software Architecture Design Thinking

Balancing between flexibility and simplicity is the most important part for design architecture. Technical managers always want most flexible software. Everything should be configurable. Configurable and implicit rules are twin. Software would be very difficult to maintain if there were lots of imp…

2009-01-19 00:16 · 评论(0)

Implement Hash table

I went to German in XMas holidays. So the feature did not finished until tonight. I was shocked by hash algorithm again when I was implemented it. It is very simple and unbelivable powerful. I got some code from internet when I was implementing it. Some numbers was attracting me. one is 31 when cal…

2009-01-04 07:48 · SimpleJVM · 评论(0)

refactor reference types

refactor implementation for reference types to make it compatible with super types.

2008-12-20 05:44 · SimpleJVM · 评论(0)

JDK library usage analyze.

I analyzed some jar files. I want know how much they using JDK. The jar files totally is 200M which contain quite lot of jars, like jboss, glassfish, spring, junit, apache. Jar files analyzed, statistics information for class level, statistics information for method and field level are attached in …

2008-12-17 04:19 · SimpleJVM · 评论(0)

Dec, Improve GC

Garbage collecting for reference create by new instructions need to be released. The information need be record down when invoking a method. How many memory need for store the information was just hard-coded for a specific number. It was somehow will waste memory. implement the count feature refere…

2008-12-17 02:57 · SimpleJVM · 评论(0)

Dec 16, field access for multiple layers class

Implement field access for multiple layers class. public class TestFieldClassBase { int instanceBase; static float staticBase; } public class TestFieldClassDerived extends TestFieldClassBase { int instanceDerived; static float staticDerived; public static void main(String[] args) { testInstanceFiel…

2008-12-16 07:01 · SimpleJVM · 评论(0)

Library Usage Analyzer

Since I am writing a simple JVM. Most part of JVM work is implement libraries. But it is impossible for me to implement all classes specified in JDK. So I need analyze which classes in JDK are most popular, and which methods and fields are most popular. So I implemented an Library Usage tool to ana…

2008-12-14 16:50 · SimpleJVM · 评论(0)

String performance test

I found string plus using StringBuffer but not StringBuilder when I was implementing my simple JVM. So I wrote some test case to test it. But it became using StringBuilder but not StringBuffer. So I guess whether use StringBuffer or StringBuilder is depend on compiler option. Any way I got a perfor…

2008-12-14 16:05 · SimpleJVM · 评论(0)