首页
论坛
门户
空间
手机版
IXPUB
插件
收藏
设置
注册
登录
商店
搜索
培训
Wiki
Blog
归档
丛书
退出
ITPUB论坛
»
Java企业开发
» JPA中的几个概念
‹‹ 上一主题
|
下一主题 ››
43
3/5
‹‹
1
2
3
4
5
››
投票
交易
悬赏
活动
评价
|
打印
|
推荐
|
订阅
|
收藏
标题: JPA中的几个概念
Sky-Tiger
天王盖地虎
来自 Vancouver
精华贴数 39
个人空间
0
技术积分 158512 (3)
社区积分 45880 (13)
注册日期 2004-2-19
论坛徽章:239
#21
使用道具
发表于 2008-7-5 19:06
The EntityTransaction interface is designed to imitate the UserTransaction interface
defined by the Java Transaction API, and the two behave very similarly. The main difference is
that EntityTransaction operations are implemented in terms of the transaction methods on
the JDBC Connection interface.
__________________
-----孰能浊以静之徐清 孰能安以动之徐生-----
-----风来疏竹 风过而竹不留声;雁照寒塘 雁去而塘不留影; 故君子事来而心始现 事去而心随空----
----------------
Groovy 研究中...
JAX-WS20(finished)/CXF/ESB/BPEL 研究中...
EJB3(finished)/Hibernate3 研究中...
OSGI/KnopflerFish 研究中...
JBOSS Seam2.0/JSF/AJAX(finished)/ICEFace/ZKoss/Flex3 研究中...
Mysql 研究中...
Spring2.5 研究中...
Blog/Wiki/RSS/ATOM 研究中...
只看该作者
Sky-Tiger
天王盖地虎
来自 Vancouver
精华贴数 39
个人空间
0
技术积分 158512 (3)
社区积分 45880 (13)
注册日期 2004-2-19
论坛徽章:239
#22
使用道具
发表于 2008-7-5 19:14
One example use of resource-local transactions in the Java EE environment
might be for logging. If your application requires an audit log stored in the database
that must be written regardless of the outcome of any JTA transactions, then a resource-local
entity manager may be used to persist data outside of the current transaction.
__________________
-----孰能浊以静之徐清 孰能安以动之徐生-----
-----风来疏竹 风过而竹不留声;雁照寒塘 雁去而塘不留影; 故君子事来而心始现 事去而心随空----
----------------
Groovy 研究中...
JAX-WS20(finished)/CXF/ESB/BPEL 研究中...
EJB3(finished)/Hibernate3 研究中...
OSGI/KnopflerFish 研究中...
JBOSS Seam2.0/JSF/AJAX(finished)/ICEFace/ZKoss/Flex3 研究中...
Mysql 研究中...
Spring2.5 研究中...
Blog/Wiki/RSS/ATOM 研究中...
只看该作者
Sky-Tiger
天王盖地虎
来自 Vancouver
精华贴数 39
个人空间
0
技术积分 158512 (3)
社区积分 45880 (13)
注册日期 2004-2-19
论坛徽章:239
#23
使用道具
发表于 2008-7-5 19:17
If that transaction rolls back, two things happen. The first is that the database transaction
will be rolled back. The next thing that happens is that the persistence context is cleared, detaching
all of our managed entity instances. If the persistence context was transaction-scoped, then it
is removed.
__________________
-----孰能浊以静之徐清 孰能安以动之徐生-----
-----风来疏竹 风过而竹不留声;雁照寒塘 雁去而塘不留影; 故君子事来而心始现 事去而心随空----
----------------
Groovy 研究中...
JAX-WS20(finished)/CXF/ESB/BPEL 研究中...
EJB3(finished)/Hibernate3 研究中...
OSGI/KnopflerFish 研究中...
JBOSS Seam2.0/JSF/AJAX(finished)/ICEFace/ZKoss/Flex3 研究中...
Mysql 研究中...
Spring2.5 研究中...
Blog/Wiki/RSS/ATOM 研究中...
只看该作者
Sky-Tiger
天王盖地虎
来自 Vancouver
精华贴数 39
个人空间
0
技术积分 158512 (3)
社区积分 45880 (13)
注册日期 2004-2-19
论坛徽章:239
#24
使用道具
发表于 2008-7-5 19:22
If there is a new entity that uses automatic primary key generation, there may be a
primary key value assigned to the detached entity. If this primary key was generated
from a database sequence or table, the operation to generate the number may have been
rolled back with the transaction. This means that the same sequence number could be
given out again to a different object. Clear the primary key before attempting to persist
the entity again, and do not rely on the primary key value in the detached entity.
__________________
-----孰能浊以静之徐清 孰能安以动之徐生-----
-----风来疏竹 风过而竹不留声;雁照寒塘 雁去而塘不留影; 故君子事来而心始现 事去而心随空----
----------------
Groovy 研究中...
JAX-WS20(finished)/CXF/ESB/BPEL 研究中...
EJB3(finished)/Hibernate3 研究中...
OSGI/KnopflerFish 研究中...
JBOSS Seam2.0/JSF/AJAX(finished)/ICEFace/ZKoss/Flex3 研究中...
Mysql 研究中...
Spring2.5 研究中...
Blog/Wiki/RSS/ATOM 研究中...
只看该作者
Sky-Tiger
天王盖地虎
来自 Vancouver
精华贴数 39
个人空间
0
技术积分 158512 (3)
社区积分 45880 (13)
注册日期 2004-2-19
论坛徽章:239
#25
使用道具
发表于 2008-7-5 19:23
If your entity uses a version field for locking purposes that is automatically maintained
by the persistence provider, it may be set to an incorrect value. The value in the entity
will not match the correct value stored in the database.
__________________
-----孰能浊以静之徐清 孰能安以动之徐生-----
-----风来疏竹 风过而竹不留声;雁照寒塘 雁去而塘不留影; 故君子事来而心始现 事去而心随空----
----------------
Groovy 研究中...
JAX-WS20(finished)/CXF/ESB/BPEL 研究中...
EJB3(finished)/Hibernate3 研究中...
OSGI/KnopflerFish 研究中...
JBOSS Seam2.0/JSF/AJAX(finished)/ICEFace/ZKoss/Flex3 研究中...
Mysql 研究中...
Spring2.5 研究中...
Blog/Wiki/RSS/ATOM 研究中...
只看该作者
justforregister
SAP
精华贴数 1
个人空间
10
技术积分 38451 (19)
社区积分 9927 (153)
注册日期 2005-6-10
论坛徽章:244
#26
使用道具
发表于 2008-7-5 19:28
行, 我支持你哦
__________________
Go to Hell
大家一起BS以下菠菜作弊者
| EPS2008 | 35201 | 2008-08-17 22:18:17 |
| missingsky | 22300 | 2008-08-17 22:19:17 |
| wws8875 | 10000 | 2008-08-17 22:25:54 |
| renxiang | 23332 | 2008-08-17 22:28:15 |
只看该作者
Sky-Tiger
天王盖地虎
来自 Vancouver
精华贴数 39
个人空间
0
技术积分 158512 (3)
社区积分 45880 (13)
注册日期 2004-2-19
论坛徽章:239
#27
使用道具
发表于 2008-7-5 19:33
QUOTE:
原帖由
justforregister
于 2008-7-5 19:28 发表
行, 我支持你哦
去去去,学你的SAP去,这和SAP没有关系!
__________________
-----孰能浊以静之徐清 孰能安以动之徐生-----
-----风来疏竹 风过而竹不留声;雁照寒塘 雁去而塘不留影; 故君子事来而心始现 事去而心随空----
----------------
Groovy 研究中...
JAX-WS20(finished)/CXF/ESB/BPEL 研究中...
EJB3(finished)/Hibernate3 研究中...
OSGI/KnopflerFish 研究中...
JBOSS Seam2.0/JSF/AJAX(finished)/ICEFace/ZKoss/Flex3 研究中...
Mysql 研究中...
Spring2.5 研究中...
Blog/Wiki/RSS/ATOM 研究中...
只看该作者
Sky-Tiger
天王盖地虎
来自 Vancouver
精华贴数 39
个人空间
0
技术积分 158512 (3)
社区积分 45880 (13)
注册日期 2004-2-19
论坛徽章:239
#28
使用道具
发表于 2008-7-5 19:34
When persist() is invoked outside of a transaction, the behavior depends on the type of entity
manager. A transaction-scoped entity manager will throw a TransactionRequiredException as
there is no persistence context available in which to make the entity managed. Applicationmanaged
and extended entity managers will accept the persist request, causing the entity to
become managed, but no immediate action will be taken until a new transaction begins and
the persistence context becomes synchronized with the transaction.
__________________
-----孰能浊以静之徐清 孰能安以动之徐生-----
-----风来疏竹 风过而竹不留声;雁照寒塘 雁去而塘不留影; 故君子事来而心始现 事去而心随空----
----------------
Groovy 研究中...
JAX-WS20(finished)/CXF/ESB/BPEL 研究中...
EJB3(finished)/Hibernate3 研究中...
OSGI/KnopflerFish 研究中...
JBOSS Seam2.0/JSF/AJAX(finished)/ICEFace/ZKoss/Flex3 研究中...
Mysql 研究中...
Spring2.5 研究中...
Blog/Wiki/RSS/ATOM 研究中...
只看该作者
Sky-Tiger
天王盖地虎
来自 Vancouver
精华贴数 39
个人空间
0
技术积分 158512 (3)
社区积分 45880 (13)
注册日期 2004-2-19
论坛徽章:239
#29
使用道具
发表于 2008-7-6 11:08
The find() operation returns a managed entity instance in all cases except when invoked
outside of a transaction on a transaction-scoped entity manager. In this case, the entity instance is
returned in a detached state. It is not associated with any persistence context.
__________________
-----孰能浊以静之徐清 孰能安以动之徐生-----
-----风来疏竹 风过而竹不留声;雁照寒塘 雁去而塘不留影; 故君子事来而心始现 事去而心随空----
----------------
Groovy 研究中...
JAX-WS20(finished)/CXF/ESB/BPEL 研究中...
EJB3(finished)/Hibernate3 研究中...
OSGI/KnopflerFish 研究中...
JBOSS Seam2.0/JSF/AJAX(finished)/ICEFace/ZKoss/Flex3 研究中...
Mysql 研究中...
Spring2.5 研究中...
Blog/Wiki/RSS/ATOM 研究中...
只看该作者
Sky-Tiger
天王盖地虎
来自 Vancouver
精华贴数 39
个人空间
0
技术积分 158512 (3)
社区积分 45880 (13)
注册日期 2004-2-19
论坛徽章:239
#30
使用道具
发表于 2008-7-6 11:21
The getReference() call is effectively a performance optimization that removes the need to
retrieve the target entity instance.
__________________
-----孰能浊以静之徐清 孰能安以动之徐生-----
-----风来疏竹 风过而竹不留声;雁照寒塘 雁去而塘不留影; 故君子事来而心始现 事去而心随空----
----------------
Groovy 研究中...
JAX-WS20(finished)/CXF/ESB/BPEL 研究中...
EJB3(finished)/Hibernate3 研究中...
OSGI/KnopflerFish 研究中...
JBOSS Seam2.0/JSF/AJAX(finished)/ICEFace/ZKoss/Flex3 研究中...
Mysql 研究中...
Spring2.5 研究中...
Blog/Wiki/RSS/ATOM 研究中...
只看该作者
43
3/5
‹‹
1
2
3
4
5
››
投票
交易
悬赏
活动
相关内容
ITPUB论坛
≡ 数据库技术 ≡
> Oracle数据库管理
> Oracle开发
> Oracle Developer Suite
> Oracle入门与认证
> Oracle专题深入讨论
> Oracle新技术/11g
> Oracle电子文档
> Oracle Application Server套件
> IBM数据库产品
> MS SQL Server
> Sybase管理与开发
> MySQL及其它开源数据库
> 内存数据库
> 数据仓库与数据挖掘
> 移动及嵌入式数据库
≡ 企业信息化 ≡
> ERP产品与实践
> CRM产品与实践
> HR产品与实践
> 物流
> 供应链
> 供应链建模与仿真
> 物流设备与系统工程
> 企业管理咨询
> 管理协同与办公自动化
> IT服务管理
> 数据中心建设
> ERP二次开发
> Oracle ERP
> EBS相关文档
> PeopleSoft与JDE
> SAP R/3
> SAP Business One开发与快速实施
> SAP财务及CRM
> SAP后勤及HR
> mySAP ERP
> 系统开发及跨应用设置
> SAP相关文档
> 国外其它ERP产品
> 国内ERP产品
≡ 开发技术 ≡
> Java入门与认证版
> Java web开发及框架技术
> Java企业开发
> ASP.NET【已迁移到微软开发技术论坛】
> .Net企业开发与应用【已迁移到微软开发技术论坛】
> WEB程序开发
> WEB 2.0技术
> 动态语言
> 移动与游戏开发
≡ 系统设计与项目管理 ≡
> 系统分析与UML
> 系统分析与UML精华区
> 项目管理
> 项目过程
> 软件测试
> 算法讨论与研究
≡ IBM软件技术园地 ≡
> IBM数据库产品
> Lotus
> Tivoli
> Websphere
> Rational
> 与SOA相关的IBM产品与技术
> IBM软件技术精英协会
> 软件技术精英活动专版
≡ 操作系统与硬件 ≡
> AIX及IBM产品【已迁移到IXPUB】
> HP-UX及HP产品【已迁移到IXPUB】
> Solaris及SUN产品【已迁移到IXPUB】
> Linux及其应用 【已迁移到IXPUB】
> 其它UNIX系统【已迁移到IXPUB】
> windows系统及微软相关产品 【已迁移到IXPUB】
> 存储设备与容灾技术 【已迁移到IXPUB】
> 服务器 【已迁移到IXPUB】
≡ 行业纵向讨论区 ≡
> IT业界评论与展望
> 政府与教育事业
> 中国政府信息主管联盟
> 电信行业
> 金融行业
> 医卫行业
> 制造行业
> 电力行业
> 信息安全与审计
≡ 会员交流 ≡
> IT职业生涯
> 招聘求职商务信息
> 旅游,驴友
> 汽车世界
> 外语角
> 数码摄影
> 你的故事我的歌
> 音乐推荐区
> 电子图书与IT文档资料
> 软件交流
> 软件交流精华区
≡ ITPUB产品与服务 ≡
> ITPUB地面活动专版
> BLOG天地
> WIKI世界
> 授权用户区
> 站务管理
≡ 微软开发技术 ≡
> 开发工具和语言
> .NET Framework 相关
> Visual Basic/VB.net
> Visual C#
> Visual C++/vc.net
> Visual Studio
> .NET软件架构与模式
> .NET开发辅助工具及框架
> Web开发
> ASP.NET与AJAX
> Web相关技术讨论(IIS等)
> Silverlight 技术
> 微软企业级产品技术
> SQL Server
> windows server
> SharePoint
> Exchange Server
> Biztalk
> 嵌入式及移动开发
> Windows Embedded 嵌入式技术
> Windows 移动设备
> Office开发
> Microsoft office system
> Office Business Application
> 微软产品用户交流区
> .Net电子书籍&&书籍介绍
> .Net人才交流
技术积分榜
社区积分榜
徽章
电子杂志
会员
团队
统计
邮箱
游乐场
帮助
TOP
CopyRight 1999-2006 itpub.net All Right Reserved.
北京皓辰广域网络信息技术有限公司. 版权所有
E-mail:Webmaster@itpub.net
京ICP证:010037号
联系我们
法律顾问
控制面板首页
编辑个人资料
积分交易
公众用户组
好友列表
升级个人空间
基本概况
论坛排行
主题排行
发帖排行
积分排行
在线时间
管理团队
管理统计