01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.object.appevent;
05:
06: /**
07: * Abstract class for lock events
08: */
09: public class AbstractLockEvent extends AbstractApplicationEvent {
10:
11: private static final long serialVersionUID = 1223477247234324L;
12:
13: /**
14: * Construct new event with a lock event context
15: * @param context Context
16: */
17: public AbstractLockEvent(AbstractLockEventContext context) {
18: super (context);
19: }
20:
21: /**
22: * Get context typed more specifically to this event
23: * @return The lock context
24: */
25: public AbstractLockEventContext getAbstractLockEventContext() {
26: return (AbstractLockEventContext) getApplicationEventContext();
27: }
28:
29: public String getMessage() {
30: return "Current transaction with read-only access attempted to modify a shared object. "
31: + "\nPlease alter the locks section of your Terracotta configuration so that the methods involved in this transaction have read/write access.";
32: }
33: }
|