ITeye博客

winyee的博客

winyee · 共 17 篇文章

Fastest C# Case Insenstive String Replace

private static string ReplaceEx(string original, string pattern, string replacement) { int count, position0, position1; count = position0 = position1 = 0; string upperString = original.ToUpper(); string upperPattern = pattern.ToUpper(); int inc = (original.Length/pattern.Length) * (replacement.Leng…

2010-06-06 11:15 · Java · 评论(0)

Hibernate

User <-> Address: Address是User的子对象。OneToOne is set on address field in User entity. case 1. 没有设置CascadeType, only persist User: -> TransientException will be thrown, it said there are transient object. case 2. CascadeType is not set, persist User, persist Address -> successful. sql: 1.intert user; …

2010-01-24 16:27 · 评论(0)

jBPM 4 Maven Dependencies

<dependency> <groupId>org.jbpm.jbpm4</groupId> <artifactId>jbpm-pvm</artifactId> <version>4.3</version> </dependency> <dependency> <groupId>org.jbpm.jbpm4</groupId> <artifactId>jbpm-log</artifactId> <version>4.0</version> </dependency> <dependency> <groupId>org.jbpm.jbpm4</groupId> <artifactId>jbpm…

2010-01-18 23:49 · 评论(4)

CXF Client

1.Create project with maven 2.add in pom.xml <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>2.2.4</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http</artifactId> <version>2.2.4</version> <…

2009-10-27 18:18 · Java · 评论(0)

Configuring a JBoss + Spring + JPA (Hibernate) + JTA web application

Configuring a JBoss + Spring + JPA (Hibernate) + JTA web application http://www.swview.org/node/214 Here's how one might go about deploying a Spring application in JBoss (4.something) that uses JPA with Hibernate as the provider for persistence and JTA for transaction demarcation. Define the Spring…

2009-10-22 15:26 · 评论(0)

Spring, JPA, and JTA with Hibernate and JOTM

http://erich.soomsam.net/2007/04/24/spring-jpa-and-jta-with-hibernate-and-jotm/ have been struggling for a couple of hours today to modify a Spring JPA configuration with a single datasource, Hibernate as the JPA provider and the JpaTransactionManager to a configuration with two XA datasources, Hib…

2009-10-20 10:04 · 评论(0)

JBoss Class Loader Ref

http://www.blogjava.net/agapple/archive/2008/10/23/236142.html http://www.diybl.com/course/3_program/java/javajs/20090213/155337.html http://www.jboss.org/community/wiki/ClassLoadingconfiguration

2009-10-15 22:35 · 笔记 · 评论(0)

how to deploy SSH WEB App to JBoss5 AS

1.Create DataSource in WEB-INF/, filename: mysql-ds.xml <?xml version="1.0" encoding="UTF-8"?> <!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource --> <!-- $Id: mysql-ds.xml 88948 2009-05-15 14:09:08Z jesper.pedersen $ --> <!-- Datasource config for My…

2009-10-15 18:51 · 笔记 · 评论(0)

How to deploy the Persistence unit in the global JNDI ?

jboss recipe of the day By default the persistence unit are available in the java: Context. If you wish to make them available also in the global naming Context you have to add two properties to your persistence.xml configuration file: view plaincopy to clipboardprint? <persistence> <persistence-un…

2009-10-15 18:34 · 笔记 · 评论(0)

integrate spring and jboss

无法在jboss5.1as下使用 需要另外扩展applcationcontext. https://anonsvn.jboss.org/repos/jbossas/projects/spring-int/trunk/ http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/ http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4213444 https://jira.jboss.org/jira/browse/SNOWDROP-4…

2009-10-15 14:51 · 笔记 · 评论(0)

SSH app deploy to JBoss5 AS

部署时排除xml-apis-1.0.b2.jar, 这个包被dom4j依赖. 会导致struts2无法解析xml config. <dependency> <groupId>xml-apis</groupId> <artifactId>xml-apis</artifactId> <version>1.0.b2</version> <type>jar</type> <scope>provided</scope> </dependency> exclude Hibernate.jar, 这个包被hibernate-commons-annotations 依赖.排除它. org.hibernate…

2009-10-13 18:46 · 笔记 · 评论(0)

C3P0连接池详细配置

30 1000 false Test false 100 null false 60 3 60 15

2009-09-15 12:07 · 评论(0)

设置MySQL数据库同步-mysql双机热备资料集锦

摘要:mysql从3.23.15版本以后提供数据库复制功能,而以前,数据库双机热备还仅是大型数据库的专利,利用该功能可以实现两个数据库同步,主从模式,互相备份模式的功能。 MYSQL5.0双机热备 原文网址:http://blog.csdn.net/lgjlry/archive/2007/12/01/1910094.aspx 近日研究mysql 5.0.* Replication.费了好大劲终于搞明白了,拿出来和大家一起分享.(假设你已经在linux系统上面安装了mysql5.0.* 并且熟悉基本的linux命令.我的系统为Fedora Core 7,mysql为5.0.37).搭建一个my…

2009-09-13 20:27 · 评论(0)

单词速记5

白领恶梦 1.背口诀记单词 辞职不编software(软件) * 很多时间spare(剩余的) 把钓具来prepare(准备) 坐船忘带fare(船费) 引起一场warfare(交战) * 被扔河里是nightmare(恶梦) * 2.识音标,记单词 software n.软件application software(应用软件),软设备,语言设备,程序系统。 spare adj.多余的, 空闲的,瘦的, 贫乏的, 备用的;v.节约, 吝惜,宽恕, 抽出,出让,免除;n.节省,备用之物; spare no efforts(不遗余力),spare oneself(怕吃苦,偷懒,不努力)。 pre…

2009-08-26 11:53 · English · 评论(0)

ibatis3 Configuration

1.用maven 创建项目(俺 用netbeans). 2.在pom.xml添加和修改. dependencies: <dependencies> <dependency> <groupId>org.apache.ibatis</groupId> <artifactId>ibatis-sqlmap</artifactId> <version>3.0-beta-2</version> </dependency> <!-- others --> </dependencies> 增加一个plugin, 支持java5 <build> <plugins> <plugin> <groupId>org.…

2009-08-25 14:36 · 笔记 · 评论(1)