简体   繁体   English

使用Hibernate 3.6配置Glassfish 3

[英]Configure Glassfish 3 with Hibernate 3.6

I am trying to configure hibernate 3.6.7 with glassfish 3.1.1. 我正在尝试使用glassfish 3.1.1配置hibernate 3.6.7。 If I just install the module from update-tool in glassfish I get hibernate 3.5... 如果我只是从glassfish中的update-tool安装模块,我得到了hibernate 3.5 ...

I want to use hibernate search 3.4.1 Final. 我想使用hibernate搜索3.4.1 Final。

I want to build a website and I will have lots of items into database and I want it work ok (use lucene search integrated in hibernate). 我想建立一个网站,我将有很多项目进入数据库,我希望它工作正常(使用集成在hibernate中的lucene搜索)。 - I want to use lucene spellchecker later - 我想稍后使用lucene拼写检查器

Do you suggest me to switch to jboss AS 7? 你建议我切换到jboss AS 7吗? I am willing to create a java ee application (ejb, standalone web tier) if so... do I have to create more xml's, configuration stuff for jboss as 7? 我愿意创建一个java ee应用程序(ejb,独立的Web层),如果是这样的话......我是否必须为jboss创建更多xml的配置内容为7? or just add my datasource and I'm done...??? 或者只是添加我的数据源,我已经完成了...... ???

Or should I make my lucene code and use it with eclipselink? 或者我应该制作我的lucene代码并将其与eclipselink一起使用?

What do you think it's best? 你觉得什么是最好的?

Regards 问候

I use Eclipse and glassfish 3.1 with Hibernate 3.6.7. 我使用Eclipse和glassfish 3.1与Hibernate 3.6.7。 and hibernate search. 和休眠搜索。 Everything works fine. 一切正常。 You don't need tons of xml, I use JPA so I have persistence.xml. 你不需要大量的xml,我使用JPA所以我有persistence.xml。 I set my database access in glassfish, put the jta datasource into the persistence.xml and some hibernate search related config, that's all. 我在glassfish中设置了数据库访问,将jta数据源放入persistence.xml和一些与hibernate搜索相关的配置,就是这样。

I tried jboss too, but I think glassfish is easier to use. 我也尝试了jboss,但我认为glassfish更容易使用。 I don't know what's the best, pick one and try it :) 我不知道什么是最好的,选择一个并尝试:)

With the help of @hcpeter I managed to configure... 在@hcpeter的帮助下,我成功配置了......

Here is how is done: 这是怎么做的:

Copy all jar files (only jar files, no folders.. take the jars out of the folders) in glassfish3/glassfish/lib/ 在glassfish3 / glassfish / lib /中复制所有jar文件(只有jar文件,没有文件夹......从文件夹中取出jar)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM