How to create logs in java if the application stops abruptly,
Hi,
I wrote a java code for handling one of my applications in built commands. Right now iam handling the logs using an arrayList and at the end of my java progem iam writing them to a file.
If the program runs completely then my logs are generated, but my application takes almost 6hours to fully complete.. if ther is anyproblem like service of application stops or any other problem then i have to stop my java code forcefully.. in that case my code is not working ...like iam not able to see that part of my logs.
Help me in writing the logs even if the java code stops in between. or iam stopping it.
Thanks in adcance
You may want to use the "Shotdown hooks" API -- http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html#addShutdownHook(java.lang.Thread).
Similar Messages
-
How to create Default Schema from within the application
Hi friends
I am creating users using the following within my application using this syntax
BEGIN
APEX_UTIL.CREATE_USER
(:P124_USER_ID, :P124_USER_NAME,:P124_USER_FIRST_NAME,:P124_USER_LAST_NAME,' ',:P124_USER_EMAIL_ID,'xxxx');
END;
The default workspace for the user is set as blanks. I would like to set it to be the default workspace as per the current logged in user.
Can you help me with the syntax for this
thank you in advance
LaxmiLaxmi,
The subject of the post is "How to create Default Schema from within the application".
But your question asks how to set the "default workspace" for a newly created user.
Those are different questions and not the ones I think you need answered.
Let me answer this question "How can you set the default schema for an account when creating the account and set it to the same value used for the default schema attribute of the administrator account used to authenticate to the currently running application?".
In the apex_util.create_user call use named parameter notation and fetch the information about the currently logged-in user first, e.g.,declare
l_workspace varchar2(256);
l_user_name varchar2(256);
l_first_name varchar2(256);
l_last_name varchar2(256);
l_web_password varchar2(256);
l_email_address varchar2(256);
l_start_date varchar2(256);
l_end_date varchar2(256);
l_employee_id varchar2(256);
l_allow_access_to_schemas varchar2(256);
l_person_type varchar2(256);
l_default_schema varchar2(256);
l_groups varchar2(256);
l_developer_role varchar2(256);
l_description varchar2(256);
begin
apex_util.fetch_user (
p_user_id => apex_util.get_current_user_id,
p_workspace => l_workspace,
p_user_name => l_user_name,
p_first_name => l_first_name,
p_last_name => l_last_name,
p_web_password => l_web_password,
p_email_address => l_email_address,
p_start_date => l_start_date,
p_end_date => l_end_date,
p_employee_id => l_employee_id,
p_allow_access_to_schemas => l_allow_access_to_schemas,
p_person_type => l_person_type,
p_default_schema => l_default_schema,
p_groups => l_groups,
p_developer_role => l_developer_role,
p_description => l_description);
apex_util.create_user(
p_user_id => :P124_USER_ID,
p_user_name => :P124_USER_NAME,
p_first_name => :P124_USER_FIRST_NAME,
p_last_name => :P124_USER_LAST_NAME,
p_email_address => :P124_USER_EMAIL_ID,
p_web_password => 'xxxx',
p_default_schema => l_default_schema);
end;Scott -
How we create a flat file on the application server
hi,
how we create a flat file on the application servere,this file have the header data and corresponding item data also.
i.e. how we use the AT NEW and ATEND. statement in this file creation.
pls send me some code related to this.
thanks,
vipinHi Grafl,
Chk this link
Folder creation in AL11 using ABAP program
try this code.This works on UNIX servers
data: unixcom like rlgrap-filename.
data: begin of tabl occurs 500,
line(400),
end of tabl.
dir = unixcom = 'mkdir mydir'. "command to create dir
"to execute the unix command
call 'SYSTEM' id 'COMMAND' field unixcom
id 'TAB' field tabl[].
<b>Reward Points if Useful</b>
Regards
Gokul -
How to create interfaces or .java files to application modules,entites
How did you create ToyStoreService.Java Interface in ToyStore sample application.Can you please explain in detail.
urgent, pl help with any material if you know..I am following the same directory structure as of ToyStore demo for controller and View.
I am getting page not available error.
I did like this,
d:
MyWorkSpace
Controller
struts_config.xml
/xx -- which forward to b.jsp
View
webroot
JSP
a.jsp
b.jsp
can you please give me one concrete procedure for implementing this..
I mean how maintain these files and how to set the root path in project setting etC..
Big job.. But it helps me a lot, Please do the big job.
Thanks in advance. -
How to create a record based on the name of a file in the file-system?
Hi,
With a lot of pictures I want to have a database to gather some information about these pictures.
First question is how to generate a record based on a file in the file system?
e.g. the pictures are "c:\fotos\2009\01\disc_001.jpg" to "c:\foto\2009\01\dis_98.jpg" .
now i want to create records with as one of the attributes the name of the picture (not the picture itself). how to create these records (based on the information of the file-ssytem). i.e. the number of records should be the same as the number of pictures.
any suggestions?
any reaction will be appreciated.
LeoLink to Create directory
http://www.adp-gmbh.ch/ora/sql/create_directory.html
You can create a list of files in the directory and read the list files from that directory.
[UTL_FILE Documentation |http://download.oracle.com/docs/cd/B14117_01/appdev.101/b10802/u_file.htm#996728]
[Solution using Java|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:439619916584]
SS -
How to create a generalized version of the detailed polygons?
How to create a generalized version of the detailed polygons?
I have a table of detailed polygons (100+ vertices) and I want to get generalized version of these polygons.
For example, assume I have a polygon with 100 vertices. Distance between vertex n and n+1 is 1.0.
I want to get geometry (generalized polygon, line or point) where distance between vertex n and n+1 is 10.0 or more (I want vertices to be considered as one vertex if distance between them is less then 10.0).
Is it possible to create generalized version of polygons on the fly?
Any help is appreciated.
Thanks.Scenario A:
If all of your polygons have no interaction among them (No polygon shares any boundary with any other ones).
In this case you can use the sdo_util.simplify in 10g to reduce the vertices in your polygons which returns new polygon geometries on the fly.
If you found that simplify is not doing exactly what you want, you can always roll out your own implementation using PL/SQL or the new SDOAPI JGeoemtry class in Java. Both will give you complete access to the coordinate arrays in a polygon and update them back to the database after you have simplified them in your code.
Scenario B:
If your polygons share boundaries, then the above methods will not work since the simplification process may not preserve the topology among your polygons. What you can do then is to use the Java topo package to create a new topology by adding all of your polygons to to an empty topology (which you first create in the database and then load into memory using oracle.spatial.topo.TopoMap). Once you have a topology built in the memory, you can use methods such as oracle.spatial.topo.TopoMap.changeEdgeCoords() to simplify the edges of your polygons. You can then recreate the simplified polygons from the topology. This is just a rough guide; for more details you need to check out the java doc for the various packages mentioned above which are shipped with 10g spatial. -
How to create multi garnishment order for the same garnishment document
Hi,
Can anyone tell me how to create multi garnishment order for the same garnishment document. I tried to copy the entry in IT0195 but the sequence field is grayed out so it will just delete the old record. What configuration should I do to make this possible?
Thanks a lot in advance.hi,
As far as I got it.
You cannot have multiple Garnishment order but if a need arises you have to maintain it in IT216.
For that follow this path goto PA30->pernr->194->change->Garnishment->adjustment.
Since like order you cannot maintain adjustment also directly.
Regards,
Amit
Reward all helpful replies. -
How to create a temp table in the memory, not in disk?
in sql server, you can create a temp table in the memory instead of disk,
then you can do the insert, delete,update and select on it.
after finishing, just release it.
in Oracle,
I am wonderfing how to create a temp table in the memory, not in disk?
thanks,Thanks for rectifying me Howard.
I just read your full article on this too and its very well explained here:
http://www.dizwell.com/prod/node/357
Few lines from your article
It is true, of course, that since Version 8.0 Oracle has provided the ability to create a Keep Pool in the Buffer Cache, which certainly sounds like it can do the job... especially since that word 'keep' is used again. But a keep pool is merely a segregated part of the buffer cache, into which you direct blocks from particular tables (by creating them, or altering them, with the BUFFER POOL KEEP clause). So you can tuck the blocks from such tables out of the way, into their own part of the buffer cache... but that is not the same thing as guaranteeing they'll stay there. If you over-populate the Keep Pool, then its LRU mechanism will kick in and age its contents out just as efficiently as an unsegregated buffer cache would.
Functionally, therefore, there can be no guarantees. The best you can do is create a sufficiently large Keep Pool, and then choose the tables that will use it with care such that they don’t swamp themselves, and start causing each other to age out back to disk.
Thanks and Regards -
How to create a snapshot report on the specific destination?
dear all
How to create a snapshot report on the specific destination?
thanks
johnuser8779435 wrote:
dear all
How to create a snapshot report on the specific destination?
thanks
john
Hi,
when prompted just input the full path with filename for example
Enter value for report_name: /tmp/awrreport.htmlHope this helps
Cheers -
How to create some columns dynamically in the report designer depending upon the input selection
Post Author: ekta
CA Forum: Crystal Reports
how to create some columns dynamically in the report designer depending upon the input selection
how export this dynamic report in (pdf , xls,doc and rtf format)
report format is as below:
Element Codes
1
16
14
11
19
10
2
3
Employee nos.
Employee Name
Normal
RDO
WC
Breveavement
LWOP
Sick
Carers leave
AL
O/T 1.5
O/T 2.0
Total Hours
000004
PHAN , Hanh Huynh
68.40
7.60
76.00
000010
I , Jungue
68.40
7.60
2.00
5.00
76.00
000022
GARFINKEL , Hersch
66.30
7.60
2.10
76.00
In the above report first column and the last columns are fixed and the other columns are dynamic depending upon the input selection:
if input selection is Normal and RDO then only 2 columns w'd be created and the other 2 fixed columns.
Can anybody help me how do I design such report....
ThanksHi Developer life,
According to your description that you want to dynamically increase and decrease the numbers of the columns in the table, right?
As Jason A Long mentioned that we can use the matrix to do this and put the year field in the column group, amount fields(Numric values) in the details, add an filter to filter the data base on this column group, but if
the data in the DB not suitable to add to the matrix directly, you can use the unpivot function to turn the column name of year to a single row and then you can add it in the column group.
If there are too many columns in the column group, it will fit the page size automatically and display the extra columns in the next page.
Similar threads with details steps for your reference:
https://social.technet.microsoft.com/Forums/en-US/339965a1-8cca-41d8-83ef-c2548050799a/ssrs-dataset-column-metadata-dynamic-update?forum=sqlreportings
If your still have any problem, please try to provide us more details information, such as the data structure in the DB and the table structure you are currently designing.
Any question, please feel free to let me know.
Best Regards
Vicky Liu -
How to create a different sid in the same system
Hi Experts
In one system already i have installed HP Quality center with Oracle, Now i want to install SAP on the same system. Please help me how to create a different SID on the same system.
Thanks in advanceHi,
If you are talking about host...then when you will start installation of new system it ask for SID then choose different SID...
Thanks
Sunny -
How to get the spool id or how to create a spool id for the report .
hi,
how to get the spool id or how to create a spool id for the report .
this spool id i have to use it in CONVERT_ABAPSPOOLJOB_2_PDF fm to get the pdf download file.
my requirement is to download a pdf file from the alv grid list.Hi Raghu,
Execute this program.
REPORT ZTEST_3318 .
tables: usr01.
perform send_report_to_spool.
*& Form send_report_to_spool
text
form send_report_to_spool.
data: loc_dest like pri_params-pdest,
wf_listname type char12,
wf_listtext like PRI_PARAMS-PRTXT,
wf_copies type i,
wf_days type i,
wf_PARAMS LIKE PRI_PARAMS, " achieving file PRI_PARAMS.
wf_valid type c.
clear : wf_listname , loc_dest , wf_listtext .
move: 'AP interface' to wf_listname .
move: 'AP interface' to wf_listtext .
select single spld into usr01-spld from usr01 where bname eq sy-uname .
if sy-subrc eq 0 .
move: usr01-spld to loc_dest .
endif .
call function 'GET_PRINT_PARAMETERS'
EXPORTING
destination = loc_dest
copies = 1
list_name = wf_listname
list_text = wf_listtext
immediately = ' '
release = ' '
new_list_id = 'X'
expiration = 1
line_size = 200
line_count = 65
layout = 'X_65_200'
sap_cover_page = 'X'
receiver = 'SAP*'
department = ''
no_dialog = 'X'
IMPORTING
out_parameters = wf_params
valid = wf_valid.
if wf_valid <> space.
new-page print on parameters wf_params no dialog.
perform write_summary .
new-page print off.
endif .
endform. "send_report_to_spool
*& Form write_summary
text
--> p1 text
<-- p2 text
FORM write_summary .
data: begin of itab occurs 0,
matnr type matnr,
end of itab.
select matnr
from mara
into table itab
up to 10 rows.
loop at itab.
write: / itab-matnr.
endloop.
ENDFORM. " write_summary
This will create spool in SP01.What data you want to put in Spool write it in form write_summary.I have done coding for testing purpose
After that use that spool for your purpose.
If Useful award point -
How to create an install cd with the final cut pro x app if the app comes from App.Store?
Just copy the Application FCPX to your CD. When you want to install drag the FCPX to the Application folder and you are done.
-
How to create a new folder within the video folder in media
Hi, I'm trying to figure out how to create a new folder within the video folder in media. I can easily create new folders within the pictures folder but not in videos.....Why??? Thanks in advance for your help.
Message Edited by dany_s on 06-25-2009 03:58 PM
Solved!
Go to Solution.Hello,
I think you can try two things : the soft reboot, and if it does not work, the hard reboot. Don't worry, you can't lose data with these two reboots.
Soft reboot :
1) Hit the three following keys at the same time :
- Alt
- Right Shift
- Delete
2) wait 2 minutes for the Blackberry to wake up.
Hard reboot :
1) your Blackberry device is on
2) remove the battery and wait for a minute
3) Put the battery back
4) wait 5 minutes for the device to wake up.
Please tell us if it works for you.
The search box on top-right of this page is your true friend, and the public Knowledge Base too: -
How to create a purchase requisition from the EP
1. How to create a purchase requisition from the EP & What are the pre-requiste?
Hi,
You need to create a SAP transaction iview for purchase requisition transaction and link it to the role and to the user to view purchase requisition transaction.
First you need to create a system in portal to link to the R/3 system. For creating system check this link.
http://help.sap.com/bp_epv260/EP_EN/documentation/EP/N03_BB_InstallGuide_EN_US.doc
For linking portal with R/3 and view the Purchase requisition check this link
Configuring EP for connecting to SAP R/3
Regards
Arun
Maybe you are looking for
-
How to register the same schema with same URL
I'm getting ORA-31085 error when try to register the same schema with same URl. My requirement is that I should be able to reregister the same schema with the same URL . I'm using the following function : PROCEDURE validateXmlSchema(inp_xmlMsg IN VAR
-
Due to having a gen 2 Ipod, I can't download any apps from the app store. Plus, many of my previously downloaded apps (that I bought) aren't working...so I can't even re-download them since I still have 4.2.1. HELP!!! Rediculous that I can't use a
-
Business Graphics with Web Dynpro?
Hello @ all, I have got a question about displaying dashboards and other charts on mobile devices using SAP Technology. 1) Does someone know, when it will become possible to display BusinessGraphics in Mobile Devices like BlackBerry, Pocket PC a.s.o
-
Loading from web a pdf file comes up with "expecting a dict object"
uploaded a pdf file to a password protected site. Have done this many times and have successfully read and downloaded pdf file from web site. On this occasion file attempts to download for reading then stops with message "Expecting a dict file" This
-
Hello All, does any body know how can I make a kind of automatic back-up of all queries/pages in a certain application? I know that it is possible to export a workspace/application or page manually. But we have in one aplication 80-90 reports. Thank