`
semi_sleep
  • 浏览: 101500 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论
文章列表
1.transaction [done]2.cache3.session operations4.class mapping5.hql6.filter, interceptor, statistic, session context
1.Three code styles Use hibernate's transaction: session.beginTransaction(); // ... interact with database session.getTransaction().commit(); Use JTA: javax.transaction.UserTransaction tx = new InitialContext().lookup("javax.transaction.UserTransaction"); // ... use session to interact ...
下载mysql 5.1 和 gui tool,安装,之后用gui tool连接,一切非常顺利。   下载mysql-connector-java-5.1,按照里面的pdf文档所写的配置,顺利连上db: Class.forName("com.mysql.jdbc.Driver").newInstance(); // 据文档上描述,newInstance()是为了work arround some errors DriverManager.getConnection("jdbc:mysql://localhost/test", "root" ...
方法是放一个text field覆盖在drop down list上,使用javascript,当text field的值改变时改变drop down list的选项,反之drop down list选择改变时更新text field的值。
1. When automatic versioning is used, hibernate generates the following sql: update products set version=?, name=?, description=?, unitCost=?, pubTime=? where id=? and version=? Note that using such sql, you don't need to select the version from database to compare with current version. 2. Other way ...
启动hsqldb: cd ..\data //数据库文件会放到这个目录,如果不存在hsqldb会自动创建java -cp ../lib/hsqldb.jar org.hsqldb.Server -database.0 file:mydb -dbname.0 xdb //-database.0 file:mydb 数据库文件的名字,-dbname.0 xdb 数据库的名称 连接到hsqldb: Class.forName("org.hsqldb.jdbcDriver");

Summary for JTA

    博客分类:
  • Java
JTA is useful not only for different database, but also for different connection to the same database.   Transaction manager manage Transaction by begin / suspend / getTransaction / setTransactionTimeout, its other methods just delegate to Transaction   Transaction then delegate call to each XAResour ...
1 Overview XML Schema mainly defines reference and datatype, reference can be <element> or <attribute>, and both will refer to a certain datatype. Datatype may in turn contains references (<attribute for <complexType> and <element> for <complexContent>). 1.1 Differ ...
2009年1月4日,房贷商业贷款利率8.5折酝酿变7折,加上去年9月份以来连续5次降息,对于优质房贷客户而言,今年起5年以上住房商业贷款最优惠利率可由去年的6.6555%下调为4.158%。5年以上个人住房公积金贷款利率仍为3.87%。 2009-01-06 ...
1.<unique> acts much like <key> except that <unique> allow value to be null, both require values to be unique with specific scope (under the element which <unique> or <key> is defined). <keyref> can refer to <unique> or <key>, it dose not aware to any s ...
1.About <choice>, <sequence>, <all> and <group>, also about "max/min occurs". What and why <all> special? There are also <element> and <any>. 2.About namespace. The "namesapce" attribute in <any> and <anyAttribute>. 3.For &l ...
1.The xml schema type system: (contains attribute?)   - SimpleType   - ComplexType (contains element?)     - SimpleContent     - ComplexContent (can be mixed with character?)       - Element Only       - Mixed For those "Y", unless otherwise explained, they should be derived from the same ...
There are two ways to change the default locale. The first is to set it on the command line: > java -Duser.language=2-char-language-code -Duser.region=2-char-country-code MyApp // Set only language code > java -Duser.language=en -Duser.region= MyApp // Set language and country code > java ...
1.The anySimpleType are quite special as all primitive type is considered as derived by restriction from anySimpleType, but they are call "primitive" (normally, primitive types don't derive from other). The anySimpleType is the base type for anySimpleType, also for those complex types, note ...
1.A datatype is composed of a value space, a lexical space and facets. there's a one2many relationship between value space and lexical space. It's said that facet define aspect of a value space, but can't it be lexical space? Also, what's Fundamental facets and Constraining or Non-fundamental facets? ...
Global site tag (gtag.js) - Google Analytics