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) · C · C++ · C#

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) · SQL · Hibernate

jBPM 4 Maven Dependencies

org.jbpm.jbpm4 jbpm-api 4.3 org.jbpm.jbpm4 jbpm-jpdl 4.3 xerces xercesImpl 2.9.1 org.jbpm.jbpm4 jbpm-pvm 4.3 org.jbpm.jbpm4 jbpm-log 4.0 org.jbpm.jbpm4 jbpm-db 4.0 JBossRepo Jboss http://repository.jboss.com/maven2/

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

CXF Client

1.Create project with maven 2.add in pom.xml [code="xml"] org.apache.cxf cxf-rt-frontend-jaxws 2.2.4 org.apache.cxf cxf-rt-transports-http 2.2.4 [/code] and it in build section [code="xml"] org.apache.maven.plugins maven-compiler-plugin 2.0.2 1.5 1.5 [/code] 3.Copy the wsdl to src/main/resources/ws…

2009-10-27 18:18 · Java · 评论(0) · Apache · Spring · maven · XML

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. 1. Define the Spr…

2009-10-22 15:26 · 评论(0) · Spring · JPA · JBoss · Hibernate · Web

Spring, JPA, and JTA with Hibernate and JOTM

[url]http://erich.soomsam.net/2007/04/24/spring-jpa-and-jta-with-hibernate-and-jotm/[/url] 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 datas…

2009-10-20 10:04 · 评论(0) · Spring · JPA · XML · Hibernate · Access

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) · HTML · Java · .net · JBoss

how to deploy SSH WEB App to JBoss5 AS

1.Create DataSource in WEB-INF/, filename: mysql-ds.xml [code="xml"] MySqlDS jdbc:mysql://localhost/struts-tutorial?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=utf-8 com.mysql.jdbc.Driver root org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter mySQL [/code] 2. create WE…

2009-10-15 18:51 · 笔记 · 评论(0) · MySQL · JBoss · Hibernate · SSH · Web

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? [code="xml"] java:/MySQLDS [/…

2009-10-15 18:34 · 笔记 · 评论(0) · HTML · Java · XML · JBoss

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) · Spring · XML · JBoss · SVN · Web

SSH app deploy to JBoss5 AS

1. 部署时排除xml-apis-1.0.b2.jar, 这个包被dom4j依赖. 会导致struts2无法解析xml config. xml-apis xml-apis 1.0.b2 jar provided 2. exclude Hibernate.jar, 这个包被hibernate-commons-annotations 依赖.排除它. org.hibernate hibernate-commons-annotations 3.3.0.ga jar hibernate org.hibernate 3. pom.xml. e.g.: [code="xml"] 4.0.0 org.yy …

2009-10-13 18:46 · 笔记 · 评论(0) · maven · Struts · MySQL · Hibernate · SSH

C3P0连接池详细配置

3 30 1000 false Test false 100 null false 60 3 60 15 100 3 root password select id from test where id=1 300 false true root false con_test 30000 30 10 30 25 10 0 200 300 转自: http://msq.iteye.com/blog/60387

2009-09-15 12:07 · 评论(0) · Blog · JDBC · 多线程

设置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) · SQL Server · 数据结构 · SQL · MySQL · Linux

单词速记5

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

2009-08-26 11:53 · English · 评论(0) · BBS · UP · 笑话 · 阿里巴巴 · thread

ibatis3 Configuration

1.用maven 创建项目(俺 用netbeans). 2.在pom.xml添加和修改. dependencies: [code="xml"] org.apache.ibatis ibatis-sqlmap 3.0-beta-2 [/code] 增加一个plugin, 支持java5 [code="xml"] org.apache.maven.plugins maven-compiler-plugin 1.5 1.5 [/code] 3.在src\main\resources下创建sqlmapconfig.xml [code="c#"] [/code] 创建blog-hsqldb.prope…

2009-08-25 14:36 · 笔记 · 评论(1) · Apache · HSQLDB · maven · iBATIS · log4j