[jboss-user] [Beginners Corner] - Re: Having an issue with Hibernate in JbossAS5

denstar do-not-reply at jboss.com
Wed Apr 15 19:51:10 EDT 2009

I'm pretty sure the problem stems from the dynamic nature of CF + Groovy.

CFGroovy is doing quite a bit of shuffling with the current context classloader, and that's what Hibernate uses to keep track of where it's at, sorta, so...

I'm thinking pre-compiled domain objects will work fine, since theoretically they'll be in the same loader, but I haven't tested yet.

To be clear, I don't think the problem lies with JBoss or Hibernate, as Hibernate is doing (as far as I can tell) the only logical deal, from it's perspective, and JBoss is just using Hibernate.

It's a similar problem to commons-logg'n, IMHO... just the nature of the beast.

FWIW, since CF is dynamical, it probably is pretty easy to compile the domain classes (Groovy or Java) and jar them up even, before loading up the groovy stuff.

Actually, I kind of like the idea of jaring up the domain classes, hbm mappings and whatnot, and deploying that instead... but I digress.

I'm pretty sure that if Barney tweaked his code a little, CFGroovy would work with a classloaded hibernate... you just have to be careful not to use stuff from outside the loader (like a 'different' dom4j, loading resources, etc.).  
I've sorta done it, but not with Groovy (just a classloaded Hibernate and JBoss), which is why I think it's possible... but I might very well be mistaken.  I'm not infallible.  More like fallible...  =]

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225767#4225767

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225767

More information about the jboss-user mailing list