<?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: Unit Testing EJBs</title> <atom:link href="http://blogs.steeplesoft.com/2007/03/unit-testing-ejbs/feed/" rel="self" type="application/rss+xml" /><link>http://blogs.steeplesoft.com/2007/03/unit-testing-ejbs/</link> <description></description> <lastBuildDate>Mon, 06 Feb 2012 08:22:23 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>By: Gonzalo</title><link>http://blogs.steeplesoft.com/2007/03/unit-testing-ejbs/comment-page-1/#comment-8182</link> <dc:creator>Gonzalo</dc:creator> <pubDate>Thu, 28 Jun 2007 18:42:48 +0000</pubDate> <guid
isPermaLink="false">http://blogs.steeplesoft.com/2007/03/27/unit-testing-ejbs/#comment-8182</guid> <description>Hello everyone, I am trying to find any examples of EJB3Unit usage, but i can&#039;t. Does anyone knows any place where i can get some? Because the documentation about using rc2 is not in the project site :(ThanksGonzalo</description> <content:encoded><![CDATA[<p>Hello everyone, I am trying to find any examples of EJB3Unit usage, but i can&#8217;t. Does anyone knows any place where i can get some? Because the documentation about using rc2 is not in the project site <img
src='http://blogs.steeplesoft.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /></p><p>Thanks</p><p>Gonzalo</p> ]]></content:encoded> </item> <item><title>By: loester</title><link>http://blogs.steeplesoft.com/2007/03/unit-testing-ejbs/comment-page-1/#comment-4300</link> <dc:creator>loester</dc:creator> <pubDate>Mon, 07 May 2007 12:01:30 +0000</pubDate> <guid
isPermaLink="false">http://blogs.steeplesoft.com/2007/03/27/unit-testing-ejbs/#comment-4300</guid> <description>Jason, thanks for sharing your gem.To the JBoss/Hibernate folks: you can easily make your own DBUnitHelper using the following information:
http://www.censnet.it/articles/cap03.htm</description> <content:encoded><![CDATA[<p>Jason, thanks for sharing your gem.</p><p>To the JBoss/Hibernate folks: you can easily make your own DBUnitHelper using the following information:<br
/> <a
href="http://www.censnet.it/articles/cap03.htm" rel="nofollow">http://www.censnet.it/articles/cap03.htm</a></p> ]]></content:encoded> </item> <item><title>By: JohnBat26</title><link>http://blogs.steeplesoft.com/2007/03/unit-testing-ejbs/comment-page-1/#comment-4131</link> <dc:creator>JohnBat26</dc:creator> <pubDate>Sat, 05 May 2007 13:27:59 +0000</pubDate> <guid
isPermaLink="false">http://blogs.steeplesoft.com/2007/03/27/unit-testing-ejbs/#comment-4131</guid> <description>Hello all !
This method for testing seem good, but this while we has small model.
How I must test Session Beans, if it dependence from 5-level graph Entities ?
I must very long tediously work istead container, executing DI myself. :(
Or one session bean depend from 5 session beans ?</description> <content:encoded><![CDATA[<p>Hello all !<br
/> This method for testing seem good, but this while we has small model.<br
/> How I must test Session Beans, if it dependence from 5-level graph Entities ?<br
/> I must very long tediously work istead container, executing DI myself. <img
src='http://blogs.steeplesoft.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /><br
/> Or one session bean depend from 5 session beans ?</p> ]]></content:encoded> </item> <item><title>By: jason</title><link>http://blogs.steeplesoft.com/2007/03/unit-testing-ejbs/comment-page-1/#comment-3631</link> <dc:creator>jason</dc:creator> <pubDate>Fri, 27 Apr 2007 14:42:33 +0000</pubDate> <guid
isPermaLink="false">http://blogs.steeplesoft.com/2007/03/27/unit-testing-ejbs/#comment-3631</guid> <description>Szymono,I&#039;m not sure it&#039;s &quot;better,&quot; really, I just like the way it works better, if that makes sense.  We tried ejb3unit and had some issues with it.  To be honest, that was so long ago, I can&#039;t remember off the top of my head.  I seem to remember thinking that it was awfully heavy.  Having said all of that, if ejb3unit works for you and you like it, there&#039;s no reason to switch that I can see.</description> <content:encoded><![CDATA[<p>Szymono,</p><p>I&#8217;m not sure it&#8217;s &#8220;better,&#8221; really, I just like the way it works better, if that makes sense.  We tried ejb3unit and had some issues with it.  To be honest, that was so long ago, I can&#8217;t remember off the top of my head.  I seem to remember thinking that it was awfully heavy.  Having said all of that, if ejb3unit works for you and you like it, there&#8217;s no reason to switch that I can see.</p> ]]></content:encoded> </item> <item><title>By: Szymono</title><link>http://blogs.steeplesoft.com/2007/03/unit-testing-ejbs/comment-page-1/#comment-3617</link> <dc:creator>Szymono</dc:creator> <pubDate>Fri, 27 Apr 2007 08:48:34 +0000</pubDate> <guid
isPermaLink="false">http://blogs.steeplesoft.com/2007/03/27/unit-testing-ejbs/#comment-3617</guid> <description>Hi,Could you tell me is above method better than ejb3unit method (http://ejb3unit.sourceforge.net)?Best Regards,
Szymono</description> <content:encoded><![CDATA[<p>Hi,</p><p>Could you tell me is above method better than ejb3unit method (<a
href="http://ejb3unit.sourceforge.net" rel="nofollow">http://ejb3unit.sourceforge.net</a>)?</p><p>Best Regards,<br
/> Szymono</p> ]]></content:encoded> </item> <item><title>By: jason</title><link>http://blogs.steeplesoft.com/2007/03/unit-testing-ejbs/comment-page-1/#comment-2218</link> <dc:creator>jason</dc:creator> <pubDate>Mon, 02 Apr 2007 14:00:42 +0000</pubDate> <guid
isPermaLink="false">http://blogs.steeplesoft.com/2007/03/27/unit-testing-ejbs/#comment-2218</guid> <description>vicnov, thanks for the feedback.  A base class for txn handling, or even use of @Before methods would likely simplify txn handling a bit, but also make things a little less flexible -- just depends on your intended usage, I guess, but a good point either way.  As far as Spring goes, we&#039;ve &lt;a target=&quot;_blank&quot; href=&quot;/2006/05/22/a-little-less-spring-in-our-step/&quot; rel=&quot;nofollow&quot;&gt;already settled that discussion&lt;/a&gt;.  All we were using Spring for was DI, which we get for free with EJB3 with less configuration and one less library (and its 573 dependecies).  While I think Spring is great, and we still use things like the JdbcTemplate, EJB3 made more sense for us given our environment (GlassFish, JSF 1.2, etc). :)</description> <content:encoded><![CDATA[<p>vicnov, thanks for the feedback.  A base class for txn handling, or even use of @Before methods would likely simplify txn handling a bit, but also make things a little less flexible &#8212; just depends on your intended usage, I guess, but a good point either way.  As far as Spring goes, we&#8217;ve <a
target="_blank" href="/2006/05/22/a-little-less-spring-in-our-step/" rel="nofollow">already settled that discussion</a>.  All we were using Spring for was DI, which we get for free with EJB3 with less configuration and one less library (and its 573 dependecies).  While I think Spring is great, and we still use things like the JdbcTemplate, EJB3 made more sense for us given our environment (GlassFish, JSF 1.2, etc). <img
src='http://blogs.steeplesoft.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: vicnov</title><link>http://blogs.steeplesoft.com/2007/03/unit-testing-ejbs/comment-page-1/#comment-2029</link> <dc:creator>vicnov</dc:creator> <pubDate>Fri, 30 Mar 2007 15:59:02 +0000</pubDate> <guid
isPermaLink="false">http://blogs.steeplesoft.com/2007/03/27/unit-testing-ejbs/#comment-2029</guid> <description>Jason, thanks for this idea of testing EJBs!
Some time ago we worked at a project with EJB 3.0 beans, and our unit-tests worked with EJBs deployed to app server. This worked well but required much time for deployment...
After that I worked (and working now) with Spring - I was  surprised how it is simple and fast to run unit-tests in Spring. No deployment, but your test class should be inherited from some Spring&#039;s class which prepares environment, manage transactions etc.
Now, after your article I see that I can do almost the same with session beans in EJB 3.0.I have just 2 ideas to propose:
1. You could create a base (parent) class which manages transactions, creates EntityManager, etc. All your test classes could inherit it.
2. If necessary, you can deal even with field-level injection using Java Reflection
3. You could use Spring itself for unit-testing. But this way you may end up by asking &quot;Do I really need Java EE container or I could use Spring with any Servlet container?&quot; :-)</description> <content:encoded><![CDATA[<p>Jason, thanks for this idea of testing EJBs!<br
/> Some time ago we worked at a project with EJB 3.0 beans, and our unit-tests worked with EJBs deployed to app server. This worked well but required much time for deployment&#8230;<br
/> After that I worked (and working now) with Spring &#8211; I was  surprised how it is simple and fast to run unit-tests in Spring. No deployment, but your test class should be inherited from some Spring&#8217;s class which prepares environment, manage transactions etc.<br
/> Now, after your article I see that I can do almost the same with session beans in EJB 3.0.</p><p>I have just 2 ideas to propose:<br
/> 1. You could create a base (parent) class which manages transactions, creates EntityManager, etc. All your test classes could inherit it.<br
/> 2. If necessary, you can deal even with field-level injection using Java Reflection<br
/> 3. You could use Spring itself for unit-testing. But this way you may end up by asking &#8220;Do I really need Java EE container or I could use Spring with any Servlet container?&#8221; <img
src='http://blogs.steeplesoft.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 10/25 queries in 2.341 seconds using disk: basic

Served from: blogs.steeplesoft.com @ 2012-02-07 14:13:28 -->
