go4it

just do it

2009年1月24日

EJB的JPA就这样暂时告一段落了。

摘要: 1.EJB的JPA暂时就“集中攻克”到此,也就是说以后可能很少有一大片的时间来专门深入研究EJB了,只能靠零散的时间, 利用时间的积累,来逐步深厚EJB的功力了,接下来,坚持至少每周看一次EJB,记录在cnblog中。 2.明天开始JSF之旅,然后就是SEAM和grails。 3.如果seam开发速度够快的话,可以先把grails暂且放在一边。 阅读全文

posted @ 2009-01-24 23:47 cxccbv 阅读(312) 评论(0) 推荐(0)

多地多关联的增加,修改和删除

摘要: package com.score.test; import java.util.HashSet; import java.util.Properties; import javax.naming.InitialContext; import javax.naming.NamingException; import com.score.dao.CourseDAO; import com.sc... 阅读全文

posted @ 2009-01-24 23:43 cxccbv 阅读(541) 评论(0) 推荐(0)

多对多关联查询sql语句

摘要: 1.student,score,coure的实体关联定义如下: ------------------------------------------------------------------------------------------------ Student: @Entity@Table(name="tb_student")public class Student implement... 阅读全文

posted @ 2009-01-24 22:40 cxccbv 阅读(3989) 评论(0) 推荐(0)

EntityCURD操作的参数和返回值

摘要: 以下是netbeans根据实体自动生成的CURD模板:/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.medea.order.session; import com.medea.order.entity.Storeord... 阅读全文

posted @ 2009-01-24 19:42 cxccbv 阅读(261) 评论(0) 推荐(0)

在J2SE环境中使用JPA

摘要: 1.配置persistence.xml org.hibernate.ejb.HibernatePersistence 2.在J2SE环境中只能使用应用托管的EntityManager并且手工控制事务。public ... 阅读全文

posted @ 2009-01-24 10:19 cxccbv 阅读(1211) 评论(0) 推荐(0)

容器托管的EntityManager持久化上下文

摘要: 1.在容器中,EntityManager由容器来管理,它的事务由JTA来管理,当调用EntityManager时,容器首先检查是否处在持久化上下文中。 若是,则EntityManager将使用该持久化上下文和其关联的事务; 若没有关联任何持久化上下文,则创建一个新的持久化上下文,并将EntityManager与所在的事务关联。 2.容器托管的EntityManager的持久化上下文的作用范围有... 阅读全文

posted @ 2009-01-24 09:15 cxccbv 阅读(662) 评论(0) 推荐(0)

导航