DBA Data[Home] [Help]

APPS.FND_TRANSACTION_PIPE dependencies on FND_TRANSACTION

Line 1: package body fnd_transaction_pipe as

1: package body fnd_transaction_pipe as
2: /* $Header: AFCPTRPB.pls 120.1 2005/09/17 02:02:11 pferguso noship $ */
3:
4: --
5: -- Constants

Line 77: debug_flag := fnd_transaction.debug_flag;

73:
74:
75: begin
76:
77: debug_flag := fnd_transaction.debug_flag;
78:
79: resp_appl_id := fnd_global.resp_appl_id;
80: resp_id := fnd_global.resp_id;
81:

Line 83: fnd_transaction.debug_info('fnd_trn_pipe.get_manager',

79: resp_appl_id := fnd_global.resp_appl_id;
80: resp_id := fnd_global.resp_id;
81:
82: if (debug_flag) then
83: fnd_transaction.debug_info('fnd_trn_pipe.get_manager',
84: 'Searching for manager to run:',
85: application || ':' || program);
86: fnd_transaction.debug_info('fnd_trn_pipe.get_manager',
87: 'RESP_APPL_ID:RESP_ID',

Line 86: fnd_transaction.debug_info('fnd_trn_pipe.get_manager',

82: if (debug_flag) then
83: fnd_transaction.debug_info('fnd_trn_pipe.get_manager',
84: 'Searching for manager to run:',
85: application || ':' || program);
86: fnd_transaction.debug_info('fnd_trn_pipe.get_manager',
87: 'RESP_APPL_ID:RESP_ID',
88: to_char(resp_appl_id) || ':' || to_char(resp_id));
89: end if;
90:

Line 97: fnd_transaction.debug_info('fnd_trn_pipe.get_manager', 'No manager defined', NULL);

93: -- Fetch ID of first manager
94: fetch tm into queue_id;
95: -- If cursor is empty, then no manager is defined for request.
96: if (tm%rowcount = 0 ) then
97: fnd_transaction.debug_info('fnd_trn_pipe.get_manager', 'No manager defined', NULL);
98:
99: fnd_transaction.post_tm_event(1, application, program, -1);
100:
101: fnd_message.set_name('FND', 'CONC-TM-No manager defined');

Line 99: fnd_transaction.post_tm_event(1, application, program, -1);

95: -- If cursor is empty, then no manager is defined for request.
96: if (tm%rowcount = 0 ) then
97: fnd_transaction.debug_info('fnd_trn_pipe.get_manager', 'No manager defined', NULL);
98:
99: fnd_transaction.post_tm_event(1, application, program, -1);
100:
101: fnd_message.set_name('FND', 'CONC-TM-No manager defined');
102: fnd_message.set_token('APPLICATION', application);
103: fnd_message.set_token('PROGRAM', program);

Line 110: fnd_transaction.debug_info('fnd_trn_pipe.get_manager',

106: raise error;
107: end if;
108:
109: if (debug_flag) then
110: fnd_transaction.debug_info('fnd_trn_pipe.get_manager',
111: 'Timeout for token pipe',
112: to_char(timeout));
113: end if;
114:

Line 119: fnd_transaction.debug_info('fnd_trn_pipe.get_manager',

115: loop
116: -- Attempt to get the token for the manager
117: token_pipe := FNDCPTP || to_char(queue_id);
118: if (debug_flag) then
119: fnd_transaction.debug_info('fnd_trn_pipe.get_manager',
120: 'Trying token pipe',
121: token_pipe);
122: end if;
123: status := dbms_pipe.receive_message(token_pipe, timeout);

Line 130: fnd_transaction.debug_info('fnd_trn_pipe.get_manager', 'Token read error:', to_char(status));

126: exit when (status = 0);
127:
128: -- Raise exception on error other than timeout.
129: if (status <> 1) then
130: fnd_transaction.debug_info('fnd_trn_pipe.get_manager', 'Token read error:', to_char(status));
131: fnd_message.set_name('FND', 'CONC-TM-Token read error');
132: raise error;
133: end if;
134:

Line 136: fnd_transaction.post_tm_event(2, application, program, queue_id);

132: raise error;
133: end if;
134:
135: /* mark soft busy event (2) */
136: fnd_transaction.post_tm_event(2, application, program, queue_id);
137:
138: -- Fetch next manager name
139: fetch tm into queue_id;
140: if tm%notfound then raise all_busy; end if; -- Exhausted the list

Line 145: fnd_transaction.conc_queue_id := queue_id;

141: end loop;
142:
143: -- bug 3623063
144: -- save queue_id to be used for logging msgs to fnd_concurrent_debug_info
145: fnd_transaction.conc_queue_id := queue_id;
146:
147: -- Construct the manager pipe name and return with success.
148: tm_pipe := FNDCPRP || to_char(queue_id);
149: close tm;

Line 152: fnd_transaction.debug_info('fnd_trn_pipe.get_manager',

148: tm_pipe := FNDCPRP || to_char(queue_id);
149: close tm;
150:
151: if (debug_flag) then
152: fnd_transaction.debug_info('fnd_trn_pipe.get_manager',
153: 'Got available TM process',
154: tm_pipe);
155: end if;
156:

Line 157: return fnd_transaction.E_SUCCESS;

153: 'Got available TM process',
154: tm_pipe);
155: end if;
156:
157: return fnd_transaction.E_SUCCESS;
158:
159: exception
160: when all_busy then -- All managers capable of running the request
161: -- are busy or down.

Line 164: fnd_transaction.post_tm_event(3, application, program, -1 );

160: when all_busy then -- All managers capable of running the request
161: -- are busy or down.
162:
163: /* mark all appropriate managers as hard busy events */
164: fnd_transaction.post_tm_event(3, application, program, -1 );
165:
166: close tm;
167: fnd_transaction.debug_info('fnd_trn_pipe.get_manager', 'All managers busy or down', NULL);
168: return fnd_transaction.E_NOMGR;

Line 167: fnd_transaction.debug_info('fnd_trn_pipe.get_manager', 'All managers busy or down', NULL);

163: /* mark all appropriate managers as hard busy events */
164: fnd_transaction.post_tm_event(3, application, program, -1 );
165:
166: close tm;
167: fnd_transaction.debug_info('fnd_trn_pipe.get_manager', 'All managers busy or down', NULL);
168: return fnd_transaction.E_NOMGR;
169: when error then
170: if tm%isopen then
171: close tm;

Line 168: return fnd_transaction.E_NOMGR;

164: fnd_transaction.post_tm_event(3, application, program, -1 );
165:
166: close tm;
167: fnd_transaction.debug_info('fnd_trn_pipe.get_manager', 'All managers busy or down', NULL);
168: return fnd_transaction.E_NOMGR;
169: when error then
170: if tm%isopen then
171: close tm;
172: end if;

Line 173: return fnd_transaction.E_OTHER;

169: when error then
170: if tm%isopen then
171: close tm;
172: end if;
173: return fnd_transaction.E_OTHER;
174: when others then
175: if tm%isopen then
176: close tm;
177: end if;

Line 182: fnd_transaction.debug_info('fnd_trn_pipe.get_manager', 'Caught exception', sqlerrm);

178: fnd_message.set_name ('FND', 'SQL-Generic error');
179: fnd_message.set_token ('ERRNO', sqlcode, FALSE);
180: fnd_message.set_token ('REASON', sqlerrm, FALSE);
181: fnd_message.set_token ('ROUTINE', 'FND_TRN_PIPE.GET_MANAGER', FALSE);
182: fnd_transaction.debug_info('fnd_trn_pipe.get_manager', 'Caught exception', sqlerrm);
183:
184: return fnd_transaction.E_OTHER;
185:
186: end get_manager;

Line 184: return fnd_transaction.E_OTHER;

180: fnd_message.set_token ('REASON', sqlerrm, FALSE);
181: fnd_message.set_token ('ROUTINE', 'FND_TRN_PIPE.GET_MANAGER', FALSE);
182: fnd_transaction.debug_info('fnd_trn_pipe.get_manager', 'Caught exception', sqlerrm);
183:
184: return fnd_transaction.E_OTHER;
185:
186: end get_manager;
187:
188:

Line 277: tmpstr := substr(arg_1, 1, fnd_transaction.ARGMAX);

273: -- Pack arguments
274: argtotal := 0;
275:
276: if (arg_1 = CHR(0)) then goto end_pack; end if;
277: tmpstr := substr(arg_1, 1, fnd_transaction.ARGMAX);
278: argtotal := argtotal + length(tmpstr);
279: if argtotal > fnd_transaction.ARGSTOTAL then
280: raise argslen_err;
281: end if;

Line 279: if argtotal > fnd_transaction.ARGSTOTAL then

275:
276: if (arg_1 = CHR(0)) then goto end_pack; end if;
277: tmpstr := substr(arg_1, 1, fnd_transaction.ARGMAX);
278: argtotal := argtotal + length(tmpstr);
279: if argtotal > fnd_transaction.ARGSTOTAL then
280: raise argslen_err;
281: end if;
282: dbms_pipe.pack_message (tmpstr);
283: if (arg_2 = CHR(0)) then goto end_pack; end if;

Line 284: tmpstr := substr(arg_2, 1, fnd_transaction.ARGMAX);

280: raise argslen_err;
281: end if;
282: dbms_pipe.pack_message (tmpstr);
283: if (arg_2 = CHR(0)) then goto end_pack; end if;
284: tmpstr := substr(arg_2, 1, fnd_transaction.ARGMAX);
285: argtotal := argtotal + length(tmpstr);
286: if argtotal > fnd_transaction.ARGSTOTAL then
287: raise argslen_err;
288: end if;

Line 286: if argtotal > fnd_transaction.ARGSTOTAL then

282: dbms_pipe.pack_message (tmpstr);
283: if (arg_2 = CHR(0)) then goto end_pack; end if;
284: tmpstr := substr(arg_2, 1, fnd_transaction.ARGMAX);
285: argtotal := argtotal + length(tmpstr);
286: if argtotal > fnd_transaction.ARGSTOTAL then
287: raise argslen_err;
288: end if;
289: dbms_pipe.pack_message (tmpstr);
290: if (arg_3 = CHR(0)) then goto end_pack; end if;

Line 291: tmpstr := substr(arg_3, 1, fnd_transaction.ARGMAX);

287: raise argslen_err;
288: end if;
289: dbms_pipe.pack_message (tmpstr);
290: if (arg_3 = CHR(0)) then goto end_pack; end if;
291: tmpstr := substr(arg_3, 1, fnd_transaction.ARGMAX);
292: argtotal := argtotal + length(tmpstr);
293: if argtotal > fnd_transaction.ARGSTOTAL then
294: raise argslen_err;
295: end if;

Line 293: if argtotal > fnd_transaction.ARGSTOTAL then

289: dbms_pipe.pack_message (tmpstr);
290: if (arg_3 = CHR(0)) then goto end_pack; end if;
291: tmpstr := substr(arg_3, 1, fnd_transaction.ARGMAX);
292: argtotal := argtotal + length(tmpstr);
293: if argtotal > fnd_transaction.ARGSTOTAL then
294: raise argslen_err;
295: end if;
296: dbms_pipe.pack_message (tmpstr);
297: if (arg_4 = CHR(0)) then goto end_pack; end if;

Line 298: tmpstr := substr(arg_4, 1, fnd_transaction.ARGMAX);

294: raise argslen_err;
295: end if;
296: dbms_pipe.pack_message (tmpstr);
297: if (arg_4 = CHR(0)) then goto end_pack; end if;
298: tmpstr := substr(arg_4, 1, fnd_transaction.ARGMAX);
299: argtotal := argtotal + length(tmpstr);
300: if argtotal > fnd_transaction.ARGSTOTAL then
301: raise argslen_err;
302: end if;

Line 300: if argtotal > fnd_transaction.ARGSTOTAL then

296: dbms_pipe.pack_message (tmpstr);
297: if (arg_4 = CHR(0)) then goto end_pack; end if;
298: tmpstr := substr(arg_4, 1, fnd_transaction.ARGMAX);
299: argtotal := argtotal + length(tmpstr);
300: if argtotal > fnd_transaction.ARGSTOTAL then
301: raise argslen_err;
302: end if;
303: dbms_pipe.pack_message (tmpstr);
304: if (arg_5 = CHR(0)) then goto end_pack; end if;

Line 305: tmpstr := substr(arg_5, 1, fnd_transaction.ARGMAX);

301: raise argslen_err;
302: end if;
303: dbms_pipe.pack_message (tmpstr);
304: if (arg_5 = CHR(0)) then goto end_pack; end if;
305: tmpstr := substr(arg_5, 1, fnd_transaction.ARGMAX);
306: argtotal := argtotal + length(tmpstr);
307: if argtotal > fnd_transaction.ARGSTOTAL then
308: raise argslen_err;
309: end if;

Line 307: if argtotal > fnd_transaction.ARGSTOTAL then

303: dbms_pipe.pack_message (tmpstr);
304: if (arg_5 = CHR(0)) then goto end_pack; end if;
305: tmpstr := substr(arg_5, 1, fnd_transaction.ARGMAX);
306: argtotal := argtotal + length(tmpstr);
307: if argtotal > fnd_transaction.ARGSTOTAL then
308: raise argslen_err;
309: end if;
310: dbms_pipe.pack_message (tmpstr);
311: if (arg_6 = CHR(0)) then goto end_pack; end if;

Line 312: tmpstr := substr(arg_6, 1, fnd_transaction.ARGMAX);

308: raise argslen_err;
309: end if;
310: dbms_pipe.pack_message (tmpstr);
311: if (arg_6 = CHR(0)) then goto end_pack; end if;
312: tmpstr := substr(arg_6, 1, fnd_transaction.ARGMAX);
313: argtotal := argtotal + length(tmpstr);
314: if argtotal > fnd_transaction.ARGSTOTAL then
315: raise argslen_err;
316: end if;

Line 314: if argtotal > fnd_transaction.ARGSTOTAL then

310: dbms_pipe.pack_message (tmpstr);
311: if (arg_6 = CHR(0)) then goto end_pack; end if;
312: tmpstr := substr(arg_6, 1, fnd_transaction.ARGMAX);
313: argtotal := argtotal + length(tmpstr);
314: if argtotal > fnd_transaction.ARGSTOTAL then
315: raise argslen_err;
316: end if;
317: dbms_pipe.pack_message (tmpstr);
318: if (arg_7 = CHR(0)) then goto end_pack; end if;

Line 319: tmpstr := substr(arg_7, 1, fnd_transaction.ARGMAX);

315: raise argslen_err;
316: end if;
317: dbms_pipe.pack_message (tmpstr);
318: if (arg_7 = CHR(0)) then goto end_pack; end if;
319: tmpstr := substr(arg_7, 1, fnd_transaction.ARGMAX);
320: argtotal := argtotal + length(tmpstr);
321: if argtotal > fnd_transaction.ARGSTOTAL then
322: raise argslen_err;
323: end if;

Line 321: if argtotal > fnd_transaction.ARGSTOTAL then

317: dbms_pipe.pack_message (tmpstr);
318: if (arg_7 = CHR(0)) then goto end_pack; end if;
319: tmpstr := substr(arg_7, 1, fnd_transaction.ARGMAX);
320: argtotal := argtotal + length(tmpstr);
321: if argtotal > fnd_transaction.ARGSTOTAL then
322: raise argslen_err;
323: end if;
324: dbms_pipe.pack_message (tmpstr);
325: if (arg_8 = CHR(0)) then goto end_pack; end if;

Line 326: tmpstr := substr(arg_8, 1, fnd_transaction.ARGMAX);

322: raise argslen_err;
323: end if;
324: dbms_pipe.pack_message (tmpstr);
325: if (arg_8 = CHR(0)) then goto end_pack; end if;
326: tmpstr := substr(arg_8, 1, fnd_transaction.ARGMAX);
327: argtotal := argtotal + length(tmpstr);
328: if argtotal > fnd_transaction.ARGSTOTAL then
329: raise argslen_err;
330: end if;

Line 328: if argtotal > fnd_transaction.ARGSTOTAL then

324: dbms_pipe.pack_message (tmpstr);
325: if (arg_8 = CHR(0)) then goto end_pack; end if;
326: tmpstr := substr(arg_8, 1, fnd_transaction.ARGMAX);
327: argtotal := argtotal + length(tmpstr);
328: if argtotal > fnd_transaction.ARGSTOTAL then
329: raise argslen_err;
330: end if;
331: dbms_pipe.pack_message (tmpstr);
332: if (arg_9 = CHR(0)) then goto end_pack; end if;

Line 333: tmpstr := substr(arg_9, 1, fnd_transaction.ARGMAX);

329: raise argslen_err;
330: end if;
331: dbms_pipe.pack_message (tmpstr);
332: if (arg_9 = CHR(0)) then goto end_pack; end if;
333: tmpstr := substr(arg_9, 1, fnd_transaction.ARGMAX);
334: argtotal := argtotal + length(tmpstr);
335: if argtotal > fnd_transaction.ARGSTOTAL then
336: raise argslen_err;
337: end if;

Line 335: if argtotal > fnd_transaction.ARGSTOTAL then

331: dbms_pipe.pack_message (tmpstr);
332: if (arg_9 = CHR(0)) then goto end_pack; end if;
333: tmpstr := substr(arg_9, 1, fnd_transaction.ARGMAX);
334: argtotal := argtotal + length(tmpstr);
335: if argtotal > fnd_transaction.ARGSTOTAL then
336: raise argslen_err;
337: end if;
338: dbms_pipe.pack_message (tmpstr);
339: if (arg_10 = CHR(0)) then goto end_pack; end if;

Line 340: tmpstr := substr(arg_10, 1, fnd_transaction.ARGMAX);

336: raise argslen_err;
337: end if;
338: dbms_pipe.pack_message (tmpstr);
339: if (arg_10 = CHR(0)) then goto end_pack; end if;
340: tmpstr := substr(arg_10, 1, fnd_transaction.ARGMAX);
341: argtotal := argtotal + length(tmpstr);
342: if argtotal > fnd_transaction.ARGSTOTAL then
343: raise argslen_err;
344: end if;

Line 342: if argtotal > fnd_transaction.ARGSTOTAL then

338: dbms_pipe.pack_message (tmpstr);
339: if (arg_10 = CHR(0)) then goto end_pack; end if;
340: tmpstr := substr(arg_10, 1, fnd_transaction.ARGMAX);
341: argtotal := argtotal + length(tmpstr);
342: if argtotal > fnd_transaction.ARGSTOTAL then
343: raise argslen_err;
344: end if;
345: dbms_pipe.pack_message (tmpstr);
346: if (arg_11 = CHR(0)) then goto end_pack; end if;

Line 347: tmpstr := substr(arg_11, 1, fnd_transaction.ARGMAX);

343: raise argslen_err;
344: end if;
345: dbms_pipe.pack_message (tmpstr);
346: if (arg_11 = CHR(0)) then goto end_pack; end if;
347: tmpstr := substr(arg_11, 1, fnd_transaction.ARGMAX);
348: argtotal := argtotal + length(tmpstr);
349: if argtotal > fnd_transaction.ARGSTOTAL then
350: raise argslen_err;
351: end if;

Line 349: if argtotal > fnd_transaction.ARGSTOTAL then

345: dbms_pipe.pack_message (tmpstr);
346: if (arg_11 = CHR(0)) then goto end_pack; end if;
347: tmpstr := substr(arg_11, 1, fnd_transaction.ARGMAX);
348: argtotal := argtotal + length(tmpstr);
349: if argtotal > fnd_transaction.ARGSTOTAL then
350: raise argslen_err;
351: end if;
352: dbms_pipe.pack_message (tmpstr);
353: if (arg_12 = CHR(0)) then goto end_pack; end if;

Line 354: tmpstr := substr(arg_12, 1, fnd_transaction.ARGMAX);

350: raise argslen_err;
351: end if;
352: dbms_pipe.pack_message (tmpstr);
353: if (arg_12 = CHR(0)) then goto end_pack; end if;
354: tmpstr := substr(arg_12, 1, fnd_transaction.ARGMAX);
355: argtotal := argtotal + length(tmpstr);
356: if argtotal > fnd_transaction.ARGSTOTAL then
357: raise argslen_err;
358: end if;

Line 356: if argtotal > fnd_transaction.ARGSTOTAL then

352: dbms_pipe.pack_message (tmpstr);
353: if (arg_12 = CHR(0)) then goto end_pack; end if;
354: tmpstr := substr(arg_12, 1, fnd_transaction.ARGMAX);
355: argtotal := argtotal + length(tmpstr);
356: if argtotal > fnd_transaction.ARGSTOTAL then
357: raise argslen_err;
358: end if;
359: dbms_pipe.pack_message (tmpstr);
360: if (arg_13 = CHR(0)) then goto end_pack; end if;

Line 361: tmpstr := substr(arg_13, 1, fnd_transaction.ARGMAX);

357: raise argslen_err;
358: end if;
359: dbms_pipe.pack_message (tmpstr);
360: if (arg_13 = CHR(0)) then goto end_pack; end if;
361: tmpstr := substr(arg_13, 1, fnd_transaction.ARGMAX);
362: argtotal := argtotal + length(tmpstr);
363: if argtotal > fnd_transaction.ARGSTOTAL then
364: raise argslen_err;
365: end if;

Line 363: if argtotal > fnd_transaction.ARGSTOTAL then

359: dbms_pipe.pack_message (tmpstr);
360: if (arg_13 = CHR(0)) then goto end_pack; end if;
361: tmpstr := substr(arg_13, 1, fnd_transaction.ARGMAX);
362: argtotal := argtotal + length(tmpstr);
363: if argtotal > fnd_transaction.ARGSTOTAL then
364: raise argslen_err;
365: end if;
366: dbms_pipe.pack_message (tmpstr);
367: if (arg_14 = CHR(0)) then goto end_pack; end if;

Line 368: tmpstr := substr(arg_14, 1, fnd_transaction.ARGMAX);

364: raise argslen_err;
365: end if;
366: dbms_pipe.pack_message (tmpstr);
367: if (arg_14 = CHR(0)) then goto end_pack; end if;
368: tmpstr := substr(arg_14, 1, fnd_transaction.ARGMAX);
369: argtotal := argtotal + length(tmpstr);
370: if argtotal > fnd_transaction.ARGSTOTAL then
371: raise argslen_err;
372: end if;

Line 370: if argtotal > fnd_transaction.ARGSTOTAL then

366: dbms_pipe.pack_message (tmpstr);
367: if (arg_14 = CHR(0)) then goto end_pack; end if;
368: tmpstr := substr(arg_14, 1, fnd_transaction.ARGMAX);
369: argtotal := argtotal + length(tmpstr);
370: if argtotal > fnd_transaction.ARGSTOTAL then
371: raise argslen_err;
372: end if;
373: dbms_pipe.pack_message (tmpstr);
374: if (arg_15 = CHR(0)) then goto end_pack; end if;

Line 375: tmpstr := substr(arg_15, 1, fnd_transaction.ARGMAX);

371: raise argslen_err;
372: end if;
373: dbms_pipe.pack_message (tmpstr);
374: if (arg_15 = CHR(0)) then goto end_pack; end if;
375: tmpstr := substr(arg_15, 1, fnd_transaction.ARGMAX);
376: argtotal := argtotal + length(tmpstr);
377: if argtotal > fnd_transaction.ARGSTOTAL then
378: raise argslen_err;
379: end if;

Line 377: if argtotal > fnd_transaction.ARGSTOTAL then

373: dbms_pipe.pack_message (tmpstr);
374: if (arg_15 = CHR(0)) then goto end_pack; end if;
375: tmpstr := substr(arg_15, 1, fnd_transaction.ARGMAX);
376: argtotal := argtotal + length(tmpstr);
377: if argtotal > fnd_transaction.ARGSTOTAL then
378: raise argslen_err;
379: end if;
380: dbms_pipe.pack_message (tmpstr);
381: if (arg_16 = CHR(0)) then goto end_pack; end if;

Line 382: tmpstr := substr(arg_16, 1, fnd_transaction.ARGMAX);

378: raise argslen_err;
379: end if;
380: dbms_pipe.pack_message (tmpstr);
381: if (arg_16 = CHR(0)) then goto end_pack; end if;
382: tmpstr := substr(arg_16, 1, fnd_transaction.ARGMAX);
383: argtotal := argtotal + length(tmpstr);
384: if argtotal > fnd_transaction.ARGSTOTAL then
385: raise argslen_err;
386: end if;

Line 384: if argtotal > fnd_transaction.ARGSTOTAL then

380: dbms_pipe.pack_message (tmpstr);
381: if (arg_16 = CHR(0)) then goto end_pack; end if;
382: tmpstr := substr(arg_16, 1, fnd_transaction.ARGMAX);
383: argtotal := argtotal + length(tmpstr);
384: if argtotal > fnd_transaction.ARGSTOTAL then
385: raise argslen_err;
386: end if;
387: dbms_pipe.pack_message (tmpstr);
388: if (arg_17 = CHR(0)) then goto end_pack; end if;

Line 389: tmpstr := substr(arg_17, 1, fnd_transaction.ARGMAX);

385: raise argslen_err;
386: end if;
387: dbms_pipe.pack_message (tmpstr);
388: if (arg_17 = CHR(0)) then goto end_pack; end if;
389: tmpstr := substr(arg_17, 1, fnd_transaction.ARGMAX);
390: argtotal := argtotal + length(tmpstr);
391: if argtotal > fnd_transaction.ARGSTOTAL then
392: raise argslen_err;
393: end if;

Line 391: if argtotal > fnd_transaction.ARGSTOTAL then

387: dbms_pipe.pack_message (tmpstr);
388: if (arg_17 = CHR(0)) then goto end_pack; end if;
389: tmpstr := substr(arg_17, 1, fnd_transaction.ARGMAX);
390: argtotal := argtotal + length(tmpstr);
391: if argtotal > fnd_transaction.ARGSTOTAL then
392: raise argslen_err;
393: end if;
394: dbms_pipe.pack_message (tmpstr);
395: if (arg_18 = CHR(0)) then goto end_pack; end if;

Line 396: tmpstr := substr(arg_18, 1, fnd_transaction.ARGMAX);

392: raise argslen_err;
393: end if;
394: dbms_pipe.pack_message (tmpstr);
395: if (arg_18 = CHR(0)) then goto end_pack; end if;
396: tmpstr := substr(arg_18, 1, fnd_transaction.ARGMAX);
397: argtotal := argtotal + length(tmpstr);
398: if argtotal > fnd_transaction.ARGSTOTAL then
399: raise argslen_err;
400: end if;

Line 398: if argtotal > fnd_transaction.ARGSTOTAL then

394: dbms_pipe.pack_message (tmpstr);
395: if (arg_18 = CHR(0)) then goto end_pack; end if;
396: tmpstr := substr(arg_18, 1, fnd_transaction.ARGMAX);
397: argtotal := argtotal + length(tmpstr);
398: if argtotal > fnd_transaction.ARGSTOTAL then
399: raise argslen_err;
400: end if;
401: dbms_pipe.pack_message (tmpstr);
402: if (arg_19 = CHR(0)) then goto end_pack; end if;

Line 403: tmpstr := substr(arg_19, 1, fnd_transaction.ARGMAX);

399: raise argslen_err;
400: end if;
401: dbms_pipe.pack_message (tmpstr);
402: if (arg_19 = CHR(0)) then goto end_pack; end if;
403: tmpstr := substr(arg_19, 1, fnd_transaction.ARGMAX);
404: argtotal := argtotal + length(tmpstr);
405: if argtotal > fnd_transaction.ARGSTOTAL then
406: raise argslen_err;
407: end if;

Line 405: if argtotal > fnd_transaction.ARGSTOTAL then

401: dbms_pipe.pack_message (tmpstr);
402: if (arg_19 = CHR(0)) then goto end_pack; end if;
403: tmpstr := substr(arg_19, 1, fnd_transaction.ARGMAX);
404: argtotal := argtotal + length(tmpstr);
405: if argtotal > fnd_transaction.ARGSTOTAL then
406: raise argslen_err;
407: end if;
408: dbms_pipe.pack_message (tmpstr);
409: if (arg_20 = CHR(0)) then goto end_pack; end if;

Line 410: tmpstr := substr(arg_20, 1, fnd_transaction.ARGMAX);

406: raise argslen_err;
407: end if;
408: dbms_pipe.pack_message (tmpstr);
409: if (arg_20 = CHR(0)) then goto end_pack; end if;
410: tmpstr := substr(arg_20, 1, fnd_transaction.ARGMAX);
411: argtotal := argtotal + length(tmpstr);
412: if argtotal > fnd_transaction.ARGSTOTAL then
413: raise argslen_err;
414: end if;

Line 412: if argtotal > fnd_transaction.ARGSTOTAL then

408: dbms_pipe.pack_message (tmpstr);
409: if (arg_20 = CHR(0)) then goto end_pack; end if;
410: tmpstr := substr(arg_20, 1, fnd_transaction.ARGMAX);
411: argtotal := argtotal + length(tmpstr);
412: if argtotal > fnd_transaction.ARGSTOTAL then
413: raise argslen_err;
414: end if;
415: dbms_pipe.pack_message (tmpstr);
416:

Line 427: fnd_transaction.debug_info('fnd_trn_pipe.send_message', 'send_message timeout', NULL);

423:
424: -- Send the message. Exit on timeout or error.
425: status := dbms_pipe.send_message(tm_pipe, remaining_time);
426: if (status = 1) then
427: fnd_transaction.debug_info('fnd_trn_pipe.send_message', 'send_message timeout', NULL);
428:
429: /* mark timeout event (4) */
430: fnd_transaction.post_tm_event(4, application, program, -1, timeout, tm_pipe );
431:

Line 430: fnd_transaction.post_tm_event(4, application, program, -1, timeout, tm_pipe );

426: if (status = 1) then
427: fnd_transaction.debug_info('fnd_trn_pipe.send_message', 'send_message timeout', NULL);
428:
429: /* mark timeout event (4) */
430: fnd_transaction.post_tm_event(4, application, program, -1, timeout, tm_pipe );
431:
432: return fnd_transaction.E_TIMEOUT;
433: elsif (status <> 0) then
434: fnd_transaction.debug_info('fnd_trn_pipe.send_message', 'send_message returned:', to_char(status));

Line 432: return fnd_transaction.E_TIMEOUT;

428:
429: /* mark timeout event (4) */
430: fnd_transaction.post_tm_event(4, application, program, -1, timeout, tm_pipe );
431:
432: return fnd_transaction.E_TIMEOUT;
433: elsif (status <> 0) then
434: fnd_transaction.debug_info('fnd_trn_pipe.send_message', 'send_message returned:', to_char(status));
435: raise error;
436: end if;

Line 434: fnd_transaction.debug_info('fnd_trn_pipe.send_message', 'send_message returned:', to_char(status));

430: fnd_transaction.post_tm_event(4, application, program, -1, timeout, tm_pipe );
431:
432: return fnd_transaction.E_TIMEOUT;
433: elsif (status <> 0) then
434: fnd_transaction.debug_info('fnd_trn_pipe.send_message', 'send_message returned:', to_char(status));
435: raise error;
436: end if;
437:
438: -- Loop until timeout or we recieve a message on the return pipe

Line 442: remaining_time := remaining_time - ((sysdate-submit_time)*fnd_transaction.SEC_PER_DAY);

438: -- Loop until timeout or we recieve a message on the return pipe
439: -- with a matching request ID. Throw out all other received messages.
440: loop
441: -- calculate the remaining timeout
442: remaining_time := remaining_time - ((sysdate-submit_time)*fnd_transaction.SEC_PER_DAY);
443:
444: -- 906219 - added call to reset_buffer here to clear the buffer
445: -- before receiving the message.
446: -- Leftover data in the buffer was causing messages to come out incorrect.

Line 453: fnd_transaction.debug_info('fnd_trn_pipe.send_message', 'receive_message timeout', NULL, 'U');

449:
450: -- Wait on return pipe. Exit on timoeout or error
451: status := dbms_pipe.receive_message(return_pipe, remaining_time);
452: if (status = 1) then
453: fnd_transaction.debug_info('fnd_trn_pipe.send_message', 'receive_message timeout', NULL, 'U');
454:
455: /* mark timeout event (4) */
456: fnd_transaction.post_tm_event(4, application, program, -1, timeout, tm_pipe);
457:

Line 456: fnd_transaction.post_tm_event(4, application, program, -1, timeout, tm_pipe);

452: if (status = 1) then
453: fnd_transaction.debug_info('fnd_trn_pipe.send_message', 'receive_message timeout', NULL, 'U');
454:
455: /* mark timeout event (4) */
456: fnd_transaction.post_tm_event(4, application, program, -1, timeout, tm_pipe);
457:
458: return fnd_transaction.E_TIMEOUT;
459: elsif (status <> 0) then
460: fnd_transaction.debug_info('fnd_trn_pipe.send_message', 'receive_message returned:', to_char(status), 'U');

Line 458: return fnd_transaction.E_TIMEOUT;

454:
455: /* mark timeout event (4) */
456: fnd_transaction.post_tm_event(4, application, program, -1, timeout, tm_pipe);
457:
458: return fnd_transaction.E_TIMEOUT;
459: elsif (status <> 0) then
460: fnd_transaction.debug_info('fnd_trn_pipe.send_message', 'receive_message returned:', to_char(status), 'U');
461: raise error;
462: end if;

Line 460: fnd_transaction.debug_info('fnd_trn_pipe.send_message', 'receive_message returned:', to_char(status), 'U');

456: fnd_transaction.post_tm_event(4, application, program, -1, timeout, tm_pipe);
457:
458: return fnd_transaction.E_TIMEOUT;
459: elsif (status <> 0) then
460: fnd_transaction.debug_info('fnd_trn_pipe.send_message', 'receive_message returned:', to_char(status), 'U');
461: raise error;
462: end if;
463:
464: -- Exit loop only if we got the proper response

Line 483: fnd_transaction.return_values(counter) := return_val;

479: for counter in 1..21 loop
480: counter1 := counter;
481: exit when dbms_pipe.next_item_type <> 9;
482: dbms_pipe.unpack_message(return_val);
483: fnd_transaction.return_values(counter) := return_val;
484: end loop;
485:
486: -- Null out the unused table elements
487: if (counter1 < 21) then

Line 489: fnd_transaction.return_values(counter2) := null;

485:
486: -- Null out the unused table elements
487: if (counter1 < 21) then
488: for counter2 in counter1..20 loop
489: fnd_transaction.return_values(counter2) := null;
490: end loop;
491: end if;
492: if (debug_flag) then
493: for counter1 in 1..20 loop

Line 494: fnd_transaction.debug_info('fnd_trn_pipe.send_message',

490: end loop;
491: end if;
492: if (debug_flag) then
493: for counter1 in 1..20 loop
494: fnd_transaction.debug_info('fnd_trn_pipe.send_message',
495: 'Return table entry #'||to_char(counter1),
496: fnd_transaction.return_values(counter1), 'U');
497: end loop;
498: end if;

Line 496: fnd_transaction.return_values(counter1), 'U');

492: if (debug_flag) then
493: for counter1 in 1..20 loop
494: fnd_transaction.debug_info('fnd_trn_pipe.send_message',
495: 'Return table entry #'||to_char(counter1),
496: fnd_transaction.return_values(counter1), 'U');
497: end loop;
498: end if;
499:
500: return fnd_transaction.E_SUCCESS;

Line 500: return fnd_transaction.E_SUCCESS;

496: fnd_transaction.return_values(counter1), 'U');
497: end loop;
498: end if;
499:
500: return fnd_transaction.E_SUCCESS;
501:
502: exception
503: when error then
504: return fnd_transaction.E_OTHER;

Line 504: return fnd_transaction.E_OTHER;

500: return fnd_transaction.E_SUCCESS;
501:
502: exception
503: when error then
504: return fnd_transaction.E_OTHER;
505: when argslen_err then
506: fnd_transaction.debug_info('fnd_trn_pipe.send_message', 'Total size of args too long', to_char(argtotal));
507: return fnd_transaction.E_ARGSIZE;
508: when others then

Line 506: fnd_transaction.debug_info('fnd_trn_pipe.send_message', 'Total size of args too long', to_char(argtotal));

502: exception
503: when error then
504: return fnd_transaction.E_OTHER;
505: when argslen_err then
506: fnd_transaction.debug_info('fnd_trn_pipe.send_message', 'Total size of args too long', to_char(argtotal));
507: return fnd_transaction.E_ARGSIZE;
508: when others then
509: fnd_message.set_name ('FND', 'SQL-Generic error');
510: fnd_message.set_token ('ERRNO', sqlcode, FALSE);

Line 507: return fnd_transaction.E_ARGSIZE;

503: when error then
504: return fnd_transaction.E_OTHER;
505: when argslen_err then
506: fnd_transaction.debug_info('fnd_trn_pipe.send_message', 'Total size of args too long', to_char(argtotal));
507: return fnd_transaction.E_ARGSIZE;
508: when others then
509: fnd_message.set_name ('FND', 'SQL-Generic error');
510: fnd_message.set_token ('ERRNO', sqlcode, FALSE);
511: fnd_message.set_token ('REASON', sqlerrm, FALSE);

Line 514: fnd_transaction.debug_info('fnd_trn_pipe.send_message', 'Caught exception', sqlerrm);

510: fnd_message.set_token ('ERRNO', sqlcode, FALSE);
511: fnd_message.set_token ('REASON', sqlerrm, FALSE);
512: fnd_message.set_token (
513: 'ROUTINE', 'FND_TRN_PIPE.SEND_MESSAGE', FALSE);
514: fnd_transaction.debug_info('fnd_trn_pipe.send_message', 'Caught exception', sqlerrm);
515: return fnd_transaction.E_OTHER;
516:
517:
518: end send_message;

Line 515: return fnd_transaction.E_OTHER;

511: fnd_message.set_token ('REASON', sqlerrm, FALSE);
512: fnd_message.set_token (
513: 'ROUTINE', 'FND_TRN_PIPE.SEND_MESSAGE', FALSE);
514: fnd_transaction.debug_info('fnd_trn_pipe.send_message', 'Caught exception', sqlerrm);
515: return fnd_transaction.E_OTHER;
516:
517:
518: end send_message;
519:

Line 520: end fnd_transaction_pipe;

516:
517:
518: end send_message;
519:
520: end fnd_transaction_pipe;