This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Well deadlocks are expected behaviour now and again in a relational database, which is why databases have recovery mechanisms. If it happens all the time (in a repeatable way) you have an issue in your stored procedure which you will need to address. If it happens fequently in an unrepeatable way you possibly have an issue with your data model (typically a poorly normalized data model), or your transaction times may be too long. It it happens only very occasionally you can code round it - catch the SQLException, check the error code == deadlock and retry the database operation.