Project

General

Profile

« Previous | Next » 

Revision 42240

latest changes

View differences:

LodImportReducer.java
126 126
                ps.setString(3, defaultGraph);
127 127
                final int NQUAD_LEVEL = 64;
128 128
                ps.setInt(4, NQUAD_LEVEL);
129
                ps.setInt(5, 1);
130
                ps.setInt(6, 10);
129
                ps.setInt(5, 0);
130
                ps.setInt(6, 15);
131 131
                ps.setInt(7, 0);
132 132
                ps.execute();
133 133
//                ps = conn.prepareStatement("commit work");
134 134
//                ps.execute();
135 135
                conn.commit();
136
                
136 137
                ps.close();
137 138
//    
138 139
//    			conn.close();
......
158 159

  
159 160
    		} catch (Exception e) {
160 161
   			log.error("Virtuoso write failed  at  query" + buildQuery + " \n and with error " + e.toString(), e);
161
//            log.error("Virtuoso write failed  at  query with error " + e.toString(), e);
162

  
163

  
164 162
    			try {
165 163
    				if(conn!=null){
166 164
	    				conn.rollback();
167 165
	    				conn.close();
168 166
	    				conn=ds.getConnection();
167
	    				conn.setAutoCommit(false);
169 168
    				}else{
170 169
    					conn.close();
171 170
        				conn=ds.getConnection();
171
        				conn.setAutoCommit(false);
172 172
    				}
173 173
					
174 174
				} catch (Exception e1) {
......
176 176
				}
177 177
    			
178 178
    		}
179
            
180
            
181
            
182
//            try {
183
////                Query q = QueryFactory.create(insertQuery);
184
////                VirtuosoUpdateRequest q2ur = VirtuosoUpdateFactory.create(q.serialize(), graph);
185
//                VirtuosoUpdateRequest q2ur = VirtuosoUpdateFactory.create(insertQuery, graph);
186
//                q2ur.exec();
187
//                counter = 0;
188
//                buildQuery = "";
189
//            } catch (Exception e) {
190
//                log.error("Virtuoso write failed  at  query" + insertQuery + " \n and with error " + e.toString(), e);
191
////              throw new InterruptedException("Virtuoso write failed  at  query : " + insertQuery + " \n  and with error " + e.toString());
192
//            }
193 179

  
194 180
        }
195 181

  
......
208 194
            ps.setString(3, defaultGraph);
209 195
            final int NQUAD_LEVEL = 64;
210 196
            ps.setInt(4, NQUAD_LEVEL);
211
            ps.setInt(5, 1);
212
            ps.setInt(6, 50);
197
            ps.setInt(5, 0);
198
            ps.setInt(6, 15);
213 199
            ps.setInt(7, 0);
214 200
            ps.execute();
215 201
            conn.commit();
216 202
            ps.close();
203
            
204
            ps = conn.prepareStatement("?");
205
            ps.setString(1,"commit work");
206
            ps.close();
207
            
217 208
        } catch (Exception e) {
218 209
            log.error("Virtuoso write failed  at  query" + buildQuery + " \n and with error " + e.toString(), e);
219 210
//            throw new InterruptedException("Virtuoso write failed  at  query" + insertQuery + " \n and with error " + e.toString());
......
225 216
//            	graph.close();
226 217
//            	ds.close();
227 218
            }catch(Exception e){
228
            	log.error("Could not Close Graph or Datasource \n and with error " + e.toString(), e);
219
            	log.error("Could not Close connection \n" + e.toString(), e);
229 220
            }
230 221
            
231 222
            log.info("Graph and Datasource Closed...");

Also available in: Unified diff