-->
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: Cannot dynamically create config and class
PostPosted: Sun Feb 29, 2004 8:01 am 
Newbie

Joined: Sun Feb 29, 2004 7:54 am
Posts: 2
I have used Javassist to create a class.
I have created my hibernate config for the class.

But I cannot see a way to to provide the Configuration class with both of these things.

If I use 'addClass' then it searches for the 'hbm.xml' in the classpath.
If I write my own classloader, and use addResource(String, ClassLoader), then it only loads the resource from the classsloader, and still attempts to load the class using Class.forName semantics.

What I really need is a way to tell Hibernate to use the same classloader for loading resources and classes.

Can I do this? Can anyone suggest another way?

I'm so close to being able to do exactly what I want!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 01, 2004 2:34 pm 
Newbie

Joined: Sun Feb 29, 2004 7:54 am
Posts: 2
I'll answer my own post.

I was being stupid. I set my classloader up properly as the context class loader for my thread, and it all works.


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.