<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: CFGroovy 1.0 RC3</title>
	<atom:link href="http://www.barneyb.com/barneyblog/2009/02/04/cfgroovy-10-rc3/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.barneyb.com/barneyblog/2009/02/04/cfgroovy-10-rc3/</link>
	<description>Thoughts, rants, and even some code from the mind of Barney Boisvert.</description>
	<lastBuildDate>Thu, 11 Sep 2014 09:58:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: barneyb</title>
		<link>https://www.barneyb.com/barneyblog/2009/02/04/cfgroovy-10-rc3/comment-page-1/#comment-162021</link>
		<dc:creator>barneyb</dc:creator>
		<pubDate>Tue, 10 Feb 2009 19:38:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=675#comment-162021</guid>
		<description>@Dennis

Yeah, don&#039;t do that.

It&#039;s not really a sample app yet, just the start of one, and a playground for some of the new features coming in 1.1.  I&#039;ve removed the auth requirement for my vendor directory so the external should work, but you&#039;ll probably be disappointed by what you get. :)</description>
		<content:encoded><![CDATA[<p>@Dennis</p>
<p>Yeah, don't do that.</p>
<p>It's not really a sample app yet, just the start of one, and a playground for some of the new features coming in 1.1.  I've removed the auth requirement for my vendor directory so the external should work, but you'll probably be disappointed by what you get. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis Spaag</title>
		<link>https://www.barneyb.com/barneyblog/2009/02/04/cfgroovy-10-rc3/comment-page-1/#comment-162019</link>
		<dc:creator>Dennis Spaag</dc:creator>
		<pubDate>Tue, 10 Feb 2009 19:29:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=675#comment-162019</guid>
		<description>I am having a problem checking out the code from the sample-blog area.  I get what looks like a basic-auth pop up for the coldspring external link in the lib directory.  Submitting it with no username/pass doesn&#039;t work.  Thanks!</description>
		<content:encoded><![CDATA[<p>I am having a problem checking out the code from the sample-blog area.  I get what looks like a basic-auth pop up for the coldspring external link in the lib directory.  Submitting it with no username/pass doesn't work.  Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: denny</title>
		<link>https://www.barneyb.com/barneyblog/2009/02/04/cfgroovy-10-rc3/comment-page-1/#comment-161307</link>
		<dc:creator>denny</dc:creator>
		<pubDate>Fri, 06 Feb 2009 22:05:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=675#comment-161307</guid>
		<description>@Barney

Whoops, shoulda been specific-- I haven&#039;t tried the cfgroovy stuff on Adobe CF on JBoss, I&#039;ve only tried it on Railo CF on JBoss.  I&#039;m just so happy with Railo, I haven&#039;t really bothered to cross-test stuff much lately. 
I&#039;m pretty sure the same issue would pop up tho, as I was dicking with Hibernate and Adobe CF for a while, and I saw it there (I always run CF under JBoss, it&#039;s my container of choice) first.

Here&#039;s my createClass function: http://coldfusion.pastebin.com/m4e784b26

Nothing special, same general idea as what you suggested.  It&#039;s just been nice to pass a cfgroovy object and use it to create groovy objects sorta like java ones.  
I&#039;ve got all of it bundled into a classloader now, so no need to add jars/restart (I verified the hibernate stuff wasn&#039;t working under jboss before I did that, as it can add complexity).

I&#039;m pretty sure that the only way I&#039;ve gotten hibernate to play with cfgroovy under jboss is to have the domain objects pre-compiled, and load them at the same time as loading hibernate, so hibernate doesn&#039;t get confused as to where the classes should be loaded from, or which hibernate to use.

Probably some simple flag to set or some such (maybe just setting the current context classloader, I&#039;ve gotten close doing that, IIRC) to make it work, but that&#039;s what I&#039;ve got so far, I think.

Ironic that Hibernate would be causing problems like commons-loggings did. Writing containers must be a total bitch.  

Class loading for fun and profit!  ;]</description>
		<content:encoded><![CDATA[<p>@Barney</p>
<p>Whoops, shoulda been specific&#8211; I haven't tried the cfgroovy stuff on Adobe CF on JBoss, I've only tried it on Railo CF on JBoss.  I'm just so happy with Railo, I haven't really bothered to cross-test stuff much lately.<br />
I'm pretty sure the same issue would pop up tho, as I was dicking with Hibernate and Adobe CF for a while, and I saw it there (I always run CF under JBoss, it's my container of choice) first.</p>
<p>Here's my createClass function: <a href="http://coldfusion.pastebin.com/m4e784b26" rel="nofollow">http://coldfusion.pastebin.com/m4e784b26</a></p>
<p>Nothing special, same general idea as what you suggested.  It's just been nice to pass a cfgroovy object and use it to create groovy objects sorta like java ones.<br />
I've got all of it bundled into a classloader now, so no need to add jars/restart (I verified the hibernate stuff wasn't working under jboss before I did that, as it can add complexity).</p>
<p>I'm pretty sure that the only way I've gotten hibernate to play with cfgroovy under jboss is to have the domain objects pre-compiled, and load them at the same time as loading hibernate, so hibernate doesn't get confused as to where the classes should be loaded from, or which hibernate to use.</p>
<p>Probably some simple flag to set or some such (maybe just setting the current context classloader, I've gotten close doing that, IIRC) to make it work, but that's what I've got so far, I think.</p>
<p>Ironic that Hibernate would be causing problems like commons-loggings did. Writing containers must be a total bitch.  </p>
<p>Class loading for fun and profit!  ;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: barneyb</title>
		<link>https://www.barneyb.com/barneyblog/2009/02/04/cfgroovy-10-rc3/comment-page-1/#comment-161294</link>
		<dc:creator>barneyb</dc:creator>
		<pubDate>Fri, 06 Feb 2009 20:13:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=675#comment-161294</guid>
		<description>@denny

Do you know if JBoss/Railo has the same issue?

I wasn&#039;t sure about how best to package a createObject-style UDF, since you have to include the UDF anywhere you want to use it, and that can be a mess.  But you can do this:

&lt;g:script script=&quot;variables.myObj = new MyNeatClass()&quot; /&gt;

Not quite as simple, but it lets you call the class constructor in a Groovy context for the automatic map-based property setting</description>
		<content:encoded><![CDATA[<p>@denny</p>
<p>Do you know if JBoss/Railo has the same issue?</p>
<p>I wasn't sure about how best to package a createObject-style UDF, since you have to include the UDF anywhere you want to use it, and that can be a mess.  But you can do this:</p>
<p>&lt;g:script script="variables.myObj = new MyNeatClass()" /&gt;</p>
<p>Not quite as simple, but it lets you call the class constructor in a Groovy context for the automatic map-based property setting</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: denny</title>
		<link>https://www.barneyb.com/barneyblog/2009/02/04/cfgroovy-10-rc3/comment-page-1/#comment-161195</link>
		<dc:creator>denny</dc:creator>
		<pubDate>Fri, 06 Feb 2009 09:43:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=675#comment-161195</guid>
		<description>@Barney  I think it&#039;s because Hibernate looks at the context classloader, or some such.  I&#039;ve run into this before, it&#039;s almost similar to the problems you get with commons-logging (which I /finally/ overcame, thanks to SLF4j!).
This is with JBoss AS 5, which I don&#039;t think is final yet, but it&#039;s getting there (and I&#039;m really loving it so far.  Good cluster stuff, faster (a bit), etc.).

I think a test case is as easy as firing up a JBoss-ed CF instance, and trying the hibernate stuff.  Everything else works fine.

BTW, have you thought about adding an createObject kind of call, as well as the runScript stuff?  That&#039;s one of the hacks I&#039;ve done, and it&#039;s been nice.  I can send you my frankensteinian hack job of the older CFGroovy if you want to see what I mean. 

@Dan For constraints, hibernate has a thing called &quot;Hibernate Validator&quot; which handles validation constraints (some of them)  length, null/not null... adds resource bundles for error messages and whatnot.  Not too bad.  It&#039;s stand-alone tho (not built into hibernate).
I&#039;ve enjoyed using GORM (part of Grails), which has some nice constraint stuff built right into the groovy domain objects.  I think I like it&#039;s approach better than hibernate validation annotations, but I&#039;m still on the fence -- hibernate is like white rice.

There are some really cool tools like Drools, or jBPM (iirc) for doing hard-core validation... Drools doesn&#039;t look too painful (rule based workflow type stuph), and it has good rule/workflow editors...

Eh.  Too much fun stuff! :-)

Again, woohoo for you, Barney!  Nice implementation of Groovy in CF you got here.  =] 
Thanks!</description>
		<content:encoded><![CDATA[<p>@Barney  I think it's because Hibernate looks at the context classloader, or some such.  I've run into this before, it's almost similar to the problems you get with commons-logging (which I /finally/ overcame, thanks to SLF4j!).<br />
This is with JBoss AS 5, which I don't think is final yet, but it's getting there (and I'm really loving it so far.  Good cluster stuff, faster (a bit), etc.).</p>
<p>I think a test case is as easy as firing up a JBoss-ed CF instance, and trying the hibernate stuff.  Everything else works fine.</p>
<p>BTW, have you thought about adding an createObject kind of call, as well as the runScript stuff?  That's one of the hacks I've done, and it's been nice.  I can send you my frankensteinian hack job of the older CFGroovy if you want to see what I mean. </p>
<p>@Dan For constraints, hibernate has a thing called "Hibernate Validator" which handles validation constraints (some of them)  length, null/not null&#8230; adds resource bundles for error messages and whatnot.  Not too bad.  It's stand-alone tho (not built into hibernate).<br />
I've enjoyed using GORM (part of Grails), which has some nice constraint stuff built right into the groovy domain objects.  I think I like it's approach better than hibernate validation annotations, but I'm still on the fence &#8212; hibernate is like white rice.</p>
<p>There are some really cool tools like Drools, or jBPM (iirc) for doing hard-core validation&#8230; Drools doesn't look too painful (rule based workflow type stuph), and it has good rule/workflow editors&#8230;</p>
<p>Eh.  Too much fun stuff! :-)</p>
<p>Again, woohoo for you, Barney!  Nice implementation of Groovy in CF you got here.  =]<br />
Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: barneyb</title>
		<link>https://www.barneyb.com/barneyblog/2009/02/04/cfgroovy-10-rc3/comment-page-1/#comment-161055</link>
		<dc:creator>barneyb</dc:creator>
		<pubDate>Thu, 05 Feb 2009 17:32:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=675#comment-161055</guid>
		<description>@Dan

Yeah, that&#039;s exactly it.  You build your persistent entities in Groovy, configure Hibernate with the standard JPA and Hibernate annotations (or you can use XML if you really want), hand it a DSN and magic happens.  Behind the scenes CFGroovy will create a DatabaseConnectionProvider backed by the DSN, wire up a Hibernate SessionFactory with it an your Groovy entities, and let it do it&#039;s thing.

Your domain objects can do anything that Hibernate lets them.  That&#039;s the beauty of it, once you get to that level, CFGroovy is completely out of the picture, you&#039;re just using raw Hibernate and all it&#039;s capabilities.</description>
		<content:encoded><![CDATA[<p>@Dan</p>
<p>Yeah, that's exactly it.  You build your persistent entities in Groovy, configure Hibernate with the standard JPA and Hibernate annotations (or you can use XML if you really want), hand it a DSN and magic happens.  Behind the scenes CFGroovy will create a DatabaseConnectionProvider backed by the DSN, wire up a Hibernate SessionFactory with it an your Groovy entities, and let it do it's thing.</p>
<p>Your domain objects can do anything that Hibernate lets them.  That's the beauty of it, once you get to that level, CFGroovy is completely out of the picture, you're just using raw Hibernate and all it's capabilities.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: barneyb</title>
		<link>https://www.barneyb.com/barneyblog/2009/02/04/cfgroovy-10-rc3/comment-page-1/#comment-161053</link>
		<dc:creator>barneyb</dc:creator>
		<pubDate>Thu, 05 Feb 2009 17:28:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=675#comment-161053</guid>
		<description>@Denny

JBoss doesn&#039;t like it?  CFGroovy loads Hibernate in it&#039;s own classloader, and it&#039;s a RootLoader so it should check itself before it goes up the ClassLaoder tree (the reverse of normal ClassLoader behaviour).  Would it be possible to come up with instructions on how to replicate the issue(s)?</description>
		<content:encoded><![CDATA[<p>@Denny</p>
<p>JBoss doesn't like it?  CFGroovy loads Hibernate in it's own classloader, and it's a RootLoader so it should check itself before it goes up the ClassLaoder tree (the reverse of normal ClassLoader behaviour).  Would it be possible to come up with instructions on how to replicate the issue(s)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Vega</title>
		<link>https://www.barneyb.com/barneyblog/2009/02/04/cfgroovy-10-rc3/comment-page-1/#comment-161015</link>
		<dc:creator>Dan Vega</dc:creator>
		<pubDate>Thu, 05 Feb 2009 14:06:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=675#comment-161015</guid>
		<description>Great stuff Barney! So can I now write all of my domain objects in Groovy and take advantage of hibernates power? How does the data source get configured for hibernate? Can I provide constraints right in my domain object? These are all questions I have but I should probably download the project again before I start asking away. Thanks!</description>
		<content:encoded><![CDATA[<p>Great stuff Barney! So can I now write all of my domain objects in Groovy and take advantage of hibernates power? How does the data source get configured for hibernate? Can I provide constraints right in my domain object? These are all questions I have but I should probably download the project again before I start asking away. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: denny</title>
		<link>https://www.barneyb.com/barneyblog/2009/02/04/cfgroovy-10-rc3/comment-page-1/#comment-160969</link>
		<dc:creator>denny</dc:creator>
		<pubDate>Thu, 05 Feb 2009 08:16:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=675#comment-160969</guid>
		<description>Sweet Barney!

I&#039;ve had a lot of fun with your cfgroovy stuff.  Funny the way your hibernate deal is going, it&#039;s getting close to what I came up with for using hibernate from CF.  The object translation (so to speak) was always kinda messy tho, every way I came at it.

Using Groovy is better than a java model, and negates a lot of problems with CF  Java.

BTW, when deploying CFGroovy Hibernate Stuff on JBoss (which already has hibernate) things can get messy.  A wonderful magical classloading type deal.  &quot;Wonderful magical&quot; being sarcasm, of course.  Haven&#039;t really found anything elegant to fix that, but I&#039;ll holler if I do.

Anyways, keep up the good work.  Swell stuff!</description>
		<content:encoded><![CDATA[<p>Sweet Barney!</p>
<p>I've had a lot of fun with your cfgroovy stuff.  Funny the way your hibernate deal is going, it's getting close to what I came up with for using hibernate from CF.  The object translation (so to speak) was always kinda messy tho, every way I came at it.</p>
<p>Using Groovy is better than a java model, and negates a lot of problems with CF  Java.</p>
<p>BTW, when deploying CFGroovy Hibernate Stuff on JBoss (which already has hibernate) things can get messy.  A wonderful magical classloading type deal.  "Wonderful magical" being sarcasm, of course.  Haven't really found anything elegant to fix that, but I'll holler if I do.</p>
<p>Anyways, keep up the good work.  Swell stuff!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
