-->
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.  [ 5 posts ] 
Author Message
 Post subject: Hibernate 2.1/jBoss 3.2.2
PostPosted: Thu Jan 08, 2004 2:49 pm 
Beginner
Beginner

Joined: Tue Dec 30, 2003 1:51 pm
Posts: 49
Location: Michigan, USA
Hello all,

I have a question about 66.html it was stated that

Quote:
A couple of things to note:

I do not have my Hibernate Java class files in the SAR. In my case, the class files are used by the rest of my code including a WAR, so I have them in a separate jar that is in my EAR classpath. In my experience with JBoss, code in a WAR cannot find classes in a SAR.


Is this still the case? Do we need to still place the common classes into a sperate jar file?

Thanks,
Jason


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 08, 2004 3:46 pm 
Senior
Senior

Joined: Tue Nov 25, 2003 9:35 am
Posts: 194
Location: San Francisco
I certainly am doing it that way, but it depends on your deployment configuration. I remember from your previous posts that you are using the Hibernate MBean, Tomcat and MySql. Are you using WARs, EARs?


Sherman


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 08, 2004 3:58 pm 
Beginner
Beginner

Joined: Tue Dec 30, 2003 1:51 pm
Posts: 49
Location: Michigan, USA
currently i am just using pojo's in a war.
i want to get the basics right before i move on to ejb's

also i want to set up some junit tests for hibernate do you know of any pitfalls to watch out for?

thank you very much for the help, schemaexport works perfectly now

regards,

jason


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 08, 2004 4:40 pm 
Senior
Senior

Joined: Tue Nov 25, 2003 9:35 am
Posts: 194
Location: San Francisco
Glad to hear that SchemaExport is working for you.


The Hibernate POJO classes need to be accessible by the MBean SAR and your WAR. As indicated in the documentation on the Hibernate web site, I have a separate JAR containing those classes in my EAR, and refer to that JAR in my application.xml. You could test having the WAR and the MBean SAR with the classes in it just in the deploy directory, and see whether that flies.


In the junit side, I do not deal directly with Hibernate testing, but instead use httpunit to drive traffic to my application web site, which in turn does Hibernate work. If you are testing something outside of your app, there are plenty of examples in the Hibernate source distribution.


Cheers,


Sherman


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 09, 2004 1:03 am 
Beginner
Beginner

Joined: Tue Dec 30, 2003 1:51 pm
Posts: 49
Location: Michigan, USA
I did get jUnit to work, I modified the TestCase in the distribution for use. Works like a dream, I would check out jUnit saves a lot of time before pushing code up for stress testing.

thanks for the help

jason


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