-->
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.  [ 7 posts ] 
Author Message
 Post subject: deploy hibernate and what jars can I omit...
PostPosted: Mon Jan 12, 2004 7:15 pm 
Beginner
Beginner

Joined: Sun Dec 14, 2003 10:47 am
Posts: 23
Looking at the hibernate lib directory there are alot of non-runtime jar files (ant.jar for example). Is there any guidance as to what jars are needed at runtime?

Specifically I am using plain hibernate (no c3p0, no jboss caching, no jta) and looking to slim things down as the client is a jnlp client and we want to keep it as slim as possible.

To make things simple here is the list of jars.... I can get this going via trial and error what I really need help with is in case the removing of some jar silently turns off some neeed feature.


needed at runtime

cglib2.jar
hibernate2.jar


supplied via apache maven

commons-lang.jar
commons-logging.jar
concurrent.jar
dom4j.jar
log4j.jar
xalan.jar
xerces.jar
xml-apis.jar


not needed at runtime

ant.jar
c3p0.jar
commons-dbcp.jar
commons-collections.jar
commons-pool.jar
connector.jar
ehcache.jar
jaas.jar
jboss-cache.jar
jboss-common.jar
jboss-jmx.jar
jboss-system.jar
jcs.jar
jdbc2_0-stdext.jar
jdbc2_0-stdext.licence.txt
jgroups.jar
jta.jar
junit.jar
odmg.jar
optional.jar
oscache.jar
proxool.jar
swarmcache.jar


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 12, 2004 7:17 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
There is a readme file in the lib directory of hibernate, which lists the required jars.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 17, 2004 12:53 pm 
Beginner
Beginner

Joined: Sun Dec 14, 2003 10:47 am
Posts: 23
egad there is... Now why didn't I see that.


Okay I have gone through and picked out the jars I needed except that ehcache.jar is needed (it is marked optional).

Thanks I just trimmed my deploy by 6megs :-D


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 17, 2004 1:02 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
You can omitt ehcache.jar too if you dont need caching by setting hibernate.cache.provider_class=net.sf.hibernate.cache.HashtableCacheProvider


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 17, 2004 8:10 pm 
Beginner
Beginner

Joined: Sun Dec 14, 2003 10:47 am
Posts: 23
I am using Hibernate standalone. I use it in 2 places, a stand alone client and a webapp. The do NOT share any data just the same codebase and hence they share hibernate.

When you say caching are you referring to distributed caching? I know I don't need that. Or said another way. Do I lose anything by not caching?

I am grey on the caching and what it gains for me since the Session is obviously doing caching for me. I have always figured the caching stuff was for distributed J2EE big iron stuff.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 18, 2004 5:50 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
By default caching is only done on session level, eg when you close the session, you loose the cache. You can however do session-spanning caching (second-level-cache) by using ehcache, swarmcache, etc. See http://www.hibernate.org/hib_docs/reference/html/performance.html#performance-s3

If you don't need this however (it is disabled by default) you can safely use set HashtableCacheProvider (will not be used anyways)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 18, 2004 11:03 am 
Beginner
Beginner

Joined: Sun Dec 14, 2003 10:47 am
Posts: 23
Ahhh now I understand thanks for the excellent explanation gloeglm.....


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 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.