-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Installing Hibernate 3.6.x in Glassfish 3.1?
PostPosted: Mon May 02, 2011 11:58 am 
Beginner
Beginner

Joined: Thu Dec 29, 2005 12:08 pm
Posts: 31
Location: Acton, MA
I am interested in finding out the proper way to install Hibernate 3.6.x in Glassfish 3.1.

I am in the process of getting the Glassfish team's recommendations here, but figured that I'd also ask for the Hibernate team's recommendations.

No official documentation in either community exists, which surprises me.

I have to assume that some--which ones?--of Hibernate's dependencies, for example, are present in Glassfish already, and I don't want to inadvertently cripple the app server or my application or both by blindly dumping all of Hibernate's dependencies in a master lib directory somewhere (unless that is indeed the proper way to do things).

Thanks in advance for any help.

Best,
Laird


Top
 Profile  
 
 Post subject: Re: Installing Hibernate 3.6.x in Glassfish 3.1?
PostPosted: Tue Aug 09, 2011 1:33 pm 
Beginner
Beginner

Joined: Thu Dec 29, 2005 12:08 pm
Posts: 31
Location: Acton, MA
O...K. :-)

Well, the Glassfish guys tell me that the appropriate way to do this is to get Hibernate installed into Glassfish as an IPS package. This doesn't look too hard.

The current Hibernate IPS package effectively uses this collection of artifacts and dependencies:

Code:
<dependency>
<groupId>org.glassfish-repo.packager</groupId>
<artifactId>hibernate-ips</artifactId>
<version>3.5.0-Final-1</version>
<type>zip</type>
</dependency>


When we unpack this, we can see that it consists of these artifacts:

Code:
Laird-Nelsons-MacBook-Pro:Downloads ljnelson$ unzip -l hibernate-ips-3.5.0-Final-1.zip
Archive:  hibernate-ips-3.5.0-Final-1.zip
  Length     Date   Time    Name
--------    ----   ----    ----
        0  04-14-10 18:18   glassfish/
        0  04-14-10 18:45   glassfish/lib/
   443432  04-02-10 18:00   glassfish/lib/antlr-2.7.6.jar
   559366  04-02-10 18:00   glassfish/lib/commons-collections-3.1.jar
   313898  04-02-10 18:00   glassfish/lib/dom4j-1.6.1.jar
  3893179  04-02-10 18:00   glassfish/lib/hibernate3.jar
   597476  04-02-10 18:00   glassfish/lib/javassist-3.9.0.GA.jar
    23445  04-02-10 18:00   glassfish/lib/slf4j-api-1.5.8.jar
     8817  04-02-10 18:00   glassfish/lib/slf4j-jdk14-1.5.8.jar
        0  04-14-10 18:45   hibernate/
    26949  04-14-10 18:45   hibernate/LICENSE.txt
     3378  04-14-10 18:45   hibernate/overview.txt
--------                   -------
  5869940                   12 files


Good old
Code:
hibernate3.jar
is in there.

I'm guessing that the intent behind this package is to include all possible optional dependencies? Does anyone know?

