2008 East
DIAMOND SPONSOR:
Data Direct
Frontiers in Data Access: The Coming Wave in Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
Intel
Virtualization – Path to Predictive Enterprise
Green Hills
IT Security in a Hostile World
JBoss / freedom oss
Practical SOA Approach
GOLD SPONSORS:
Software AG
The Art & Science of SOA: How Governance Enables Adoption
PlateSpin
Effective Planning for Virtual Infrastructure Growth
Fujitsu
Automated Business Process Discovery & Virtualization Service
Ceedo
Workspace Virtualization
Click For 2007 West
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
Service Oriented Architecture (SOA) has been discu...
TOP THREE LINKS YOU MUST CLICK ON


Java Developer's Journal Feature: "Deadlocks in J2EE"
Most non-trivial applications involve high degrees of concurrency and many layers of abstraction. Concurrency is associated with resource contention and an increase in deadlock conditions. The multiple layers of abstraction make it more difficult to isolate and fix the deadlock conditions.
Reader Feedback: Page 1 of 1

comments. I love this Sohbet & Chat site as it contains good materials Kameralı Sohbet thank you

Ha wrote: Hi, there are many ways beyond the portal framework itself to substantially increase the throughput up to 10x and to reduce the time that the browser needs to build the page. Sohbet & Chat We have throughput numbers around 20 pages for a large portal on 1 CPU base. Feel free to read more on

Ha wrote: Hi, there are many ways beyond the portal framework itself to substantially increase the throughput up to 10x and to reduce the time that the browser needs to build the Sohbet & Chat page. We have throughput numbers around 20 pages for a large portal on 1 CPU base. Feel free to read more on

şehmuz çokyer wrote: Thank you very much for this useful article and the comments. I love this site as it contains good materials. ------------------------------------------ sohbet & Chat

You mention:
"It would be nice if the EJB vendors supplied a retry-on-deadlock parameter that would do this automatically with container-managed transactions. Without this automated feature, developers end up forcing EJB calls to use bean-managed transactions just to be able to retry on deadlocks. (One of the disadvantages to making your EJB calls use bean-managed transactions is that it's not obvious how to get the same semantics as a container-managed transaction with "RequiresNew" ...)"

Is BMT strictly required to retry? Suppose all business methods pass through an initial method with no transaction attributes. This method front_bizmethod() calls the actual business method which of course
has a transaction attribute of Required/RequiresNew etc.

public void front_bizmethod()
{
int retry_count = 0;
boolean retry = false;
do
{
try
{
bizmethod();
}
catch (RetryException re)
{
retry = true;
retry_count++;
}
} while (retry && retry_count < 10);
}

/** Business method -- has transaction attribute
* Required or RequiresNew
*/
bizmethod() throws RetryException
{
// Do business calls and throw a RetryException
// if a deadlock was detected by the database
}

What I mean is that there is a way around it by
coding an extra method.

What are your thoughts on the same ?

Thanks for this great article, Mike. I wasn't able to make it to JavaOne this year so I missed your BOF at JavaOne that looks like it was talking about this stuff (BOF-0534). Are there any slides from that that I can get ahold of?

With the power and simplicity that CMT (container managed transactions) brings, is there really no simple way to automatically handle database deadlock by retrying the transaction according to some given parameters (ie: number of retries, back off time, etc)? That would really be unfortunate.

Here are a few possible solutions, but they all seem sub-optimal for various reasons: (I would like to stay within the spec (EJB3/JEE5), but I'm not adament on this).

1) JBoss has a proprietary extension for this: (org.jboss.ejb.plugins.TxRetryExceptionHandler) However, besides being outside the spec, this implementation does not allow me to easily keep track of any state regarding the retry (ie: retry count numbers, data for back off algorithms, etc.).

2) I can use the EJB3 Interceptor spec, but this is really cumbersome because it ties in *after* the CMT stuff has already been setup.

3) I'm sure I could write a jboss-aop interceptor that would do the right thing here, but again it would be outside the spec. Has anyone done this already? I certainly don't want to reinvent the wheel on this one.

4) I could switch from CMT (container managed transactions) to BMT (bean managed transactions). This would give me more control over the the transaction endpoints but then I would have to give up all the niceties that CMT give me.

I really would like a nice solution for this...

Most non-trivial applications involve high degrees of concurrency and many layers of abstraction. Concurrency is associated with resource contention and an increase in deadlock conditions. The multiple layers of abstraction make it more difficult to isolate and fix the deadlock conditions.


FEATURED WHITE PAPERS
YOUR FEEDBACK
Kevin Epstein wrote: Come on Maureen, I miss your incisive style and analysis here. Perhaps I'm missing something, but isn't Cassatt a bit late to the party? Where's the "news" in their announcement? Specifically, their announcement appears to be about an upcoming product... but 24 hours prior, Scalent Systems, Red Hat...
chinzip wrote: Hi Grey Flurry, any idea where can we get the codes of this articles? THanks.
Mark Blafkin wrote: IBM's 'newfound principles" may be basically supported by the closed online discussion they sponsored, but they are undoubtedly "inspired" by profit and an effort to regain their stranglehold on standards bodies. If they really cared about improving standards bodies for all stakeholders, they wouldn...
Roberto Campione wrote: Good article, that helped alot. Out of interest - have you any examples of importing templates using xmlaccess?
Java Consultant wrote: Good Post.... Java Developer...
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SYS-CON FEATURED WHITEPAPERS

BREAKING WEBSPHERE NEWS
A new report, announced today, found that IBM (NYSE: IBM) supercomputers already deemed the most pow...
IBM is going to buy Transitive, the British cross-platform virtualization firm that salvaged legacy ...
Emulex has announced that its LightPulse LP21000 family of Fibre Channel over Ethernet (FCoE) Conver...
Mark Papermaster, the ex-VP of blade development at IBM and the guy that IBM stopped from going to A...
A round-up of the many themes and topics of interest to infrastructure architects, developers and IT...
Okay, here's the deal. When you observe the big software guys and see how quickly they adopt emergin...
"More than a half dozen conferences and events targeting Virtualization and Cloud Computing canceled...
SYS-CON Events announced today that more than 40 Cloud technology providers, as well as Virtualizati...
Cloud Computing offers significant benefits over traditional solutions for deploying production syst...
IBM has found something else to do with Linux. Its Lotus software operation is going into the hardwa...
Well it appears that non-compete agreements may carry a bit more weight in New York than they do in ...
HP has said it doesn’t want to be in the cloud business itself – merely sell gear to cloud maker...
Further demonstrating continued evidence that the SAP ecosystem strategy delivers additional choices...
Cloud Computing is now an all-encompassing IT paradigm with tremendous focus on the so-called "Publi...
This is the sentence that screams "We don't get it, we don't get it, someone please help us, we don'...
SYS-CON Events announced today that the leading global virtualization technology provider VMware nam...
SYS-CON Events announced today that the leading global virtualization technology provider VMware nam...
To create application and workload best practices, Mellanox, Dell, and AMD have provided a new Dell ...
NetSuite, Larry Ellison’s other company, the on-demand one usually seen as a foil for Salesforce.c...
XML end-to-end architectures are a natural follow-on to SOA: XML for the user interface, XML for dat...
As far as the software industry goes, these tough economic days give the biggest business advantage ...
ADS BY GOOGLE