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