If so, then it looks like the assembly descriptor for the 3.6.6.Final release (the one that I'm trying to make IPS-compatible) describes how to build hibernate-all, which I think is basically what this hibernate3.jar is.

But when I build it that way, I get a ton--a ton--more dependencies:

Code:
total used in directory 39160 available 286518380
  drwxr-xr-x  43 ljnelson  staff     1462 Aug  9 13:14 .
  drwxr-xr-x   7 ljnelson  staff      238 Aug  9 13:14 ..
  -rw-r--r--   1 ljnelson  staff   443432 Aug  9 13:14 antlr-2.7.6.jar
  -rw-r--r--   1 ljnelson  staff    43033 Aug  9 13:14 asm-3.1.jar
  -rw-r--r--   1 ljnelson  staff   281694 Aug  9 13:14 bsh-2.0b4.jar
  -rw-r--r--   1 ljnelson  staff   608376 Aug  9 13:14 c3p0-0.9.1.jar
  -rw-r--r--   1 ljnelson  staff   278682 Aug  9 13:14 cglib-2.2.jar
  -rw-r--r--   1 ljnelson  staff   559366 Aug  9 13:14 commons-collections-3.1.jar
  -rw-r--r--   1 ljnelson  staff    60686 Aug  9 13:14 commons-logging-1.1.1.jar
  -rw-r--r--   1 ljnelson  staff   313898 Aug  9 13:14 dom4j-1.6.1.jar
  -rw-r--r--   1 ljnelson  staff  1006424 Aug  9 13:14 ehcache-core-2.4.3.jar
  -rw-r--r--   1 ljnelson  staff   802494 Aug  9 13:14 freemarker-2.3.8.jar
  -rw-r--r--   1 ljnelson  staff     6411 Aug  9 13:14 hibernate-c3p0-3.6.6.Final.jar
  -rw-r--r--   1 ljnelson  staff    71283 Aug  9 13:14 hibernate-commons-annotations-3.2.0.Final.jar
  -rw-r--r--   1 ljnelson  staff  3113588 Aug  9 13:14 hibernate-core-3.6.6.Final.jar
  -rw-r--r--   1 ljnelson  staff    11277 Aug  9 13:14 hibernate-ehcache-3.6.6.Final.jar
  -rw-r--r--   1 ljnelson  staff   421591 Aug  9 13:14 hibernate-entitymanager-3.6.6.Final.jar
  -rw-r--r--   1 ljnelson  staff   319696 Aug  9 13:14 hibernate-envers-3.6.6.Final.jar
  -rw-r--r--   1 ljnelson  staff    66548 Aug  9 13:14 hibernate-infinispan-3.6.6.Final.jar
  -rw-r--r--   1 ljnelson  staff    79841 Aug  9 13:14 hibernate-jbosscache-3.6.6.Final.jar
  -rw-r--r--   1 ljnelson  staff     5388 Aug  9 13:14 hibernate-oscache-3.6.6.Final.jar
  -rw-r--r--   1 ljnelson  staff     5326 Aug  9 13:14 hibernate-proxool-3.6.6.Final.jar
  -rw-r--r--   1 ljnelson  staff     5148 Aug  9 13:14 hibernate-swarmcache-3.6.6.Final.jar
  -rw-r--r--   1 ljnelson  staff    44494 Aug  9 13:14 hibernate-testing-3.6.6.Final.jar
  -rw-r--r--   1 ljnelson  staff   349357 Aug  9 13:14 hibernate-tools-3.2.0.ga.jar
  -rw-r--r--   1 ljnelson  staff    61504 Aug  9 13:14 i18nlog-1.0.10.jar
  -rw-r--r--   1 ljnelson  staff  1125855 Aug  9 13:14 infinispan-core-4.2.1.CR1.jar
  -rw-r--r--   1 ljnelson  staff   633312 Aug  9 13:14 javassist-3.12.0.GA.jar
  -rw-r--r--   1 ljnelson  staff   542693 Aug  9 13:14 jboss-common-core-2.2.14.GA.jar
  -rw-r--r--   1 ljnelson  staff    11924 Aug  9 13:14 jboss-logging-spi-2.0.5.GA.jar
  -rw-r--r--   1 ljnelson  staff    10899 Aug  9 13:14 jboss-transaction-api-1.0.1.GA.jar
  -rw-r--r--   1 ljnelson  staff  1168922 Aug  9 13:14 jbosscache-core-3.2.1.GA.jar
  -rw-r--r--   1 ljnelson  staff  2635681 Aug  9 13:14 jgroups-2.11.0.GA.jar
  -rw-r--r--   1 ljnelson  staff  2123983 Aug  9 13:14 jgroups-2.6.13.GA.jar
  -rw-r--r--   1 ljnelson  staff  1611518 Aug  9 13:14 jgroups-all-2.2.8.jar
  -rw-r--r--   1 ljnelson  staff   249028 Aug  9 13:14 jtidy-r8-20060801.jar
  -rw-r--r--   1 ljnelson  staff   167842 Aug  9 13:14 marshalling-api-1.2.3.GA.jar
  -rw-r--r--   1 ljnelson  staff   114308 Aug  9 13:14 oscache-2.1.jar
  -rw-r--r--   1 ljnelson  staff   475943 Aug  9 13:14 proxool-0.8.3.jar
  -rw-r--r--   1 ljnelson  staff     7635 Aug  9 13:14 rhq-pluginAnnotations-3.0.1.jar
  -rw-r--r--   1 ljnelson  staff    75485 Aug  9 13:14 river-1.2.3.GA.jar
  -rw-r--r--   1 ljnelson  staff    25496 Aug  9 13:14 slf4j-api-1.6.1.jar
  -rw-r--r--   1 ljnelson  staff    30602 Aug  9 13:14 swarmcache-1.0RC2.jar


So assume for the moment that you're a regular old Java EE developer, and you want to use Hibernate in a Glassfish application. What would be the dependencies that should be present in the application server?

For example, Glassfish ships with an implementation of EclipseLink. You don't need to include anything else to use it. It has whatever dependencies it has in it.

If I wanted to offer the option to have Glassfish ship with an implementation of Hibernate 3.6.6.Final, what should be in it? Obviously hibernate-core, hibernate-entitymanager...and one can make a very strong case for the various optional cache providers. But the various api jars (which are declared as compile scope, not provided?!) seem like they should be omitted.

Any guidance here?

Thanks,
Laird


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.