Sunday, August 23, 2009

Oracle ADF 11g- Generate values from sequence for a given table.




When creating a database table using JDeveloper 11g (11.1.1.10), select column sequence from left context menu and select the check box for sequence and trigger. (as in given figure)








Generate Business Component for this table and then double click this entity, to view the xml file, click on the attributes link and the select the attribute which generates values from sequence(EmployeeId), make its datatype to be DBSequence (See below image)



Note initially for display the value will be shown as negative but once you commit the record the values will be automatically taken from the sequence.

Monday, August 10, 2009

Restarting Oracle Application Server

telnet myserver
uname/password
opmnctl stopall
su –u [infra tier uname/passwd]
opmnctl stopall
sqlplus /nolog
conn /as sysdba
shutdown immediate [database shutdown]
startup [database start]
quit
opmnctl startall [infra tier restart]
exit
opmnctl startall [mid tier restart]

Monday, August 3, 2009

PrinteWriter in jsp while returning ajax call

Printwriter in JSP during ajax call

out.write(xmlData);
pw =new PrintWriter(out, true);

Create new domains in BPEL

open bpel console in your browser
eg.
....com:7777/BPELConsole
just replace "Console" with Admin i.e. BPELAdmin

Sunday, August 2, 2009

Create a datasource






Login oracle entireprise manager-> oc4j instance-> administration tab-> Datasource



How to hide the url of ur application

eg. www.tanveer.com/MyPayrollContext/jsp/index.jsp to display only till "www.tanveer.com/MyPayrollContext" do the following your web.xml should have the following entry
"<"welcome-file-list">"
"<"welcome-file">"index.jsp"<"/welcome-file">"
" <"/welcome-file-list">"
//ignore double codes

and your index.jsp should be placed in the main project directory, you can have your other jsp's inside your jsp folder.