@Override public Message getMessage(MessageId messageId) throws IOException { // Get a connection and pull the message out of the DB TransactionContext c = persistenceAdapter.getTransactionContext(); try { byte data[] = adapter.doGetMessage(c, messageId); if (data == null) { return null; } Message answer = (Message)wireFormat.unmarshal(new ByteSequence(data)); return answer; } catch (IOException e) { throw IOExceptionSupport.create("Failed to broker message: " + messageId + " in container: " + e, e); } catch (SQLException e) { JDBCPersistenceAdapter.log("JDBC Failure: ", e); throw IOExceptionSupport.create("Failed to broker message: " + messageId + " in container: " + e, e); } finally { c.close(); } }
public Message getMessage(MessageId messageId) throws IOException { // Get a connection and pull the message out of the DB TransactionContext c = persistenceAdapter.getTransactionContext(); try { byte data[] = adapter.doGetMessage(c, messageId); if (data == null) { return null; } Message answer = (Message)wireFormat.unmarshal(new ByteSequence(data)); return answer; } catch (IOException e) { throw IOExceptionSupport.create("Failed to broker message: " + messageId + " in container: " + e, e); } catch (SQLException e) { JDBCPersistenceAdapter.log("JDBC Failure: ", e); throw IOExceptionSupport.create("Failed to broker message: " + messageId + " in container: " + e, e); } finally { c.close(); } }
@Override public Message getMessage(MessageId messageId) throws IOException { // Get a connection and pull the message out of the DB TransactionContext c = persistenceAdapter.getTransactionContext(); try { byte data[] = adapter.doGetMessage(c, messageId); if (data == null) { return null; } Message answer = (Message)wireFormat.unmarshal(new ByteSequence(data)); return answer; } catch (IOException e) { throw IOExceptionSupport.create("Failed to broker message: " + messageId + " in container: " + e, e); } catch (SQLException e) { JDBCPersistenceAdapter.log("JDBC Failure: ", e); throw IOExceptionSupport.create("Failed to broker message: " + messageId + " in container: " + e, e); } finally { c.close(); } }
@Override public Message getMessage(MessageId messageId) throws IOException { // Get a connection and pull the message out of the DB TransactionContext c = persistenceAdapter.getTransactionContext(); try { byte data[] = adapter.doGetMessage(c, messageId); if (data == null) { return null; } Message answer = (Message)wireFormat.unmarshal(new ByteSequence(data)); return answer; } catch (IOException e) { throw IOExceptionSupport.create("Failed to broker message: " + messageId + " in container: " + e, e); } catch (SQLException e) { JDBCPersistenceAdapter.log("JDBC Failure: ", e); throw IOExceptionSupport.create("Failed to broker message: " + messageId + " in container: " + e, e); } finally { c.close(); } }
@Override public Message getMessage(MessageId messageId) throws IOException { // Get a connection and pull the message out of the DB TransactionContext c = persistenceAdapter.getTransactionContext(); try { byte data[] = adapter.doGetMessage(c, messageId); if (data == null) { return null; } Message answer = (Message)wireFormat.unmarshal(new ByteSequence(data)); return answer; } catch (IOException e) { throw IOExceptionSupport.create("Failed to broker message: " + messageId + " in container: " + e, e); } catch (SQLException e) { JDBCPersistenceAdapter.log("JDBC Failure: ", e); throw IOExceptionSupport.create("Failed to broker message: " + messageId + " in container: " + e, e); } finally { c.close(); } }