java - Spring Transactional not using same JDBC connection -
can please tell me why sql exception "invalid object #emp_temp" if running both queries under same transaction? @transactional public map<string, eventtype> findeventsbydaterange(final date starttimestamp, final date endtimestamp) throws exception { log.debug("fetching events data"); string event_query = "select id, name, status, joindate #emp_temp employee joindate >= ? , joindate < ?"; this.jt.execute(event_query, new preparedstatementcallback<boolean>() { @override public boolean doinpreparedstatement(preparedstatement preparedstatement) throws sqlexception, dataaccessexception { preparedstatement.settimestamp(1, new java.sql.timestamp(starttimestamp.gettime())); preparedstatement.settimestamp(2, new java.sql.timestamp(endtimestamp.gettime())); return preparedstatement.execute(); } }); //this.jt.execute(event_query); return this.jt.query("s