很不幸的一件事,需要在netbean 下开发ejb3,整了半天才发现glassfish使用toplink,没带hibernate的包,还要下两个包,然后copy进去,以下是查到的资料,sun太恶心了,想和sun bye bye 了,只为多活几年.
Use Hibernate as a persistence provider with Glassfish
from http://blogs.sun.com/roller/page/GlassFishPersistence#use_hibernate_as_a_persistence
As you must be aware, Glassfish currently has Toplink Essentials as the default persistence provider. The question that frequently gets asked is: How hard it is to to use Hibernate as the persistence provider with Glassfish?
The answer is: Not at all
. Just drop couple of jars reqired by Hibernate in the lib directory of Glassfish and modify your persistence.xml to use Hibernate as the provider and you are ready to go. Lets walk through the steps:
1. Download and install glassfish milestone 6 build or later.
2. Download and install Hibernate3 3.2cr1 or later.
3. Download and install Hibernate EntityManager 3.1 beta7 or later.
4. Copy the required Hibernate jars into Glassfish lib dir. The script here contains the list of jars.
5. Update your persistence.xml to use Hibernate as the persistence provider. Here is a sample persistence.xml
6. Deploy and run your application.
分享到:
- 2008-06-11 01:34
- 浏览 1510
- 评论(9)
- 论坛回复 / 浏览 (8 / 4275)
- 查看更多
相关推荐
glassfish集群搭建手册glassfish集群搭建手册glassfish集群搭建手册
GlassFish4的下载和安装的详细步骤,下载地址,配置等。附带有GlassFish3的安装简述
Glassfish 集群技术揭秘Glassfish 集群技术揭秘
Glassfish部署web项目
glassfish 安装配置文档 发布、eclipse调试
Glassfish中关于tomcat介绍 Glassfish中关于tomcat介绍 Glassfish中关于tomcat介绍 Glassfish中关于tomcat介绍
GlassFish 的安装和启动,中文的呀
GlassFish2.0的安装
GlassFish 是一款强健的商业兼容应用服务器,达到产品级质量,可免费用于开发、部署和重新分发。开发者可以免费获得源代码,还可以对代码进行更改。 GlassFish 是用于构建 Java EE 5应用服务器的开源开发项目的名称...
glassfish-3.1.2.2.zip上传根据需要使用,基于Java EE 6
安装(Glassfish)需要JDK5以上版本的JDK。配置Glassfish需要ant1.6.5。 安装Glassfish 1. 下载Glassfish安装包, 并为JDK 5设置JAVA_HOME环境变量.
glassfish部署EJB公网访问设置
glassfish服务器是Netbean的网络服务器之一
Glassfish单机集群配置样例代码与资源
本教程详细的介绍了sun公司的推出的服务器glassfish安装部署的使用步骤,阐述了glassfish和tomcat服务器的异同,以及glassfish的优点!正在开发JavaEE的朋友如果你还没使用过glassfish,那么请你去www.sun.com下载...
jmx和jmx在glassfish中的应用
glassfish-ose-4.0 白皮书,很全的哦
在Glassfish上部署web应用在Glassfish上部署web应用
介绍glassfish以及JAVA EE 5的关系,包含了glassfish的安装配置等信息
Oracle GlassFish Server 3.1相关资料