<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6873099295148794773</id><updated>2011-11-27T18:59:22.159-05:00</updated><category term='install'/><category term='logging'/><category term='flash'/><category term='datasource'/><category term='oas'/><category term='smtp'/><category term='BitGravity'/><category term='jdbc'/><category term='javascript'/><category term='urlconnection'/><category term='ESB'/><category term='jndi'/><category term='recreate'/><category term='soa'/><category term='classloading'/><category term='telecom'/><category term='struts2'/><category term='Interscope'/><category term='java url connection'/><category term='open source'/><category term='command'/><category term='grant'/><category term='mbean'/><category term='billing system'/><category term='jdeveloper'/><category term='WSM'/><category term='java url connection EOFException'/><category term='lsof'/><category term='frameworks'/><category term='Axis'/><category term='spring'/><category term='aggregate function'/><category term='Wily'/><category term='windows'/><category term='port'/><category term='phpmailer'/><category term='clearquest'/><category term='apache'/><category term='ibatis'/><category term='xml'/><category term='Mobile'/><category term='geocoding'/><category term='java'/><category term='windows service'/><category term='php'/><category term='webservices'/><category term='xslt'/><category term='role'/><category term='oracle'/><category term='network interface'/><category term='properties'/><category term='oc4j'/><category term='billing'/><category term='WSM. SOA'/><category term='sql'/><category term='fileadaptor'/><category term='SOA suite'/><category term='unix'/><category term='ssl'/><category term='https'/><category term='window.onload cookie object'/><category term='SWFObject'/><category term='ipconfig'/><category term='j2ee'/><category term='jms'/><category term='timeout'/><category term='subversion'/><title type='text'>TechnoGems Tech Notes</title><subtitle type='html'>Technical notes that I find useful.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>49</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-4263048900919628379</id><published>2011-11-10T22:14:00.000-05:00</published><updated>2011-11-10T22:14:35.678-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='frameworks'/><category scheme='http://www.blogger.com/atom/ns#' term='Mobile'/><title type='text'>Cross Platform Mobile Application Development Framework Comparision Chart</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;br /&gt;&lt;style&gt;&lt;!-- /* Font Definitions */ @font-face {font-family:PMingLiU; panose-1:2 2 5 0 0 0 0 0 0 0;}@font-face {font-family:Latha; panose-1:2 11 6 4 2 2 2 2 2 4;}@font-face {font-family:Latha; panose-1:2 11 6 4 2 2 2 2 2 4;}@font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;}@font-face {font-family:"\@PMingLiU"; panose-1:2 2 5 0 0 0 0 0 0 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; font-size:11.0pt; font-family:"Calibri","sans-serif";}a:link, span.MsoHyperlink {color:blue; text-decoration:underline;}a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline;}p.MsoAcetate, li.MsoAcetate, div.MsoAcetate {mso-style-link:"Balloon Text Char"; margin:0in; margin-bottom:.0001pt; font-size:8.0pt; font-family:"Tahoma","sans-serif";}span.BalloonTextChar {mso-style-name:"Balloon Text Char"; mso-style-link:"Balloon Text"; font-family:"Tahoma","sans-serif";}.MsoChpDefault {font-family:"Calibri","sans-serif";}.MsoPapDefault {margin-bottom:10.0pt; line-height:115%;}@page WordSection1 {size:8.5in 11.0in; margin:2.25in 1.0in 1.0in 1.0in;}div.WordSection1 {page:WordSection1;}--&gt;&lt;/style&gt;&lt;br /&gt;&lt;div class="WordSection1"&gt;&lt;br /&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none;"&gt;&lt;tbody&gt;&lt;tr&gt;   &lt;td style="border: solid windowtext 1.0pt; padding: 0in 5.4pt 0in 5.4pt; width: 108.9pt;" valign="top" width="145"&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;b&gt;Corona&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-left: none; border: solid windowtext 1.0pt; padding: 0in 5.4pt 0in 5.4pt; width: 243.0pt;" valign="top" width="324"&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;Corona lets developers use integrated Lua, layered on top of&lt;br /&gt;Objective-C, to build graphically rich applications that are also lightweight&lt;br /&gt;in size and quick in development time. &lt;/div&gt;&lt;/td&gt;   &lt;td style="border-left: none; border: solid windowtext 1.0pt; padding: 0in 5.4pt 0in 5.4pt; width: 126.9pt;" valign="top" width="169"&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;a href="http://en.wikipedia.org/wiki/Corona_%28software_development_kit%29"&gt;Wikipedia&lt;br /&gt;Link&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;a href="http://developer.anscamobile.com/resources/docs"&gt;Developer&lt;br /&gt;Link&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td style="border-top: none; border: solid windowtext 1.0pt; padding: 0in 5.4pt 0in 5.4pt; width: 108.9pt;" valign="top" width="145"&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;b&gt;&lt;span style="color: black;"&gt;Phone Gap (Adobe)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; padding: 0in 5.4pt 0in 5.4pt; width: 243.0pt;" valign="top" width="324"&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;The mobile framework allows web developers to natively target all&lt;br /&gt;smartphone with a single codebase (JavaScript, HTML and CSS) by enabling a&lt;br /&gt;Foreign Function Interface (FFI) to an embedded WebView or Webkit on the&lt;br /&gt;device.&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; padding: 0in 5.4pt 0in 5.4pt; width: 126.9pt;" valign="top" width="169"&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;a href="http://en.wikipedia.org/wiki/PhoneGap"&gt;Wikipedia Link&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;a href="http://docs.phonegap.com/en/1.2.0/index.html"&gt;Developer Link&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="height: 57.55pt;"&gt;   &lt;td style="border-top: none; border: solid windowtext 1.0pt; height: 57.55pt; padding: 0in 5.4pt 0in 5.4pt; width: 108.9pt;" valign="top" width="145"&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;b&gt;&lt;span style="color: black;"&gt;Rhomobile &lt;br /&gt;&lt;br /&gt;(Motorola Solutions company)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 57.55pt; padding: 0in 5.4pt 0in 5.4pt; width: 243.0pt;" valign="top" width="324"&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;Rhodes is a framework for building native applications that can run&lt;br /&gt;on a variety of smartphones. Rhodes uses a Model View Controller pattern.&lt;br /&gt;Views are written in HTML&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 57.55pt; padding: 0in 5.4pt 0in 5.4pt; width: 126.9pt;" valign="top" width="169"&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;a href="http://en.wikipedia.org/wiki/Rhomobile"&gt;Wikipedia Link&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;a href="http://docs.rhomobile.com/"&gt;Developer Link&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td style="border-top: none; border: solid windowtext 1.0pt; padding: 0in 5.4pt 0in 5.4pt; width: 108.9pt;" valign="top" width="145"&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;b&gt;&lt;span style="color: black;"&gt;Titanium Mobile&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; padding: 0in 5.4pt 0in 5.4pt; width: 243.0pt;" valign="top" width="324"&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;Appcelerator Titanium Mobile is a web based application framework&lt;br /&gt;solutions allowing web developers to apply existing skills to create native&lt;br /&gt;applications for iPhone and Android using the familiar JavaScript syntax.&lt;br /&gt;Developers will also have to learn the extensive Titanium API. Wikipedia&lt;br /&gt;notes that the term cross-compiler is misleading as the titanium engine&lt;br /&gt;interprets the code during run time.&lt;/div&gt;&lt;/td&gt;   &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; padding: 0in 5.4pt 0in 5.4pt; width: 126.9pt;" valign="top" width="169"&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;a href="http://en.wikipedia.org/wiki/Appcelerator_Titanium"&gt;Wikipedia&lt;br /&gt;Link&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;a href="http://wiki.appcelerator.org/display/guides/Quick+Start"&gt;Developer&lt;br /&gt;Link&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-4263048900919628379?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/4263048900919628379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=4263048900919628379' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/4263048900919628379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/4263048900919628379'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2011/11/cross-platform-mobile-application.html' title='Cross Platform Mobile Application Development Framework Comparision Chart'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-5953937403334581340</id><published>2011-10-11T07:33:00.000-04:00</published><updated>2011-10-11T07:33:23.193-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='smtp'/><category scheme='http://www.blogger.com/atom/ns#' term='phpmailer'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Using PHPMailer and Gmail to send email</title><content type='html'>If you are developing applications using PHP and you need to send email you can use the PHPMailer() class in PHP. Using a publicly available SMTP server to send the email is much easier than trying to setup your own email server.  The following code snippet shows the various settings for the mailer. &lt;br /&gt;The code assumes that you have PHP 5.x version and you have class.phpmailer.php file in the include directory. &lt;br /&gt;Google uses ssl for the smtp connection.  In order for this example to work with google smtp server, you need to enable ssl in your php.ini file by adding a line that says &lt;b&gt;extension=php_openssl.dll&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;If you are not sure of the exact location of the php.ini file and you are using xampp, you can find the location of the php.ini file by navigating to http://localhost/xampp/phpinfo.php on your browser and look for the text "Loaded Configuration File".  Once you find the file, edit it and look for the text "extension=php_openssl.dll".  If the text is not found in your file, add a new line at the end of the file with the above text.&lt;br /&gt;&lt;blockquote&gt;&lt;?PHPrequire_once('./include/class.phpmailer.php');$mail = new PHPMailer();$mail-&gt;IsSMTP();&lt;br /&gt;$mail-&gt;SMTPDebug = 1; // 1 tells it to display SMTP errors and messages, 0 turns off all errors and messages, 2 prints messages only.&lt;br /&gt;&lt;br /&gt;$mail-&gt;Host = "ssl://smtp.gmail.com"; // specify main and backup server&lt;br /&gt;$mail-&gt;Port = 465; // set the port to use&lt;br /&gt;$mail-&gt;SMTPAuth = true; // turn on SMTP authentication&lt;br /&gt;&lt;br /&gt;$mail-&gt;Username = 'user@gmail.com'; // replace this with your email acct&lt;br /&gt;$mail-&gt;Password = 'userPassword'; // replace this with your password&lt;br /&gt;&lt;br /&gt;$mail-&gt;From = 'jmeslie@gmail.com';&lt;br /&gt;$mail-&gt;FromName = 'Jean Meslie';&lt;br /&gt;$mail-&gt;AddAddress('receipient@yahoo.com', 'Receiver');&lt;br /&gt;$mail-&gt;AddReplyTo('user@gmail.com'); // Adds a “Reply-to' address. Un-comment this to use it.&lt;br /&gt;$mail-&gt;Subject = 'test message';&lt;br /&gt;$mail-&gt;Body = 'message body goes here. This message was sent at '. time();&lt;br /&gt;&lt;br /&gt;if ($mail-&gt;Send() == true) {&lt;br /&gt;echo 'The message has been sent at '. time();&lt;br /&gt;}&lt;br /&gt;else {&lt;br /&gt;echo 'The email message has NOT been sent for some reason. Please try again later.';&lt;br /&gt;echo 'Mailer error: ' . $mail-&gt;ErrorInfo;&lt;br /&gt;}&lt;br /&gt;?&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-5953937403334581340?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/5953937403334581340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=5953937403334581340' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/5953937403334581340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/5953937403334581340'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2011/10/using-phpmailer-and-gmail-to-send-email.html' title='Using PHPMailer and Gmail to send email'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-1567344478292252056</id><published>2011-10-03T22:00:00.003-04:00</published><updated>2011-10-03T22:03:32.265-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='grant'/><category scheme='http://www.blogger.com/atom/ns#' term='recreate'/><category scheme='http://www.blogger.com/atom/ns#' term='role'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Recreate GRANTS to user in oracle without dba privilege</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;If you want to get list of grants made to tables and you want to recreate the user permissions in a different environment, the easy way to generate a script is to use the &lt;a href="http://psoug.org/reference/dbms_metadata.html"&gt;dbms_metadata.get_granted_ddl&lt;/a&gt; function as described &lt;a href="https://kr.forums.oracle.com/forums/thread.jspa?threadID=940742"&gt;here&lt;/a&gt;.  However, if you do not have DBA privilege on the database you will not be able to use that method.   Here is a simple sql that you can use to generate a script that will work in most common situations.  This just relies on the &lt;a href="http://download.oracle.com/docs/cd/B28359_01/gateways.111/b31046/a_db2dd.htm#autoId18"&gt;TABLE_PRIVILEGES&lt;/a&gt; table.&lt;br /&gt;&lt;blockquote&gt;select replace('GRANT ' || decode(select_priv,'Y','SELECT','') || decode(insert_priv,'A',',INSERT','') || decode(delete_priv,'Y',',DELETE','') ||  decode(update_priv,'Y',',UPDATE','') || decode(references_priv,'Y',',REFERENCES','')  || decode(alter_priv,'Y',',ALTER','') ||' ON '|| owner || '.' || table_name || ' TO ' || GRANTEE ||';','GRANT ,','GRANT ')from TABLE_PRIVILEGES where owner= 'OWNER' order by table_name, grantee;&lt;/blockquote&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-1567344478292252056?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/1567344478292252056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=1567344478292252056' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/1567344478292252056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/1567344478292252056'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2011/10/recreate-grants-to-user-in-oracle.html' title='Recreate GRANTS to user in oracle without dba privilege'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-7465589678700740303</id><published>2011-09-27T14:05:00.004-04:00</published><updated>2011-09-27T18:47:28.280-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='window.onload cookie object'/><title type='text'>window.onload being used in multiple places within the same application included</title><content type='html'>&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:trackmoves/&gt;   &lt;w:trackformatting/&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:donotpromoteqf/&gt;   &lt;w:lidthemeother&gt;EN-US&lt;/w:LidThemeOther&gt;   &lt;w:lidthemeasian&gt;X-NONE&lt;/w:LidThemeAsian&gt;   &lt;w:lidthemecomplexscript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;    &lt;w:splitpgbreakandparamark/&gt;    &lt;w:dontvertaligncellwithsp/&gt;    &lt;w:dontbreakconstrainedforcedtables/&gt;    &lt;w:dontvertalignintxbx/&gt;    &lt;w:word11kerningpairs/&gt;    &lt;w:cachedcolbalance/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;   &lt;m:mathpr&gt;    &lt;m:mathfont val="Cambria Math"&gt;    &lt;m:brkbin val="before"&gt;    &lt;m:brkbinsub val="&amp;#45;-"&gt;    &lt;m:smallfrac val="off"&gt;    &lt;m:dispdef/&gt;    &lt;m:lmargin val="0"&gt;    &lt;m:rmargin val="0"&gt;    &lt;m:defjc val="centerGroup"&gt;    &lt;m:wrapindent val="1440"&gt;    &lt;m:intlim val="subSup"&gt;    &lt;m:narylim val="undOvr"&gt;   &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"&gt;   &lt;w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"&gt;   &lt;w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 1"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 2"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 3"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 4"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 5"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 6"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 7"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 8"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 9"&gt;   &lt;w:lsdexception locked="false" priority="35" qformat="true" name="caption"&gt;   &lt;w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"&gt;   &lt;w:lsdexception locked="false" priority="1" name="Default Paragraph Font"&gt;   &lt;w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"&gt;   &lt;w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"&gt;   &lt;w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"&gt;   &lt;w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Revision"&gt;   &lt;w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"&gt;   &lt;w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"&gt;   &lt;w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"&gt;   &lt;w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"&gt;   &lt;w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"&gt;   &lt;w:lsdexception locked="false" priority="37" name="Bibliography"&gt;   &lt;w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable  {mso-style-name:"Table Normal";  mso-tstyle-rowband-size:0;  mso-tstyle-colband-size:0;  mso-style-noshow:yes;  mso-style-priority:99;  mso-style-qformat:yes;  mso-style-parent:"";  mso-padding-alt:0in 5.4pt 0in 5.4pt;  mso-para-margin-top:0in;  mso-para-margin-right:0in;  mso-para-margin-bottom:10.0pt;  mso-para-margin-left:0in;  line-height:115%;  mso-pagination:widow-orphan;  font-size:11.0pt;  font-family:"Calibri","sans-serif";  mso-ascii-font-family:Calibri;  mso-ascii-theme-font:minor-latin;  mso-fareast-font-family:"Times New Roman";  mso-fareast-theme-font:minor-fareast;  mso-hansi-font-family:Calibri;  mso-hansi-theme-font:minor-latin;  mso-bidi-font-family:"Times New Roman";  mso-bidi-theme-font:minor-bidi;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;;mso-bidi-Times New Roman&amp;quot;font-family:&amp;quot;;font-size:10.0pt;"  &gt;Recently one of my team members ran into an issue where we had used&lt;br /&gt;the window.onload to dynamically set some values in a cookie object.&lt;br /&gt;Our application handles multiple javascript files and we had used&lt;br /&gt;window.onload in another jsp also for another reason. &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;;mso-bidi-Times New Roman&amp;quot;font-family:&amp;quot;;font-size:10.0pt;"  &gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;;mso-bidi-Times New Roman&amp;quot;; color:black;mso-themebackground:#FFFF66font-family:&amp;quot;;font-size:10.0pt;color:text1;"   &gt;So,when multiple jsp files are trying to add different functions to the window.onload event, only the last function was executing.  We developed a workaround by adding the function that chains the onload event functions.  Below snippet gives an example of how we solved it. &lt;/span&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;;mso-bidi-Times New Roman&amp;quot;; color:black;mso-themefont-family:&amp;quot;;font-size:10.0pt;color:text1;"   &gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;font-family:&amp;quot;;font-size:10.0pt;color:text1;"   &gt;-&lt;br /&gt;function addLoadEvent(functionName) {&lt;br /&gt;var firstonload = window.onload;&lt;br /&gt;&lt;br /&gt;if (typeof window.onload != 'function') {&lt;br /&gt; window.onload = &lt;/span&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;;mso-bidi-Times New Roman&amp;quot;; color:black;mso-themefont-family:&amp;quot;;font-size:10.0pt;color:text1;"   &gt;functionName&lt;/span&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;font-family:&amp;quot;;font-size:10.0pt;color:text1;"   &gt;;&lt;br /&gt;}&lt;br /&gt;else {&lt;br /&gt; window.onload = function() {&lt;br /&gt;   if (&lt;/span&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;font-family:&amp;quot;;font-size:10.0pt;color:text1;"   &gt;firstonload &lt;/span&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;font-family:&amp;quot;;font-size:10.0pt;color:text1;"   &gt;) {&lt;br /&gt;     &lt;/span&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;font-family:&amp;quot;;font-size:10.0pt;color:text1;"   &gt;firstonload&lt;/span&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;font-family:&amp;quot;;font-size:10.0pt;color:text1;"   &gt;();&lt;br /&gt;   }&lt;br /&gt;   &lt;/span&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;;mso-bidi-Times New Roman&amp;quot;; color:black;mso-themefont-family:&amp;quot;;font-size:10.0pt;color:text1;"   &gt;functionName&lt;/span&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;;mso-bidi-Times New Roman&amp;quot;; color:black;mso-themefont-family:&amp;quot;;font-size:10.0pt;color:text1;"   &gt;();&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;;mso-bidi-Times New Roman&amp;quot;font-family:&amp;quot;;font-size:10.0pt;"  &gt;  &lt;br /&gt;&lt;br /&gt;and the actual function definition is in the original jsp and this&lt;br /&gt;function is called from there. So the first time window.onload may&lt;br /&gt;not be a function so we are setting it, On subsequent  assignments,&lt;br /&gt;window.onload exists, so whatever it holds will be wrapped up with the&lt;br /&gt;new function.  the list grows like that...&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="line-height:115%;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;font-family:&amp;quot;;font-size:10.0pt;"  &gt; &lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-7465589678700740303?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/7465589678700740303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=7465589678700740303' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/7465589678700740303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/7465589678700740303'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2011/09/windowonload-being-used-in-multiple.html' title='window.onload being used in multiple places within the same application included'/><author><name>Anita Selwyn</name><uri>http://www.blogger.com/profile/10647481295084064272</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-7090597418634015791</id><published>2011-06-07T01:00:00.002-04:00</published><updated>2011-06-07T01:02:45.807-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='struts2'/><title type='text'>Struts2 navigate away from error pages</title><content type='html'>Struts 2 provides a nice &lt;a href="http://struts.apache.org/2.0.14/docs/workflow-interceptor.html"&gt;workflow&lt;/a&gt; interceptor that makes sure there are not validation errors before allowing the interceptor chain to continue.&lt;br /&gt;&lt;br /&gt;This will also prevent the user from navigating away to a different method in the same action.  Sometimes that is not the desired behavior we like.  For example, if the user is editing an item and there is a validation error and the user does not want to fix the validation error, however they choose to navigate to a different page on the same action, the workflow interceptor will prevent the user and put them back to the edit page.  &lt;br /&gt;&lt;br /&gt;If the desired behavior is to let them proceed to to another page, you can exclude those methods in the interceptor configuration similar to the following example.&lt;br /&gt;&lt;pre&gt;&amp;lt;interceptor-ref name="defaultLoginStack" &gt;&lt;br /&gt;         &amp;lt;param name="validation.excludeMethods"&gt;doInput,doList&amp;lt;/param&gt;&lt;br /&gt;         &amp;lt;param name="workflow.excludeMethods"&gt;doInput,doList&amp;lt;/param&gt;&lt;br /&gt;&amp;lt;/interceptor-ref&gt;&lt;br /&gt;&lt;/pre&gt;In the above example, if the user tries to access the doList or doInput methods the validation will be skipped and the workflow will allow to continue even if the previous page had errors.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-7090597418634015791?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/7090597418634015791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=7090597418634015791' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/7090597418634015791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/7090597418634015791'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2011/06/struts2-navigate-away-from-error-pages.html' title='Struts2 navigate away from error pages'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-201628391537625004</id><published>2011-05-13T14:39:00.001-04:00</published><updated>2011-05-13T22:17:39.504-04:00</updated><title type='text'>Tomcat Resource Configuration for Oracle Database Connection</title><content type='html'>Tomcat has a &lt;a href="http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html#Database_Connection_Pool_(DBCP)_Configurations"&gt;Database Connection Pool&lt;/a&gt; mechanism that will work for most of the database including Oracle.  The mechanism described in the tomcat web site will work for most situations.  Using the above method will make the code not depend on a specific database. &lt;br /&gt;&lt;br /&gt;However there are situations where the application code is dependent on Oracle database.  One such example is when you use Oracle Stored procedures and you need to use Oracle Cursor as on output parameter.  In such case you will have to cast the Statement to Oracle specific oracle.jdbc.OracleCallableStatement class to get the cursor. &lt;br /&gt;&lt;br /&gt;However if you simply cast the java.sql.CallableStatement to oracle.jdbc.OracleCallableStatement you may notice that you get a class cast exception if you configured your DataSource using the above method.  &lt;br /&gt;&lt;br /&gt;To overcome the class cast exception, you need to configure the data source using a Oracle specific connection factory.   The following example will server that purpose.  The text in bold are the changes pertaining to the Oracle connection factory. &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&amp;lt;Resource name="jdbc/OracleDS" auth="Container" type="&lt;b&gt;oracle.jdbc.pool.OracleDataSource&lt;/b&gt;"&lt;br /&gt;&lt;b&gt;user="DBUser"&lt;/b&gt;&lt;br /&gt;password="xxxxxx"&lt;br /&gt;&lt;b&gt;driverClassName="oracle.jdbc.OracleDriver"&lt;/b&gt;&lt;br /&gt;&lt;b&gt;factory="oracle.jdbc.pool.OracleDataSourceFactory"&lt;/b&gt;&lt;br /&gt;url="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=your.db.host)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=serviceName)))"&lt;br /&gt;maxActive="?"&lt;br /&gt;maxIdle="?"&lt;br /&gt;maxWait="-1"/&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-201628391537625004?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/201628391537625004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=201628391537625004' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/201628391537625004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/201628391537625004'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2011/05/tomcat-resource-configuration-for.html' title='Tomcat Resource Configuration for Oracle Database Connection'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-3027920389439689266</id><published>2010-10-05T01:21:00.001-04:00</published><updated>2010-10-05T01:24:30.273-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='properties'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><title type='text'>spring apache commons configuration</title><content type='html'>I was surprised to find out that integrating the apache commons configuration with the spring framework is not trivial.&amp;nbsp; I was hoping that there will be one bean that we can use out of the box within the spring framework or the apache commons framework and we set that as a property in the bean and we can go on.&amp;nbsp; Unfortunately it was not that easy.&amp;nbsp;&amp;nbsp; It takes a few steps to get this working.&amp;nbsp; Here are the steps that you need to follow to get this integration working:&lt;br /&gt;&lt;br /&gt;1) Define the properties beans in spring xml file (typically ApplicationConfiguration.xml file)&lt;br /&gt;&amp;nbsp;as follows:&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;"&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;"&gt;&amp;nbsp;&amp;lt;!-- Apache Commons Configuration Composite configuration --&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bean id="configurations"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class="org.springmodules.commons.configuration.CommonsConfigurationFactoryBean"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="configurations"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;list&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bean class="org.apache.commons.configuration.PropertiesConfiguration"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;constructor-arg type="java.net.URL"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value="classpath:myconfiguration.properties" /&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="reloadingStrategy"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bean class="org.apache.commons.configuration.reloading.FileChangedReloadingStrategy"/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bean class="org.apache.commons.configuration.SystemConfiguration"/&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/list&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!-- define configuration as a set of spring resources --&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bean id="configuration" class="org.apache.commons.configuration.Configuration" factory-bean="&amp;amp;amp;configurations" factory-method="getConfigurations"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;bean class="org.springmodules.commons.configuration.CommonsConfigurationFactoryBean" id="configurations"&gt;&lt;property name="configurations"&gt;&lt;list&gt;&lt;bean class="org.apache.commons.configuration.Configuration" factory-bean="&amp;amp;configurations" factory-method="getConfigurations" id="configuration"&gt;&lt;/bean&gt;&lt;/list&gt;&lt;/property&gt;&lt;/bean&gt;&lt;/span&gt;&lt;/blockquote&gt;2) Define a bean with the getter and setter that returns/accepts an array of org.apache.commons.configuration.Configuration class.&amp;nbsp; To make it easier for the rest of the code to get the configuration easy, you may want to add a utility method in there to return the combined Configutaion.&amp;nbsp; Here is an example:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;private Configuration configs[] ;&lt;br /&gt;private ConfigurationBuilder cfgBuilder ;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public Configuration[] getConfigs() {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return configs;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void setConfigs(Configuration[] configs) {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; this.configs = configs;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cfgBuilder = new ConfigurationBuilder();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for (Configuration cgf: configs) {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cfgBuilder.addConfiguration(cgf);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public Configuration getConfig() {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return cfgBuilder.getConfiguration();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;3) Define the bean properties in the spring xml file.&amp;nbsp; I suggest, that you may want to define the above method in a base class of all your beans and define it as an abstract bean.&amp;nbsp; This will enable you to use the properties in all your beans without having to define the properties in every bean.&amp;nbsp; Here is an example:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="color: blue;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; &amp;lt;bean id="baseActionBean"&amp;nbsp; class="com.my.company.BaseAction"&amp;nbsp; abstract="true" &amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="configs" ref="configuration" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bean id="logonClass" class="com.my.company.UsefulAction"&amp;nbsp; parent="baseActionBean"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/bean&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;4)&amp;nbsp; Add the necessary libraries if you do not have them already.&amp;nbsp; Here is the list of jars you will need.&lt;br /&gt;&lt;blockquote&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;commons-lang-*.jar&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;commons-configuration*.jar&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;spring-modules-jakarta-commons*.jar&lt;/span&gt;&lt;/blockquote&gt;&amp;nbsp;With these changes, you should be able to use the properties in your beans with a code as simple as getConfig().getString("propertyKey")&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-3027920389439689266?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/3027920389439689266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=3027920389439689266' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/3027920389439689266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/3027920389439689266'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2010/10/spring-apache-commons-configuration.html' title='spring apache commons configuration'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-7154526341838428358</id><published>2010-09-24T22:47:00.001-04:00</published><updated>2010-09-24T22:48:57.871-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='logging'/><title type='text'>Deleting old log files based on size and time</title><content type='html'>There are times when the log files take up too much space in the system and bring the system to run out of space.&amp;nbsp; Fortunately there are few steps you can take to keep the log files under control for development servers.&amp;nbsp; Here I have listed a simple strategy:&lt;br /&gt;1) Create a dedicated partition for the log files so if the log files grow out of space, that still does not crash the system by making no space left for your data and configuration files.&lt;br /&gt;2) Keep all log files for all applications under a common directory dedicated for logs.&amp;nbsp; Replace the location of the log files within your application with symbolic links to the common logs folder or change the log configuration files to directly point them to the log directory.&lt;br /&gt;3) Create a simple script to delete files that are older than certain number of days.&lt;br /&gt;4) For files that does not get rolled over by the application, have a script that trims the head of the file by certain percentage of their size when the file size grows over a certain size limit.&lt;br /&gt;&lt;br /&gt;If you follow these simple steps, your log files and directories will stay tidy and you still have logs left when you need them to debug issues.&amp;nbsp;&amp;nbsp; Here is a sample script that you can use to cleanup old files and trim larger files.&lt;br /&gt;&lt;blockquote style="background-color: white; color: blue;"&gt;&lt;b style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;logdir="/tmp/test"&lt;br /&gt;trimAmt=50&lt;br /&gt;tempFile=/tmp/trimedfile.$$&lt;br /&gt;sizeLimit=+1G&lt;br /&gt;fileAge= +30&lt;br /&gt;&lt;br /&gt;cd $logdir&lt;br /&gt;&lt;br /&gt;find . -mtime $fileAge -exec rm -f {} \;&lt;br /&gt;&lt;br /&gt;for FILENAME in $(find . -size $sizeLimit -print )&lt;br /&gt;do&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; filesize=$(wc -l $FILENAME |&amp;nbsp; awk '{print $1}')&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; trimsize=$(( $filesize -($filesize / $trimAmt)))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo " $FILENAME $filesize $trimsize "&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tail -$trimsize $FILENAME &amp;gt; /tmp/trimedfile.$$&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cat $tempFile &amp;gt; $FILENAME&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rm&amp;nbsp; $tempFile&lt;br /&gt;done&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-7154526341838428358?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/7154526341838428358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=7154526341838428358' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/7154526341838428358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/7154526341838428358'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2010/09/deleting-old-log-files-based-on-size.html' title='Deleting old log files based on size and time'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-8185656687125684504</id><published>2010-08-25T13:27:00.000-04:00</published><updated>2010-08-25T13:27:55.752-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='java url connection'/><title type='text'>Java URL connection timeout - default timeout might save you from hanging</title><content type='html'>Many times, when you make a url connection or any connection that works over tcp ip (ftp, http etc) protocol, it is possible that your client just hangs.&amp;nbsp; It is frustrating to debug this kind of issue because, you do not get any exception from your application except it just hangs.&amp;nbsp; This can be a problem especially in production environments where there are firewalls between every single component and it is hard to trace network traffic.&amp;nbsp; &amp;nbsp; &lt;br /&gt;&lt;br /&gt;If you are using sun jdk.1.4 or above there is a way you can prevent your code from just hanging.&amp;nbsp; Best of all, you do not even have to make a code change.&amp;nbsp; The sun jvm has a way to specify default timeout values for the net client. &amp;nbsp; All you have to do is just add the following java parameters to the command line that starts your application. &amp;nbsp;&lt;br /&gt;&lt;div style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;b&gt;-D&lt;/b&gt;&lt;b&gt;sun.net.client.defaultConnectTimeout=TimeoutInMiliSec -D&lt;/b&gt;&lt;b&gt;sun.net.client.defaultReadTimeout=&lt;/b&gt;&lt;b&gt;TimeoutInMiliSec&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt; &lt;br /&gt;This will force the client to timeout and hopefully your application logs the exception that gives enough clue to debug the issue. &amp;nbsp; For more information about specifying network properties in java check out the &lt;a href="http://download.oracle.com/javase/1.4.2/docs/guide/net/properties.html"&gt;Networking Properties&lt;/a&gt; guide from sun/oracle.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-8185656687125684504?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/8185656687125684504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=8185656687125684504' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8185656687125684504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8185656687125684504'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2010/08/java-url-connection-timeout-default.html' title='Java URL connection timeout - default timeout might save you from hanging'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-2630641809141756587</id><published>2010-08-23T16:43:00.004-04:00</published><updated>2010-08-24T10:11:57.023-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='clearquest'/><title type='text'>Exporting ClearQuest records to Excel</title><content type='html'>If you need to export clearquest records to excel, the easy option is to use CSV format.&amp;nbsp; You can do that by using the "Save result set to file" option and select a delimiter of your choice.&amp;nbsp; Hoqwever, if one of your exported column is a multi line text, this may not provide the results you expect when you open the file in excel.&lt;br /&gt;&lt;br /&gt;In that case you may want to export the data as xml file.&amp;nbsp; Use the "Rational ClearQuest Client"&amp;nbsp; (not the windows client) and click on the "export query results" icon above the query results pane.&amp;nbsp; This will open a window where you can select the export format.&amp;nbsp;&amp;nbsp; In this window select the xml format and you can get the results as an xml file. (You can find detailed instruction on how to import &lt;a href="http://publib.boulder.ibm.com/infocenter/ieduasst/rtnv1r0/index.jsp?topic=/com.ibm.iea.rcq/rcq/7.0/Operations/RCQ_Module2_Exporting/player.html"&gt;here&lt;/a&gt;) However, the xml file is not very friendly to read.&amp;nbsp;&amp;nbsp; You can create a simple xsl file and add a single line to the xml file to use the xsl file you just created to make the file more reader friendly.&lt;br /&gt;&lt;br /&gt;Here is a sample xsl file you can use: (You can download a copy from &lt;a href="http://www.technogemsinc.com/demos/cqTransform.xsl"&gt;here&lt;/a&gt;)&lt;br /&gt;&lt;div style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;?xml version="1.0" encoding="ISO-8859-1"?&lt;br /&gt;&amp;gt; &amp;lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&amp;gt;&lt;br /&gt;&amp;lt;xsl:template match="/"&amp;gt;&lt;br /&gt;&amp;lt;html&amp;gt; &amp;lt;body&amp;gt; &amp;lt;h2&amp;gt;My ClearQuest Results &amp;lt;/h2&amp;gt; &amp;lt;table&amp;gt; &amp;lt;xsl:for-each select="exportedResults/columnNames"&amp;gt; &amp;lt;tr bgcolor="gray"&amp;gt; &amp;lt;xsl:for-each select="columnName"&amp;gt; &amp;lt;th&amp;gt;&amp;lt;xsl:value-of select="."/&amp;gt; &amp;lt;/th&amp;gt; &amp;lt;/xsl:for-each&amp;gt; &amp;lt;/tr&amp;gt; &amp;lt;/xsl:for-each&amp;gt; &amp;lt;xsl:for-each select="exportedResults/records/record"&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;xsl:for-each select="field"&amp;gt; &amp;lt;td&amp;gt;&amp;lt;xsl:value-of select="."/&amp;gt;&amp;lt;/td&amp;gt; &amp;lt;/xsl:for-each&amp;gt; &amp;lt;/tr&amp;gt; &amp;lt;/xsl:for-each&amp;gt; &amp;lt;/table&amp;gt; &amp;lt;/body&amp;gt; &amp;lt;/html&amp;gt; &amp;lt;/xsl:template&amp;gt; &amp;lt;/xsl:stylesheet&amp;gt; &lt;/div&gt;&lt;br /&gt;&lt;div style="color: black;"&gt;You can add the following line to the generated xml so you tell the browser to use the xsl.&amp;nbsp; Make sure that the xsl and xml fiels are in the same directory.&lt;/div&gt;&lt;span style="color: #3333ff;"&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;?xml-stylesheet type="text/xsl" href="cqTransform.xsl"?&amp;gt;&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;!--Generated by ClearQuest Eclipse client&amp;nbsp; Mon Aug 23 14:43:15 EDT 2010--&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-2630641809141756587?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/2630641809141756587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=2630641809141756587' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/2630641809141756587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/2630641809141756587'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2010/08/exporting-clearquest-records-to-excel.html' title='Exporting ClearQuest records to Excel'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-6617180297872602055</id><published>2010-06-24T22:53:00.000-04:00</published><updated>2010-06-24T22:53:06.915-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java url connection EOFException'/><title type='text'>java urlconnection difference between jdk 1.4 vs 1.5</title><content type='html'>Recently, I ran in to an issue when trying to do some maintenance on an application that was last compiled using java 1.4 compiler.&amp;nbsp; After compiling with java 1.5 or 1.6 compiler, the application stopped working.&amp;nbsp; The part that was failing was when the application is making a URLConnection and posting a bytestream to the URL.&amp;nbsp; It appears that from the client's perspective it wrote the entire bytestream.&amp;nbsp; However, when the server is attempting to read the bytestream, it would get a EndOfFile exception.&amp;nbsp;&amp;nbsp; After scratching my head for a day, I noticed that one of my colleague had the same application working on his machine.&amp;nbsp; The only difference is the URL he is using has a backslash at the end and mine did not.&amp;nbsp; I tried changing the url by adding a backslash at the end, and the application starts working. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I have not seen any official documentation regarding this difference in the behavior between the same code compiled by jdk 1.4 and the newer ones.&amp;nbsp; But, it seem to be the case as few others also experienced similar issue. &lt;br /&gt;&lt;br /&gt;I will update this blog entry if I ever find more details on this issue.&amp;nbsp; Meanwhile, if you run in to this issue, you may want to try adding a backslash to the end of your url.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-6617180297872602055?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/6617180297872602055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=6617180297872602055' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/6617180297872602055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/6617180297872602055'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2010/06/java-urlconnection-difference-between.html' title='java urlconnection difference between jdk 1.4 vs 1.5'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-7573027983436902847</id><published>2010-04-19T20:49:00.001-04:00</published><updated>2010-04-19T20:50:13.919-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='ibatis'/><title type='text'>Pagination using sql</title><content type='html'>If you have a complex query that returns lot of rows from the database and you are displaying the results in a table,&amp;nbsp; you may want to add some pagination logic to your application.&amp;nbsp; However, most people add pagination to the application layer, but retrieve all the rows back from the database.&amp;nbsp; Java programming frameworks/API such as IBatis, JPA etc provides a mechanism to limit the number of rows retrieved or skip a number of rows.&amp;nbsp;&amp;nbsp; However, the implementation of those framework is left behind the jdbc driver and often results in the data still retrieved to the application server and then discarded.&amp;nbsp;&amp;nbsp; You could avoid this resource wastage by changing your query to limit the rows.&amp;nbsp; The following is an example of how you can do just that.&lt;br /&gt;&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: #20124d;"&gt; &lt;b style="color: blue;"&gt;select * from (  select rownum rnum, a.* from ( &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt; &lt;span style="color: orange;"&gt;select columns from your_complex_table order by  someField&lt;/span&gt;&lt;/span&gt; &lt;b style="color: blue;"&gt;)&amp;nbsp; a&amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where rownum &amp;lt;&amp;nbsp; #UPPER_LIMIT ) &amp;nbsp;&amp;nbsp;&amp;nbsp; where rnum &amp;gt;= #LOWER_LIMIT &lt;/b&gt;&lt;/blockquote&gt;&lt;span style="color: #073763;"&gt;&lt;/span&gt;In this example, you can change the values of #UPPER_LIMIT and #LOWER_LIMIT as parameters to your query limit the results to just the rows you want to deal with.&amp;nbsp; If you are using a&amp;nbsp; iBATIS you can make your actual query (the one does fetches all the records) in to an sql fragment and reuse it for the paginated query and get row counts.&amp;nbsp;&amp;nbsp; It also helps to get all the records in case of exporting all the data to some external format.&amp;nbsp; The following example shows how you can reuse the sql fragment within your sqlMapping.&lt;br /&gt;&lt;blockquote&gt;&lt;span style="color: blue;"&gt;&amp;lt;sql id="&lt;span style="color: black;"&gt;selectItems&lt;/span&gt;"&amp;gt;&lt;/span&gt;&lt;br /&gt;select columns from your_complex_table order by someField &lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;lt;/sql&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;lt;select id="&lt;span style="color: black;"&gt;selectItemCount&lt;/span&gt;" resultClass="&lt;span style="color: black;"&gt;int&lt;/span&gt;"&amp;gt;&lt;/span&gt;&lt;br /&gt;SELECT COUNT(*) AS total&lt;br /&gt;&amp;lt;include refid="selectItems"/&amp;gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;lt;/select&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;lt;select id="&lt;span style="color: black;"&gt;selectPaginated&lt;/span&gt;" resultClass="&lt;span style="color: black;"&gt;Item&lt;/span&gt;" parameterClass="&lt;span style="color: black;"&gt;map&lt;/span&gt;"&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;select * from ( select rownum rnum, a.* from (&lt;br /&gt;&amp;lt;include refid="selectItems"/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) a&amp;nbsp; where rownum &amp;lt;&amp;nbsp; #UPPER_LIMIT ) &lt;br /&gt;&amp;nbsp;&amp;nbsp; where rnum &amp;gt;= #LOWER_LIMIT&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;lt;/select&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-7573027983436902847?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/7573027983436902847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=7573027983436902847' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/7573027983436902847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/7573027983436902847'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2010/04/pagination-using-sql.html' title='Pagination using sql'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-6765469904090245316</id><published>2010-02-11T16:12:00.000-05:00</published><updated>2010-02-11T16:12:04.721-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='geocoding'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>How to get UTM/MGRS from Latitude/Longitude using Oracle</title><content type='html'>Oracle Spatial queries can be used to derive the UTM/MGRS from a given Latitude and Longitude.&lt;br /&gt;The following sql provides an example on how to get the UTM/MGRS&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Select SDO_CS.to_USNG( SDO_GEOMETRY(2001,8307,SDO_POINT_TYPE(41.98,33.23,NULL),NULL,NULL), 1) UTM_MGRS from dual; &lt;/span&gt;&lt;/blockquote&gt;&amp;nbsp;For more information on oracle spatial features, refer to http://www.oracle.com/technology/products/spatial/pdf/10gr2_collateral/locator_twp_10gr2.pdf&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-6765469904090245316?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/6765469904090245316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=6765469904090245316' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/6765469904090245316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/6765469904090245316'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2010/02/how-to-get-utmmgrs-from.html' title='How to get UTM/MGRS from Latitude/Longitude using Oracle'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-8409448059114512211</id><published>2010-02-11T15:48:00.003-05:00</published><updated>2010-02-13T11:44:54.063-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='geocoding'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle Locator vs Spatial</title><content type='html'>&lt;table&gt;&lt;tbody&gt;&lt;tr&gt; &lt;th style="font-weight: normal;"&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Oracle Locator&lt;/span&gt;&lt;/b&gt;&lt;/th&gt; &lt;th style="font-weight: normal;"&gt;&lt;span style="font-size: x-large;"&gt;&lt;b&gt;Oracle Spatial &lt;/b&gt;&lt;/span&gt;&lt;/th&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;&lt;br /&gt;&lt;div style="direction: ltr; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 4.8pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed;"&gt;Free&amp;nbsp; included in oracle 10G onwards&lt;br /&gt;What Can Oracle Locator Do for You?&lt;br /&gt;Query nearest neighbor and other spatial relationships between geometries&lt;br /&gt;Perform location queries on relational information not stored in Oracle Spatial geometry&lt;br /&gt;Support long transactions&lt;br /&gt;Store and index vector geometries in the database&lt;br /&gt;Enhance application performance&lt;br /&gt;http://www.oracle.com/technology/products/spatial/pdf/10gr2_collateral/locator_twp_10gr2.pd&lt;br /&gt;&lt;ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;span style="font-size: small;"&gt;Additional option on top of oracle database&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;/ul&gt;&lt;div style="direction: ltr; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 4.8pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed;"&gt;What Can Oracle Spatial Do for You?&lt;br /&gt;Everything that Oracle Locator does, and:&lt;br /&gt;Perform length and area calculations on geometries&lt;br /&gt;Generate new geometries such as buffers and unions&lt;br /&gt;Perform coordinate systems transformations, for individual geometries or entire layers&lt;br /&gt;Store linear measure information&lt;br /&gt;http://www.oracle.com/technology/products/spatial/pdf/10gr2_collateral/spatial_twp_10gr2.pdf&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-8409448059114512211?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/8409448059114512211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=8409448059114512211' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8409448059114512211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8409448059114512211'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2010/02/oracle-locator-vs-spatial.html' title='Oracle Locator vs Spatial'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-5023944140043591227</id><published>2010-02-10T10:47:00.009-05:00</published><updated>2010-02-10T11:04:50.890-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ESB'/><category scheme='http://www.blogger.com/atom/ns#' term='webservices'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Using Oracle ESB as a web service client to pull data periodically</title><content type='html'>In this article we will cover the detailed steps to create an ESB service that invokes a web service periodically and write the response to a file.&amp;nbsp; The web service in this case takes an input parameter and returns some response based on the input.&amp;nbsp; The client is expected to parse the response and take an element from the response and supply that as the input for the next call. &lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_hqatc_n_OTU/S3LUbdn3UXI/AAAAAAAAJKY/SqOSawTNYb8/s1600-h/esbWebServiceClientDiagram.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://1.bp.blogspot.com/_hqatc_n_OTU/S3LUbdn3UXI/AAAAAAAAJKY/SqOSawTNYb8/s640/esbWebServiceClientDiagram.gif" width="640" /&gt;&lt;/a&gt;&lt;br /&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; Create a service group. Lets call it EsbWebServiceClient&lt;br /&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; Create a xsd file to represent the configuration information that we will use to pass to the webservice. &lt;br /&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp; Create a xml file that complies with the schema and the initial parameters for invoking the web service. The ESB adaptor will update this file after each invocation.&lt;br /&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp; Create a file adaptor to read a file.&amp;nbsp; Don’t check the mark that says delete file after reading.&amp;nbsp; Specify the schema that you created in step 2 for the schema of the file. When you are done with step you should end up with boxes 1 &amp;amp; 2 shown in the diagram with the line connecting them.&lt;br /&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp; Create a ESB Service&amp;nbsp; for Soap service (Right click on design pane-&amp;gt; Create ESB Service-&amp;gt;Soap Service)&amp;nbsp; On the pop up window, select the WSDL file representing the service.&amp;nbsp; For this demo, the web service is a simple service that takes a string as input and returns a string. This creates Box 3.with no lines connected.&lt;br /&gt;6.&amp;nbsp;&amp;nbsp;&amp;nbsp; Now create a schema that represents the input elements to the webservice and the output of the webservice.&amp;nbsp; We will use this as the holding area to have both the request and response so we can write the output to a file and update the config file with the updated information.&amp;nbsp; In the example the schema is called serviceParameterAndResponse.&lt;br /&gt;7.&amp;nbsp;&amp;nbsp;&amp;nbsp; Create a ESB routing Service and name it ConfigMapper.(Right click on design pane-&amp;gt; Create ESB Service-&amp;gt;Routing Service)&amp;nbsp; On the pop up window, select the serviceParameterAndResponse schema for both request and response formats.. This creates Box 4.with no lines connected. This routing service provides the framework for us to merge the input parameters and the webservice output.&lt;br /&gt;8.&amp;nbsp;&amp;nbsp;&amp;nbsp; Now create a file adaptor that can write an output file and name it WsResponseWriter. To keep it simple, specify the schema for the file as the same as the response from the webservice&amp;nbsp; This should create Box 5 with no lines connected. &lt;br /&gt;9.&amp;nbsp;&amp;nbsp;&amp;nbsp; Now create a file adaptor that can write the config file and name that ConfigFileWriter.. Specify the schema and the location for the file as the same as the schema created in step 2. This should create Box 6 with no connector lines&lt;br /&gt;10.&amp;nbsp;&amp;nbsp;&amp;nbsp; Double click box 2 and add a routing rule to invoke the method on the webservice.&amp;nbsp; This should create a reply line.&amp;nbsp; Now point the reply to the execute method on the routing service created on step 7.&amp;nbsp; This should create lines 8 &amp;amp; 9 on the esb diagram..&lt;br /&gt;11.&amp;nbsp;&amp;nbsp;&amp;nbsp; Double click box 4 and add two routing rules.&amp;nbsp; One pointing to WsResponseWriter and the second one pointing to ConfigFileWriter.&amp;nbsp; This should create the lines 10 &amp;amp; 11 in the diagram.&lt;br /&gt;12.&amp;nbsp;&amp;nbsp;&amp;nbsp; Now the diagram is almost complete.&amp;nbsp; You will see the mappings are still gray. We will add the mappings which will make them yellow.&lt;br /&gt;13.&amp;nbsp;&amp;nbsp;&amp;nbsp; Double click on the top "X" and create a new mapping.&amp;nbsp; When the designed is displayed, drag a line from the config parameter to the input parameter of the web service.&lt;br /&gt;14.&amp;nbsp;&amp;nbsp;&amp;nbsp; Double click of the bottom "X" of box 2.&amp;nbsp; Create a new mapping.&amp;nbsp; You will notice there is an option to "include the request in reply play load".&amp;nbsp; Make sure you select this option.&amp;nbsp; When the designer panel is displayed you should see a new node called “ESBREQUEST” on the left hand side.&amp;nbsp; To learn more about the $ESBREQUEST parameter refer to this article (http://www.soastation.org/2007/05/esbrequest-in-oracle-esb-routing.html)&lt;br /&gt;15.&amp;nbsp;&amp;nbsp;&amp;nbsp; Now select the source view of the xslt and add a function to parse the required fields from the request to map to the output. In the example below, I have mapped the string after the pipe symbol to be stored as the parameter for the next call. And for the response, I have concatenated the input and the output to be written out to the file.&amp;nbsp; Please note that you will not be able to drat lines to or from the $ESBREQUEST variable on the designer view.&lt;br /&gt;&lt;blockquote&gt;&lt;b&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;xsl:param name="ESBREQUEST"/&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;lt;xsl:template match="/"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;out1:serviceParameterAndResponse&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;out1:param1&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:value-of select='substring-after(/tns:getElapsedTimeSinceResponse/tns:return,"|")'/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/out1:param1&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;out1:response&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xsl:value-of select='concat(substring-after(/tns:getElapsedTimeSinceResponse/tns:return,"|"),substring(&lt;b&gt;$ESBREQUEST&lt;/b&gt;/tns:lastTime,1.0,2.0))'/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/out1:response&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/out1:serviceParameterAndResponse&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;lt;/xsl:template&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;div style="color: red;"&gt;&lt;/div&gt;&amp;nbsp;16.&amp;nbsp;&amp;nbsp;&amp;nbsp; Now double click on the "X" on box 4 and create new mappings.&amp;nbsp;&amp;nbsp; These mappings should be straightforward as all the manipulation is done on the previous step.&amp;nbsp;&amp;nbsp; Just draw a straight line from the corresponding field on the left to right.&amp;nbsp; Repeat this for both the ‘X” on the box.&lt;br /&gt;17.&amp;nbsp;&amp;nbsp;&amp;nbsp; Now your diagram should look similar to the one shown above.&amp;nbsp; You can register the service to your ESB and test it. &lt;br /&gt;&lt;br /&gt;If you like see a copy of the project that I used to create the demo, feel free to drop me an email.&amp;nbsp; My email address is jmeslie at gmail dot com.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-5023944140043591227?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/5023944140043591227/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=5023944140043591227' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/5023944140043591227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/5023944140043591227'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2010/02/using-oracle-esb-as-web-service-client.html' title='Using Oracle ESB as a web service client to pull data periodically'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_hqatc_n_OTU/S3LUbdn3UXI/AAAAAAAAJKY/SqOSawTNYb8/s72-c/esbWebServiceClientDiagram.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-1359741257203368894</id><published>2010-01-14T11:12:00.001-05:00</published><updated>2010-01-14T11:14:26.106-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>How to set Vista to allow inbound web traffic?</title><content type='html'>If your organization uses Group Policy, use the Windows Firewall Group Policy settings to configure Windows Firewall. If you have set exceptions in the windows firewall too to allow trafic and you are still not able to access your computer from a remote machine, most likely cause is the group policy is set on your computer. The Group Policy Object Editor (type &lt;span style="color: blue;"&gt;Gpedit.msc&lt;/span&gt; on the windows search bar) provides access to the Windows Firewall settings. The settings are stored within the Group Policy Object Editor at Computer Configuration/Administrative Templates/Network/Network Connections/Windows Firewall.&lt;br /&gt;&lt;br /&gt;Once you are in the group policy editor, navigate to Local Computer Policy -&amp;gt; Windows Setting -&amp;gt; Security Seting -&amp;gt; Windows Firewall with advanced security -&amp;gt; Inbound rules&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-1359741257203368894?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/1359741257203368894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=1359741257203368894' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/1359741257203368894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/1359741257203368894'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2010/01/how-to-set-vista-to-allow-inbound-web.html' title='How to set Vista to allow inbound web traffic?'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-5980342770248660130</id><published>2009-10-22T10:15:00.006-04:00</published><updated>2009-10-22T10:35:39.953-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='subversion'/><title type='text'>How to add version info to subversion files automatically</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Adding version info to subversion files&lt;/span&gt;&lt;br /&gt;You can configure Subversion and TortoiseSVN to update the version information on the files checked in to subversion by adding subversion keywords to your file and setting the subversion properties.   To automatically add the version number, the user who changed the file and the date in which the file was changed, follow these steps:&lt;br /&gt;&lt;br /&gt;Add the subversion keywords to the file. These properties and keywords are case sensitive.    To ensure that you are using the correct value of the keyword, I suggest copy the following text to your file and make the changes necessary to make it a valid comment:&lt;br /&gt;&lt;pre&gt;/**&lt;br /&gt;**  Last Changed by    : $LastChangedBy$&lt;br /&gt;**  Last Changed Rev   : $Rev$&lt;br /&gt;**  Last Changed Date  : $LastChangedDate$&lt;br /&gt;**/&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The next step is to add the subversion properties to the file.  It can be done by one file at a time or at a folder level to add the properties to all the files in the folder and its sub folders.   To do this, right click on the file/folder, select TortoiseSVN-&amp;gt;Properties.  Click “New” and in the properties window select “svn:keywords” and enter  “LastChangedBy Rev LastChangedDate” as the value as shown below:&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_hqatc_n_OTU/SuBsJQsFFvI/AAAAAAAAFaY/rgz1P4ohy2Y/s1600-h/image001.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5395431259944326898" src="http://1.bp.blogspot.com/_hqatc_n_OTU/SuBsJQsFFvI/AAAAAAAAFaY/rgz1P4ohy2Y/s320/image001.jpg" style="cursor: pointer; height: 179px; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;To avoid making errors, I would suggest that you use the import/export functionality to add these properties.   Select a file that already has this property and you know it is working and click on export as shown below.  Save the property to a file and close the properties window.  Now go to the TortoiseSVN properties window of the new file and select import and select the properties file you saved before.  This will ensure that you have set the properties correctly for that file.&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_hqatc_n_OTU/SuBsjWzONRI/AAAAAAAAFao/QPCEO_cjYNc/s1600-h/image003.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5395431708261496082" src="http://2.bp.blogspot.com/_hqatc_n_OTU/SuBsjWzONRI/AAAAAAAAFao/QPCEO_cjYNc/s320/image003.jpg" style="cursor: pointer; height: 179px; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Subversion automatic property setting&lt;/span&gt;&lt;br /&gt;You can configure Subversion and TortoiseSVN to set properties automatically on files and folders when they are added to the repository. There are two ways of doing this.&lt;br /&gt;You can edit the subversion configuration file to enable this feature on your client. The General page of TortoiseSVN's settings dialog has an edit button to take you there directly.  (Right click anywhere within the right pane of windows explorer, Highlight the TortoiseSVN menu and click on the settings tab to bring up the General settings page of Tortoise SVN )&lt;br /&gt;The config file is a simple text file which controls some of subversion's workings. You need to change two things: First, in the section headed miscellany uncomment the line enable-auto-props = yes. Secondly you need to edit the section below to define which properties you want added to which file types. This method is a standard subversion feature and works with any subversion client. However it has to be defined on each client individually - there is no way to propagate these settings from the repository.   Table 1 shows a sample snippet of the config file with the changes that adds the properties for the file types .txt, .java, .jsp, .htm*, *.properties, *.xml and *.xml.   You can add more lines as needed to add more file types.&lt;br /&gt;An alternative method is to set the tsvn:autoprops property on folders.  I recommend that we use this method as all of us are using TortoiseSVN  client.  This method only works for TortoiseSVN clients, but it does get propagated to all working copies on update.  The advantage is if even if one user did not have the correct settings on their PC, these properties will get propagated as long as the top folder was created from a pc with the right setting.  To do this right click on a top level folder for the project,  select tortisSVN properties and select add property and select the tsvn:autoprops property name and add the values as shown below: &lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_hqatc_n_OTU/SuBsjEJiCLI/AAAAAAAAFag/uCSY3FLDsVQ/s1600-h/image002.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5395431703254796466" src="http://1.bp.blogspot.com/_hqatc_n_OTU/SuBsjEJiCLI/AAAAAAAAFag/uCSY3FLDsVQ/s320/image002.jpg" style="cursor: pointer; height: 161px; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Whichever method you choose, you should note that auto-props are only applied to files at the time they are added to the repository. Auto-props will never change the properties of files which are already versioned.  If you want to add the properties to files that are already committed to subversion, you may want to select the top level folder and add the subversion property.&lt;br /&gt;&lt;br /&gt;Table 1: Partial Text of the Subversion config file &lt;br /&gt;&lt;pre&gt;### Section for configuring miscelleneous Subversion options.&lt;br /&gt;[miscellany]&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;### Automatic properties are defined in the section 'auto-props'.&lt;br /&gt;&lt;span style="color: red;"&gt;enable-auto-props = yes&lt;/span&gt;&lt;br /&gt;### Set interactive-conflicts to 'no' to disable interactive&lt;br /&gt;### conflict resolution prompting.  It defaults to 'yes'.&lt;br /&gt;# interactive-conflicts = no&lt;br /&gt;&lt;br /&gt;### Section for configuring automatic properties.&lt;br /&gt;[auto-props]&lt;br /&gt;### The format of the entries is:&lt;br /&gt;###   file-name-pattern = propname[=value][;propname[=value]...]&lt;br /&gt;### The file-name-pattern can contain wildcards (such as '*' and&lt;br /&gt;### '?').  All entries which match (case-insensitively) will be&lt;br /&gt;### applied to the file.  Note that auto-props functionality&lt;br /&gt;### must be enabled, which is typically done by setting the&lt;br /&gt;### 'enable-auto-props' option.&lt;br /&gt;&lt;span style="color: red;"&gt;*.txt = svn:eol-style=native;svn:keywords=LastChangedBy Rev LastChangedDate&lt;br /&gt;*.java = svn:eol-style=native;svn:keywords=LastChangedBy Rev LastChangedDate&lt;br /&gt;*.jsp = svn:eol-style=native;svn:keywords=LastChangedBy Rev LastChangedDate&lt;br /&gt;*.htm* = svn:eol-style=native;svn:keywords=LastChangedBy Rev LastChangedDate&lt;br /&gt;*.properties* = svn:eol-style=native;svn:keywords=LastChangedBy Rev LastChangedDate&lt;br /&gt;*.xml = svn:eol-style=native;svn:keywords=LastChangedBy Rev LastChangedDate&lt;br /&gt;*.sql = svn:eol-style=native;svn:keywords=LastChangedBy Rev LastChangedDate&lt;br /&gt;&lt;/span&gt;# *.png = svn:mime-type=image/png&lt;br /&gt;# *.jpg = svn:mime-type=image/jpeg&lt;br /&gt;# Makefile = svn:eol-style=native&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-5980342770248660130?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/5980342770248660130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=5980342770248660130' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/5980342770248660130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/5980342770248660130'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2009/10/how-to-add-version-info-to-subversion.html' title='How to add version info to subversion files automatically'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_hqatc_n_OTU/SuBsJQsFFvI/AAAAAAAAFaY/rgz1P4ohy2Y/s72-c/image001.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-9046313942039296600</id><published>2009-10-19T16:40:00.005-04:00</published><updated>2009-10-19T20:42:04.060-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle - Generate a list of dates with time</title><content type='html'>I had to create a report that had to have a line for each date/time within the given range, even if the actual data did not have value for that date.  Say, web trafic count for each 5 minutes for a given day. The simple full join of the date will not work for this because, there might be periods during the day there was no user activity, and it is expected to have zeroes in that case. &lt;br /&gt;&lt;br /&gt;A simple approach would be to use the hirerical query used in &lt;a href="http://consultingblogs.emc.com/jamespipe/archive/2007/01/15/Oracle-SQL-_2D00_-Generate-a-list-of-dates.aspx"&gt;this blog&lt;/a&gt; if you only need one row per date.   But if you need date entries for multiple times per day, say a row for every 5 minutes,  the following function will come in handy. It uses a Pipelined Table Function.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;CREATE OR REPLACE TYPE date_array AS TABLE OF DATE;&lt;br /&gt;/&lt;br /&gt;CREATE OR REPLACE FUNCTION MPI2.date_table(sdate DATE, edate DATE, mi_interval integer   )&lt;br /&gt;&lt;br /&gt;RETURN date_array PIPELINED is&lt;br /&gt; fDate date ;&lt;br /&gt;BEGIN&lt;br /&gt;  fDate := sdate;&lt;br /&gt;  while fDate &lt; edate LOOP&lt;br /&gt;    PIPE ROW(fDate );&lt;br /&gt;    fDate := fDate +  mi_interval / 1440;  &lt;br /&gt;  END LOOP;&lt;br /&gt;  RETURN;&lt;br /&gt;END date_table;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now you may query this function just like you query a table, as follows&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;SELECT to_char(column_value,'DD-MON-YYYY HH24:MI')  FROM TABLE(CAST(MPI2.DATE_TABLE(trunc(sysdate-1),sysdate,5) AS date_array));&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The above query will return a row for every 5 minutes.  You can do a full join of this table with your actual tables to get the result you wanted.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-9046313942039296600?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/9046313942039296600/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=9046313942039296600' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/9046313942039296600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/9046313942039296600'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2009/10/oracle-generate-list-of-dates-with-time.html' title='Oracle - Generate a list of dates with time'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-1905750497412291687</id><published>2009-10-09T13:27:00.006-04:00</published><updated>2009-10-09T13:42:08.894-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows service'/><title type='text'>How to create your own Windows Service Monitor? - A scheduled task</title><content type='html'>There are times when a windows service just stops running without any error.  The following script provides a brute force script that will help monitor the service and restart it if the service is down.&lt;br /&gt;&lt;br /&gt;To create this service, copy the following code to a cmd file and setup a schedule task. (Replace YourServiceName with the actual name of your service)&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;@ECHO OFF&lt;br /&gt;set logFile=c:\temp\svcmonitor.log&lt;br /&gt;set tempFile=c:\temp\tmp.txt&lt;br /&gt;set serviceName=YourServiceName&lt;br /&gt;sc query %serviceName% &gt;  %tempFile%&lt;br /&gt;for /F "skip=3 tokens=1,4" %%i in (%tempFile%) do if %%i equ STATE  (&lt;br /&gt;if  %%j equ STOPPED (&lt;br /&gt;echo %date% %time%  %serviceName% service is stopped. Trying to restart. &gt;&gt; %logFile%&lt;br /&gt;sc start %serviceName% &gt;&gt;  %logFile%&lt;br /&gt;echo %date% %time%  %serviceName% restarted &gt;&gt; %logFile%&lt;br /&gt;) else (&lt;br /&gt;echo %date% %time%  %serviceName% service is %%j &gt;&gt; %logFile%&lt;br /&gt;)&lt;br /&gt;)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now update the scheduled task in to run every day.  Then go to the advanced scheduling options menu and set to repeat the task every 10 minutes(or what ever frequency deemed appropriate for your task) as shown below.  Now you have a poor man's version of a windows service monitor.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_hqatc_n_OTU/Ss90Yinh5oI/AAAAAAAAFBE/_9S07grYPX0/s1600-h/scheduler.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_hqatc_n_OTU/Ss90Yinh5oI/AAAAAAAAFBE/_9S07grYPX0/s320/scheduler.jpg" alt="" id="BLOGGER_PHOTO_ID_5390655243944060546" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-1905750497412291687?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/1905750497412291687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=1905750497412291687' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/1905750497412291687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/1905750497412291687'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2009/10/windows-service-monitor-scheduled-task.html' title='How to create your own Windows Service Monitor? - A scheduled task'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_hqatc_n_OTU/Ss90Yinh5oI/AAAAAAAAFBE/_9S07grYPX0/s72-c/scheduler.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-8780295298879484675</id><published>2009-10-08T10:36:00.008-04:00</published><updated>2009-10-08T11:22:40.692-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oc4j'/><category scheme='http://www.blogger.com/atom/ns#' term='logging'/><category scheme='http://www.blogger.com/atom/ns#' term='Axis'/><category scheme='http://www.blogger.com/atom/ns#' term='webservices'/><title type='text'>Debugging Webservice clients - Log HTTP transport content</title><content type='html'>Many times it is useful to see the actual content that is send and received through the wire in order to troubleshoot webservice clients.  Unfortunately, there does not seem to be a standard way to enable logging across all the webservice clients.  Depending on the client you use for accessing the webservice, the debugging method varies.    Here are a few tips that will help.&lt;br /&gt;&lt;br /&gt;If you are using Axis client to access a webservice and using log4j for logging, you can enable printing of the http request and response contents by setting the "httpclient.wire.content"  property to "debug".  For example if using the log4j.properties file set the following property:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;log4j.category.httpclient.wire.content=debug,stdout&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If the webservice is connecting to a secure url using https protocol,  setting the java system property "javax.net.debug" to "plaintext" will provide a hex dump of the content send and received. &lt;br /&gt;&lt;br /&gt;If you are using the web service proxy provided by oc4j within jdeveloper or the oc4j container,  you can enable the java logging property "oracle.webservices.client" in logging.properties file to FINE&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;oracle.webservices.client.level=FINE&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Setting this option will allow a standalone client to log the request and response content to the log file specified by the logging.properties file.&lt;br /&gt;&lt;br /&gt;If the client is running within the oc4j container, you can enable the oracle diagnostics logging for  "oracle.webservices.client".   This can be done by navigating to the &amp;lt;oc4j container&gt; -&gt; Administration --&gt; Logger Configuration page and setting the log level as "FINE" for "oracle.webservices.client" property. &lt;br /&gt;You can view the request and response contents in the log.xml file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-8780295298879484675?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/8780295298879484675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=8780295298879484675' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8780295298879484675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8780295298879484675'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2009/10/debugging-webservice-clients-log-http.html' title='Debugging Webservice clients - Log HTTP transport content'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-734099227636767063</id><published>2009-10-07T09:27:00.005-04:00</published><updated>2009-10-07T09:33:59.324-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oas'/><category scheme='http://www.blogger.com/atom/ns#' term='SOA suite'/><title type='text'>Failed to set the internal configuration of the OC4J JMS Server with: XMLJMSServerConfig</title><content type='html'>After setting up a few jms queues, if the oc4j did not shutdown properly, (ie) shutting down the machine without issuing "opmnctl stopall", the above error is very likely to occur.&lt;br /&gt;&lt;br /&gt;To fix this just rename the &amp;lt;ORACLE_HOME&gt;/j2ee/&amp;lt;soa_instance&gt;/persistence folder and create an empty folder in its place. &lt;br /&gt;&lt;br /&gt;Now if you start the server, it should startup fine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-734099227636767063?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/734099227636767063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=734099227636767063' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/734099227636767063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/734099227636767063'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2009/10/failed-to-set-internal-configuration-of.html' title='Failed to set the internal configuration of the OC4J JMS Server with: XMLJMSServerConfig'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-6265717540867986594</id><published>2009-09-17T11:49:00.007-04:00</published><updated>2009-09-18T11:28:41.185-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jms'/><category scheme='http://www.blogger.com/atom/ns#' term='j2ee'/><category scheme='http://www.blogger.com/atom/ns#' term='jdeveloper'/><category scheme='http://www.blogger.com/atom/ns#' term='ESB'/><category scheme='http://www.blogger.com/atom/ns#' term='webservices'/><category scheme='http://www.blogger.com/atom/ns#' term='soa'/><title type='text'>Asynchronous Web Service Calls over HTTP using Oracle ESB and JMS</title><content type='html'>&lt;h1&gt;How to create an asynchronous webservice that supports failover using Oracle ESB?&lt;/h1&gt;  &lt;p class="MsoNormal"&gt;This article describes a general design for invoking web services in an asynchronous fashion even if the web service provider only supports synchronous invocation. &lt;span style=""&gt; &lt;/span&gt;I have used JDeveloper to create this service however the same principles can be used for any development tool.&lt;/p&gt;  &lt;h2&gt;Use case:&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;Generally there are 3 different scenarios of using a web services. &lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span class="Heading3Char"&gt;&lt;span style="font-size:13pt;"&gt;Request/Response Real      Time: .&lt;/span&gt;&lt;/span&gt;Here the response from the web service is critical      for the application to proceed to the next step.&lt;span style=""&gt;  &lt;/span&gt;If the web service is not available,      user needs to know right away.&lt;span style=""&gt;       &lt;/span&gt;Example: An application depends on a web service to display a list of accounts they can manage. In this case invoking the web service in an asynchronous fashion is not going to help much. A simple synchronous web service call will do the work without adding any complexity.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span class="Heading3Char"&gt;&lt;span style="font-size:13pt;"&gt;Request only – (delivery      critical):&lt;/span&gt;&lt;/span&gt; Here, the client application needs to send a message to a web service, but it is not expecting any response from the service.&lt;span style=""&gt;  &lt;/span&gt;The client wants to make sure that the message will be delivered to the service even if the service was down at the time of invocation.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span class="Heading3Char"&gt;&lt;span style="font-size:13pt;"&gt;Request/Response time (not      critical, delivery critical):&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;  &lt;/span&gt;Here, the client application needs to      send a message and receive response from the web service.&lt;span style=""&gt;  &lt;/span&gt;The client wants to make sure that the message will be delivered to the service even if the service was down at the time of invocation.&lt;span style=""&gt;  &lt;/span&gt;The client is not waiting for the response from the service. Instead, the client has provided a callback mechanism to receive the response. &lt;/li&gt;&lt;/ol&gt;  &lt;p class="MsoNormal"&gt;The design described here suites for the third scenario and the second scenario.&lt;span style=""&gt;  &lt;/span&gt;For the second scenario, only part of the design is needed.&lt;/p&gt;  &lt;h2&gt;The approach:&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;The idea here is to use JMS queues to receive the request and response messages to and from the web service.&lt;span style=""&gt;  &lt;/span&gt;Clients will access the web service through a JMS-WebService adaptor.&lt;span style=""&gt;  &lt;/span&gt;JMS listeners will invoke the web service and the callback service when messages are received in the request or response queues. &lt;span style=""&gt; &lt;/span&gt;&lt;span style=""&gt;  &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The following diagram describes the approach. &lt;/p&gt;  &lt;!--[if gte vml 1]&gt;&lt;v:shapetype id="_x0000_t75" coordsize="21600,21600" spt="75" preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;  &lt;v:stroke joinstyle="miter"&gt;  &lt;v:formulas&gt;   &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;   &lt;v:f eqn="sum @0 1 0"&gt;   &lt;v:f eqn="sum 0 0 @1"&gt;   &lt;v:f eqn="prod @2 1 2"&gt;   &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;   &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @0 0 1"&gt;   &lt;v:f eqn="prod @6 1 2"&gt;   &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;   &lt;v:f eqn="sum @8 21600 0"&gt;   &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @10 21600 0"&gt;  &lt;/v:formulas&gt;  &lt;v:path extrusionok="f" gradientshapeok="t" connecttype="rect"&gt;  &lt;o:lock ext="edit" aspectratio="t"&gt; &lt;/v:shapetype&gt;&lt;v:shape id="_x0000_i1025" type="#_x0000_t75" style="'width:6in;"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\MeslieJ\LOCALS~1\Temp\msohtml1\01\clip_image001.png" title=""&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hqatc_n_OTU/SrJcljV3NTI/AAAAAAAADyI/3SrhRrkLaAQ/s1600-h/internalwebserviceesbdiagram1.gif"&gt;&lt;img style="cursor: pointer; width: 320px; height: 242px;" src="http://2.bp.blogspot.com/_hqatc_n_OTU/SrJcljV3NTI/AAAAAAAADyI/3SrhRrkLaAQ/s320/internalwebserviceesbdiagram1.gif" alt="" id="BLOGGER_PHOTO_ID_5382466304873018674" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CMeslieJ%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;link rel="Edit-Time-Data" href="file:///C:%5CDOCUME%7E1%5CMeslieJ%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_editdata.mso"&gt;&lt;!--[if !mso]&gt; &lt;style&gt; v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} &lt;/style&gt; &lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Wingdings; 	panose-1:5 0 0 0 0 0 0 0 0 0; 	mso-font-charset:2; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:0 268435456 0 0 -2147483648 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} h1 	{mso-style-next:Normal; 	margin-top:12.0pt; 	margin-right:0in; 	margin-bottom:3.0pt; 	margin-left:0in; 	mso-pagination:widow-orphan; 	page-break-after:avoid; 	mso-outline-level:1; 	font-size:16.0pt; 	font-family:Arial; 	mso-font-kerning:16.0pt;} h2 	{mso-style-link:"Heading 2 Char"; 	mso-style-next:Normal; 	margin-top:12.0pt; 	margin-right:0in; 	margin-bottom:3.0pt; 	margin-left:0in; 	mso-pagination:widow-orphan; 	page-break-after:avoid; 	mso-outline-level:2; 	font-size:14.0pt; 	font-family:Arial; 	font-style:italic;} h3 	{mso-style-link:"Heading 3 Char"; 	mso-style-next:Normal; 	margin-top:12.0pt; 	margin-right:0in; 	margin-bottom:3.0pt; 	margin-left:0in; 	mso-pagination:widow-orphan; 	page-break-after:avoid; 	mso-outline-level:3; 	font-size:13.0pt; 	font-family:Arial;} span.Heading3Char 	{mso-style-name:"Heading 3 Char"; 	mso-style-locked:yes; 	mso-style-link:"Heading 3"; 	mso-ansi-font-size:13.0pt; 	mso-bidi-font-size:13.0pt; 	font-family:Arial; 	mso-ascii-font-family:Arial; 	mso-hansi-font-family:Arial; 	mso-bidi-font-family:Arial; 	mso-ansi-language:EN-US; 	mso-fareast-language:EN-US; 	mso-bidi-language:AR-SA; 	font-weight:bold;} span.Heading2Char 	{mso-style-name:"Heading 2 Char"; 	mso-style-locked:yes; 	mso-style-link:"Heading 2"; 	mso-ansi-font-size:14.0pt; 	mso-bidi-font-size:14.0pt; 	font-family:Arial; 	mso-ascii-font-family:Arial; 	mso-hansi-font-family:Arial; 	mso-bidi-font-family:Arial; 	mso-ansi-language:EN-US; 	mso-fareast-language:EN-US; 	mso-bidi-language:AR-SA; 	font-weight:bold; 	font-style:italic;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;}  /* List Definitions */  @list l0 	{mso-list-id:599030486; 	mso-list-type:hybrid; 	mso-list-template-ids:1668679600 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l0:level1 	{mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in;} @list l1 	{mso-list-id:1709140561; 	mso-list-type:hybrid; 	mso-list-template-ids:-285332032 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l1:level1 	{mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in;} @list l2 	{mso-list-id:1734961406; 	mso-list-type:hybrid; 	mso-list-template-ids:860105592 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l2:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Symbol;} ol 	{margin-bottom:0in;} ul 	{margin-bottom:0in;} --&gt; &lt;/style&gt;&lt;br /&gt;&lt;!--[endif]--&gt;  &lt;p class="MsoNormal"&gt;The web service is created and deployed in a remote server.&lt;span style=""&gt;  &lt;/span&gt;In many cases this might be an external web service provided by a third party hosted outside your firewall. The client provides its callback mechanism as a web service and it is deployed locally. JMS queues are created in the local server for receiving the request and response messages.&lt;span style=""&gt;  &lt;/span&gt;A JMS adaptor is created that exposes the request queue as a web service. Using JMS adaptor provides the following benefits:&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;The      client can communicate with the service using SOAP/HTTP(S) which is well      supported by most tools than the SOAP/JMS.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;It      hides the dirty details of the JMS details from the web service client      developer.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style=""&gt; &lt;/span&gt;The web service client developer is using      the same protocol to access the service if he has to call the service      directly. (except for the return value)&lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal"&gt;A JMS listener is created to monitor the request queue and invoke the actual web service using a SOAP adaptor.&lt;span style=""&gt;  &lt;/span&gt;The response from the web service will be written to the response queue.&lt;span style=""&gt;  &lt;/span&gt;The listener and the adaptor can be configured to retry the service invocation if the service is down.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Another JMS listener is created to monitor the response queue and invoke the callback web service using a SOAP adaptor.&lt;span style=""&gt;  &lt;/span&gt;The listener and the adaptor can be configured to retry the service invocation if the callback service is down when the actual web service responded.&lt;/p&gt;  &lt;h2&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/h2&gt;  &lt;h2&gt;Benefits:&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;This approach allows you to develop an asynchronous callback mechanism to your web service, even if the original service did not provide one.&lt;span style=""&gt;  &lt;/span&gt;Most web services that are request/response provides only synchronous calling mechanism only.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;It provides a way to decouple the dependency on the external web service without adding any custom client code.&lt;span style=""&gt;  &lt;/span&gt;These days most application server vendors provide JMS and SOAP adaptor widgets that let you create these without having to write them yourself.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;If you are using a web service that does not return and response back (one way request only), this approach can still work just be not creating the response queue and the related components (step 5 and beyond in the above diagram).&lt;/p&gt;  &lt;h2&gt;Limitation:&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;This approach assumes that you have enterprise grade tools such as JMS/SOAP Adaptors in your production environment. &lt;span style=""&gt;  &lt;/span&gt;If such tools are not available, you may have to create these adaptors yourself. &lt;span style=""&gt; &lt;/span&gt;If you are developing them yourself, the time spent creating these generic services might be higher than adding failover logic to the application itself.&lt;/p&gt;  &lt;h2&gt;Creating the service &lt;/h2&gt;  &lt;p class="MsoNormal"&gt;The instructions assume you are using Oracle application server 10.1.3.x and jDeveloper 10.&lt;span style=""&gt;  &lt;/span&gt;The exact steps will be different for other application server and IDEs. &lt;span style=""&gt; &lt;/span&gt;Please note that these instructions assume that you are familiar with the above tools and does not provide step by step details of each widget. &lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Create      and deploy the ‘actual WebService. If the service is provided to you by a      third party you can skip this step.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Create      and deploy the web service response receiver web service to your local      server. &lt;span style=""&gt; &lt;/span&gt;If you are creating only a      one way web service call you can skip this step. &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Create      JMS queues for request and response queues.&lt;span style=""&gt;  &lt;/span&gt;This can be done through the Enterprise      Manager application by navigating to &lt;your oc4j="" instance=""&gt; &lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;à&lt;/span&gt;&lt;/span&gt;      Administration &lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;à&lt;/span&gt;&lt;/span&gt; Enterprise Messaging      Service &lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;à&lt;/span&gt;&lt;/span&gt;      Create/delete/edit JMS destinations. &lt;span style=""&gt; &lt;/span&gt;Since we are going through this exercise      to create a failover mechanism, I would suggest create these queues with      File/Database persistence.&lt;/your&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Create      separate JMS Connection factories for each of these queues so we don’t get      in to any resource contentions.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Create      a new jDeveloper ESB project &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Copy      the WSDL for step 1 and 2 in to the project so we can reuse the schema      elements.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Create      JMS adaptor for writing to the request queue (produce message). Check the      box that says “Invocable from external service”.&lt;/li&gt;&lt;/ol&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;If you selected Oracle Enterprise Messaging Service in the adaptor configuration widget, select Produce Message as the operation type and specify a meaningful name (similar to the original service’s method name) for the operation.&lt;span style=""&gt;  &lt;/span&gt;The WSDL exposed by this adaptor will be later used by the web service client. Select the request queue and the appropriate connection factory. Specify a large time out so if the external service is down, the message will not expire before the ESB exhausts all retry attempts. On the schema selection screen, select the message element that corresponds to the input message to the external web service from the WSDL.&lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="8" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Create      an ESB Soap service (Create ESB Service &lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;à&lt;/span&gt;&lt;/span&gt;      SOAP Service) and specify the WSDL for the actual web service.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Create      JMS adaptor for reading from the request queue (consume message). If you      selected Oracle Enterprise Messaging Service in the adaptor configuration      widget, select Consume Message as the operation type.&lt;span style=""&gt;  &lt;/span&gt;Select the request queue and the      appropriate connection factory.&lt;span style=""&gt;  &lt;/span&gt;On      the schema selection screen, select the message element that corresponds      to the input message to the external web service from the WSDL (schema and      queue names same as previous step).&lt;span style=""&gt;       &lt;/span&gt;JDeveloper should have created the adaptor service icon and the      routing service.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Edit      the routing service by double clicking and add a routing rule. For the      consume message operation.&lt;span style=""&gt;  &lt;/span&gt;Wire it      to point to the appropriate operation of the SOAP adaptor from step 8.&lt;span style=""&gt;  &lt;/span&gt;Create a transformation map to map the      elements from the request to response. Also, you may want to make this      execution asynchronous. &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Create      JMS adaptor for writing to the response queue (produce message).&lt;/li&gt;&lt;/ol&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;If you selected Oracle Enterprise Messaging Service in the adaptor configuration widget, select Produce Message as the operation type. Select the response queue and the appropriate connection factory. Specify a large time out so if the callback service is down, the message will not expire before the ESB exhausts all retry attempts. On the schema selection screen, select the message element that corresponds to the input message to the callback web service from the WSDL (or the output message from the external web service).&lt;/p&gt;  &lt;ol style="margin-top: 0in;" start="12" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;Create      an ESB Soap service (Create ESB Service &lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;à&lt;/span&gt;&lt;/span&gt;      SOAP Service) and specify the WSDL for the callback web service.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Create      JMS adaptor for reading from the response queue (consume message). If you      selected Oracle Enterprise Messaging Service in the adaptor configuration      widget, select Consume Message as the operation type.&lt;span style=""&gt;  &lt;/span&gt;Select the response queue and the      appropriate connection factory.&lt;span style=""&gt;  &lt;/span&gt;On      the schema selection screen, select the message element that corresponds      to the input message to the callback web service from the WSDL.&lt;span style=""&gt;  &lt;/span&gt;JDeveloper should have created the      adaptor service icon and the routing service.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Edit      the routing service by double clicking and add a routing rule. For the      consume message operation. &lt;span style=""&gt; &lt;/span&gt;Wire it      to point to the appropriate operation of the SOAP adaptor from step 12.&lt;span style=""&gt;  &lt;/span&gt;Create a transformation map to map the      elements from the request to response. Also, you may want to make this      execution asynchronous.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Edit      the routing service created in step 10, by double clicking and expand the      routing rule for the consume message operation.&lt;span style=""&gt;  &lt;/span&gt;Wire the response message from the      service to point to the produce message operation of the JMS adaptor for      the response queue. Create a transformation map to map the elements from      the request to response. Also, you may want to make this execution      asynchronous. The following diagram represents the ESB diagram for a      project with these settings.&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_hqatc_n_OTU/SrJcy-BiG1I/AAAAAAAADyQ/oOrUndYPQoo/s1600-h/internalwebserviceesbdiagram.gif"&gt;&lt;img style="cursor: pointer; width: 320px; height: 240px;" src="http://2.bp.blogspot.com/_hqatc_n_OTU/SrJcy-BiG1I/AAAAAAAADyQ/oOrUndYPQoo/s320/internalwebserviceesbdiagram.gif" alt="" id="BLOGGER_PHOTO_ID_5382466535373806418" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Deploy/Register      the ESB project to the OC4J container. &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Create      a web service proxy for the WSDL exposed in step 7. Invoke the service      using the generated proxy.&lt;span style=""&gt;  &lt;/span&gt;If      everything went well you should notice the response came back through your      callback service. &lt;/li&gt;&lt;/ol&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-6265717540867986594?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/6265717540867986594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=6265717540867986594' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/6265717540867986594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/6265717540867986594'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2009/09/creating-asynchronous-webservice-that.html' title='Asynchronous Web Service Calls over HTTP using Oracle ESB and JMS'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_hqatc_n_OTU/SrJcljV3NTI/AAAAAAAADyI/3SrhRrkLaAQ/s72-c/internalwebserviceesbdiagram1.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-5534115261434192642</id><published>2009-04-21T14:33:00.003-04:00</published><updated>2009-04-22T09:19:38.697-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oas'/><category scheme='http://www.blogger.com/atom/ns#' term='WSM'/><category scheme='http://www.blogger.com/atom/ns#' term='soa'/><title type='text'>How to Change Oracle ORAWSM Database Password</title><content type='html'>If you are reading this you already know that the WSM uses the ORAWSM user in the infra database.  If you need to change the Oracle database password for the ORAWSM user, you would guess that you will may have to change the password in some configuration files for the webservices manager to use the new password.   However that process is not that simple.   Here are the steps you need to follow. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Step 1: Change the password directly in the database.&lt;br /&gt;&lt;br /&gt;Login as sysdba and change the password of orawsm.&lt;br /&gt;&lt;br /&gt;Step 2: Change the password in WSM configuration files&lt;br /&gt;Reffer to steps described in the following url.  (Content copied here for your reference.)&lt;br /&gt;http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b31007.pdf (appendix C - Changing Passwords) &lt;br /&gt;&lt;br /&gt;The following procedure describes how to change a database password for a single instance of an Oracle WSM Database.&lt;br /&gt;To change a password for a single database instance&lt;br /&gt;1. Edit the attribute db.password in the ORACLE_HOME/owsm/bin/coresv.properties file.&lt;br /&gt;2. From the command prompt, execute the following command:&lt;br /&gt;wsmadmin encodePasswords coresv.properties dataload.messagelog.db.password&lt;br /&gt;3. From the command prompt, execute the wsmadmin copyDBConfig command:&lt;br /&gt;wsmadmin copyDBConfig&lt;br /&gt;4. From the command prompt, execute the wsmadmin deploy command: &lt;br /&gt;wsmadmin deploy application_server_password component&lt;br /&gt;See Appendix B, "Oracle Web Services Manager WSMADMIN Commands" for more information.&lt;br /&gt;&lt;br /&gt;The following procedure describes how to change your database password when you have multiple instances of Oracle WSM Database.&lt;br /&gt;&lt;br /&gt;To update and reconcile a password for multiple database instances&lt;br /&gt;1. Update the relevant attribute in the application properties file for each application.&lt;br /&gt;These are located under ORACLE_HOME/owsm/config/application_name.&lt;br /&gt;2. Update and reconcile the passwords for all the database instances.&lt;br /&gt;3. From the command prompt, execute the wsmadmin encodePassword command&lt;br /&gt;for each affected file:&lt;br /&gt;wsmadmin encodePasswords path_to_file properties&lt;br /&gt;4. From the command prompt, execute the wsmadmin deploy command:&lt;br /&gt;wsmadmin deploy application_server_password component&lt;br /&gt;See Appendix B, "Oracle Web Services Manager WSMADMIN Commands" for more&lt;br /&gt;information.&lt;br /&gt;&lt;br /&gt;Step 3: Change the password in the policy configuration for each gateway defined.  &lt;br /&gt;&lt;br /&gt;For each gateway and agent in your system, there is a property - cfluent.messagelog.db.password - which has to be manually changed to the correct password value for your OWSM schema, as it is left unaffected by the redeployment of the OWSM applications. &lt;br /&gt;This is handled through the OWSM console by accessing the properties screen for each gateway and agent (Policy Management &gt; Manage Policies &gt; Edit Component Properties).&lt;br /&gt;The password that you enter should be the actual password with no encryption.  The value will be encrypted before it is stored in to the orawsm.policy_manager_objects  table.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-5534115261434192642?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/5534115261434192642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=5534115261434192642' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/5534115261434192642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/5534115261434192642'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2009/04/how-to-change-oracle-orawsm-database.html' title='How to Change Oracle ORAWSM Database Password'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-9031195853358524411</id><published>2009-04-20T22:10:00.004-04:00</published><updated>2009-04-21T09:38:27.635-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WSM. SOA'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle Webservice Manager (OWSM) admin password change utility</title><content type='html'>Recently we had to change the admin password for the OWSM admin user due to security policy.  I was surprised that oracle does not provide any tool/procedure to change the password of the OWSM admin users.  The procedure they described in Metalink basically calls for creating a temporary user, then copying the encrypted password of that user to the admin user by executing a sql statement and deleting the temporary user. &lt;br /&gt;&lt;br /&gt;So,  I took a little bit more digging in to the scripts and came up with a java program update the password of the admin user without having to go through all the round about ways. &lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://www.technogemsinc.com/clientFile/wsm/wsmupdt.zip"&gt;download&lt;/a&gt; the script from &lt;a href="http://www.technogemsinc.com/clientFile/wsm/wsmupdt.zip"&gt;here&lt;/a&gt; and expand the zip file.   The readme.txt file has the instructions how to execute the command.   It basically involved, updating a property file with the userid/password information and executing a java command line. &lt;br /&gt;&lt;br /&gt;If you are curious about the java program and like a copy of the source code, I will be happy to share.  Just drop me a line at jmeslie at gmail dot com.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-9031195853358524411?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/9031195853358524411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=9031195853358524411' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/9031195853358524411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/9031195853358524411'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2009/04/oracle-webservice-manager-owsm-admin.html' title='Oracle Webservice Manager (OWSM) admin password change utility'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-4185067273043019926</id><published>2009-02-13T13:22:00.010-05:00</published><updated>2009-04-20T21:59:42.414-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='aggregate function'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle function to  aggregate a number by date</title><content type='html'>One of the common scenarios while working with relational database tables is to aggregate a column on a table and find out the corresponding value of a different column.   For example, if you have a table that has the name, location and checkin time of all employees in a table and and you want to find out the location from which each employee ckecked in last, the sql will involve creating a inner query.   For most cases, an inner query is fine.  However, if the table has a huge number of rows querying the table twice might be expensive.   That is when a custom aggregate function might be helpful.  &lt;br /&gt;Here is the sql that represents the table:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;CREATE TABLE EMP_TIME_LOG&lt;br /&gt;(&lt;br /&gt;  REPORT_ID    NUMBER(5),&lt;br /&gt;  LOCATION_ID  NUMBER(2),&lt;br /&gt;  LOGIN_DTG    DATE                             DEFAULT sysdate,&lt;br /&gt;  EMP_NAME     VARCHAR2(50 BYTE)&lt;br /&gt;)&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;SET DEFINE OFF;&lt;br /&gt;Insert into EMP_TIME_LOG&lt;br /&gt;   (REPORT_ID, LOCATION_ID, LOGIN_DTG, EMP_NAME)&lt;br /&gt; Values&lt;br /&gt;   (1, 1, TO_DATE('02/13/2008 13:35:59', 'MM/DD/YYYY HH24:MI:SS'), 'emp1');&lt;br /&gt;Insert into EMP_TIME_LOG&lt;br /&gt;   (REPORT_ID, LOCATION_ID, LOGIN_DTG, EMP_NAME)&lt;br /&gt; Values&lt;br /&gt;   (2, 1, TO_DATE('02/13/2008 13:36:23', 'MM/DD/YYYY HH24:MI:SS'), 'emp2');&lt;br /&gt;Insert into EMP_TIME_LOG&lt;br /&gt;   (REPORT_ID, LOCATION_ID, LOGIN_DTG, EMP_NAME)&lt;br /&gt; Values&lt;br /&gt;   (3, 2, TO_DATE('02/13/2008 13:36:50', 'MM/DD/YYYY HH24:MI:SS'), 'emp1');&lt;br /&gt;Insert into EMP_TIME_LOG&lt;br /&gt;   (REPORT_ID, LOCATION_ID, LOGIN_DTG, EMP_NAME)&lt;br /&gt; Values&lt;br /&gt;   (4, 2, TO_DATE('02/13/2008 13:37:32', 'MM/DD/YYYY HH24:MI:SS'), 'emp3');&lt;br /&gt;Insert into EMP_TIME_LOG&lt;br /&gt;   (REPORT_ID, LOCATION_ID, LOGIN_DTG, EMP_NAME)&lt;br /&gt; Values&lt;br /&gt;   (5, 4, TO_DATE('02/13/2008 13:45:48', 'MM/DD/YYYY HH24:MI:SS'), 'emp3');&lt;br /&gt;COMMIT;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;In this example we need to get group the rows by employee name but we want to get the latest checkin time and the location_id of the row corresponding to the latest checkin time.   Without using any custom function here is how one might achieve this. &lt;br /&gt;&lt;blockquote&gt;select t1.emp_name , t1.location_id  from emp_time_log T1 ,&lt;br /&gt;(select location_id, emp_name, max(login_dtg) max_login_dt  from emp_time_log group by emp_name,location_id ) T2&lt;br /&gt;where t1.emp_name = t2.emp_name and t2.max_login_dt = t1.LOGIN_DTG &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Oracle supports a feature called &lt;a href="http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14289/dciaggfns.htm"&gt; User-Defined Aggregate Functions&lt;/a&gt; that makes this very easy to implement. If we had a custom aggregate function that can take both the location id and the login_dtg and returned the location_id of the row corresponding to the max(login_dtg) of each group,  we could eliminate the inner query.  However, for aggregate functions there is limit on the number of arguments that can be passed in.   Fortunately, we could create a custom data type that can hold both the values and use that custom type as a parameter to the aggregate function.   With a custom function, the query to achieve the same result would look like the following.&lt;br /&gt;&lt;blockquote&gt;select emp_name , MAX_DATES_NUMBER (NUMBER_DATE (location_id, login_dtg)) as location_id from  emp_time_log group by emp_name &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Here NUMBER_DATE is the custom data type that I created to hold both the number and a date, and MAX_DATES_NUMBER is the custom aggregate function. &lt;br /&gt;The function definition is as follows:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;CREATE OR REPLACE FUNCTION MAX_DATES_NUMBER&lt;br /&gt;  ( idDtVal Number_Date&lt;br /&gt;  ) RETURN NUMBER&lt;br /&gt;    PARALLEL_ENABLE&lt;br /&gt;    AGGREGATE USING Number_Date;&lt;br /&gt;/&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;The code for creating the custom data type and the the logic for implementing the aggregation function is given below.  Jonathan Gennick has written a nice article  "&lt;a href="http://www.oracle.com/technology/oramag/oracle/06-jul/o46sql.html"&gt;Build Custom Aggregate Functions&lt;/a&gt;" that explains who the custom aggregation function works.   I encourage you to read that &lt;a href="http://www.oracle.com/technology/oramag/oracle/06-jul/o46sql.html"&gt;article&lt;/a&gt;. &lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;CREATE OR REPLACE TYPE Number_Date &lt;br /&gt;AS OBJECT (&lt;br /&gt;&lt;br /&gt;maxId NUMBER,&lt;br /&gt;maxDt DATE,&lt;br /&gt;&lt;br /&gt;STATIC FUNCTION ODCIAggregateInitialize&lt;br /&gt;  ( actx IN OUT Number_Date&lt;br /&gt;  ) RETURN NUMBER,&lt;br /&gt;&lt;br /&gt;MEMBER FUNCTION ODCIAggregateIterate&lt;br /&gt;  ( self  IN OUT Number_Date,&lt;br /&gt;    idDtVal IN Number_Date&lt;br /&gt;  ) RETURN NUMBER,&lt;br /&gt;&lt;br /&gt;MEMBER FUNCTION ODCIAggregateTerminate&lt;br /&gt;  ( self             IN   Number_Date,&lt;br /&gt;    returnValue  OUT NUMBER,&lt;br /&gt;    flags           IN   NUMBER&lt;br /&gt;  ) RETURN NUMBER,&lt;br /&gt;&lt;br /&gt;MEMBER FUNCTION ODCIAggregateMerge&lt;br /&gt;  (self  IN OUT Number_Date,&lt;br /&gt;   ctx2 IN      Number_Date&lt;br /&gt;  ) RETURN NUMBER&lt;br /&gt;&lt;br /&gt;);&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;CREATE OR REPLACE TYPE BODY Number_Date AS&lt;br /&gt;&lt;br /&gt;STATIC FUNCTION ODCIAggregateInitialize&lt;br /&gt;  ( actx IN OUT Number_Date&lt;br /&gt;  ) RETURN NUMBER IS &lt;br /&gt;  BEGIN&lt;br /&gt;    IF actx IS NULL THEN&lt;br /&gt;      actx := Number_Date (0,'01-JAN-1900');&lt;br /&gt;    ELSE&lt;br /&gt;      actx.maxDt := '01-JAN-1900';&lt;br /&gt;      actx.maxId := 0;&lt;br /&gt;    END IF;&lt;br /&gt;    RETURN ODCIConst.Success;&lt;br /&gt;  END;&lt;br /&gt;&lt;br /&gt;MEMBER FUNCTION ODCIAggregateIterate&lt;br /&gt;  ( self  IN OUT Number_Date,&lt;br /&gt;    idDtVal IN Number_Date&lt;br /&gt;  ) RETURN NUMBER IS&lt;br /&gt;  BEGIN&lt;br /&gt;    IF idDtVal.maxDt &gt; self.maxDt  THEN &lt;br /&gt;       self.maxId := idDtVal.maxId;&lt;br /&gt;       self.maxDt := idDtVal.maxDt;&lt;br /&gt;    END IF;&lt;br /&gt;    RETURN ODCIConst.Success;&lt;br /&gt;  END;&lt;br /&gt;&lt;br /&gt;MEMBER FUNCTION ODCIAggregateTerminate&lt;br /&gt;  ( self        IN  Number_Date,&lt;br /&gt;    ReturnValue OUT NUMBER,&lt;br /&gt;    flags       IN  NUMBER&lt;br /&gt;  ) RETURN NUMBER IS&lt;br /&gt;  BEGIN&lt;br /&gt;    returnValue := self.maxId;&lt;br /&gt;    RETURN ODCIConst.Success;&lt;br /&gt;  END;&lt;br /&gt;&lt;br /&gt;MEMBER FUNCTION ODCIAggregateMerge&lt;br /&gt;  (self IN OUT Number_Date,&lt;br /&gt;   ctx2 IN     Number_Date&lt;br /&gt;  ) RETURN NUMBER IS&lt;br /&gt;  BEGIN&lt;br /&gt;    IF ctx2.maxDt &gt; self.maxDt  THEN &lt;br /&gt;       self.maxId := ctx2.maxId;&lt;br /&gt;       self.maxDt := ctx2.maxDt;&lt;br /&gt;    END IF;&lt;br /&gt;&lt;br /&gt;    RETURN ODCIConst.Success;&lt;br /&gt;  END;&lt;br /&gt;&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-4185067273043019926?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/4185067273043019926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=4185067273043019926' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/4185067273043019926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/4185067273043019926'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2009/02/oracle-function-to-aggregate-number-by.html' title='Oracle function to  aggregate a number by date'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-2481725843867610702</id><published>2009-01-01T16:44:00.005-05:00</published><updated>2009-01-01T20:21:37.133-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oc4j'/><category scheme='http://www.blogger.com/atom/ns#' term='ESB'/><title type='text'>Oracle ESB deploy script</title><content type='html'>If you need to deploy your ESB projects to multiple environments without jDeveloper, there is not a elegant solution.  The ANT deployment tasks that comes part of the 10.3.1.3 packages helps a good deal.  You can refer to the documentation on that at &lt;br /&gt;http://www.oracle.com/technology/products/integration/esb/files/esbdeploymentautomation.zip or it is included in your ORACLE_HOME/integration/deployment/documentation.zip file. &lt;br /&gt;&lt;br /&gt;Using the deployment script described there, you can extract the deployment plan from the esb project files.   Once you have extracted the deployment plan file, all your settings will be in one single file which you can edit/make multiple copies with different settings for different environments.    Even though this approach is far better than having to maintain several versions of several esb file, it still falls short of my expectation.  &lt;br /&gt;&lt;br /&gt;For most of the ESB projects dealing with various adapters and such, the deployment plan file has too much information it it so every time the ESB project changes (adding/removing adaptors or adaptor settings), you will have to regenerate the deployment plan file and make the copies for your different information.   However, in most cases the only information that changes per environment are the endpoint properties that specify file directories, server specific properties etc.  From a development and deployment perspective, it would be much nicer, if oracle had provided a way to specify the endpoint properties in a single location on the server, so every time a new version of ESB project is deployed, the endpoint properties are not impacted.  In the absence of such feature, the closest that I could do minimize the impact of maintaining the endpoint properties is to generate the deployment plan file using the ant task and edit it using another custom task that takes the endpoint properties from a properties file that just has the properties you want to be different for each environment. &lt;br /&gt;&lt;br /&gt;The source code and the sample ant task for this can be found &lt;a href="http://www.technogemsinc.com/clientFile/esb_deploy.html"&gt;here.&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Using this approach, you create a property file that contains the endpoint property as the key and the value you want as a simple java style property file.   You will need to create one such file per environment.  The java program takes the template file, the properties file and the new deployment file name as arguments and creates the deployment file that can be used by the ant task that comes with oracle.    Using this procedure, a typical build will have the following steps. &lt;br /&gt;1) Extract deployment plan file using the oracle provided task. &lt;br /&gt;2) Invole the ESBDeploymentPlanEditor class to create a server/environment specific deployment plan using the custom task&lt;br /&gt;3) Deploy the ESB project using the deployment plan created on the above step using the oracle provided task.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-2481725843867610702?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/2481725843867610702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=2481725843867610702' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/2481725843867610702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/2481725843867610702'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2009/01/oracle-esb-deploy-script.html' title='Oracle ESB deploy script'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-8572071696900087001</id><published>2008-12-15T21:39:00.003-05:00</published><updated>2008-12-15T21:55:02.113-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oas'/><category scheme='http://www.blogger.com/atom/ns#' term='classloading'/><category scheme='http://www.blogger.com/atom/ns#' term='oc4j'/><category scheme='http://www.blogger.com/atom/ns#' term='mbean'/><title type='text'>oc4j classloading diagnostics using MBean</title><content type='html'>Class Loading can be tricky in a J2EE environment.  The &lt;a href="http://download.oracle.com/docs/cd/B25221_04/web.1013/b14433/classload.htm"&gt;Oracle Application server documentation&lt;/a&gt;  provides good explanation on how the classloading works.   However, at times, it is easier to just test if the classloader can find a class without having to go through the hops to execute the class.  Fortunately, oc4j offers a MBean that can be used for that purpose.  Here is the detail step to test if a class can be found by the classloader. &lt;br /&gt;&lt;br /&gt;1. Log in enterprise manager console.&lt;br /&gt;2. Click on your OC4J container name on the main topology web site.&lt;br /&gt;3. Click on the link "Administration".&lt;br /&gt;4. Click on the "Go To Task" icon as follows.&lt;br /&gt;&lt;br /&gt;JMX -&gt; System MBean Browser&lt;br /&gt;&lt;br /&gt;5. Expand the ClassLoading node in the navigation pane, then select the singleton MBean instance.&lt;br /&gt;6. Click the Operations tab in the right-hand pane, then click the executeQuery operation.&lt;br /&gt;&lt;br /&gt;Three versions of the executeQuery operation are exposed. Click the version that takes one parameter.&lt;br /&gt;&lt;br /&gt;7. Enter in a value as follows under the "Parameters" heading -&gt; LoaderTree&lt;br /&gt;8. Click the Invoke button to call the operation.&lt;br /&gt;&lt;br /&gt;This will display the class loading hirearchy. &lt;br /&gt;&lt;br /&gt;To test if a given class can be found by the classloader,  repeat steps 7 &amp; 8 with the following command in the parameters tree &lt;br /&gt;&lt;br /&gt;FindResource(packagename.classname)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There are other queries/commands that you can run on the MBean.  For a complete list reffer to the oracle &lt;a href="http://download.oracle.com/docs/cd/B32110_01/web.1013/b28952/classload.htm#CHDBCBDJ"&gt;documentation here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-8572071696900087001?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/8572071696900087001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=8572071696900087001' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8572071696900087001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8572071696900087001'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2008/12/oc4j-classloading-diadnostics-using.html' title='oc4j classloading diagnostics using MBean'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-8701062365709652717</id><published>2008-12-12T14:30:00.002-05:00</published><updated>2008-12-12T14:36:30.072-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oc4j'/><category scheme='http://www.blogger.com/atom/ns#' term='ESB'/><category scheme='http://www.blogger.com/atom/ns#' term='fileadaptor'/><title type='text'>ESB ftp adaptor missing class oracle.tip.adapter.file.outbound.FileIoInteractionSpec</title><content type='html'>If you happen to get an error in the ftp adaptor that it is unable to find the class oracle.tip.adapter.file.outbound.FileIoInteractionSpec, the most likely reason is that there is a class loading issue.   To validate the issue, you can use the MBean for class loading and run the following command.&lt;br /&gt;&lt;br /&gt;FindResource(oracle.tip.adapter.file.outbound.FileIoInteractionSpec)&lt;br /&gt;&lt;br /&gt;If the above command indicate that the class is not found, you may run the following command to verify it it is atleast in your system.&lt;br /&gt;&lt;br /&gt;Depends(oracle.tip.adapter.file.outbound.FileIoInteractionSpec)&lt;br /&gt;&lt;br /&gt;If this command shows that the class in in the FTPAdaptor jar file,  you may simply delete the &lt;OAS_HOME&gt;/j2ee/&lt;INSTANCE_NAME&gt;/connectors/FileAdapter/FileAdapter directory and restart the container.   This will reimport the files in the fileadaptor directory with the right files.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-8701062365709652717?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/8701062365709652717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=8701062365709652717' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8701062365709652717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8701062365709652717'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2008/12/esb-ftp-adaptor-missing-class.html' title='ESB ftp adaptor missing class oracle.tip.adapter.file.outbound.FileIoInteractionSpec'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-8816804427277499899</id><published>2008-12-04T13:14:00.006-05:00</published><updated>2008-12-04T13:56:13.411-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oc4j'/><category scheme='http://www.blogger.com/atom/ns#' term='SOA suite'/><category scheme='http://www.blogger.com/atom/ns#' term='ESB'/><title type='text'>ESB rejected Message Handlers doesnot work</title><content type='html'>If you ever wondered to change the default place where the ESB drops the files it rejected,  you might have came across the endproperty "rejectedMessageHandlers".  However JDeveloper 10.1.3.3 does not allow to add this property.   You have to close the jDeveloper, edit the file manually and re-register the service.   I also noticed that the property seems to be disappearing some times.  (so keep a backup handy all the time)&lt;br /&gt;&lt;br /&gt;There is also another catch to the way you specify the value of the property.  The developer guide example specifies a sample value as below. &lt;br /&gt;&lt;br /&gt;&lt;div class="summaryBox"&gt; &amp;lt;property name="rejectedMessageHandlers" value="file://c:\rejectSample\reject"/&amp;gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;However, it will not work.  As pointed out in the &lt;a href="http://forums.oracle.com/forums/thread.jspa?threadID=527397"&gt;OTN thread&lt;/a&gt;&lt;br /&gt;you need to add a additional slash after the file: as shown below. &lt;br /&gt;&lt;br /&gt;&lt;div class="summaryBox"&gt;  &amp;lt;property name="rejectedMessageHandlers" value="file:///c:\rejectSample\reject"/&amp;gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I agree this is pretty dump.  However it if you are reading this you might be already  used to such dump things from the SOA suite. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;P.S.  In case you are wondering the location of the default folder for the rejected messages, it is &lt;ORACLE_INSTANCE_HOME&gt;/j2ee/home/jca/service.name.routingservice.name/rejectedMessages.  &lt;br /&gt;I have not yet found a way to keep the name of the original input file. &lt;br /&gt;rejectedMessageHandlers&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-8816804427277499899?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='enclosure' type='' href='http://forums.oracle.com/forums/thread.jspa?threadID=527397' length='0'/><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/8816804427277499899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=8816804427277499899' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8816804427277499899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8816804427277499899'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2008/12/esb-rejected-message-handlers-doesnot.html' title='ESB rejected Message Handlers doesnot work'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-7549992657770847815</id><published>2008-12-02T15:25:00.005-05:00</published><updated>2008-12-02T15:31:43.494-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oc4j'/><category scheme='http://www.blogger.com/atom/ns#' term='ESB'/><category scheme='http://www.blogger.com/atom/ns#' term='xslt'/><category scheme='http://www.blogger.com/atom/ns#' term='fileadaptor'/><title type='text'>How to: Get filename from ESB adaptor</title><content type='html'>Oracle ESB provides header functions that allows designers to access inbound and outbound header functions. The following are the functions available.&lt;br /&gt;&lt;br /&gt;1. String getRequestHeader(String xpathExpression,String namespaceDecl)&lt;br /&gt;2. void setOutboundHeader(String xpathExpression,String value, String namespaceDecl)&lt;br /&gt;3. String getInboundResponseHeader(String xpathExpression,String namespaceDecl)&lt;br /&gt;4. void setResponseHeader(String xpathExpression,String value, String namespaceDecl)&lt;br /&gt;Where,&lt;br /&gt;xpathExpression : XPath expression to get/set&lt;br /&gt;value : value to be set for the xpathExpression&lt;br /&gt;namespaceDecl : namespace declarations in the form ‘prefix=namespace;’&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can use the following code snippet in your transformation xslt to get the name of the file that is read by the file adaptor in ESB. &lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&amp;lt;xsl:variable name="GET_INFILENAME" select="ehdr:getRequestHeader('/fhdr:InboundFileHeaderType/fhdr:fileName', &lt;br /&gt;'fhdr=http://xmlns.oracle.com/pcbpel/adapter/file/;')"/&amp;gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-7549992657770847815?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/7549992657770847815/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=7549992657770847815' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/7549992657770847815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/7549992657770847815'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2008/12/how-to-get-filename-from-esb-adaptor.html' title='How to: Get filename from ESB adaptor'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-3210409369676496979</id><published>2008-11-23T16:05:00.012-05:00</published><updated>2009-10-22T13:58:15.471-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SOA suite'/><category scheme='http://www.blogger.com/atom/ns#' term='ESB'/><category scheme='http://www.blogger.com/atom/ns#' term='soa'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Where to find Oracle ESB documentation</title><content type='html'>&lt;a href="http://www.technogemsinc.com/clientFile/esb.htm"&gt;Here&lt;/a&gt; is a list of ESB documentation files I found useful.  You can check them out at &lt;a href="http://www.technogemsinc.com/clientFile/esb.htm"&gt;http://www.technogemsinc.com/clientFile/esb.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For details about configuring the AQ, database, file, FTP, JMS, and MQ adapters in Oracle JDeveloper, see &lt;a href="http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/toc.htm"&gt;Oracle Application Server Adapter for Files, FTP, Databases, and Enterprise Messaging User's Guide&lt;/a&gt;. For details about configuring the Oracle application adapter for Oracle E-Business Suite, see &lt;a href="http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28351/toc.htm"&gt;Oracle Application Server Adapter for Oracle Applications User's Guide&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-3210409369676496979?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/3210409369676496979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=3210409369676496979' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/3210409369676496979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/3210409369676496979'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2008/11/where-to-find-oracle-esb-documentation_23.html' title='Where to find Oracle ESB documentation'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-3118489302695489951</id><published>2008-11-23T14:40:00.007-05:00</published><updated>2008-12-02T15:33:55.786-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SOA suite'/><category scheme='http://www.blogger.com/atom/ns#' term='ESB'/><category scheme='http://www.blogger.com/atom/ns#' term='xslt'/><category scheme='http://www.blogger.com/atom/ns#' term='soa'/><category scheme='http://www.blogger.com/atom/ns#' term='fileadaptor'/><title type='text'>How to set the name of the file  dynamically during transformation time in ESB fileAdaptor</title><content type='html'>Oracle ESB provides header functions that allows designers to access inbound and outbound header functions.   The following are the functions available.  &lt;br /&gt;&lt;br /&gt;1. String getRequestHeader(String xpathExpression,String namespaceDecl)&lt;br /&gt;2. void setOutboundHeader(String xpathExpression,String value, String namespaceDecl)&lt;br /&gt;3. String getInboundResponseHeader(String xpathExpression,String namespaceDecl)&lt;br /&gt;4. void setResponseHeader(String xpathExpression,String value, String namespaceDecl)&lt;br /&gt;Where,&lt;br /&gt;xpathExpression : XPath expression to get/set&lt;br /&gt;value : value to be set for the xpathExpression&lt;br /&gt;namespaceDecl : namespace declarations in the form ‘prefix=namespace;’&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can use the following code snippet in your transformation xslt to set the name of the file that is about to written by the ESB File adaptor.  This overrides the name given in the design time. &lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&amp;lt;xsl:variable name="SET_OUTFILENAME"&lt;br /&gt;select="ehdr:setOutboundHeader('/fhdr:OutboundFileHeaderType/fhdr :fileName', $GET_INFILENAME, 'fhdr=http://xmlns.oracle.com/pcbpel/adapter/file/;')"/&amp;gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The variable GET_INFILE is the name of the input file name as referred in the previous &lt;a href="http://meslie.blogspot.com/2008/12/how-to-get-filename-from-esb-adaptor.html"&gt;post.&lt;/a&gt; &lt;br /&gt;If you like an example project, you can download it from oracle site &lt;a href="http://www.oracle.com/technology/products/integration/esb/files/esbsamples.zip"&gt;here&lt;/a&gt;  The sample project is under HeaderSupportDemo folder.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-3118489302695489951?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/3118489302695489951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=3118489302695489951' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/3118489302695489951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/3118489302695489951'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2008/11/how-to-get-name-of-file-read-by-esb.html' title='How to set the name of the file  dynamically during transformation time in ESB fileAdaptor'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-5269285529629527638</id><published>2008-11-23T14:20:00.006-05:00</published><updated>2008-11-23T14:39:28.094-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SOA suite'/><category scheme='http://www.blogger.com/atom/ns#' term='ESB'/><category scheme='http://www.blogger.com/atom/ns#' term='xslt'/><category scheme='http://www.blogger.com/atom/ns#' term='soa'/><title type='text'>How to get the name of an ESB instance in transformation</title><content type='html'>A new XPath function was added in Oracle 10.1.3.3 to get instance IDs.  If you are running an older version you have to upgrade to get this working.  One note of caution is, after making the edits to your xslt, the designer view will not work.  This is a limitation of jDeveloper. &lt;br /&gt;Here is an example on how to get the instance id in the transformation. &lt;br /&gt;&lt;br /&gt;1. Define a simple ESB project and define a simple File Adapter.&lt;br /&gt;2. Perform a transformation in the routing service.&lt;br /&gt;3 Perform the following steps to get the instance ID:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;a. Go to Design View.&lt;br /&gt;b. Select Advanced Functions in the Component Palette.&lt;br /&gt;c. Select xpath-expression and drag it to the middle column.&lt;br /&gt;d. Double-click the function icon.&lt;br /&gt;e. Enter ehdr:getInstanceID() in the XPath Expression field.&lt;br /&gt;f. Click OK&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;4. Click Yes when prompted with a warning.&lt;br /&gt;5. Map the function to the InstanceID element and save the project.&lt;br /&gt;6. Return to the routing service where the XSL transformation activity is defined.&lt;br /&gt;7. Double-click the routing service.&lt;br /&gt;8. Expand the Properties section and add the following property:&lt;br /&gt;Map the function to the InstanceID element and save the project.&lt;br /&gt;6. Return to the routing service where the XSL transformation activity is defined.&lt;br /&gt;7. Double-click the routing service.&lt;br /&gt;8. Expand the Properties section and add the following property:(Note this property is case sensitive.)&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-style:italic;"&gt;enableAccessBusinessEvent=true&lt;br /&gt; &lt;/span&gt; &lt;/blockquote&gt;&lt;br /&gt;9. Save and deploy the project.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-5269285529629527638?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/5269285529629527638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=5269285529629527638' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/5269285529629527638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/5269285529629527638'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2008/11/how-to-get-name-of-esb-instance-in.html' title='How to get the name of an ESB instance in transformation'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-3099363787677425120</id><published>2008-08-16T21:05:00.003-04:00</published><updated>2008-08-16T21:18:28.038-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oc4j'/><category scheme='http://www.blogger.com/atom/ns#' term='logging'/><title type='text'>Viewing JSP Stack Traces with OC4J 10.1.3.1.</title><content type='html'>When an error occurs in the translation or runtime execution of a JSP page, the container would return the exception, message and a stacktrace to the client.   However, the exception is not displayed in the page by default in OC4j. &lt;br /&gt;&lt;br /&gt;This can be a little annoying for development machines.   There are several ways to change this behavior.   The easiest way is to set the development flag at the container level.  This can be done by updating the &lt;orion-web-app&gt; element of the global-web-application.xml file. &lt;br /&gt;&lt;br /&gt;Here is an example:&lt;br /&gt;&lt;br /&gt;&amp;lt;orion-web-app &lt;br /&gt;  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" &lt;br /&gt;  xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-web-10_0.xsd"&lt;br /&gt;  jsp-cache-directory="./persistence"&lt;br /&gt;  servlet-webdir="/servlet"&lt;br /&gt;  development="&lt;span style="font-weight:bold;"&gt;true&lt;/span&gt;"&lt;br /&gt;  jsp-timeout="0"&lt;br /&gt;  jsp-cache-tlds="standard"&lt;br /&gt;  schema-major-version="10"&lt;br /&gt;  schema-minor-version="0"&lt;br /&gt;&amp;gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;I like this option because, this can be set once for the container and dont have to worry about it.   &lt;br /&gt;&lt;br /&gt;If this cannot be done because you are working on a shared server, you can override individually by setting this flag on the application level by including orion-web.xml file in WEB-INF directory of your application.   However, you have to make sure you remove this or change it when you deploy to production. &lt;br /&gt;&lt;br /&gt;As a temporery measure, you can change it during deployment on the jdeveloper deployment wizard. The "&lt;a href="http://buttso.blogspot.com/2006/11/viewing-jsp-stack-traces-with-oc4j.html"&gt;Buttso Blathers&lt;/a&gt;" has a screen shot of this &lt;a href="http://buttso.blogspot.com/2006/11/viewing-jsp-stack-traces-with-oc4j.html"&gt;screen&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-3099363787677425120?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/3099363787677425120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=3099363787677425120' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/3099363787677425120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/3099363787677425120'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2008/08/viewing-jsp-stack-traces-with-oc4j.html' title='Viewing JSP Stack Traces with OC4J 10.1.3.1.'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-6922996738397977045</id><published>2008-07-31T16:05:00.004-04:00</published><updated>2008-07-31T16:34:17.380-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='SWFObject'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><category scheme='http://www.blogger.com/atom/ns#' term='BitGravity'/><title type='text'>Reload SWFObject with a different flv file</title><content type='html'>Recently, I had to create a simple web page to display a bunch of video files (.flv) files.  I wanted to change the video based on the text the user click without having to reload the entire page.   It proved a bit tricker than what I originally thought. &lt;br /&gt;&lt;br /&gt;I was using the flash player from bitgravity to create the code snippet that loads the flash object.  It works well  for the first flash movie.  However, when the second movie is loaded, the javascript goes outof wack because the first call to SWFObject.embedSWF(...) changes the div tag.&lt;br /&gt;&lt;br /&gt;I tried to use the SWFObject.removeSWF function but realized that not all versions support it.   So, I came up with a simple but rude solution, that seem to be working fine for me. &lt;br /&gt;&lt;br /&gt;The gist of it is, to embed the &lt;div&gt; tag that is passed as a parameter to the SWFObject.embedSWF call within another div tag.    Then before I call the SWFObject.embedSWF method, I replace the innerHTML of the parent tag with a well known value, so every time the SWFObject.embedSWF() method will find the &lt;div&gt; element in the same manner it found the first time.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is a sample code for this.  Create these following javascript functions.&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;&amp;lt;script type="text/javascript" src="http://bitcast-a.bitgravity.com/player/swfobject.js"&amp;lg;&amp;lt;/script&amp;lg;&lt;br /&gt;&amp;lt;script type="text/javascript" src="http://bitcast-a.bitgravity.com/player/playerversion.js"&amp;lg;&amp;lt;/script&amp;lg;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;lg;&lt;br /&gt;&lt;br /&gt;function replaceSwfWithEmptyDiv(targetID){&lt;br /&gt;&lt;br /&gt;   var el = document.getElementById(targetID);&lt;br /&gt;   if(el){&lt;br /&gt;   el.innerHTML='&amp;lt;div id="bg_player_location"&amp;lg;';&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function showMovie(url, divObj) {&lt;br /&gt;selectDiv(divObj);&lt;br /&gt;replaceSwfWithEmptyDiv("bg_videoBox");&lt;br /&gt;var flashvars = {};&lt;br /&gt;flashvars.File =url;&lt;br /&gt;flashvars.Mode = "ondemand";&lt;br /&gt;flashvars.ScrubMode = "advanced";&lt;br /&gt;flashvars.StreamGuard = "false";&lt;br /&gt;flashvars.AutoPlay = "true";&lt;br /&gt;flashvars.DefaultRatio = "1.777778";&lt;br /&gt;flashvars.ForceRatio = "false";&lt;br /&gt;flashvars.VideoFit = "automatic";&lt;br /&gt;flashvars.BufferTime = "1.5";&lt;br /&gt;flashvars.AutoBitrate = "disabled";&lt;br /&gt;flashvars.Thumbnail = "";&lt;br /&gt;flashvars.PreRoll = "";&lt;br /&gt;flashvars.LogoPNG = "onepix.png";&lt;br /&gt;var params = {};&lt;br /&gt;params.base = "http://bitcast-a.bitgravity.com/player/";&lt;br /&gt;params.allowFullScreen = "true";&lt;br /&gt;params.salign = "lt";&lt;br /&gt;params.scale = "noscale"&lt;br /&gt;params.wmode = "transparent";&lt;br /&gt;var attributes = {};&lt;br /&gt;attributes.id = "bitgravity_player_5";&lt;br /&gt;swfobject.embedSWF(lateststable, "bg_player_location", "368", "207", "9.0.0", "http://bitcast-a.bitgravity.com/player/expressInstall.swf", flashvars, params, attributes);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/script&amp;lg;&lt;br /&gt;&lt;/pre&gt; &lt;br /&gt;&lt;br /&gt;And now you would add the following code snippet to where the flash video will be displayed.&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;&amp;lt;div id="bg_videoBox"&gt; &amp;lt;div id="bg_player_location"&gt; &amp;lt;/div&gt; &amp;lt;/div&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now the final step.  Add a snipper similar to the one below to load the video.&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div onclick="javascript:showMovie('http://link.to your.file.flv');" &gt; Reality TV show &amp;lt;/div&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Hope this helps.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-6922996738397977045?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/6922996738397977045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=6922996738397977045' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/6922996738397977045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/6922996738397977045'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2008/07/reload-swfobject-with-different-flv.html' title='Reload SWFObject with a different flv file'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-6426443256788118604</id><published>2008-07-17T00:38:00.003-04:00</published><updated>2008-07-17T00:47:07.173-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='open source'/><category scheme='http://www.blogger.com/atom/ns#' term='billing system'/><category scheme='http://www.blogger.com/atom/ns#' term='telecom'/><category scheme='http://www.blogger.com/atom/ns#' term='billing'/><title type='text'>Open source billing systems</title><content type='html'>Recently, I was researching for a potential billing system for one of our clients.   The requirement is to be able to create rate plans that has certain fixed monthly cost and overage charges based on usage.  Also, they prefer open source.  Here are some of the tools that I reviewed and my comments on them. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.freeside.biz/freeside/index.html"&gt;FreeSide&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;A cgi script based billing system.  It seems like they are pushing it as a hardware &amp; software solution.  The user interface seems to be okay. It seems to have good functionality.  There is an online demo site http://www.freeside.biz/freeside/demo.html&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.jbilling.com"&gt;JBilling&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A free open source billing system. With enterprise features and a robust architecture, jbilling is the choice for businesses of all sizes. Built on the Java 2 Enterprise Edition to ensure security and scalability.  This seems to support bundling and packaging of items and allows complex pricing rules.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.citrusdb.org/"&gt;CitrusDB&lt;/a&gt;&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;CitrusDB is a web based customer care and billing software solution (CC&amp;B) that uses PHP and a database backend (MySQL) to keep track of customer information, operational CRM, services, products, billing invoices and credit cards, and support information. The feature set is very minimal.  You can create basic plans, add customers, create invoice. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.opentaps.org/"&gt;opentaps&lt;/a&gt; Open Source ERP + CRM&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;opentaps is a complete open source platform for your enterprise based on Java.  Its sophisticated features and modern architecture includes a full ERP and CRM solution plus mobile connectivity and built-in business intelligence tools.  It is more than a illing system and it might be a overkill if you are looking for just a billing system.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;a href="http://www.aplusbill.com/"&gt;A Plus Bill&lt;/a&gt; (Not an open source)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A Plus Bill is a PHP/MySql based online invoicing, billing and client management system with online help desk and auto billing capability via cron jobs(in linux) and Scheduled Tasks (in windows). It includes a user-friendly backend to keep track of clients and repeated charges. It is created for web hosting companies, ISP providers, general invoicing, and customer management.  It supports the basic features.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-6426443256788118604?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/6426443256788118604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=6426443256788118604' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/6426443256788118604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/6426443256788118604'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2008/07/open-source-billing-systems.html' title='Open source billing systems'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-8007840726180383482</id><published>2008-07-09T16:31:00.004-04:00</published><updated>2008-07-09T16:42:39.451-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='network interface'/><category scheme='http://www.blogger.com/atom/ns#' term='ipconfig'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Unix creating virtual network interface</title><content type='html'>Recently, I happened to be searching the man pages of ifconfig on how to add a virtual IP to a unix machine.  The examples and the help text was not very helpful and I endedup googling for it.  I came across a nice HOw TO article on this and I am providing the content and the &lt;a href="http://spiralbound.net/2005/11/22/solaris-virtual-network-interfaces"&gt;link&lt;/a&gt; here.  I followed the instructions and I was able to create an interface in minutes. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let’s assume our network card is eri0, and we want to create a virtual interface called eri0:1&lt;br /&gt;&lt;br /&gt;Create the virtual interface:&lt;br /&gt;# ifconfig eri0:1 plumb&lt;br /&gt;&lt;br /&gt;Configure the virtual interface:&lt;br /&gt;# ifconfig eri0:1 179.164.83.161 netmask 255.255.255.0 broadcast 179.164.83.255&lt;br /&gt;&lt;br /&gt;Check to make sure it worked:&lt;br /&gt;&lt;br /&gt;# ifconfig -a&lt;br /&gt;&lt;br /&gt;lo0: flags=1000849 mtu 8232 index 1&lt;br /&gt;inet 127.0.0.1 netmask ff000000&lt;br /&gt;eri0: flags=1000843 mtu 1500 index 2&lt;br /&gt;inet 179.164.83.160 netmask ffffff00 broadcast 179.164.83.255&lt;br /&gt;ether 0:3:ba:9:63:9b&lt;br /&gt;eri0:1: flags=1000842 mtu 1500 index 2&lt;br /&gt;inet 179.164.83.161 netmask ffffff00 broadcast 179.164.83.255&lt;br /&gt;&lt;br /&gt;Finally bring up your new virtual interface:&lt;br /&gt;# ifconfig eri0:1 up&lt;br /&gt;&lt;br /&gt;To make it come up on start:&lt;br /&gt;&lt;br /&gt;create /etc/hostname.eri0:1 with hostname in it&lt;br /&gt;make sure the hostname is in /etc/hosts&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-8007840726180383482?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='enclosure' type='' href='http://spiralbound.net/2005/11/22/solaris-virtual-network-interfaces' length='0'/><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/8007840726180383482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=8007840726180383482' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8007840726180383482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8007840726180383482'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2008/07/unix-creating-virtual-network-interface.html' title='Unix creating virtual network interface'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-5100721303028430915</id><published>2008-07-02T11:27:00.004-04:00</published><updated>2008-07-02T11:39:02.870-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oc4j'/><category scheme='http://www.blogger.com/atom/ns#' term='soa'/><title type='text'>ORA-12516 error with oc4j SOA suite</title><content type='html'>One of the common errors I see when running the SOA suite from oracle is the ORA-12516 error.   This typically happens in a development environment where the backend database is oracle XE.   The root cause of the issue is the XE process is running out of sessions/process threads as the default values for these in XE is too small.   To fix the error, verify the current values for the processes and sessions and increase them to atleast 300. &lt;br /&gt;&lt;br /&gt;To increase the sessions and process  use the following sqls.&lt;br /&gt;&lt;pre class="prettyprint" &gt;&lt;br /&gt;sqlplus "sys as sysdba"&lt;br /&gt;SQL&amp;gt; show parameter processes;&lt;br /&gt;SQL&amp;gt; show parameter sessions;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;If the values are less than 300, set them to 300 using the following sqls,&lt;br /&gt;&lt;pre class="prettyprint" &gt;&lt;br /&gt;SQL&amp;gt; alter system set processes=300 scope=spfile;&lt;br /&gt;SQL&amp;gt; alter system set sessions=300 scope=spfile;&lt;br /&gt;SQL&amp;gt; shutdown immediate&lt;br /&gt;SQL&amp;gt; startup&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now, restart the oracle process using the following commands.&lt;br /&gt;&lt;pre class="prettyprint" &gt;&lt;br /&gt;opmnctl stopall&lt;br /&gt;opmnctl startall&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-5100721303028430915?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/5100721303028430915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=5100721303028430915' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/5100721303028430915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/5100721303028430915'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2008/07/ora-12516-error-with-oc4j-soa-suite.html' title='ORA-12516 error with oc4j SOA suite'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-8611051096640240787</id><published>2008-07-01T15:20:00.009-04:00</published><updated>2008-07-01T17:02:50.560-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='oc4j'/><category scheme='http://www.blogger.com/atom/ns#' term='logging'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Struts/Tiles/oc4j logging</title><content type='html'>Recently I was troubleshooting an issue with a web application that uses struts/tiles and runs in an oc4j container. I application was getting a exception and oc4j will not print the exception stack trace in the output. It was hard to understand what is going on and it took me a while to figure out. So I am documenting here the process, so it can be a handy reference next time around or for some one who comes across the same issue.&lt;br /&gt;&lt;br /&gt;To understand what was going on, the first step was to see what was the exception. To do this I set the development mode to true in the global_application.xml file. The global-web-application.xml file can be found under %ORACLE_HOME%/j2ee/%instance%/config/global-web-application.xml. Update the development attrubute on the orion-web-app tag to true and restart the instance.&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;&amp;lt;orion-web-app development="true" xsi="http://www.w3.org/2001/XMLSchema-instance" nonamespaceschemalocation="http://xmlns.oracle.com/oracleas/schema/orion-web-10_0.xsd" directory="./persistence" webdir="/servlet" timeout="0" tlds="false" version="0"&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now, if you visit the page on the browser, you will see the stack trace on the browser. This is a handy method, if your log files are cluttered. Alternatively you may view the stacktrace in the log files if you have configured oc4j to print standard out and error to a file. (for more information on how to setup refer to my &lt;a href="http://meslie.blogspot.com/2008/03/oracle-application-server-standard-out.html"&gt;earlier&lt;/a&gt; entry)&lt;br /&gt;&lt;br /&gt;In my current situation, the stacktrace was not very useful as it did not point to any application code directly. The following is the stacktrace I received.&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;[   ERROR] [2008-07-01 09:23:13,500] [AJPRequestHandler-HTTPThreadGroup-5:] {{ServletException in '/StrutsAction2.do?QueryParm=parmvalue': null}} [org.apache.struts.taglib.tiles.InsertTag]&lt;br /&gt;javax.servlet.ServletException: Error in servlet&lt;br /&gt; at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:757)&lt;br /&gt; at com.evermind.server.http.ServletRequestDispatcher.unprivileged_include(ServletRequestDispatcher.java:160)&lt;br /&gt; at com.evermind.server.http.ServletRequestDispatcher.access$000(ServletRequestDispatcher.java:50)&lt;br /&gt; at com.evermind.server.http.ServletRequestDispatcher$1.oc4jRun(ServletRequestDispatcher.java:97)&lt;br /&gt; at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)&lt;br /&gt; at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:102)&lt;br /&gt; at com.evermind.server.http.EvermindPageContext.include(EvermindPageContext.java:396)&lt;br /&gt; at com.evermind.server.http.EvermindPageContext.include(EvermindPageContext.java:349)&lt;br /&gt; at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:101)&lt;br /&gt; at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:137)&lt;br /&gt; at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:758)&lt;br /&gt; at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:890)&lt;br /&gt; at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:460)&lt;br /&gt; at _layouts._template._jspService(_template.java:324)&lt;br /&gt; at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)&lt;br /&gt; at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453)&lt;br /&gt; at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591)&lt;br /&gt; at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515)&lt;br /&gt; at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)&lt;br /&gt; at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)&lt;br /&gt; at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)&lt;br /&gt; at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)&lt;br /&gt; at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:50)&lt;br /&gt; at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)&lt;br /&gt; at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)&lt;br /&gt; at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)&lt;br /&gt; at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)&lt;br /&gt; at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261)&lt;br /&gt; at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:237)&lt;br /&gt; at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:300)&lt;br /&gt; at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)&lt;br /&gt; at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)&lt;br /&gt; at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)&lt;br /&gt; at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)&lt;br /&gt; at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)&lt;br /&gt; at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)&lt;br /&gt; at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)&lt;br /&gt; at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)&lt;br /&gt; at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)&lt;br /&gt; at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)&lt;br /&gt; at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)&lt;br /&gt; at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)&lt;br /&gt; at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)&lt;br /&gt; at java.lang.Thread.run(Thread.java:595)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;As you can see, all I can see is it getting a null exception when the jvm is trying to process the request for StrutsAction2.   Unfortunately it was not printing the application class that was causing the exception.  The reason for the issue is the exception is happening in a different thread than the one the stacktrace is printed.  &lt;br /&gt;Here is what was happening. I was actually calling url accociated with StrutsAction1. The tile definition for the StrutsAction1 includes StrutsAction2 in its response.  The stacktrace oc4j was printing was from the thread that was processing StrutsAction2 which is a seperate thread.   The only clue I could get from here is that the error is occoring during StrutsAction2.  If I try to invoke StrutsAction2 directly it seems to be working fine. &lt;br /&gt;&lt;br /&gt;This made things a bit more complex and I started adding more and more debugging statements to the strutsaction2.  Then I realized there is a Custom tiles plugin we have defined for the app and it had a debug statement.  On the outlook, the debug statement looked harmless to me.  However, I was a bit surprised by the fact that I was not even seeing the debugline on the logfile even after turning debug on. &lt;br /&gt;&lt;br /&gt;Here is the debug statement.&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;&lt;br /&gt;Logger.debug("Processing Request: " + request.getContextPath() + request.getServletPath() +" Req Detail: " + getLogString(request));&lt;br /&gt;&lt;br /&gt; private String getLogString (HttpServletRequest req) {&lt;br /&gt;  StringBuffer buf = new StringBuffer("Request Parms:");&lt;br /&gt;  Enumeration&lt;String&gt; parms = req.getParameterNames() ;&lt;br /&gt;                if (parms != null) {&lt;br /&gt;                while ( parms.hasMoreElements() ) {&lt;br /&gt;   String parm = parms.nextElement() ;&lt;br /&gt;   String pVal = req.getParameter(parm);&lt;br /&gt;   buf.append(parm + "=" + pVal + ";");&lt;br /&gt;  }&lt;br /&gt;                }&lt;br /&gt;  buf.append(": Req Headers: ");&lt;br /&gt;  Enumeration&lt;String&gt; headers = req.getHeaderNames() ;&lt;br /&gt;                if (headers != null ) {&lt;br /&gt;  while ( headers.hasMoreElements() ) {&lt;br /&gt;   String parm = headers.nextElement() ;&lt;br /&gt;   String pVal = req.getHeader(parm);&lt;br /&gt;   buf.append(parm + "=" + pVal + ";");&lt;br /&gt;  }&lt;br /&gt;                }&lt;br /&gt;                &lt;br /&gt;  Enumeration&lt;String&gt; attribs = req.getAttributeNames() ;&lt;br /&gt;  if(attribs != null) {&lt;br /&gt;                while ( attribs.hasMoreElements() ) {&lt;br /&gt;   String parm = attribs.nextElement() ;&lt;br /&gt;   Object pVal = req.getAttribute(parm);&lt;br /&gt;   buf.append(parm + "=" + pVal.toString() + ";");&lt;br /&gt;  }&lt;br /&gt;                }&lt;br /&gt;  return buf.toString();&lt;br /&gt; }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Not seeing the debug line in the log provided me the next clue.  The issue might be somewhere in the debug statement.  I came to the conclusion because this debug statement was the first thinging happening in the preprocess method for the plugin. &lt;br /&gt;&lt;br /&gt;So my next step is to add a try catch around the debug line and printed the stacktrace in case of ecxeption.   This pointed to the bug in the getLogString  method.  It was the line getting the attribute value "pVal.toString()" as the specific call flow, it was running in to an attribute that had a null value. &lt;br /&gt;&lt;br /&gt;So I added a null check to the line as follows to get going.   This was interesting beacause the common code that was suposed to be helping with debug was itself the one causing the bug.   The leason here is be extra carefull with debug statements especially when adding to comon code. &lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;buf.append(parm + "=" + (pVal==null?"null":pVal.toString()) + ";");"&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-8611051096640240787?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/8611051096640240787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=8611051096640240787' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8611051096640240787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8611051096640240787'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2008/07/strutstilesoc4j-logging.html' title='Struts/Tiles/oc4j logging'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-5913337269760790809</id><published>2008-04-29T16:14:00.000-04:00</published><updated>2008-06-23T23:44:44.380-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='jdbc'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>OC4J JDBC Connection Pool issue with ResultSet.getStatement()</title><content type='html'>Recently one our customers migrated their application from Tomcat to OC4J container and noticed some interesting observations regarding JDBC connection pool.  I thought I would share here as it will help others too. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;The Issue: &lt;/strong&gt;&lt;br /&gt;After migrating the application to OC4J, the number of connections to the database held by the enterprise manager did not match with the actual connections held in the database.  The customer had Interscope's Wily product and it reported a different number for the number of database connections.  &lt;br /&gt;&lt;br /&gt;The application's heap usage also goes up significantly as it the conection objects are not released. &lt;br /&gt;&lt;br /&gt;This lead us to evaluate the application's code on how they are getting the connection and releasing it.   The way they were getting the connection was in line with the typical usage.  However, when they are releasing the connection,  they are going it by getting the connection object through the reference from the resultset object.  They were using a utility method sibilar to the one below. &lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;   protected synchronized Connection getConn() {&lt;br /&gt;     Connection conn = null;&lt;br /&gt;     try {&lt;br /&gt;         Context initContext = new InitialContext();&lt;br /&gt;         &lt;br /&gt;         DataSource ds = (DataSource)initContext.looku("dataSourceName");&lt;br /&gt;          conn = ds.getConnection();&lt;br /&gt;          &lt;br /&gt;     } catch (Exception e) {&lt;br /&gt;      Logger.error("Error in getting a JDBC " + "connection " + e.getMessage());      &lt;br /&gt;     }     &lt;br /&gt;     return conn;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt; public synchronized void closeResultSetAndItsAssoc(ResultSet rs) {&lt;br /&gt;     if (rs != null) {&lt;br /&gt;      try {&lt;br /&gt; &lt;br /&gt;       Statement stmt = rs.getStatement();&lt;br /&gt;       Connection conn = stmt.getConnection();&lt;br /&gt;       &lt;br /&gt;       if (rs != null) {&lt;br /&gt;        try { rs.close(); } catch (SQLException ignore) {}             &lt;br /&gt;       }     &lt;br /&gt;       if (stmt != null) {&lt;br /&gt;        try { stmt.close(); } catch (SQLException ignore) {}&lt;br /&gt;       }     &lt;br /&gt;       if (conn != null) {&lt;br /&gt;        try { conn.close(); } catch (SQLException ignore) {}&lt;br /&gt;       }&lt;br /&gt;      }  catch (SQLException ignore) {&lt;br /&gt;       appLogger.warn(ignore.getMessage());     &lt;br /&gt;      }&lt;br /&gt;     }&lt;br /&gt;     &lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This code snippet worked well with Tomcat container.  However, with the OC4J container, the actual connection object obtained by the getConn() method above is different from the one obtained by the stmt.getConnection() method.  So, it appeared to the connection pool manager that the applicatio never closed the connection.   Interestingly the one obtained by the stmt.getConnection() method is the actual physical connection and we would notice the connection is closed at the database rather than going back to inactive state. &lt;br /&gt;&lt;br /&gt;Luckily, they were using the getConn() method and the closeResultSetAndItsAssoc() methods from the same object.  We were able to make a quick fix to the closeResultSetAndItsAssoc method by closing the connection reference obtained using the getConn() method.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-5913337269760790809?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/5913337269760790809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=5913337269760790809' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/5913337269760790809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/5913337269760790809'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2008/04/oc4j-jdbc-connection-pool-issue-with.html' title='OC4J JDBC Connection Pool issue with ResultSet.getStatement()'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-7867510830163160346</id><published>2008-04-22T14:55:00.000-04:00</published><updated>2008-04-22T15:00:41.387-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>What is going on with DATE and TIMESTAMP?</title><content type='html'>I have ran in to developers using java.sql.Date object in Oracle and wondering why the date object does not contain the time information.  The short answer is java.sql.Date   and you need to use the java.sql.TimeStamp object that contains both Date and timestamp information. &lt;br /&gt;&lt;br /&gt;A detailed explanation of the issue can be found in the &lt;a href="http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#08_01"&gt;Oracle web site&lt;/a&gt; .  I am copying the text here for a quick reference. &lt;br /&gt;&lt;br /&gt;Prior to 9.2, the Oracle JDBC drivers mapped the DATE SQL type to java.sql.Timestamp. This made a certain amount of sense because the Oracle DATE SQL type contains both date and time information as does java.sql.Timestamp. The more obvious mapping to java.sql.Date was somewhat problematic as java.sql.Date does not include time information. It was also the case that the RDBMS did not support the TIMESTAMP SQL type, so there was no problem with mapping DATE to Timestamp. &lt;br /&gt;&lt;br /&gt;In 9.2 TIMESTAMP support was added to the RDBMS. The difference between DATE and TIMESTAMP is that TIMESTAMP includes nanoseconds and DATE does not. So, beginning in 9.2, DATE is mapped to Date and TIMESTAMP is mapped to Timestamp. Unfortunately if you were relying on DATE values to contain time information, there is a problem. &lt;br /&gt;&lt;br /&gt;There are several ways to address this problem: &lt;br /&gt;&lt;br /&gt;Alter your tables to use TIMESTAMP instead of DATE. This is probably rarely possible, but it is the best solution when it is. &lt;br /&gt;&lt;br /&gt;Alter your application to use defineColumnType to define the columns as TIMESTAMP rather than DATE. There are problems with this because you really don't want to use defineColumnType unless you have to (see What is defineColumnType and when should I use it?). &lt;br /&gt;&lt;br /&gt;Alter you application to use getTimestamp rather than getObject. This is a good solution when possible, however many applications contain generic code that relies on getObject, so it isn't always possible. &lt;br /&gt;&lt;br /&gt;Set the V8Compatible connection property. This tells the JDBC drivers to use the old mapping rather than the new one. You can set this flag either as a connection property or a system property. You set the connection property by adding it to the java.util.Properties object passed to DriverManager.getConnection or to OracleDataSource.setConnectionProperties. You set the system property by including a -D option in your java command line. &lt;br /&gt;&lt;br /&gt;  java -Doracle.jdbc.V8Compatible="true" MyApp&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-7867510830163160346?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/7867510830163160346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=7867510830163160346' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/7867510830163160346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/7867510830163160346'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2008/04/what-is-going-on-with-date-and.html' title='What is going on with DATE and TIMESTAMP?'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-4421173080104096315</id><published>2008-04-07T21:56:00.000-04:00</published><updated>2008-04-07T23:46:44.460-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='jndi'/><category scheme='http://www.blogger.com/atom/ns#' term='datasource'/><category scheme='http://www.blogger.com/atom/ns#' term='jdbc'/><title type='text'>JNDI Lookup for JDBC resources</title><content type='html'>Recently I came across an issue where the code to perform a JNDI lookup for a JDBC resource that worked fine in a tomcat container did not work when migrated to an OC$J container. Looking at the details of the code and the resource definitions explained why it did not work and the fix needed.&lt;br /&gt;&lt;br /&gt;The following is code snippet that is used to get the datasource object by the application.&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;String dsName = "myDataSource";&lt;br /&gt;initCtx = new InitialContext(); &lt;br /&gt;envCtx = (Context) initCtx.lookup("java:comp/env"); &lt;br /&gt;DataSource ds = (DataSource) envCtx.lookup(dsName);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;In Tomcat the server.xml file contains the definition for the datasource "myDataSource". The resource ref mapping is done by an entry in the Catalina/hostname/warname.xml file. This setup works fine in a Tomcat container.&lt;br /&gt;&lt;br&gt;&lt;br /&gt;When ported to oc4j container, the datasource "myDataSource" is defined in the application's context (in this case it was the default application). However the code is when running within oc4j container, it failed to find the resource. Taking a closer look at the issue helped identify the solution.&lt;br /&gt;&lt;br&gt;&lt;br /&gt;The application is looking for the resource name "myDataSource" within its environment. In Tomcat this resource name was made available to it by the context definition within the Catalina/hostname/appname.xml file by having the following entry&lt;br /&gt;&lt;br&gt;&lt;br /&gt;In OC4J the datasources.xml file can provide this mapping. However, providing that mapping itself is not sufficient. The web.xml file needs to have a resource-ref definition that the name referenced within its environment is the globalname defined else where. Tomcat container was forgiving for some reason and it lookedup the resource withoout having the resource-ref definition. In order to fix the issue we had tow choice: &lt;br /&gt;&lt;span style="font-family:Courier New;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;"&gt;1) Change the code to lookup the resource using the global jndi name. ie &lt;/span&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;String dsName = "myDataSource";&lt;br /&gt;initCtx = new InitialContext();&lt;br /&gt;DataSource ds = (DataSource) initCtx.lookup(dsName);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;or &lt;br /&gt;2) Add the resource-ref to the web.xml file so the local name is mapped to the jndi global name.&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;&amp;lt;resource-ref&gt;&lt;br /&gt;        &amp;lt;res-ref-name&gt;myDataSource&lt;/ res-ref-name&gt;&lt;br /&gt;        &amp;lt;res-type &gt;javax.sql.DataSource&lt;/ res-type&gt;&lt;br /&gt;        &amp;lt;res-auth &gt;Container&lt;/ res-auth&gt;&lt;br /&gt;        &amp;lt;res-sharing-scope &gt;Shareable&lt; /res-sharing-scope&gt;&lt;br /&gt;&amp;lt;/resource-ref&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;I personally prefer the later as it gives the option to change DataSource reference/names etc without having to change the code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-4421173080104096315?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/4421173080104096315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=4421173080104096315' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/4421173080104096315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/4421173080104096315'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2008/04/jndi-lookup-for-jdbc-resources.html' title='JNDI Lookup for JDBC resources'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-8444457799598592128</id><published>2008-03-29T21:09:00.000-04:00</published><updated>2008-03-29T21:24:58.246-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='timeout'/><category scheme='http://www.blogger.com/atom/ns#' term='urlconnection'/><title type='text'>URLConnection is silently retrying POST request</title><content type='html'>Recently, I was debugging an issue with a webservice that takes long time to respond.  I noticed that the client was using the URLconnection object and it was automatically retrying the connection if the server abruptly terminated  the connection.    I was not expecting the client to reconnect to the server as I did not find any client side code to retry the connection.   After googling for similar symptoms I found a known bug &lt;a href="http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=fd3af1f160b6004e054a6ef830db4?bug_id=6382788"&gt;&lt;span&gt;(ID 6382788&lt;/span&gt;) &lt;/a&gt;with the URLConnection object.    Below is the explanation of the bug and the work around suggested by sun.&lt;br /&gt;&lt;pre&gt;Non-idempotent http POST requests are being automatically resent to the server if the&lt;br /&gt;server does not respond with a valid http response or an IOException occurs. This is&lt;br /&gt;incorrect according to the rfc. Only idempotent requests are supposed to be&lt;br /&gt;automatically resent.&lt;br /&gt;&lt;br /&gt;As this has been the behavior of Sun's http client forever, some users may be relying&lt;br /&gt;on this behavior without even knowing it. So the solution is to allow this behavior&lt;br /&gt;to be configured through a system property, sun.net.http.retryPost.&lt;br /&gt;&lt;br /&gt;sun.net.http.retryPost determines if the an unsuccessful http POST request will be&lt;br /&gt;automatically resent to the server. Unsuccessful in this case means the server did&lt;br /&gt;not send a valid http response or an IOException occurred. The default value is true&lt;br /&gt;to maintain backward compatibility.&lt;/pre&gt;By the way the connection was reset because of a firewall that was terminating the connection as it was taking longer than the defined idle timeout.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-8444457799598592128?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/8444457799598592128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=8444457799598592128' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8444457799598592128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8444457799598592128'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2008/03/urlconnection-is-silently-retrying-post.html' title='URLConnection is silently retrying POST request'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-8219623925998738627</id><published>2008-03-13T14:52:00.001-04:00</published><updated>2009-08-13T14:19:50.986-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='port'/><category scheme='http://www.blogger.com/atom/ns#' term='lsof'/><category scheme='http://www.blogger.com/atom/ns#' term='command'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Identifying the process that is listening on a port</title><content type='html'>There are several times when we try to bring up a process and we get a port conflict. But if you ever wondered which process is running on that port, it is easy to find out.&lt;br /&gt;In most &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;unix&lt;/span&gt; systems you can use the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;lsof&lt;/span&gt; command which is normally available under /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;usr&lt;/span&gt;/local/bin/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;lsof&lt;/span&gt;. The only catch is you have to be root or have &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;sudo&lt;/span&gt; access to run this command.&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;lsof&lt;/span&gt; -i &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;TCP&lt;/span&gt;:&lt;port&gt; will list the process that is listening on &lt;port&gt;. So if you are trying to find out the process id that is listening on port 80, issue the command "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;lsof&lt;/span&gt; -i &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;TCP&lt;/span&gt;:80". For more information on the &lt;a href="http://www.netadmintools.com/html/lsof.man.html"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;lsof&lt;/span&gt;&lt;/a&gt; command &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_10"&gt;refer&lt;/span&gt; to the &lt;a href="http://www.netadmintools.com/html/lsof.man.html"&gt;manual&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Once you find the process id, you can get more information about the process by using the &lt;a href="http://unixhelp.ed.ac.uk/CGI/man-cgi?ps"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;ps&lt;/span&gt; &lt;/a&gt;command.&lt;br /&gt;&lt;br /&gt;There is a developer works &lt;a href="http://www.ibm.com/developerworks/aix/library/au-lsof.html"&gt;article &lt;/a&gt;that has good usage information about &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;lsof&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;If your system does not have the lsof command due to security restrictions, you may want to try the script found &lt;a href="http://www.mail-archive.com/dtrace-discuss@opensolaris.org/msg02625.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/port&gt;&lt;/port&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-8219623925998738627?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/8219623925998738627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=8219623925998738627' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8219623925998738627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8219623925998738627'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2008/03/identifying-process-that-is-listening.html' title='Identifying the process that is listening on a port'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-3498969219602490645</id><published>2008-03-12T09:19:00.000-04:00</published><updated>2008-03-29T21:27:35.028-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oas'/><category scheme='http://www.blogger.com/atom/ns#' term='install'/><title type='text'>OAS and XE conflict on DHCP enabled machines</title><content type='html'>Recently I was trying to install Oracle Application Server and the Oracle XE database along with the SOA suite and BPEL engine on a laptop. The installation process went okay till I had to reboot the machine. After I reboot the machine, the TNS LISTNER (tnslsnr.exe) will not run. As soon as the process starts, it will crash with an error window saying some unexpected error occurred. Further looking for any log information showed that somehow the tnslistner is picking up files from the OAS installation rather than the XE installation.&lt;br /&gt;&lt;br /&gt;Reinstalling the SOA suite did not help. I discussed this with an Oracle consultant who suggested that the issue might be due to some network setting and he was asking me if I got any DHCP warning during installation. Since I remember ignoring an error about DHCP, I decided to read the OAS installation manual that had a section about DHCP. After following the instructions there and installing a loopback adaptor and reinstalling the OAS, I was able to have both XE and the OAS BPEL engine run on the same laptop.&lt;br /&gt;&lt;br /&gt;If you are a person who likes to just install the software without reading the manual first, there will be few glitches that will happen if you are installing OAS. So I would recommend taking some time to read the manuals before you start installation that would save you from trouble later. Unfortunately, I had to learn it the hard way.&lt;br /&gt;&lt;br /&gt;The install guide is typically found under the doc\install.1013\ folder when you unzip the download installation binary.    A few tips from my install experience:&lt;br /&gt;1)  If you are installing the OAS applications on a laptop, run the installation script with the laptop unplugged from any network.    When I had the installation running while connected to my work network, and try to bring up the OAS from home while connected to my work network through VPN, the OPNM failed to start till I disconnect from the VPN connection.   However,  adding the loopback adaptor and installing OAS while unplugged from the network,  helped resolve this issue.&lt;br /&gt;2)  If you are adding the BPEL engine later after installing the base OAS,  you will have to run the scripts to create the schema on the database, manually.   The instructions are on the &lt;a href="http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28980/toc.htm"&gt;manual&lt;/a&gt;.   If you are installing this on a windows box and your environment variables are not set properly you may encounter some issues.   the Integration Repository Creation Assistant (IRCA) script needs the ORACLE_HOME and JAVA_HOME variables to be set properly.  If the path contains and spaces, it will not work.  So you may have to edit the path with the short file names with no spaces.&lt;br /&gt;&lt;br /&gt;Hopefully, your installation goes smooth.  It really helps to read the documentation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-3498969219602490645?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/3498969219602490645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=3498969219602490645' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/3498969219602490645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/3498969219602490645'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2008/03/oas-and-xe-conflict-on-dhcp-enabled.html' title='OAS and XE conflict on DHCP enabled machines'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-8633740669106368437</id><published>2008-03-03T12:42:00.000-05:00</published><updated>2008-03-29T21:27:58.807-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oas'/><title type='text'>Oracle application server- standard out and error</title><content type='html'>Recently I was troubleshooting an application under Oracle Application Server (OAS 10g) and I was wondering where the standard out and error were getting routed. I was looking for the script that starts the oc4j to see where it is getting redirected. However, oracle is doing things their own way and using a executable file to start the jvm if we are using oc4j as part of the opmn.&lt;br /&gt;So I had to digup the oracle documentation and found where they are supposed to go and how to control them. This &lt;a href="http://download-uk.oracle.com/docs/cd/B25221_04/web.1013/b14432/sysprops.htm#i677197"&gt;website &lt;/a&gt;has good documentation on the various setting. However if you like to setup quickly here is what I did and hope this will help.&lt;br /&gt;&lt;br /&gt;1) Update your opmn config file so it prints the system out and system.err to a file.&lt;br /&gt;To do this, edit the rocess-type definition related to the oc4j instance where the app is deployed and add the following line just below the java-options line under start-parameters.&lt;br /&gt;&lt;data id="oc4j-options" value="-out oc4j.out.txt -err oc4j.err.txt"&gt;&lt;br /&gt;If you are not comfortable editing the file manually, you can use the enterprose manager tool and add new properties (yourInstance-&gt;Administration-&gt;Server Properties)to the startup parameters. You will have to add one option per line.&lt;br /&gt;Here is the sample process definition:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;process-type id="myappinstance" module-id="OC4J" status="enabled"&amp;gt;&lt;br /&gt;              &amp;lt;module-data&amp;gt;&lt;br /&gt;                 &amp;lt;category id="start-parameters"&amp;gt;&lt;br /&gt;                    &amp;lt;data id="java-options" value="-server -Djava.security.policy=$ORACLE_HOME/j2ee/myappinstance/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Dstdstream.filesize=2.5"/&amp;gt;&lt;br /&gt;                    &amp;lt;data id="oc4j-options" value="-out oc4j.out.txt -err oc4j.err.txt"/&amp;gt;&lt;br /&gt;                 &amp;lt;/category&amp;gt;&lt;br /&gt;                 &amp;lt;category id="stop-parameters"&amp;gt;&lt;br /&gt;                    &amp;lt;data id="java-options" value="-Djava.security.policy=$ORACLE_HOME/j2ee/myappinstance/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false"/&amp;gt;&lt;br /&gt;                 &amp;lt;/category&amp;gt;&lt;br /&gt;              &amp;lt;/module-data&amp;gt;&lt;br /&gt;              &amp;lt;start timeout="600" retry="2"/&amp;gt;&lt;br /&gt;              &amp;lt;stop timeout="120"/&amp;gt;&lt;br /&gt;              &amp;lt;restart timeout="720" retry="2"/&amp;gt;&lt;br /&gt;              &amp;lt;port id="default-web-site" range="12501-12600" protocol="ajp"/&amp;gt;&lt;br /&gt;              &amp;lt;port id="rmi" range="12401-12500"/&amp;gt;&lt;br /&gt;              &amp;lt;port id="rmis" range="12701-12800"/&amp;gt;&lt;br /&gt;              &amp;lt;port id="jms" range="12601-12700"/&amp;gt;&lt;br /&gt;              &amp;lt;process-set id="default_group" numprocs="1"/&amp;gt;&lt;br /&gt;           &amp;lt;/process-type&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2) Restart the instance and now you should see the outputs from any System.out outputs in the new file.&lt;br /&gt;&lt;br /&gt;The location of the files are little strange. You will find them under %ORACLE_HOME%\j2ee\home\%INSTANCE_NAME%_default_group_1.&lt;/data&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-8633740669106368437?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/8633740669106368437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=8633740669106368437' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8633740669106368437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8633740669106368437'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2008/03/oracle-application-server-standard-out.html' title='Oracle application server- standard out and error'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-8799865218773688395</id><published>2008-02-11T21:57:00.000-05:00</published><updated>2008-03-29T23:04:54.171-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='ssl'/><category scheme='http://www.blogger.com/atom/ns#' term='https'/><title type='text'>HTTPS Connection in Java</title><content type='html'>&lt;div onload="prettyPrint()"&gt;&lt;br /&gt;Every time I had to create a java client to access a page using a https connection, I come across some issue and I keep googling for the answer. So this time I decided to document this so it will be useful for me the next time. There are few steps that we need to follow to make a https connection in java.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1) Create a trust store&lt;/strong&gt;&lt;br /&gt;To create a https client you need to provide the trust store with the certificate of the host you are connecting. The trust store is a file where a list of trusted certificates are stored. Thie file need to be created or the certificate of your host need to be manually added to the trust store. I believe there is a way to automatically extract this from the url and dynamically add a handler. (I say this because JMeter does not require you to do this step) This is an isssue when you are connecting to servers in your development environment or servers, whoose certificate is not signed by a valid signing authority.&lt;br /&gt;&lt;br /&gt;So, to create the truststore, you need a certificate. You can create a certificate by pointing your browser to the host and use your browser to extract the certificate file. Here are the steps to extract the certificate using IE. Point your browser to the site. When the browser shows the padlock, doubleclick the padlock and bringup the popup window. Go to the details tab and select the options to copy the certificate to a file.&lt;br /&gt;Now, use the keytool that is part of the jdk to create a store file.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;&lt;em&gt;&lt;%JAVA_HOME%&gt;\bin\keytool -import -trustcacerts -keystore testkeys -storepass passphrase -noprompt -file mycert.cer &lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In the above command, testkeys is the name of the truststore file to be created/edited, mycert.cer is the name of the certificate file created by the browser.&lt;br /&gt;&lt;br /&gt;If you prefer to install the certificate using a java program you can follow the &lt;a href="http://blogs.sun.com/andreas/entry/no_more_unable_to_find"&gt;instructions&lt;/a&gt;&lt;br /&gt;from Andreas Sterbenz's Blog.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2) Make truststore available to jvm&lt;/strong&gt;&lt;br /&gt;Once you have created the truststore file, your code to make normal URL connection should work even for the ssl connection. The only change you need to do is add a JVM argument to the command line. java &lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;&lt;em&gt;-Djavax.net.ssl.trustStore="&lt;%PATH_TO_TRUST_STORE%&gt;\testkeys" &lt;your&gt;&lt;/your&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/span&gt;If you dont want to add the extra parameter you can update the default trust store found under /lib/security/cacerts file using the above procedure. I suggest that you backup the file before you do anything with the file.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3) Make URL connection as usual&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;Here is a sample snippet for making a url request.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;URL url = new URL("https://someurl");&lt;br /&gt;URLConnection con = url.openConnection();&lt;br /&gt;con.setDoOutput(true);&lt;br /&gt;con.connect();&lt;br /&gt;OutputStreamWriter wr = new OutputStreamWriter(con.getOutputStream());&lt;br /&gt;wr.write("Request data....");&lt;br /&gt;wr.flush();&lt;br /&gt;// Get the response&lt;br /&gt;BufferedReader rd = new BufferedReader(new InputStreamReader(con.getInputStream()));&lt;br /&gt;String line;&lt;br /&gt;while ((line = rd.readLine()) != null){&lt;br /&gt;System.out.println(line);&lt;br /&gt;}&lt;br /&gt;wr.close();&lt;br /&gt;rd.close();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;4) Create host verifier if your host name does not match with certificate&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;If your certificate issuing name does not match with the hostname you are connecting to, you may run in to another error. Thie can be solved by adding your own hostverifier to your code. Adding the following snippet will accept any host. Use this with caution in a production environment and allow only known mappings.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;HostnameVerifier hostnameVerifier = new HostnameVerifier() &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;{ public boolean verify(String urlHostName, SSLSession session) { System.out.println("Warning: URL Host: " + urlHostName + " v/s " + session.getPeerHost()); return true; } }; HttpsURLConnection.setDefaultHostnameVerifier(hostnameVerifier);&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;5) Create authorization handler, if page is password protected&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The next challenge you may run in to is if the site you are visiting is protected by username/password. You need to add an authenticator. The easiest way to do this is to add a default authenticator.&lt;br /&gt;The following is an example of a simple authenticator:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;static class MyAuthenticator extends Authenticator { &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;String username , password ;&lt;br /&gt;MyAuthenticator(String user, String pwd ) {&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;super(); &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;username = user ; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;password = pwd; &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;} &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;protected PasswordAuthentication getPasswordAuthentication() {&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;return new PasswordAuthentication (username, password.toCharArray()); &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;} &lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color: rgb(51, 0, 153);font-family:courier new;" &gt;}&lt;br /&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;Now to activate this authenticator, you need to add the following code to your source.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="color: rgb(51, 0, 153);font-family:arial;" &gt;MyAuthenticator auth = new MyAuthenticator(user, passwd); Authenticator.setDefault( auth);&lt;br /&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;Hope fully these steps will get you going with making a url connection to a url that is ssl enabled and password protected.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-8799865218773688395?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/8799865218773688395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=8799865218773688395' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8799865218773688395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/8799865218773688395'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2008/02/https-connection-in-java.html' title='HTTPS Connection in Java'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-7450951031111610319</id><published>2008-02-01T09:53:00.000-05:00</published><updated>2008-02-11T21:53:42.052-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wily'/><category scheme='http://www.blogger.com/atom/ns#' term='Interscope'/><title type='text'>Wily Notes</title><content type='html'>Here are some notes I took from Wiley class:&lt;br /&gt;&lt;br /&gt;1) Wiley offers a way to group metric by URL. However the default configuration puts all the values in to one category called default. I found the following set of configuration groups them my application context and then my urls.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;introscope.agent.urlgroup.keys=default&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;introscope.agent.urlgroup.group.default.pathprefix=*&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;introscope.agent.urlgroup.group.default.format={path_delimited:/:1:3}{path_delimited:/:2:4}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The above configuration works well, except it leaves the '/' in the url. I have not figured out how to get rid of it yet.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:+0;"&gt;&lt;/span&gt;Wily uses property files for most configuration. Even though they look like java properties file, they do not support line break. ie you cannot use "\" at the end of the line to split the value of a property across multiple lines.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Is there any difference between multiple metric tracer and single metric tracer?&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;No significent performance improvemnet on the agent. But, the EM will perform better as it has less data to process. Also, it helps with the limit of 200K metric per agent limit. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Multiple dashboards with different security privilige&lt;br /&gt;&lt;/p&gt;&lt;p&gt;You can create different domains and assign dashboards to those domains and controluser access at the domain level. This gives a nice way of eliminating complexity of the UI for users who do not have to see all the dashboards.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-7450951031111610319?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/7450951031111610319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=7450951031111610319' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/7450951031111610319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/7450951031111610319'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2008/02/wily-notes.html' title='Wily Notes'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6873099295148794773.post-3265990626828597490</id><published>2007-06-08T11:29:00.000-04:00</published><updated>2008-02-11T21:55:57.547-05:00</updated><title type='text'>Mobile Coupons</title><content type='html'>There are so many companies trying to send coupons to the mobile phone. For lot of people it might look &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;convenient&lt;/span&gt;. But if we think about how they would do this with today's technology, most people might change their mind as the savings offered by the coupons may not be worth the trouble. Here is the list of reasons why I do not want advertising on my mobile phone.&lt;br /&gt;&lt;br /&gt;1) Messaging - No on my home phone same for my cell phone.&lt;br /&gt;I do not like telemarketers call me on my home phone. For the same reason, I do not want text/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;mms&lt;/span&gt; messages coming to me on my cell phone. To make things worse, I might even get charged for the message that I never wanted.&lt;br /&gt;&lt;br /&gt;2) Location tracking&lt;br /&gt;There are some companies that sends you coupons based on where you are. To effectively do this companies need to know track your location 24/7. Is it worth letting a company track your location 24/7 in hope for a $2 coupon?&lt;br /&gt;This might be okay if you are searching for something specific and you get some offers based on what you searched and where you are. However, most people are not searching for stuff while they are shopping.&lt;br /&gt;&lt;br /&gt;3) Downloading applications&lt;br /&gt;May be this is just my feeling. Cell phones are already getting complicated. The more apps you download in to it the less responsive it becomes. I think twice before installing an app on my laptop. To download an app on my cell phone I will be even more hesitant. Considering the battery drain these apps will cause it is not worth downloading and running any app unless it is critical.&lt;br /&gt;&lt;br /&gt;So for me to opt in to any type of push messages on my cell phones, all these issues need to be addressed. &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;Until&lt;/span&gt; some one comes up with that solution, I will use my cell phone for just for voice, email and an &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;occasional&lt;/span&gt; web surfing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6873099295148794773-3265990626828597490?l=blog.technogemsinc.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.technogemsinc.com/feeds/3265990626828597490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6873099295148794773&amp;postID=3265990626828597490' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/3265990626828597490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6873099295148794773/posts/default/3265990626828597490'/><link rel='alternate' type='text/html' href='http://blog.technogemsinc.com/2007/06/mobile-coupons.html' title='Mobile Coupons'/><author><name>Jean</name><uri>http://www.blogger.com/profile/13194337908510609133</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
