<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>breddy.net &#187; jboss</title>
	<atom:link href="http://www.breddy.net/tag/jboss/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.breddy.net</link>
	<description>Personal and professional weblog of Chris Bredesen</description>
	<lastBuildDate>Tue, 21 Jun 2011 20:31:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Presentation Notes: TriJUG April 18, 2011</title>
		<link>http://www.breddy.net/2011/04/19/trijug-april-cdi/</link>
		<comments>http://www.breddy.net/2011/04/19/trijug-april-cdi/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 12:54:59 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[Professional]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jboss]]></category>
		<category><![CDATA[jug]]></category>
		<category><![CDATA[presentation]]></category>

		<guid isPermaLink="false">http://www.breddy.net/?p=173</guid>
		<description><![CDATA[Presentation outline and notes/references for my  Traiangle Java User&#8217;s Group presentation given on April 18, 2011.  The slides used during the presentation are merely an instrument for me as the presenter; they aren&#8217;t available for download.  Below is the rough &#8230; <a href="http://www.breddy.net/2011/04/19/trijug-april-cdi/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Presentation outline and notes/references for my  <a href="http://trijug.org">Traiangle Java User&#8217;s Group</a> presentation given on April 18, 2011.  The slides used during the presentation are merely an instrument for me as the presenter; they aren&#8217;t available for download.  Below is the rough outline I (kinda) followed and at the bottom are references and helpful links.  Feel free to leave any and all candid feedback in the comments.  Thanks for attending!<span id="more-173"></span></p>
<h3>Modern Web Component Development with Java EE6 and Arquillian</h3>
<h3>Outline</h3>
<ul>
<li>About Me
<ul>
<li>Chris Bredesen  &#8211; Product Manager, Red Hat Customer Portal</li>
</ul>
</li>
<li>Agenda
<ul>
<li>Brief History</li>
<li>CDI</li>
<li>Arquillian</li>
<li>Anatomy of an EE6 application</li>
<li>Informal audience survey &#8211; Spring / Seam / EE 5/6 usage?</li>
</ul>
</li>
<li>J2EE 1.4
<ul>
<li>InitialContext ctx = &#8230;..</li>
<li>No DI; JNDI gave us a registry</li>
<li>Clients look up what&#8217;s needed (&#8220;traditional&#8221; control structure)</li>
</ul>
</li>
<li>Java EE 5
<ul>
<li>Limited (but well-defined!) component types&#8230;</li>
<li>@Stateless / Stateful</li>
<li>&#8230;that can be injected into other EE 5 components</li>
<li>@EJB</li>
<li>@Resource</li>
<li>@PersistenceContext</li>
</ul>
</li>
<li>Seam 1.x &amp; 2.x
<ul>
<li>Leverages EE rather than sidestepping it
<ul>
<li>Introduced what was to become the CDI &#8220;programming model&#8221;</li>
<li>Somewhat tightly coupled with JSF 1 &amp; a web container</li>
<li>Annotation-based component declaration</li>
<li>Events</li>
<li>Stateful/Conversational model that optionally uses EJB3</li>
</ul>
</li>
<li>Rich web framework
<ul>
<li>MVC (both pull- and push-style)</li>
<li>Security</li>
<li>Persistence</li>
<li>Localization</li>
<li>Greatly improves JSF&#8217;s navigation rules (far less verbose and limited)</li>
<li>Bookmarkable URL&#8217;s / GET support</li>
</ul>
</li>
<li>Built-in integration with Drools, RESTEasy, etc</li>
</ul>
</li>
<li>Java EE6
<ul>
<li>Robust, flexible DI via CDI</li>
<li>EJB 3.1 (no-interface views, finally!)</li>
<li>JAX-RS  &#8211; Profiles (web, EE)</li>
</ul>
</li>
<li>CDI Overview
<ul>
<li>Standarization and improvement of the Seam component model + Guice)</li>
<li>@Inject (aligned with JSR-330)</li>
<li>@Named</li>
<li>@Produces</li>
<li>@RequestScoped</li>
</ul>
</li>
<li>CDI Overview (cont&#8217;d)
<ul>
<li>Contexts
<ul>
<li>@ApplicationScoped</li>
<li>@SessionScoped</li>
<li>@ConversationScoped</li>
<li>@RequestScoped</li>
<li>@[Anything]Scoped &#8211; pluggable contexts!
<ul>
<li>@ThreadScoped &#8211; via ThreadLocal</li>
<li>@CacheScoped &#8211; via Cache impl</li>
</ul>
</li>
</ul>
</li>
<li>Lifecycle
<ul>
<li>Robust scoping requires robust lifecycle management</li>
<li>Callbacks</li>
<li>Managed instances that end when the scope does</li>
</ul>
</li>
<li>Events
<ul>
<li>Bridgeable to JMS</li>
</ul>
</li>
<li>Well-defined SPI for creating portable extensions</li>
</ul>
</li>
<li>CDI Overview (cont&#8217;d)
<ul>
<li>Seam was too many things</li>
<li>CDI is a core framework &amp; programming model</li>
<li>Web toolkits can be built on top of CDI via portable extensions</li>
</ul>
</li>
<li>CDI Overview (cont&#8217;d)
<ul>
<li>Stereotypes help group common sets of annotations</li>
</ul>
</li>
<li>JSF2 adds many features that Seam had
<ul>
<li>Page level metadata/navigation &lt;f:metadata&gt;</li>
<li>EL integration with CDI</li>
<li>Better GET support</li>
</ul>
</li>
<li>Cross-container testing  &#8211; Arquillian  &#8211; ShrinkWrap</li>
<li>Anatomy of an EE 6 Application</li>
</ul>
<h3>Tools Used</h3>
<ul>
<li>JBoss AS 6.0 Final</li>
<li>Eclipse for Java EE developers 3.6 SR2</li>
<li>JBoss Tools 3.2</li>
<li>m2eclipse 0.12 (make sure to install WTP support!)</li>
<li>Maven 3.0.3</li>
</ul>
<h3>References &amp; Other Reading Material</h3>
<ul>
<li>CDI Quickstart for Maven <a href="http://seamframework.org/Documentation/CDIQuickstartForMavenUsers">http://seamframework.org/Documentation/CDIQuickstartForMavenUsers</a></li>
<li>Weld reference <a href="http://docs.jboss.org/weld/reference/1.0.1-Final/en-US/html/">http://docs.jboss.org/weld/reference/1.0.1-Final/en-US/html/</a></li>
<li>JSR-299 <a href="http://www.jcp.org/en/jsr/detail?id=299">http://www.jcp.org/en/jsr/detail?id=299</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.breddy.net/2011/04/19/trijug-april-cdi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Accessing a JBoss EJB3 Session Bean With Spring</title>
		<link>http://www.breddy.net/2006/07/06/accessing-a-jboss-ejb3-session-bean-with-spring/</link>
		<comments>http://www.breddy.net/2006/07/06/accessing-a-jboss-ejb3-session-bean-with-spring/#comments</comments>
		<pubDate>Thu, 06 Jul 2006 17:34:09 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[Professional]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jboss]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://www.breddy.net/2006/07/06/accessing-a-jboss-ejb3-session-bean-with-spring/</guid>
		<description><![CDATA[Spring and Hibernate have long been my choice of frameworks with which to construct maintainable, scalable middle-tier software. Spring promotes good OO design using loose coupling and provides excellent declarative transaction support. Hibernate is the persistence tool of choice for &#8230; <a href="http://www.breddy.net/2006/07/06/accessing-a-jboss-ejb3-session-bean-with-spring/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Spring and Hibernate have long been my choice of frameworks with which to construct maintainable, scalable middle-tier software.  Spring promotes good OO design using loose coupling and provides excellent declarative transaction support.  Hibernate is the persistence tool of choice for the open source community.  Any sane person who programs this way will have given up on EJB long ago.  Coarse-grained entities, tightly coupled service objects and XML deployment descripters a-plenty are enough to bring a guy to his knees.</p>
<p>But no more.  The EJB expert group, now composed of some of the very creators of modern persistence framework, has bequeathed upon us something wonderful.  The lightweight POJO programming model we have come to love is apparent everywhere in the EJB 3.0 specifiction (<a title="JSR-220" href="http://www.jcp.org/en/jsr/detail?id=220" target="_blank">JSR-220</a>), which was <a title="JSR-220 voting results" href="http://www.jcp.org/en/jsr/results?id=3768" target="_blank">unanimously accepted</a> by the <a title="Java Community Process" href="http://www.jcp.org" target="_blank">JCP</a> earlier this year.  EJB 3.0 is just one goodie in the larger <a title="Java EE 5 What's New" href="http://java.sun.com/javaee/overview/whatsnew.jsp" target="_blank">Java EE 5</a> (<a title="JSR-244" href="http://www.jcp.org/en/jsr/detail?id=244" target="_blank">JSR-244</a>) bag &#8211; but this post is going to be long enough as it is.<span id="more-40"></span></p>
<p>When I returned from Las Vegas with my newfound interest in EJB, my first task at hand was to create a little test application that demonstrated the scenario that is most applicable to my work:  EJB3 services remoted over RMI consumed with POJO web applications that already use Spring.  This use case stems from the need that we have realized the need to segment a growing middle-tier application from the monolithic beast it is destined to become into smaller, more manageable services.  The client programs (mostly web applications) already access the business interfaces using Spring.</p>
<p>I&#8217;m going to skip the gory details of setting up the server, creating a project and all the like.  There are plenty of explanations of this elsewhere.  Besides, this post is going to be long enough as it is.</p>
<p>First we need a business interface.  How about something really complex:</p>
<p>[java]<br />
public interface SimpleService {<br />
int stringLength(String string);<br />
}<br />
[/java]</p>
<p>Nothing fancy there.  Now let&#8217;s implement it with some logic:</p>
<p>[java]<br />
public class SimpleServiceBean implements SimpleService {<br />
public int stringLength(String string) {<br />
return string == null ? 0 : string.length();<br />
}<br />
}<br />
[/java]</p>
<p>Still totally straightforward.  Now let&#8217;s turn our bean into an EJB.  This is the <em>really</em> complicated part.  Watch for the annotations:</p>
<p>[java]<br />
@Stateless<br />
@Remote(SimpleService.class)<br />
public class SimpleServiceBean implements SimpleService {<br />
public int stringLength(String string) {<br />
return string == null ? 0 : string.length();<br />
}<br />
}<br />
[/java]</p>
<p>Did you get all that?  The <tt>@Stateless</tt> annotation tells us that this is a Stateless Session bean, and the <tt>@Remote</tt> annotation specifies the remote interface.  <em>Everything else is handled by the container.</em> Although the footwork is managed by the container in a somewhat vendor-specific way, the annotations are standard Java EE, and so you&#8217;re not tied to an implementation. When you catch your breath, let&#8217;s move on.</p>
<p>Since Java EE 5 has embraced configuration by exception, we don&#8217;t even need any depoyment descriptors.  These two files can be compiled, JAR&#8217;d up and deployed to a server of your choosing &#8212; I used JBoss 4.0.4.</p>
<p>In order to have a client, we need to provide, at a minimum, the remote interfaces and any other classes or exceptions it references.  For testing, I just tossed the same JAR on the classpath since I know it contains everything I need.  Additionally, we need the Spring JARs (this test used 2.0RC1) and the JBoss client JAR&#8217;s.</p>
<p>The only real programming we have to do here is to create a Spring container that wires up to the server&#8217;s JNDI directory.  To do this, we&#8217;ll use Spring&#8217;s <tt>JndiObjectFactoryBean</tt>.  This part actually confused me because try as I did, I could never accomplish this feat using the more aptly-named <tt>SimpleRemoteStatelessSessionProxyFactoryBean</tt>.  The difference, apparently, is that since EJB3 places no specific requirements on the business, home or remote interfaces, there is less to do, and thus the client simply grabs the object and narrows it down as prescribed.  Here is my Spring configuration (minus the XML header and DTD info):</p>
<p>[xml]</p>
<p>org.jnp.interfaces.NamingContextFactory org.jboss.naming:org.jnp.interfaces jnp://localhost:1099<br />
[/xml]</p>
<p>The JNDI properties provided are JBoss specific, as is the provider URL.  These are included with the JBoss client JAR in the form of a jndi.properties file.  They are exactly the same as what would be used to construct a traditional <tt>InitialContext</tt> if this were a non-spring J2SE client.</p>
<p>JBoss mounts Remote interfaces (by default) using /remote, and Local interfaces using /local.  As you can see here, we&#8217;ve chosen the remote.  One could just as easily expose <tt>SimpleServiceBean</tt> as a Local EJB by using the <tt>@Local</tt> annotation and providing the same business interface as an arguement.  The Spring container changes only in URL and jndiName values.</p>
<p>Once the bean factory is configured, you can load it and request the remote <tt>SimpleServiceBean</tt> proxy by name (simpleService), casting it to <tt>SimpleService</tt> as you would normally do with a Spring-managed object.  It works flawlessly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.breddy.net/2006/07/06/accessing-a-jboss-ejb3-session-bean-with-spring/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Seam, EJB3 and Gavin</title>
		<link>http://www.breddy.net/2006/06/13/seam-ejb3-and-gavin/</link>
		<comments>http://www.breddy.net/2006/06/13/seam-ejb3-and-gavin/#comments</comments>
		<pubDate>Wed, 14 Jun 2006 02:05:36 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[Professional]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jboss]]></category>

		<guid isPermaLink="false">http://www.breddy.net/2006/06/13/seam-ejb3-and-gavin/</guid>
		<description><![CDATA[This afternoon&#8217;s festivities were highlited by a characteristically colorful presentation by Gavin King. For those who don&#8217;t know, Gavin is the creator of the Hibernate persistence framework which was aquired eventually by JBoss. Gavin &#38; crew demonstrated quickly but effectively &#8230; <a href="http://www.breddy.net/2006/06/13/seam-ejb3-and-gavin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This afternoon&#8217;s festivities were highlited by a characteristically colorful presentation by Gavin King.  For those who don&#8217;t know, Gavin is the creator of the <a title="Hibernate.org" href="http://www.hibernate.org/" target="_blank">Hibernate</a> persistence framework which was aquired eventually by JBoss.</p>
<p>Gavin &amp; crew demonstrated quickly but effectively the lovely synergy that has been brought to EJB3 and JSF by their newest creation, <a title="Seam homepage" href="http://labs.jboss.com/portal/jbossseam" target="_blank">Seam</a>.  Seam can hardly be called a web framework &#8212; you wouldn&#8217;t recognize it as such what with its lack of, well, just about everything that you&#8217;ve come to expect from a web framework.</p>
<p>Seam throws away boilerplate code a-la Rails, but does so in a way that leverages a lot of the untapped power of EJB3 and JSF. Seam is all about Don&#8217;t Repeat Yourself (DRY).  As such, we throw away form beans (a-la Spring MVC) and a whole lot of XML (in favor of annotations).</p>
<p>The most surprising theme that emerges from all of this is the rampant use of Stateful Session beans.  You read that right &#8211; I said Stateful.  Seam begs the question, &#8220;why on earth would I represent state in a database (slow is an understatement) or in HTTPSession (with no dirty checking) when I can use this lovely gift called Stateful beans?&#8221;  He makes a damn good point.  By representing web conversations as SFSB&#8217;s (which are POJO&#8217;s in EJB3, in case you&#8217;re wondering) you eliminate many of the headaches associated with web apps.  Multiple tabs open in your browser?  Piece of cake &#8211; each browser tab/session/window has a unique conversation (they&#8217;re <em>stateful</em>, remember?).   Double submit?  Ha!  Don&#8217;t even try!  Want to have a clean client redirect after performing some action, but still pass messages across?  No problemo &#8211; you&#8217;ve got a lightweight stateful conversation behind you.</p>
<p>By logically grouping your flows into SFSB&#8217;s, you can leverage more sophisticated failover because the container dirty-checks each instance and replicates automatically.  Try that with HTTPSession.</p>
<p>So, I will be doing a sandbox app soon with Seam, and I&#8217;ll post more as I know it.  Till then, read all you can.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.breddy.net/2006/06/13/seam-ejb3-and-gavin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Future of JBoss AS</title>
		<link>http://www.breddy.net/2006/06/13/the-future-of-jboss-as/</link>
		<comments>http://www.breddy.net/2006/06/13/the-future-of-jboss-as/#comments</comments>
		<pubDate>Tue, 13 Jun 2006 20:20:08 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[Professional]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jboss]]></category>

		<guid isPermaLink="false">http://www.breddy.net/2006/06/13/the-future-of-jboss-as/</guid>
		<description><![CDATA[You can&#8217;t really question the inertia behind enterprise development using POJO&#8217;s and lightweight frameworks.  Rod Johnson (of Spring framework fame) wrote the book about this approach, effectively putting the last nail in the heavy framework&#8217;s coffin.  This morning&#8217;s presentation by &#8230; <a href="http://www.breddy.net/2006/06/13/the-future-of-jboss-as/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>You can&#8217;t really question the inertia behind enterprise development using POJO&#8217;s and lightweight frameworks.  Rod Johnson (of Spring framework fame) <a title="J2EE Without EJB" href="http://www.springframework.com/books/j2eewithoutEJB.html" target="_blank">wrote</a> <a title="Expert One-on-one J2EE" href="http://www.springframework.com/books/expertoneonone.html" target="_blank">the</a> <a title="Professional Java Development with the Spring Framework (Amazon.com)" href="http://www.amazon.com/gp/product/0764574833/sr=8-1/qid=1150229760/ref=pd_bbs_1/103-5528651-5807808?%5Fencoding=UTF8" target="_blank">book</a> about this approach, effectively putting the last nail in the heavy framework&#8217;s coffin.  This morning&#8217;s presentation by JBoss covered their take on this from a 5000-ft level and also described some of the new things afoot in v5 of JBoss AS.</p>
<p>JBoss is mutating their MicroKernel (heavily JMX based) into what they call the MicroContainer.  The MicroContainer architecture could be described by reading the outline of Spring&#8217;s core container and subtituting &#8220;Spring&#8221; for &#8220;JBoss&#8221;.  Indeed, they are not only building a lightweight DI framework; they are building their entire app server on it.  Cool.</p>
<p>JBoss has always been good about letting the developer/integrater customize the footprint of the server through configuration.  It looks like this is going to be even cleaner and better in v5, since the same DI engine which builds the server innerworkings can also assemble application components &#8212; all the way up through the presentation tier using Seam/JSF.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.breddy.net/2006/06/13/the-future-of-jboss-as/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

