protected Object currentInternal(JDBCStore store, ClassMapping mapping) throws Exception { if (current == null) { CurrentSequenceRunnable runnable = new CurrentSequenceRunnable(store, mapping); try { if (suspendInJTA()) { // NotSupportedException is wrapped in a StoreException by // the caller. _conf.getManagedRuntimeInstance().doNonTransactionalWork( runnable); } else { runnable.run(); } } catch (RuntimeException re) { throw (Exception) (re.getCause() == null ? re : re.getCause()); } } return super.currentInternal(store, mapping); }
protected Object currentInternal(JDBCStore store, ClassMapping mapping) throws Exception { if (current == null) { CurrentSequenceRunnable runnable = new CurrentSequenceRunnable(store, mapping); try { if (suspendInJTA()) { // NotSupportedException is wrapped in a StoreException by // the caller. _conf.getManagedRuntimeInstance().doNonTransactionalWork( runnable); } else { runnable.run(); } } catch (RuntimeException re) { throw (Exception) (re.getCause() == null ? re : re.getCause()); } } return super.currentInternal(store, mapping); }
protected Object currentInternal(JDBCStore store, ClassMapping mapping) throws Exception { if (current == null) { CurrentSequenceRunnable runnable = new CurrentSequenceRunnable(store, mapping); try { if (suspendInJTA()) { // NotSupportedException is wrapped in a StoreException by // the caller. _conf.getManagedRuntimeInstance().doNonTransactionalWork( runnable); } else { runnable.run(); } } catch (RuntimeException re) { throw (Exception) (re.getCause() == null ? re : re.getCause()); } } return super.currentInternal(store, mapping); }
public Object current(StoreContext ctx, ClassMetaData meta) { JDBCStore store = getStore(ctx); try { return currentInternal(store, (ClassMapping) meta); } catch (OpenJPAException ke) { throw ke; } catch (SQLException se) { throw SQLExceptions.getStore(se, store.getDBDictionary()); } catch (Exception e) { throw new StoreException(e); } }
public Object current(StoreContext ctx, ClassMetaData meta) { JDBCStore store = getStore(ctx); try { return currentInternal(store, (ClassMapping) meta); } catch (OpenJPAException ke) { throw ke; } catch (SQLException se) { throw SQLExceptions.getStore(se, store.getDBDictionary()); } catch (Exception e) { throw new StoreException(e); } }
protected Object currentInternal(JDBCStore store, ClassMapping mapping) throws Exception { if (current == null) { CurrentSequenceRunnable runnable = new CurrentSequenceRunnable(store, mapping); try { if (suspendInJTA()) { // NotSupportedException is wrapped in a StoreException by // the caller. _conf.getManagedRuntimeInstance().doNonTransactionalWork( runnable); } else { runnable.run(); } } catch (RuntimeException re) { throw (Exception) (re.getCause() == null ? re : re.getCause()); } } return super.currentInternal(store, mapping); }
public Object current(StoreContext ctx, ClassMetaData meta) { JDBCStore store = getStore(ctx); try { return currentInternal(store, (ClassMapping) meta); } catch (OpenJPAException ke) { throw ke; } catch (SQLException se) { throw SQLExceptions.getStore(se, store.getDBDictionary()); } catch (Exception e) { throw new StoreException(e); } }
public Object current(StoreContext ctx, ClassMetaData meta) { JDBCStore store = getStore(ctx); try { return currentInternal(store, (ClassMapping) meta); } catch (OpenJPAException ke) { throw ke; } catch (SQLException se) { throw SQLExceptions.getStore(se, store.getDBDictionary()); } catch (Exception e) { throw new StoreException(e); } }
public Object current(StoreContext ctx, ClassMetaData meta) { JDBCStore store = getStore(ctx); try { return currentInternal(store, (ClassMapping) meta); } catch (OpenJPAException ke) { throw ke; } catch (SQLException se) { throw SQLExceptions.getStore(se, store.getDBDictionary()); } catch (Exception e) { throw new StoreException(e); } }
protected Object currentInternal(JDBCStore store, ClassMapping mapping) throws Exception { if (current == null) { Connection conn = getConnection(store); try { long cur = getSequence(mapping, conn); if (cur != -1) current = Numbers.valueOf(cur); } finally { closeConnection(conn); } } return super.currentInternal(store, mapping); }