<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: EJB 3.1: Immediate feedback on EJB Singletons and concurrency needed</title>
	<atom:link href="http://bill.burkecentral.com/2007/09/19/ejb-31-immediate-feedback-on-ejb-singletons-and-concurrency-needed/feed/" rel="self" type="application/rss+xml" />
	<link>http://bill.burkecentral.com/2007/09/19/ejb-31-immediate-feedback-on-ejb-singletons-and-concurrency-needed/</link>
	<description>Software plumbing using middleware wrenches</description>
	<lastBuildDate>Thu, 09 Feb 2012 19:51:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: JR</title>
		<link>http://bill.burkecentral.com/2007/09/19/ejb-31-immediate-feedback-on-ejb-singletons-and-concurrency-needed/#comment-2437</link>
		<dc:creator><![CDATA[JR]]></dc:creator>
		<pubDate>Tue, 20 Jan 2009 22:03:53 +0000</pubDate>
		<guid isPermaLink="false">http://bill.burkecentral.com/2007/09/19/ejb-31-immediate-feedback-on-ejb-singletons-and-concurrency-needed/#comment-2437</guid>
		<description><![CDATA[So what transpired of this? Is this in the 3.1 release, and can you brief the behavior of the singleton in the clustered environment. Does the implementation allow only one cluster-wide instance with data shared in Jboss cache?? Thanks]]></description>
		<content:encoded><![CDATA[<p>So what transpired of this? Is this in the 3.1 release, and can you brief the behavior of the singleton in the clustered environment. Does the implementation allow only one cluster-wide instance with data shared in Jboss cache?? Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://bill.burkecentral.com/2007/09/19/ejb-31-immediate-feedback-on-ejb-singletons-and-concurrency-needed/#comment-1891</link>
		<dc:creator><![CDATA[Richard]]></dc:creator>
		<pubDate>Wed, 07 May 2008 22:16:09 +0000</pubDate>
		<guid isPermaLink="false">http://bill.burkecentral.com/2007/09/19/ejb-31-immediate-feedback-on-ejb-singletons-and-concurrency-needed/#comment-1891</guid>
		<description><![CDATA[I realize that its a bit late (to say the least), but...

Please let there be an easy way to create a cluster-wide singleton with an annotation!  In fact, I&#039;d love to see the cluster mindset change a little bit.  Let&#039;s face it, few people are using EJB to create simple throwaway apps that will never run clustered.  Many of them may not grow to that point, but anyone intentionally writing a low-use app is unlikely to use an environment such as EJB in which to do it.

Having an easy way to create a cluster-wide singleton without having to worry about cache access issues, the risk of creating two objects and destroying one if there&#039;s a cache race (generally not a big deal, but something you have to deal with anyway), etc, would be wonderful.  Sure, it can be done without it, but one of the massive wins in EJB3 has been taking concepts that were difficult and handling them with a single annotation so the developer doesn&#039;t have to risk the &quot;enter everything correctly and get your desired behavior; miss one thing and encounter weirdness&quot; behavior we all grew to hate with EJB2...]]></description>
		<content:encoded><![CDATA[<p>I realize that its a bit late (to say the least), but&#8230;</p>
<p>Please let there be an easy way to create a cluster-wide singleton with an annotation!  In fact, I&#8217;d love to see the cluster mindset change a little bit.  Let&#8217;s face it, few people are using EJB to create simple throwaway apps that will never run clustered.  Many of them may not grow to that point, but anyone intentionally writing a low-use app is unlikely to use an environment such as EJB in which to do it.</p>
<p>Having an easy way to create a cluster-wide singleton without having to worry about cache access issues, the risk of creating two objects and destroying one if there&#8217;s a cache race (generally not a big deal, but something you have to deal with anyway), etc, would be wonderful.  Sure, it can be done without it, but one of the massive wins in EJB3 has been taking concepts that were difficult and handling them with a single annotation so the developer doesn&#8217;t have to risk the &#8220;enter everything correctly and get your desired behavior; miss one thing and encounter weirdness&#8221; behavior we all grew to hate with EJB2&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://bill.burkecentral.com/2007/09/19/ejb-31-immediate-feedback-on-ejb-singletons-and-concurrency-needed/#comment-1590</link>
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Thu, 24 Jan 2008 15:11:04 +0000</pubDate>
		<guid isPermaLink="false">http://bill.burkecentral.com/2007/09/19/ejb-31-immediate-feedback-on-ejb-singletons-and-concurrency-needed/#comment-1590</guid>
		<description><![CDATA[Three different concerns here:

1- Activation timing
2- Concurrency
3- Instance count

I wouldn&#039;t use a term such as Singleton to cover the three.]]></description>
		<content:encoded><![CDATA[<p>Three different concerns here:</p>
<p>1- Activation timing<br />
2- Concurrency<br />
3- Instance count</p>
<p>I wouldn&#8217;t use a term such as Singleton to cover the three.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Odi</title>
		<link>http://bill.burkecentral.com/2007/09/19/ejb-31-immediate-feedback-on-ejb-singletons-and-concurrency-needed/#comment-316</link>
		<dc:creator><![CDATA[Odi]]></dc:creator>
		<pubDate>Mon, 01 Oct 2007 16:21:43 +0000</pubDate>
		<guid isPermaLink="false">http://bill.burkecentral.com/2007/09/19/ejb-31-immediate-feedback-on-ejb-singletons-and-concurrency-needed/#comment-316</guid>
		<description><![CDATA[@Steven: Unlike Servlets a SLSB doesn&#039;t need to be reentrant, and I quite like that. They are stateless in the sense that the caller must not rely on state being preserved between method calls as consecutive calls may go to different instances. You can still use instance variables in a SLSB (for example to hold state during private method calls without passing it through method parameters) and it&#039;s still thread-safe.]]></description>
		<content:encoded><![CDATA[<p>@Steven: Unlike Servlets a SLSB doesn&#8217;t need to be reentrant, and I quite like that. They are stateless in the sense that the caller must not rely on state being preserved between method calls as consecutive calls may go to different instances. You can still use instance variables in a SLSB (for example to hold state during private method calls without passing it through method parameters) and it&#8217;s still thread-safe.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KRo</title>
		<link>http://bill.burkecentral.com/2007/09/19/ejb-31-immediate-feedback-on-ejb-singletons-and-concurrency-needed/#comment-296</link>
		<dc:creator><![CDATA[KRo]]></dc:creator>
		<pubDate>Thu, 27 Sep 2007 05:19:22 +0000</pubDate>
		<guid isPermaLink="false">http://bill.burkecentral.com/2007/09/19/ejb-31-immediate-feedback-on-ejb-singletons-and-concurrency-needed/#comment-296</guid>
		<description><![CDATA[-1 Singleton sb. 

I prefer a facade slsb delegating through to a pojo singleton with the facade slsb statically referencing the singleton. The pojo singleton uses synchronize (the java language rather than introducing an alias annotation to the EJB) as necessary. When newer and better K EE 10 comes along, I can easily replace facade EJBs with whatever the K server requires. Or, I can re-use the pojo singleton in both J EE 5 and ESB in the same architecture.

But, I&#039;m still wondering why I find the Timer EJB so useful (it is a singleton?) - or was the Timer EJB simply misnamed and forced into an EJB construct when it might better have been a service bean?]]></description>
		<content:encoded><![CDATA[<p>-1 Singleton sb. </p>
<p>I prefer a facade slsb delegating through to a pojo singleton with the facade slsb statically referencing the singleton. The pojo singleton uses synchronize (the java language rather than introducing an alias annotation to the EJB) as necessary. When newer and better K EE 10 comes along, I can easily replace facade EJBs with whatever the K server requires. Or, I can re-use the pojo singleton in both J EE 5 and ESB in the same architecture.</p>
<p>But, I&#8217;m still wondering why I find the Timer EJB so useful (it is a singleton?) &#8211; or was the Timer EJB simply misnamed and forced into an EJB construct when it might better have been a service bean?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://bill.burkecentral.com/2007/09/19/ejb-31-immediate-feedback-on-ejb-singletons-and-concurrency-needed/#comment-294</link>
		<dc:creator><![CDATA[Andy]]></dc:creator>
		<pubDate>Thu, 27 Sep 2007 01:40:15 +0000</pubDate>
		<guid isPermaLink="false">http://bill.burkecentral.com/2007/09/19/ejb-31-immediate-feedback-on-ejb-singletons-and-concurrency-needed/#comment-294</guid>
		<description><![CDATA[+1 SLSB instance pools blow.]]></description>
		<content:encoded><![CDATA[<p>+1 SLSB instance pools blow.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Shaw</title>
		<link>http://bill.burkecentral.com/2007/09/19/ejb-31-immediate-feedback-on-ejb-singletons-and-concurrency-needed/#comment-286</link>
		<dc:creator><![CDATA[Tim Shaw]]></dc:creator>
		<pubDate>Wed, 26 Sep 2007 09:46:05 +0000</pubDate>
		<guid isPermaLink="false">http://bill.burkecentral.com/2007/09/19/ejb-31-immediate-feedback-on-ejb-singletons-and-concurrency-needed/#comment-286</guid>
		<description><![CDATA[I think there are 2 aspects to this - initialisation (a la &#039;startup&#039; servlet approach) and shared state maintenance (a la &#039;stuff it in the DB&#039;).
I would vote for both - they are entirely different use cases.
@Startup - run once and forget : single &#039;onStartup&#039; method called at a specific point in the container lifecycle
@Service - singleton with maintained state as per the JBoss one : I certainly vote for a single &#039;view&#039; of a Service bean across a cluster ... but in that case it&#039;s the state that&#039;s important - there could be many instances of the class itself. My use case here would be a simple cache - but I also see a need for shared state across many MDB&#039;s running in parallel. Note that a service bean could be instantiated after startup - and thus have available the other beans it might need.]]></description>
		<content:encoded><![CDATA[<p>I think there are 2 aspects to this &#8211; initialisation (a la &#8216;startup&#8217; servlet approach) and shared state maintenance (a la &#8216;stuff it in the DB&#8217;).<br />
I would vote for both &#8211; they are entirely different use cases.<br />
@Startup &#8211; run once and forget : single &#8216;onStartup&#8217; method called at a specific point in the container lifecycle<br />
@Service &#8211; singleton with maintained state as per the JBoss one : I certainly vote for a single &#8216;view&#8217; of a Service bean across a cluster &#8230; but in that case it&#8217;s the state that&#8217;s important &#8211; there could be many instances of the class itself. My use case here would be a simple cache &#8211; but I also see a need for shared state across many MDB&#8217;s running in parallel. Note that a service bean could be instantiated after startup &#8211; and thus have available the other beans it might need.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Heiko W. Rupp</title>
		<link>http://bill.burkecentral.com/2007/09/19/ejb-31-immediate-feedback-on-ejb-singletons-and-concurrency-needed/#comment-273</link>
		<dc:creator><![CDATA[Heiko W. Rupp]]></dc:creator>
		<pubDate>Mon, 24 Sep 2007 15:48:44 +0000</pubDate>
		<guid isPermaLink="false">http://bill.burkecentral.com/2007/09/19/ejb-31-immediate-feedback-on-ejb-singletons-and-concurrency-needed/#comment-273</guid>
		<description><![CDATA[I think it is a good idea to have a @Singleton ( I don&#039;t mind the name of it)
But please make concurrency semantics very explict. Don&#039;t leave that to the container implementor.
I guess explicitly specifying it via annotation with the sensible default of single threaded (as principle of least surprise) is best.

And yes allow those singletons to be started before other &quot;regular&quot; EJBS so that they really can be used to &#039;bootstrap&#039; the enterprise part. I don&#039;t like the @PostConstruct annotation here, as it has a different semantic.

Also make it very clear if such a service can access other EJBs when it is initially called (do we need two initialization phases?)]]></description>
		<content:encoded><![CDATA[<p>I think it is a good idea to have a @Singleton ( I don&#8217;t mind the name of it)<br />
But please make concurrency semantics very explict. Don&#8217;t leave that to the container implementor.<br />
I guess explicitly specifying it via annotation with the sensible default of single threaded (as principle of least surprise) is best.</p>
<p>And yes allow those singletons to be started before other &#8220;regular&#8221; EJBS so that they really can be used to &#8216;bootstrap&#8217; the enterprise part. I don&#8217;t like the @PostConstruct annotation here, as it has a different semantic.</p>
<p>Also make it very clear if such a service can access other EJBs when it is initially called (do we need two initialization phases?)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: billburke</title>
		<link>http://bill.burkecentral.com/2007/09/19/ejb-31-immediate-feedback-on-ejb-singletons-and-concurrency-needed/#comment-269</link>
		<dc:creator><![CDATA[billburke]]></dc:creator>
		<pubDate>Mon, 24 Sep 2007 14:23:26 +0000</pubDate>
		<guid isPermaLink="false">http://bill.burkecentral.com/2007/09/19/ejb-31-immediate-feedback-on-ejb-singletons-and-concurrency-needed/#comment-269</guid>
		<description><![CDATA[The singleton may not be a service.  It may just be an &quot;initialization&quot; object that, for example, pre-populates JPA&#039;s global cache, or provides a bridge for a framework developer.  There&#039;s still debate in the eg on whether singeltons should be allowed to be initialization objects (and have a different component for this like servlet listers), but that will be a topic for another blog.]]></description>
		<content:encoded><![CDATA[<p>The singleton may not be a service.  It may just be an &#8220;initialization&#8221; object that, for example, pre-populates JPA&#8217;s global cache, or provides a bridge for a framework developer.  There&#8217;s still debate in the eg on whether singeltons should be allowed to be initialization objects (and have a different component for this like servlet listers), but that will be a topic for another blog.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laird Nelson</title>
		<link>http://bill.burkecentral.com/2007/09/19/ejb-31-immediate-feedback-on-ejb-singletons-and-concurrency-needed/#comment-268</link>
		<dc:creator><![CDATA[Laird Nelson]]></dc:creator>
		<pubDate>Mon, 24 Sep 2007 14:07:24 +0000</pubDate>
		<guid isPermaLink="false">http://bill.burkecentral.com/2007/09/19/ejb-31-immediate-feedback-on-ejb-singletons-and-concurrency-needed/#comment-268</guid>
		<description><![CDATA[Hey, I like the last comment (Elias).  Agreed, upon further thought, that it isn&#039;t really the Singleton nature that&#039;s at issue here, it&#039;s more the...the...SharedResource-ness?  Elias, I&#039;m not so sure it&#039;s really a Service, per se; maybe there&#039;s a better word.]]></description>
		<content:encoded><![CDATA[<p>Hey, I like the last comment (Elias).  Agreed, upon further thought, that it isn&#8217;t really the Singleton nature that&#8217;s at issue here, it&#8217;s more the&#8230;the&#8230;SharedResource-ness?  Elias, I&#8217;m not so sure it&#8217;s really a Service, per se; maybe there&#8217;s a better word.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

