/** * A private worker method that calculates the lock mode for an individual NamedQuery. If the NamedQuery is * configured to use the NONE lock mode(explicit or implicit), this method will promote the lock to a READ * level lock. This was done to allow for JPA1 apps to function properly under a 2.0 runtime. */ private LockModeType processNamedQueryLockModeType(Log log, String lockModeString, String queryName) { if (lockModeString == null) { return null; } LockModeType lmt = LockModeType.valueOf(lockModeString); String lm = _conf.getLockManager(); boolean optimistic = _conf.getOptimistic(); if (lm != null) { lm = lm.toLowerCase(); if (lm.contains("pessimistic")) { if (lmt == LockModeType.NONE && !optimistic) { if (log != null && log.isWarnEnabled() == true) { log.warn(_loc.get("override-named-query-lock-mode", new String[] { "xml", queryName, _cls.getName() })); } lmt = LockModeType.READ; } } } return lmt; }
/** * A private worker method that calculates the lock mode for an individual NamedQuery. If the NamedQuery is * configured to use the NONE lock mode(explicit or implicit), this method will promote the lock to a READ * level lock. This was done to allow for JPA1 apps to function properly under a 2.0 runtime. */ private LockModeType processNamedQueryLockModeType(Log log, String lockModeString, String queryName) { if (lockModeString == null) { return null; } LockModeType lmt = LockModeType.valueOf(lockModeString); String lm = _conf.getLockManager(); boolean optimistic = _conf.getOptimistic(); if (lm != null) { lm = lm.toLowerCase(); if (lm.contains("pessimistic")) { if (lmt == LockModeType.NONE && !optimistic) { if (log != null && log.isWarnEnabled() == true) { log.warn(_loc.get("override-named-query-lock-mode", new String[] { "xml", queryName, _cls.getName() })); } lmt = LockModeType.READ; } } } return lmt; }
/** * A private worker method that calculates the lock mode for an individual NamedQuery. If the NamedQuery is * configured to use the NONE lock mode(explicit or implicit), this method will promote the lock to a READ * level lock. This was done to allow for JPA1 apps to function properly under a 2.0 runtime. */ private LockModeType processNamedQueryLockModeType(Log log, String lockModeString, String queryName) { if (lockModeString == null) { return null; } LockModeType lmt = LockModeType.valueOf(lockModeString); String lm = _conf.getLockManager(); boolean optimistic = _conf.getOptimistic(); if (lm != null) { lm = lm.toLowerCase(); if (lm.contains("pessimistic")) { if (lmt == LockModeType.NONE && !optimistic) { if (log != null && log.isWarnEnabled() == true) { log.warn(_loc.get("override-named-query-lock-mode", new String[] { "xml", queryName, _cls.getName() })); } lmt = LockModeType.READ; } } } return lmt; }
/** * A private worker method that calculates the lock mode for an individual NamedQuery. If the NamedQuery is * configured to use the NONE lock mode(explicit or implicit), this method will promote the lock to a READ * level lock. This was done to allow for JPA1 apps to function properly under a 2.0 runtime. */ private LockModeType processNamedQueryLockModeType(Log log, String lockModeString, String queryName) { if (lockModeString == null) { return null; } LockModeType lmt = LockModeType.valueOf(lockModeString); String lm = _conf.getLockManager(); boolean optimistic = _conf.getOptimistic(); if (lm != null) { lm = lm.toLowerCase(); if (lm.contains("pessimistic")) { if (lmt == LockModeType.NONE && !optimistic) { if (log != null && log.isWarnEnabled() == true) { log.warn(_loc.get("override-named-query-lock-mode", new String[] { "xml", queryName, _cls.getName() })); } lmt = LockModeType.READ; } } } return lmt; }
/** * A private worker method that calculates the lock mode for an individual NamedQuery. If the NamedQuery is * configured to use the NONE lock mode(explicit or implicit), this method will promote the lock to a READ * level lock. This was done to allow for JPA1 apps to function properly under a 2.0 runtime. */ private LockModeType processNamedQueryLockModeType(NamedQuery query) { LockModeType lmt = query.lockMode(); if (query.lockMode() != null) { String lm = _conf.getLockManager(); boolean optimistic = _conf.getOptimistic(); if (lm != null) { lm = lm.toLowerCase(); if (lm.contains("pessimistic")) { if (lmt == LockModeType.NONE && !optimistic) { if (_log.isWarnEnabled() == true) { _log.warn(_loc.get("override-named-query-lock-mode", new String[] { "annotation", query.name(), _cls.getName() })); } lmt = LockModeType.READ; } } } } return lmt; }
/** * A private worker method that calculates the lock mode for an individual NamedQuery. If the NamedQuery is * configured to use the NONE lock mode(explicit or implicit), this method will promote the lock to a READ * level lock. This was done to allow for JPA1 apps to function properly under a 2.0 runtime. */ private LockModeType processNamedQueryLockModeType(NamedQuery query) { LockModeType lmt = query.lockMode(); if (query.lockMode() != null) { String lm = _conf.getLockManager(); boolean optimistic = _conf.getOptimistic(); if (lm != null) { lm = lm.toLowerCase(); if (lm.contains("pessimistic")) { if (lmt == LockModeType.NONE && !optimistic) { if (_log.isWarnEnabled() == true) { _log.warn(_loc.get("override-named-query-lock-mode", new String[] { "annotation", query.name(), _cls.getName() })); } lmt = LockModeType.READ; } } } } return lmt; }
/** * A private worker method that calculates the lock mode for an individual NamedQuery. If the NamedQuery is * configured to use the NONE lock mode(explicit or implicit), this method will promote the lock to a READ * level lock. This was done to allow for JPA1 apps to function properly under a 2.0 runtime. */ private LockModeType processNamedQueryLockModeType(NamedQuery query) { LockModeType lmt = query.lockMode(); if (query.lockMode() != null) { String lm = _conf.getLockManager(); boolean optimistic = _conf.getOptimistic(); if (lm != null) { lm = lm.toLowerCase(); if (lm.contains("pessimistic")) { if (lmt == LockModeType.NONE && !optimistic) { if (_log.isWarnEnabled() == true) { _log.warn(_loc.get("override-named-query-lock-mode", new String[] { "annotation", query.name(), _cls.getName() })); } lmt = LockModeType.READ; } } } } return lmt; }
/** * A private worker method that calculates the lock mode for an individual NamedQuery. If the NamedQuery is * configured to use the NONE lock mode(explicit or implicit), this method will promote the lock to a READ * level lock. This was done to allow for JPA1 apps to function properly under a 2.0 runtime. */ private LockModeType processNamedQueryLockModeType(NamedQuery query) { LockModeType lmt = query.lockMode(); if (query.lockMode() != null) { String lm = _conf.getLockManager(); boolean optimistic = _conf.getOptimistic(); if (lm != null) { lm = lm.toLowerCase(); if (lm.contains("pessimistic")) { if (lmt == LockModeType.NONE && !optimistic) { if (_log.isWarnEnabled() == true) { _log.warn(_loc.get("override-named-query-lock-mode", new String[] { "annotation", query.name(), _cls.getName() })); } lmt = LockModeType.READ; } } } } return lmt; }
/** * Configures the given broker with the current factory option settings. */ protected void configureBroker(BrokerImpl broker) { broker.setOptimistic(_conf.getOptimistic()); broker.setNontransactionalRead(_conf.getNontransactionalRead()); broker.setNontransactionalWrite(_conf.getNontransactionalWrite()); broker.setRetainState(_conf.getRetainState()); broker.setRestoreState(_conf.getRestoreStateConstant()); broker.setAutoClear(_conf.getAutoClearConstant()); broker.setIgnoreChanges(_conf.getIgnoreChanges()); broker.setMultithreaded(_conf.getMultithreaded()); broker.setAutoDetach(_conf.getAutoDetachConstant()); broker.setDetachState(_conf.getDetachStateInstance(). getDetachState()); }
/** * Configures the given broker with the current factory option settings. */ protected void configureBroker(BrokerImpl broker) { broker.setOptimistic(_conf.getOptimistic()); broker.setNontransactionalRead(_conf.getNontransactionalRead()); broker.setNontransactionalWrite(_conf.getNontransactionalWrite()); broker.setRetainState(_conf.getRetainState()); broker.setRestoreState(_conf.getRestoreStateConstant()); broker.setAutoClear(_conf.getAutoClearConstant()); broker.setIgnoreChanges(_conf.getIgnoreChanges()); broker.setMultithreaded(_conf.getMultithreaded()); broker.setAutoDetach(_conf.getAutoDetachConstant()); broker.setDetachState(_conf.getDetachStateInstance().getDetachState()); broker.setPostLoadOnMerge(_conf.getPostLoadOnMerge()); }
/** * Configures the given broker with the current factory option settings. */ protected void configureBroker(BrokerImpl broker) { broker.setOptimistic(_conf.getOptimistic()); broker.setNontransactionalRead(_conf.getNontransactionalRead()); broker.setNontransactionalWrite(_conf.getNontransactionalWrite()); broker.setRetainState(_conf.getRetainState()); broker.setRestoreState(_conf.getRestoreStateConstant()); broker.setAutoClear(_conf.getAutoClearConstant()); broker.setIgnoreChanges(_conf.getIgnoreChanges()); broker.setMultithreaded(_conf.getMultithreaded()); broker.setAutoDetach(_conf.getAutoDetachConstant()); broker.setDetachState(_conf.getDetachStateInstance().getDetachState()); broker.setPostLoadOnMerge(_conf.getPostLoadOnMerge()); }
/** * Configures the given broker with the current factory option settings. */ protected void configureBroker(BrokerImpl broker) { broker.setOptimistic(_conf.getOptimistic()); broker.setNontransactionalRead(_conf.getNontransactionalRead()); broker.setNontransactionalWrite(_conf.getNontransactionalWrite()); broker.setRetainState(_conf.getRetainState()); broker.setRestoreState(_conf.getRestoreStateConstant()); broker.setAutoClear(_conf.getAutoClearConstant()); broker.setIgnoreChanges(_conf.getIgnoreChanges()); broker.setMultithreaded(_conf.getMultithreaded()); broker.setAutoDetach(_conf.getAutoDetachConstant()); broker.setDetachState(_conf.getDetachStateInstance().getDetachState()); broker.setPostLoadOnMerge(_conf.getPostLoadOnMerge()); }
/** * Configures the given broker with the current factory option settings. */ protected void configureBroker(BrokerImpl broker) { broker.setOptimistic(_conf.getOptimistic()); broker.setNontransactionalRead(_conf.getNontransactionalRead()); broker.setNontransactionalWrite(_conf.getNontransactionalWrite()); broker.setRetainState(_conf.getRetainState()); broker.setRestoreState(_conf.getRestoreStateConstant()); broker.setAutoClear(_conf.getAutoClearConstant()); broker.setIgnoreChanges(_conf.getIgnoreChanges()); broker.setMultithreaded(_conf.getMultithreaded()); broker.setAutoDetach(_conf.getAutoDetachConstant()); broker.setDetachState(_conf.getDetachStateInstance().getDetachState()); broker.setPostLoadOnMerge(_conf.getPostLoadOnMerge()); }