Socket alive after program exit
The java socket connection remains alive when the the program exits abrubtly. No exception is thrown at the listening socket side. Since timeout is set, InterruptedIOException is thrown at timeout intervals.
Is there a question?
That doesn't have anything to do with java. That is how TCP/IP works.
The only way to detect all connection failures is to write to the socket - reads will not do it.
Similar Messages
-
Keep external process alive after System.exit(0)
I wish to start Outlook from my Java program and have my own program exit normally but keep alive the Outlook process. Besides, I am not interested in input/output/error streams.
public class OutlookStarter {
public static void main(String[] args) throws Exception {
new ProcessBuilder("cmd", "/c",
"\"C:\\Program Files\\Microsoft Office\\Office14\\outlook.exe\"")
.start();
}When I run this when Outlook is not started, my program will not exit until I close Outlook.
I really do not want to close Outlook just to exit my program (my real program has a Swing GUI and users must be able to close it).
Also when I run this when Outlook is already started, somehow my program DOES exit without closing the new Outlook window.
EDIT: I can add System.exit(0) and behavior is the same. I can use Runtime.getRuntime().exec and behavior is the same.
Edited by: Strider80 on Jan 12, 2011 7:27 AMStrider80 wrote:
I wish to start Outlook from my Java program and have my own program exit normally but keep alive the Outlook process. Besides, I am not interested in input/output/error streams.
public class OutlookStarter {
public static void main(String[] args) throws Exception {
new ProcessBuilder("cmd", "/c",
"\"C:\\Program Files\\Microsoft Office\\Office14\\outlook.exe\"")
.start();
Did you try using [url http://www.computerhope.com/starthlp.htm]start ^[url http://www.computerhope.com/starthlp.htm]Microsoft DOS and command prompt^ ?
new ProcessBuilder("cmd", "/c",
"start \"C:\\Program Files\\Microsoft Office\\Office14\\outlook.exe\"")
.start(); -
How do you retain added indexes in Acrobat 7.0 Pro after program exit?
Indexes of pdf docs created properly with Acrobat Catalog.
In Acrobat with Advanced search option, add indexes is successful, and searches for text in indexed documents is successful.
Exit Acrobat, then later re-launch Acrobat, indexes previously added, have disappeared.And then after opening Firefox, and then what? If you're trying to help it'd be appreciative you are clear and complete with your instructions.
Thanks! -
Program exit - IF_SWF_IFS_WORKITEM_EXIT - Executed by WF-batch.
Hi all,
I have implemented a Program exit in my User decision step. This user exit is for finding the actual agent rule. But whats happening now is that the events are getting triggered in the below fashion.
1. swfco_event_before_creation(BEF_CREAT)
2. swfco_event_after_creation
The above two are getting executed by the user who created the workflow.
But after that the event 'swfco_event_state_changed' is getting automatically execute by the WF-batch user and later the WF-batch user has trigerring the event -AFT_EXEC and allowing the Work item to be in the complete state.
I tried simulating the same in test system and i was not able to find it and the Workflow is waiting in the event-swfco_event_after_creation and it is still in the wait status till in reached the deadline and didnt get executed by WF-batch.
Kindly guide.
Thanks,
Neslin.WF-BATCH is starting at the event-C_EVTTYP_STATE_CHANGED(STATE_CHG) automatically. I can see it in the information message near to WF-BATCH.
Correct agent Dialog work item created 26.06.2009 11:54:57
Correct agent Work Item Exit Called 26.06.2009 11:54:57
Correct agent Work Item Exit Called 26.06.2009 11:54:57
Correct agent Work Item Exit Called 26.06.2009 11:54:57
Correct agent Work Item Exit Called 26.06.2009 11:54:57
Correct agent Work Item Exit Called 26.06.2009 11:54:57
Correct agent Work Item Exit Called 26.06.2009 11:54:57
WF-BATCH Work Item Exit Called 26.06.2009 11:57:15
WF-BATCH Work Item Exit Called 26.06.2009 11:57:15
WF-BATCH Work Item Exit Called 26.06.2009 11:57:15
WF-BATCH Work Item Exit Called 26.06.2009 11:57:15
WF-BATCH Work Item Reserved 26.06.2009 11:57:15
WF-BATCH Work Item Exit Called 26.06.2009 11:57:15
WF-BATCH Work Item Exit Called 26.06.2009 11:57:15
WF-BATCH Work Item Exit Called 26.06.2009 11:57:15
WF-BATCH Work Item Exit Called 26.06.2009 11:57:15
WF-BATCH Work Item Processing Complete 26.06.2009 11:57:15
WF-BATCH Result Processing 26.06.2009 11:57:15
This is how it is coming in the log.
Thanks,
neslin. -
Program exit to change workitem text
Hi All,
I have a requirement to change work item text at runtime, i am using program exit to change the task contrainer variable which is being used to display work item text. i have written a code in program exit to update container element, but it's not reflected to change workitem text, when i check in ln workflow log the variable shows with updated value.
Please help to solve issue.
Many thanks,Hi Gupta,
I used below code to update container element.
CASE im_event_name.
WHEN swfco_event_after_creation.
CLEAR l_value.
CALL METHOD l_wi_cont->get
EXPORTING
name = 'LV_WITEXT'
IMPORTING
value = l_value.
REPLACE '$' INTO l_value WITH lv_id.
CALL METHOD l_wi_cont->set
EXPORTING
name = 'LV_WITEXT'
value = l_value.
With above code LV_WITEXT is updated with new value, but same is not displayed as workitem text in inbox.
After workitem displayed in inbox if i use FM SWL_REFRESH_WORKITEM_TEXT explicitly to refresh, workitem text getting refreshed.
Many thanks. -
After I exit Firefox, I get a pop-up message that Firefox has stopped working.
After I exit Firefox, I get a pop-up message that Firefox has stopped working. I have to click to close the program, or search online for a solution to the program, then close.
See:
* http://kb.mozillazine.org/Firefox_crashes
* https://support.mozilla.com/kb/Firefox+crashes -
Program exited with status value:101
Hi,
Please somebody help me.
I'm developing an application, in which I implemented maps, UIImagePicker, and used Sqlite3 for database.
My application gets terminated when I run it on iphone(no problem on simulator) with the following message:
Program exited with status value:101.
This happens randomly mostly after opening map 8-9 times or after accessing database for about 40-50 times.
I observed the memory allocation and leaks, there is no leak and when application terminate the net memory allocation is between 2.5Mb - 6Mb.Use the activity monitor instrument (or memory monitor) on the device to find out the real sizes and the amount of memory available.
101 is usually memory problem. -
How to debug a program exit in a Workflow ?
Hi experts,
How to debug a program exit in a workflow when the workflow is triggered ?
thanks in advance
regards
AshwinIn 4.6c I did this by creating a function module and a table (zsm50_debug). In the table are just two fields: User name (key), and a flag (yes/no).
The function module:
FUNCTION zsm50_debug.
*"*"Local interface:
*" IMPORTING
*" REFERENCE(Z_DEBUG_USER) LIKE SY-UNAME
DATA: z_exit,
z_debug.
CLEAR: z_debug.
DATA: starttime TYPE t,
currenttime TYPE t,
time_passed TYPE i.
starttime = sy-uzeit.
* Check if debugging is switched on
SELECT SINGLE debug FROM zsm50_debug
INTO z_debug
WHERE uname = z_debug_user.
* Debugging is switched on:
IF z_debug = 'X'.
* Not an endless loop, but it will continue after approx. 1 minute...
* Plenty of time to go to SM50 to debug the program and continue!
DO.
* Change the value of z_exit to 'X' to exit the loop an stay in
* debug mode.
IF z_exit = 'X'.
EXIT.
ENDIF.
* To prevent an endless loop (if the user forgot that debugging was
* switched on in ZSM50_DEBUG, time is measured to allow the program
* to continue after 2 minutes
GET TIME FIELD currenttime.
time_passed = currenttime - starttime.
IF time_passed > 120.
WRITE: / '!!!==========================================!!!'.
WRITE: / '!!!DEBUGGING STILL SWITCHED ON IN ZSM50_DEBUG!!!'.
WRITE: / '!!! Program was delayed by two minutes !!!'.
WRITE: / '!!!==========================================!!!'.
EXIT.
ENDIF.
ENDDO.
ENDIF.
ENDFUNCTION.
This FM reads the table and checks if the flag is switched on. If so, it loops for two minutes. After that, it continues regardless. If not flagged, it continues immediately.
This way, you can debug any program that is running in the background.
In every method I program I add this FM right in the beginning. With authorization for SM50, I can then debug the program (in production it may be difficult to get the correct server, if there are more). -
UIWebView cause "Program exited with status value:101"
My application uses both imagepickercontroller and UIWebView as subviews. it crashes frequently, I guessed the reason was related to imagepickercontroller at first, but after doing more testing , I found it is UIWebView cause crash and exit silently problem with message in console "Program exited with status value:101". I tried to write a simple test app which contains only a window and an UIWebView as subview to load pages with javascripts like maps.google.com, it exit silently always after opening such pages after a while. I also tested UICatalog on iPhone, get the same result. any ideas on this issues??
Error 101 means iPhone runs out of Memory and ends your application.
Set a breakpoint to the "applicationDidReceiveMemoryWarning" function or however it is called exactly.
Also if you check object allocations and leaks with instruments you should be able to see a big memory footprint of your application. -
Whether Workflow Program Exit works in ABAP WebDynpro
Hi,
I have the custom workflow in which in each task i have given a program exit to update the status into my custom tables.
Now i'm in doing the change in workflow, that it should call the abap webdynpro screen, where the user decisions has to be made.
I'm getting the Workitem id from the UWL and then it lauches the Web Dynpro to choose either Approve, Reject or Change etc along with some other travel expense information.
Now once i complete the web dynpro by calling the method 'SAP_WAPI_WORKITEM_COMPLETE', the particular work item is completed.
I want to ask whether before this FM is called,whether the Program Exit which i have written in the Class method and which is called in the Workflow, whether it triggers or not?
Regards,It is calling the workflow program exit before the SAP_WAPI_WORKITEM_COMPLETE function module.
So closing the thread. -
Retrieve workflow container data in programming exit
I am trying to use a programming exit in Workflow in order to amend the task container for the receipients field of a "Send Email" step. The reason why we are not determining the receipients in the usual way is because we hold the receipients (amongst other data) in a separate Z* table - this needs to stay this way.
I created a class and copied method CHANGE_CONT_ELEMENT to base my altered code on. The method is triggered fine when testing the workflow. Here is what it now looks like:
method CHANGE_CONT_ELEMENT .
DATA: container TYPE REF TO if_swf_cnt_container,
if_swf_cnt_container,
cont TYPE REF TO IF_SWF_IFS_PARAMETER_CONTAINER,
name TYPE swfdname,
lh_wihandle TYPE REF TO if_swf_run_wim_internal,
l_exception TYPE REF TO cx_swf_cnt_container,
l_wiid TYPE sww_wiid,
w_container type ref to IF_SWF_IFS_PARAMETER_CONTAINER,
w_names type SWFDNAMTAB,
wa_names type line of SWFDNAMTAB,
w_value(30).
w_container = me->m_ctx->GET_WI_CONTAINER( ).
w_names = w_container->LIST_NAMES( ).
data: w_name type SWFDNAME.
w_name = 'TEST-NUMBER'.
TRY.
loop at w_names into wa_names.
CALL METHOD w_container->get
EXPORTING
name = wa_names.
endloop.
CATCH CX_SWF_CNT_ELEM_NOT_FOUND .
CATCH CX_SWF_CNT_ELEM_TYPE_CONFLICT .
CATCH CX_SWF_CNT_UNIT_TYPE_CONFLICT .
CATCH CX_SWF_CNT_CONTAINER .
ENDTRY.
ENDMETHOD.
Now w_names retrieves the names of the fields fine (including my "TEST" entry which I declared in the Workflow Builder), but the GET method causes a "CX_SWF_CNT_ELEM_NOT_FOUND" exception.
Is this the correct way to retrieve data out of a Workflow container within a WF programming exit? What am I doing wrong?
Kind regards,
Michael KochHi Michael, Paolo & Other experts,
I am trying to understand when, why and how to use a 'programming exit' in a SAP workflow.
(1) Did you figure out the solution to your problem?
(2) Is there any material / tutorial on use of a 'programming exit' in a workflow?
Thanks
Abaper -
Doubt in Workflows using Programming Exits on OO ABAP
I have a doubt on workflows:-
Let me brief you about my requirement:
I am trying to update some Master data using ABAP Methods through Programming Exits in a Workflow.
I managed to find an OO method that can fetch the workflow container values directly into the structure.
While testing the workflow:-
The OO ABAP method executes and successfully updates the master tables.
However, a calling method (that triggers this method indirectly), raises an exception called SWF_RUN_WIM_EXEC_INTERRUPTED.
The exception is caught within the caller method and the workflow errors saying that the method ABC cannot be executed.
The caller method is:-
CL_SWF_RUN_WORKFLOW_START
The exception is raised on execution of the following statement:-
CALL METHOD me->start_workitem( lh_wi_handle ).
One reason for this is that the workflow is still not completed and still in READY state.
Alternative method
Once the Master data is updated successfully,
I tried to use the FM SAP_WAPI_WORKITEM_COMPLETE to end the work item or tried another FM to suspend the workflow.
Now it gives an error saying that these FMs are restricted from use during run-time execution.
Query
Do you have an idea why the exception is raised and how to track/prevent the same?
Can you suggest any other alternative? Your valuable advice is urgently needed.
Thanks a million in advance,
Best Regards,
VinodCheck the code
CLASS zcl_event_handler IMPLEMENTATION
CLASS zcl_event_handler IMPLEMENTATION.
Top-of-page event
METHOD top_of_page.
PERFORM event_top_of_page
USING z_dyndoc_id.
ENDMETHOD. "METHOD top_of_page
Change Status Button
METHOD handle_toolbar.
IF NOT pa_prodr IS INITIAL.
DATA: lz_toolbar TYPE stb_button.
CLEAR lz_toolbar.
MOVE 'CHANGE_STATUS' TO lz_toolbar-function.
MOVE text-001 TO lz_toolbar-text.
APPEND lz_toolbar TO e_object->mt_toolbar.
ENDIF. "IF NOT pa_prodr IS INITIAL
ENDMETHOD. "METHOD handle_toolbar
Handle User Command
METHOD handle_user_command.
CASE e_ucomm.
WHEN 'CHANGE_STATUS'.
LOOP AT it_output
INTO wa_output.
IF wa_output-chk_box EQ kc_x.
z_flag = 1.
EXIT.
ENDIF. "IF wa_output-chk_box EQ kc_x
ENDLOOP. "LOOP AT it_output INTO wa_output
IF z_flag EQ 1.
PERFORM display_selected_data.
ELSE.
MESSAGE i001(zzrefn01)
WITH text-023.
ENDIF. "IF z_flag EQ 1
ENDCASE. "CASE e_ucomm
ENDMETHOD. "METHOD handle_user_command
ENDCLASS. "zcl_event_handler IMPLEMENTATION -
Locked-up at "Uploading file to Adobe ExportPDF online...", even after closing, exiting, clearing browser cache, clearing all documents from online library. Ctrl-Alt-Del EndTask also had no effect. Upon opening, searches for current status and then locks up... Any help?
Any advice would be helpful. Thanks
-
Read container element in program exits
Hi all,
again me
Today the question is that i want to read and change the element 'ObjectType' of an BOR element's container before execute method of the task. I use the program exits with CL_SWF_TST_PE_BEFOREEXEC class, it's work fine.
But this element is a BOR of a BOR, so i know how to read an element with CALL METHOD container->element_get_value but in this case how can i do ?
Thanks
Edited by: CECG on Jan 24, 2008 2:46 PMI think you can use following macros
swc_get_object_type
swc_get_object_key
Checki in Include <CNTN01> for syntax
Thanks
Arghadip -
How can I set the number of test sockets in my program?
How can I set the number of test sockets in my program? I use LabWindows/CVI 6 and TestStand version 2.0.
And I use BatchModel for the parallel UUT running. I didn't found program way to set the number of test socket. I think I should have it. In TestStand I can change the number of test sockets through menu Configure -> Model Options -> number of test sockets (I mean I do it by manual mode).
Thank's a lot.
MariaOne way you can set the number of Test Sockets for your sequence is by overiding the ModelOptions Callback used by your sequence. Select All Sequences from the View drop-down then right click, select Sequence File Callbacks, select the ModelOptions callback and then click on Add. You can then select the Edit button to Edit the ModelOptions for your sequence. You can set other ModelOptions as required also.
RG
Maybe you are looking for
-
Hi all, I recently downloaded elements 11, and I imported some photos okay, but now it starts to import, gets about half way, and a box saying elements organizer has stopped working. When I went into problem details, it said appcrash. any ideas wot b
-
Transferring a DVD to the Desk top and then downloading to Kindle Fire
I want to transfer some of my DVD films to my Kindle Fire; can I do this by using the DeskTop DVD Drive first to copy to a store on the computer and then downlaodng to a Kindle, I am not technically dexterous so would like a detailed guide p[lease if
-
Cannot Export to Web in QT pro
When I choose export to web and select desktop, I get a "the application QTPlayerHelper quit unexpectedly. Then in the downloading file window it says : failed: export process terminated unexpectedly (11). Also, is this a better choice than creating
-
Hi, I am trying to bypass some ip network from policy-map rule.It`s not working.Any one please help me to resolve the problem. class-map match-any http match not access-group name http-allow match protocol http host "www.yyyy.com" match protocol htt
-
If I copy and paste the link from the Thundervbird email into the browse window it works fine