KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > tx > UnlockedSharedObjectException


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.object.tx;
5
6 import com.tc.exception.ExceptionWrapper;
7 import com.tc.exception.ExceptionWrapperImpl;
8
9 /**
10  * @author steve
11  */

12 public class UnlockedSharedObjectException extends RuntimeException JavaDoc {
13   
14   private static final ExceptionWrapper wrapper = new ExceptionWrapperImpl();
15   
16   private UnlockedSharedObjectException() {
17     super();
18   }
19   
20   private UnlockedSharedObjectException(String JavaDoc message) {
21     super(wrapper.wrap(message));
22   }
23
24   public UnlockedSharedObjectException(String JavaDoc message, String JavaDoc threadName, long vmId) {
25     this(UnlockedSharedObjectException.createDisplayableString(message, threadName, vmId));
26   }
27   
28   public UnlockedSharedObjectException(String JavaDoc message, String JavaDoc threadName, long vmId, String JavaDoc details) {
29     this(UnlockedSharedObjectException.createDisplayableString(message, threadName, vmId) + "\n " + details);
30   }
31   
32   private static String JavaDoc createDisplayableString(String JavaDoc message, String JavaDoc threadName, long vmId) {
33     return message + "\n\n Caused by Thread: " + threadName + " in VM(" + vmId + ")";
34   }
35 }
Popular Tags