/** * When the event type is not PAYLOAD_EXTENTS, return the set of * object IDs for updated objects. When the event type is * PAYLOAD_LOCAL_STALE_DETECTION, items in this list may actually have * been deleted from the database. */ public Collection getUpdatedObjectIds() { if (_payload == PAYLOAD_EXTENTS) throw new UserException(s_loc.get("extent-only-event")); return (_updates == null) ? Collections.EMPTY_LIST : _updates; }
/** * Assert that the given table is non-null. */ private static void assertTable(MetaDataContext context, Table table) { if (table == null) throw new MetaDataException(_loc.get("unmapped", context)); }
/** * Unimplemented, WAS does not provide this level of control. Log a * trace instead of throwing an exception. Rollback may be used in * some error paths, throwing another exception may result in the * original exception being lost. */ public void rollback() throws IllegalStateException, SecurityException, SystemException { if (_log.isTraceEnabled()) { _log.trace(_loc.get("was-unsupported-op", "rollback")); } }
public void destroyObject(Object obj) { // silentClose (). try { Socket s = (Socket) obj; if (log.isTraceEnabled()) log.trace(s_loc.get("tcp-close-sending-socket", _address + ":" + _port, "" + s.getLocalPort())); s.close(); } catch (Exception e) { log.warn(s_loc.get("tcp-close-socket-error", _address.getHostAddress() + ":" + _port), e); } }
protected void fireEvent(Object event, Object listener) { ExpirationListener listen = (ExpirationListener) listener; ExpirationEvent ev = (ExpirationEvent) event; try { listen.onExpire(ev); } catch (Exception e) { if (log.isWarnEnabled()) log.warn(s_loc.get("exp-listener-ex"), e); } }
/** * Assert that the user did not try to place an index on this mapping. */ public void assertNoIndex(MetaDataContext context, boolean die) { if (_idx == null) return; Message msg = _loc.get("unexpected-index", context); if (die) throw new MetaDataException(msg); context.getRepository().getLog().warn(msg); }
public void destroyObject(Object obj) { // silentClose (). try { Socket s = (Socket) obj; if (log.isTraceEnabled()) log.trace(s_loc.get("tcp-close-sending-socket", _address + ":" + _port, "" + s.getLocalPort())); s.close(); } catch (Exception e) { log.warn(s_loc.get("tcp-close-socket-error", _address.getHostAddress() + ":" + _port), e); } }
/** * Unimplemented, WAS does not provide this level of control. Log a * trace instead of throwing an exception. SetRollbackOnly may be used * in some error paths, throwing another exception may result in the * original exception being lost. */ public void setRollbackOnly() throws IllegalStateException, SystemException { if (_log.isTraceEnabled()) { _log.trace(_loc.get("was-unsupported-op", "setRollbackOnly")); } }
protected void fireEvent(Object event, Object listener) { TypesChangedListener listen = (TypesChangedListener) listener; TypesChangedEvent ev = (TypesChangedEvent) event; try { listen.onTypesChanged(ev); } catch (Exception e) { if (log.isWarnEnabled()) log.warn(s_loc.get("exp-listener-ex"), e); } }
/** * When the event type is PAYLOAD_EXTENTS, return the set of class * names for the classes of updated objects. */ public Collection getUpdatedTypeNames() { if (_payload != PAYLOAD_EXTENTS) throw new UserException(s_loc.get("nonextent-event")); return (_updates == null) ? Collections.EMPTY_LIST : _updates; }
/** * Assert that the user did not try to place a unique constraint on this * mapping. */ public void assertNoUnique(MetaDataContext context, boolean die) { if (_unq == null) return; Message msg = _loc.get("unexpected-unique", context); if (die) throw new MetaDataException(msg); context.getRepository().getLog().warn(msg); }
/** * Assert that the given table is non-null. */ private static void assertTable(MetaDataContext context, Table table) { if (table == null) throw new MetaDataException(_loc.get("unmapped", context)); }
public void destroyObject(Object obj) { // silentClose (). try { Socket s = (Socket) obj; if (log.isTraceEnabled()) log.trace(s_loc.get("tcp-close-sending-socket", _address + ":" + _port, "" + s.getLocalPort())); s.close(); } catch (Exception e) { log.warn(s_loc.get("tcp-close-socket-error", _address.getHostAddress() + ":" + _port), e); } }
public void clear() { if (_log != null && _log.isTraceEnabled()) _log.trace(_loc.get("clear-parser", this)); if (_parsed != null) _parsed.clear(); }
protected void fireEvent(Object event, Object listener) { ExpirationListener listen = (ExpirationListener) listener; ExpirationEvent ev = (ExpirationEvent) event; try { listen.onExpire(ev); } catch (Exception e) { if (log.isWarnEnabled()) log.warn(s_loc.get("exp-listener-ex"), e); } }
public void setValueMappedBy(String mapped) { if (_owner.getKey() != this && mapped != null) throw new UserException(_loc.get("mapped-by-not-key", this)); else { _mappedBy = mapped; _mappedByMeta = null; } }
/** * Assert that the user did not try to place a unique constraint on this * mapping. */ public void assertNoUnique(MetaDataContext context, boolean die) { if (_unq == null) return; Message msg = _loc.get("unexpected-unique", context); if (die) throw new MetaDataException(msg); context.getRepository().getLog().warn(msg); }
private ClassMetaData metasPutInternal(Class<?> cls, ClassMetaData meta){ if (_pawares.containsKey(cls)) throw new MetaDataException(_loc.get("pc-and-aware", cls)); _metas.put(cls, meta); return meta; }
public void destroyObject(Object obj) { // silentClose (). try { Socket s = (Socket) obj; if (log.isTraceEnabled()) log.trace(s_loc.get("tcp-close-sending-socket", _address + ":" + _port, "" + s.getLocalPort())); s.close(); } catch (Exception e) { log.warn(s_loc.get("tcp-close-socket-error", _address.getHostAddress() + ":" + _port), e); } }
/** * Add a result to be returned from the current parse. */ protected void addResult(Object result) { if (_log != null && _log.isTraceEnabled()) _log.trace(_loc.get("add-result", result)); _curResults.add(result); }