天天看点

JavaPersistenceWithHibernate第二版笔记Getting started with ORM-001用JPA和Hibernate实现HellowWorld(JTA、Bitronix)

一、结构

JavaPersistenceWithHibernate第二版笔记Getting started with ORM-001用JPA和Hibernate实现HellowWorld(JTA、Bitronix)

二、model层

1.

三、配置文件

1.persistence.xml(这个文件似乎不起作用)

For the “Hello World” application, you delegate database connection handling to a Java Transaction API ( JTA ) provider, the open source Bitronix project. Bitronix offers connection pooling with a managed java.sql.DataSource and the standard javax.transaction.UserTransaction API in any Java SE environment. Bitronix binds

these objects into JNDI , and Hibernate interfaces automatically with Bitronix through JNDI lookups.

2.jndi.properties(这个文件似乎不起作用)

四、测试文件

2.

3.

4.

5.

You can do anything you set your mind to, man!