public void remove(String opUrl, String handle) { try { JdbcTemplate jdbcTemplate = getJdbcTemplate(); int cnt = jdbcTemplate.update(_sqlDelete, new Object[] {opUrl, handle}); } catch (Exception e) { _log.error("Error removing association from table: " + _tableName, e); } }
public JdbcConsumerAssociationStore ( String tableName ) { setTableName ( tableName ) ; }
public void save(String opUrl, Association association) { cleanupExpired(); try { JdbcTemplate jdbcTemplate = getJdbcTemplate(); int cnt = jdbcTemplate.update(_sqlInsert, new Object[] { opUrl, association.getHandle(), association.getType(), association.getMacKey() == null ? null : new String( Base64.encodeBase64(association.getMacKey().getEncoded())), association.getExpiry()}); } catch (Exception e) { _log.error("Error saving association to table: " + _tableName, e); } }
public void save ( String opUrl, Association association ) { cleanupExpired ( ) ; try { JdbcTemplate jdbcTemplate = getJdbcTemplate ( ) ; int cnt = jdbcTemplate.update ( _sqlInsert, new Object[] { opUrl, association.getHandle ( ), association.getType ( ), association.getMacKey ( ) == null ? null : new String ( Base64.encodeBase64 ( association.getMacKey ( ).getEncoded ( ) ) ), association.getExpiry ( ) } ) ; } catch ( Exception e ) { _log.error ( "Error saving association to table: " + _tableName, e ) ; } }
public void remove ( String opUrl, String handle ) { try { JdbcTemplate jdbcTemplate = getJdbcTemplate ( ) ; int cnt = jdbcTemplate.update ( _sqlDelete, new Object[] { opUrl, handle } ) ; } catch ( Exception e ) { _log.error ( "Error removing association from table: " + _tableName, e ) ; } }
public void save ( String opUrl, Association association ) { cleanupExpired ( ) ; try { JdbcTemplate jdbcTemplate = getJdbcTemplate ( ) ; int cnt = jdbcTemplate.update ( _sqlInsert, new Object[] { opUrl, association.getHandle ( ), association.getType ( ), association.getMacKey ( ) == null ? null : new String ( Base64.encodeBase64 ( association.getMacKey ( ).getEncoded ( ) ) ), association.getExpiry ( ) } ) ; } catch ( Exception e ) { _log.error ( "Error saving association to table: " + _tableName, e ) ; } }
public JdbcConsumerAssociationStore(String tableName) { setTableName(tableName); }
public void remove ( String opUrl, String handle ) { try { JdbcTemplate jdbcTemplate = getJdbcTemplate ( ) ; int cnt = jdbcTemplate.update ( _sqlDelete, new Object[] { opUrl, handle } ) ; } catch ( Exception e ) { _log.error ( "Error removing association from table: " + _tableName, e ) ; } }
public void save ( String opUrl, Association association ) { cleanupExpired ( ) ; try { JdbcTemplate jdbcTemplate = getJdbcTemplate ( ) ; int cnt = jdbcTemplate.update ( _sqlInsert, new Object[] { opUrl, association.getHandle ( ), association.getType ( ), association.getMacKey ( ) == null ? null : new String ( Base64.encodeBase64 ( association.getMacKey ( ).getEncoded ( ) ) ), association.getExpiry ( ) } ) ; } catch ( Exception e ) { _log.error ( "Error saving association to table: " + _tableName, e ) ; } }
public JdbcConsumerAssociationStore ( String tableName ) { setTableName ( tableName ) ; }
public void remove ( String opUrl, String handle ) { try { JdbcTemplate jdbcTemplate = getJdbcTemplate ( ) ; int cnt = jdbcTemplate.update ( _sqlDelete, new Object[] { opUrl, handle } ) ; } catch ( Exception e ) { _log.error ( "Error removing association from table: " + _tableName, e ) ; } }
public void save ( String opUrl, Association association ) { cleanupExpired ( ) ; try { JdbcTemplate jdbcTemplate = getJdbcTemplate ( ) ; int cnt = jdbcTemplate.update ( _sqlInsert, new Object[] { opUrl, association.getHandle ( ), association.getType ( ), association.getMacKey ( ) == null ? null : new String ( Base64.encodeBase64 ( association.getMacKey ( ).getEncoded ( ) ) ), association.getExpiry ( ) } ) ; } catch ( Exception e ) { _log.error ( "Error saving association to table: " + _tableName, e ) ; } }
public JdbcConsumerAssociationStore ( String tableName ) { setTableName ( tableName ) ; }
public void remove ( String opUrl, String handle ) { try { JdbcTemplate jdbcTemplate = getJdbcTemplate ( ) ; int cnt = jdbcTemplate.update ( _sqlDelete, new Object[] { opUrl, handle } ) ; } catch ( Exception e ) { _log.error ( "Error removing association from table: " + _tableName, e ) ; } }
public JdbcConsumerAssociationStore ( String tableName ) { setTableName ( tableName ) ; }
private void cleanupExpired() { try { Date boundary = new Date(); JdbcTemplate jdbcTemplate = getJdbcTemplate(); int cnt = jdbcTemplate.update(_sqlCleanup, new Object[] {boundary}); if (_log.isDebugEnabled()) { _log.debug("Client associations cleanup removed " + cnt + " entries"); } } catch (Exception e) { _log.error("Error cleaning up client associations from table: " + _tableName, e); } }
private void cleanupExpired ( ) { try { Date boundary = new Date ( ) ; JdbcTemplate jdbcTemplate = getJdbcTemplate ( ) ; int cnt = jdbcTemplate.update ( _sqlCleanup, new Object[] { boundary } ) ; if ( _log.isDebugEnabled ( ) ) _log.debug ( "Client associations cleanup removed " + cnt + " entries" ) ; } catch ( Exception e ) { _log.error ( "Error cleaning up client associations from table: " + _tableName, e ) ; } }
private void cleanupExpired ( ) { try { Date boundary = new Date ( ) ; JdbcTemplate jdbcTemplate = getJdbcTemplate ( ) ; int cnt = jdbcTemplate.update ( _sqlCleanup, new Object[] { boundary } ) ; if ( _log.isDebugEnabled ( ) ) _log.debug ( "Client associations cleanup removed " + cnt + " entries" ) ; } catch ( Exception e ) { _log.error ( "Error cleaning up client associations from table: " + _tableName, e ) ; } }
private void cleanupExpired ( ) { try { Date boundary = new Date ( ) ; JdbcTemplate jdbcTemplate = getJdbcTemplate ( ) ; int cnt = jdbcTemplate.update ( _sqlCleanup, new Object[] { boundary } ) ; if ( _log.isDebugEnabled ( ) ) _log.debug ( "Client associations cleanup removed " + cnt + " entries" ) ; } catch ( Exception e ) { _log.error ( "Error cleaning up client associations from table: " + _tableName, e ) ; } }
private void cleanupExpired ( ) { try { Date boundary = new Date ( ) ; JdbcTemplate jdbcTemplate = getJdbcTemplate ( ) ; int cnt = jdbcTemplate.update ( _sqlCleanup, new Object[] { boundary } ) ; if ( _log.isDebugEnabled ( ) ) _log.debug ( "Client associations cleanup removed " + cnt + " entries" ) ; } catch ( Exception e ) { _log.error ( "Error cleaning up client associations from table: " + _tableName, e ) ; } }