Wire Hibernate Transactions in Spring
本文主要探讨如何利用Spring来装配组件,包括其事务上下文。从J2EE应用程序内部连接到单个的数据库并不是什么难事。但是,如果要装配或者集成企业级的组件,情况就复杂了。一个组件可以有一个或多个支持它的数据库,因此,当装配两个或更多的组件时,我们希望能够保持在跨组件的多个数据库中进行的操作的原子性。J2EE服务器为这些组件提供了一个容器来保证事务原子性和跨组件独立性。如果使用的不是J2EE服务器,则可以利用Spring来帮助我们。Spring基于Inversion of Control(控制反转)模式(也称为依赖注入),它不仅可以连接组件服务,还可以连接关联的事务上下文。在本文中,我们将Hibernate用作对象/关系持久性存储和查询服务。
The 2nd most useful Java-Oracle Tool for 2006
The 2nd most useful Java-Oracle Tool that I’ve used this year is schema spy.
How often have you taken over a project without any documenation? Even worse , there is a database involved, and everybody just ‘knows’ (or pretends to know) where things are. What if all the orginal developers are gone and nobody is left to explain things? I can find my way around most legacy Java code , but databases leave me cold.
Still not convinced - take a look on the Schema Spy website. The level of information that this tool gives you takes you from knowing nothing about the database to knowing almost everything.
Interested in trying it out? Follow these simple steps
- Download it from http://schemaspy.sourceforge.net/
- Change the configuration to point to your database
- Install the Graphviz component (available here)
- Run the tool and await your fully documented database.
Just to shame the commercial competition , as well as Oracle , Schema Spy supports DB2, hsqldb , Microsoft SQL Server, MySQL, PostgreSQL and Sybase. It’s written by John Currier and is well worth a donation.
In case you’re wondering, the most useful Java-Oracle tool for 2006 is Oracle’s project raptor. Schema spy runs it a very close second. Considering that it’s a Billion dollar company Vs one man , I’d chalk that up as a victory for the little guy!
使用native2ascii进行本地码-至-ASCII 码互相转换
选项[-reverse]为反向转换
native2ascii -encoding GBK -reverse resources_zh_CN.properties resources_zh_CN.properties.source
native2ascii -encoding GBK resources_zh_CN.properties.source resources_zh_CN.properties
native2ascii -encoding UTF-8 -reverse resources_zh_CN.properties resources_zh_CN.properties.source
native2ascii -encoding UTF-8 resources_zh_CN.properties.source resources_zh_CN.properties
