It's my job to make use of the lobHandler + JdbcTemplate + PreparedStatementSetter triplet to place my Clob in to the database, when i saw on

My question is how you can do that having a NamedParameterJdbcTemplate? It's no techniques accepting the mysterious PreparedStatementSetter interface like a parameter.

This works without needing the PreparedStatementCallback and lobHandler, a minimum of when placing a string.

NamedParameterJdbcTemplate template; //= new NamedParameterJdbcTemplate(pDs);
MapSqlParameterSource paramSource = new MapSqlParameterSource();
paramSource.addValue("id", 1L, Types.NUMERIC);
paramSource.addValue("clob", "a long long text", Types.CLOB);
template.update(INSERT_STMT, paramSource);

I actually do something similar to this, clearly we make use of an Oracle database if you are using another thing you'll have to fiddle with a few of the parameter. The getJdbcTemplate technique is a assistant approach to JdbcDaoSupport (a spring assistant class.)

getJdbcTemplate().execute(new ConnectionCallback() {

        public Object doInConnection(Connection con) throws SQLException, DataAccessException {

            PublishResponseObject responseObject = new PublishResponseObject();
            OracleCallableStatement ocstmt = null;
            CLOB clob = null;

            try {
                clob = createCLOB(xmlString, con);
                ocstmt = (OracleCallableStatement) con.prepareCall("{call schmea.publish(?)}");
                //When in insert mode and update By Pk is specified updates are possible and version numbers will be returned.
                ocstmt.setCLOB(1, clob);
             finally {