in modules/core/src/main/java/org/apache/savan/atom/AtomDataSource.java [119:137]
public void addEntry(String id, OMElement entry) throws SavanException {
try {
StringWriter w = new StringWriter();
entry.serialize(w);
Connection connection = getConnection();
try {
PreparedStatement statement = connection.prepareStatement(SQL_ADD_ENTRY);
statement.setString(1, id);
statement.setString(2, w.getBuffer().toString());
statement.executeUpdate();
} finally {
connection.close();
}
} catch (SQLException e) {
throw new SavanException(e);
} catch (XMLStreamException e) {
throw new SavanException(e);
}
}