<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;D04NQX4_fSp7ImA9WhRRFE4.&quot;"><id>tag:blogger.com,1999:blog-2564517520207117824</id><updated>2011-11-27T15:19:50.045-08:00</updated><title>SOA Infrastructure</title><subtitle type="html">Articles on Service Oriented Architecture topics.  These will include "How-To's" on various Oracle Products such as: Oracle WebLogic Server, Oracle Coherence, Oracle Entitlements Server (OES), Oracle Data Integrator (ODI), and Oracle JRockit.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://soainfrastructure.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://soainfrastructure.blogspot.com/" /><author><name>Steven Pozarycki</name><uri>http://www.blogger.com/profile/02394091549061147655</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>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/SoaInfrastructure" /><feedburner:info uri="soainfrastructure" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DUcEQX89eyp7ImA9Wx5RFko.&quot;"><id>tag:blogger.com,1999:blog-2564517520207117824.post-3716676428350644341</id><published>2010-08-24T12:10:00.000-07:00</published><updated>2010-08-24T12:10:00.163-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-24T12:10:00.163-07:00</app:edited><title>Sizing Oracle Coherence Applications</title><content type="html">The following is the last of the five posts which will list the best practices and performance suggestions for tuning one’s Oracle Coherence environment.&amp;nbsp; This is a general guide that will evolve as new product features are added to Oracle Coherence.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=3716676428350644341" name="_Toc267995751"&gt;Sizing Oracle Coherence&lt;/a&gt;&lt;/h3&gt;Remember there are 4 types of virtual machines in Coherence:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;JVMs that are used for data storage (“storage JVMs”)&lt;/li&gt;
&lt;li&gt;JVMs that run client applications and do not store data (“client JVMs”)&lt;/li&gt;
&lt;li&gt;JVMs that run client applications and connect to the cluster via Coherence*Extend (TCP/IP)&lt;/li&gt;
&lt;li&gt;.NET applications that run client applications and connect to the cluster via Coherence*Extend (TCP/IP)&lt;/li&gt;
&lt;/ol&gt;The protocol for storage and client JVMs (type 1 and 2 above) is TCMP (“Tangosol Cluster Management Protocol”, based on UDP unicast).&lt;br /&gt;
&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=3716676428350644341" name="_Toc267995752"&gt;Tips for Sizing Oracle Coherence&lt;/a&gt;&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Allow extra space for overhead&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Every object has one full backup on another JVM on another machine&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;If a JVM fails, Oracle Coherence automatically fails over AND creates new backups on other JVMs&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;This means that if a JVM fails, other JVMs will need to accommodate the backups of the objects&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Rule-of-thumb: each 1 GB JVM can store 350 MB of actual object data&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;That means a 16 GB machine will support about 4.5 GB of raw object data. 13 JVMs * 350 MB = 4.55 GB&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;ul&gt;&lt;/ul&gt;&lt;b&gt;&lt;u&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Question #1:&lt;/u&gt;&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; How many 1 GB JVMs can you run on a box with 16 GB of RAM?&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;Answer: At most 13&lt;br /&gt;
Start with 16 GB of RAM&lt;br /&gt;
Subtract RAM required for OS and other apps&lt;br /&gt;
/ divide by 1.2 (remember, 1 GB of heap uses 1.2 GB of RAM)&lt;br /&gt;
(16 GB – 400 MB ) / 1.2 GB = ~ 13&lt;/blockquote&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Question #2:&lt;/u&gt;&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; How many 16 GB machines will be required to support 20 GB of data in the grid?&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;Answer: At least five (six for HA)&lt;br /&gt;
* Each JVM handles 350 MB&lt;br /&gt;
* You have 13 JVMs per machine&lt;br /&gt;
* You have 4.5 GB per machine (13 * 350 MB)&lt;br /&gt;
* 20 GB / 4.5 GB per box = 4.44&lt;br /&gt;
* Round up to 5&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
I hope these series of five posts on Oracle Coherence have been helpful to you!&lt;div class="blogger-post-footer"&gt;&lt;p&gt;"The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation."&lt;/p&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2564517520207117824-3716676428350644341?l=soainfrastructure.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/y_zNtVDV4lVmUqILIY76pso21IQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/y_zNtVDV4lVmUqILIY76pso21IQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/y_zNtVDV4lVmUqILIY76pso21IQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/y_zNtVDV4lVmUqILIY76pso21IQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoaInfrastructure/~4/OeZKpmkOZA8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soainfrastructure.blogspot.com/feeds/3716676428350644341/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://soainfrastructure.blogspot.com/2010/08/sizing-oracle-coherence-applications.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/3716676428350644341?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/3716676428350644341?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoaInfrastructure/~3/OeZKpmkOZA8/sizing-oracle-coherence-applications.html" title="Sizing Oracle Coherence Applications" /><author><name>Steven Pozarycki</name><uri>http://www.blogger.com/profile/02394091549061147655</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><feedburner:origLink>http://soainfrastructure.blogspot.com/2010/08/sizing-oracle-coherence-applications.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08AQX86fyp7ImA9Wx5REEo.&quot;"><id>tag:blogger.com,1999:blog-2564517520207117824.post-4525245411917958843</id><published>2010-08-17T12:04:00.000-07:00</published><updated>2010-08-17T12:04:00.117-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-17T12:04:00.117-07:00</app:edited><title>Tuning Oracle Coherence*Web Applications</title><content type="html">The following is the fourth of five posts which will list the best practices and performance suggestions for tuning one’s Oracle Coherence environment.&amp;nbsp; This is a general guide that will evolve as new product features are added to Oracle Coherence.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4525245411917958843" name="_Toc267995753"&gt;Oracle Coherence*Web&lt;/a&gt;&lt;/h3&gt;Oracle Coherence*Web is an HTTP session management module and a drop-in replacement for application server container session management. It basically “wraps” existing web applications, no runtime byte code manipulation is done and any requests to use sessions (from servlets, JSPs, filters, etc) are intercepted by Oracle Coherence*Web wrappers.&amp;nbsp; For more details you can look at:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://coherence.oracle.com/display/COH35UG/Coherence*Web+Session+Management+Module"&gt;Coherence*Web Session Management Module&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://coherence.oracle.com/display/COH35UG/Coherence*Web+and+WebLogic+Server"&gt;Coherence*Web and WebLogic Server&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://coherence.oracle.com/display/COH35UG/Installing+Coherence*Web+Using+the+WebInstaller#InstallingCoherence*WebUsingtheWebInstaller-installwebsummary"&gt;Coherence*Web and Other Application Server Containers&lt;/a&gt;&lt;br /&gt;
&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4525245411917958843" name="_Toc267995754"&gt;High-Level Steps to enable Oracle Coherence*Web&lt;/a&gt;&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Run the inspector on the existing WAR/EAR file (This generates a coherence-web.xml configuration file. This file wraps all servlets, filters, etc with Coherence implementations. It also contains configuration settings for Coherence*Web)&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Inspect and (if any changes are required) modify the coherence-web.xml file&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Run the installer process on the existing WAR/EAR which generates a new WAR/EAR and backs up the original WAR/EAR.&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;You now deploy the new WAR/EAR to the Application Server Container&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;The complete steps for the Oracle WebLogic Server are listed &lt;a href="http://coherence.oracle.com/display/COH35UG/Installing+Coherence*Web+Using+the+WebInstaller#InstallingCoherence*WebUsingtheWebInstaller-installwebwl10"&gt;here&lt;/a&gt;. &lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4525245411917958843" name="_Toc267995755"&gt;Troubleshooting Oracle Coherence*Web&lt;/a&gt;&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Obtain a baseline for the application without Coherence to properly determine how sessions are being used and replicated. This will make it easier to compare with Coherence and further troubleshoot.&lt;/li&gt;
&lt;li&gt;Network throughput can be an issue as well. Run a datagram test to determine how much one can push between machines. This will help tune the network between the web application tier and the data grid. Review the &lt;a href="http://soainfrastructure.blogspot.com/2010/07/tuning-coherence-application.html"&gt;first post&lt;/a&gt; in this series and specifically in the networking section.&lt;/li&gt;
&lt;li&gt;The session model will be a factor in the performance; the split session model is default and will keep small session attributes in the near cache while large ones will be accessed from the grid. If the application regularly uses lots of large attributes, another model may be more appropriate. Review the Session Models at this &lt;a href="http://coherence.oracle.com/display/COH35UG/Session+Management+for+Clustered+Applications"&gt;link&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Review their cache configuration file. From a web application caching perspective, Coherence*Web in a web-app really gets a big benefit from a near caching scheme, where objects of a size less than 1K are kept in the local JVM, avoiding the network hop and marshalling/deserialization.&lt;/li&gt;
&lt;li&gt;If one is deploying multiple web applications, sometimes it's desirable to share session attributes and sometimes it is not. There is configuration for scoping link on this &lt;a href="http://coherence.oracle.com/display/COH35UG/Coherence*Web+Session+Management+Module"&gt;page&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;For sizing it depends on the web-application and how the web-application uses the session to determine the proper size of the grid. Some testing with some average test cases should be used to arrive at a metric such as “1 user takes X MB in the grid”.&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;p&gt;"The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation."&lt;/p&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2564517520207117824-4525245411917958843?l=soainfrastructure.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/v8UBKn3xup3lroGXebA47EBNxbA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/v8UBKn3xup3lroGXebA47EBNxbA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/v8UBKn3xup3lroGXebA47EBNxbA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/v8UBKn3xup3lroGXebA47EBNxbA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoaInfrastructure/~4/AMP201WgGBs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soainfrastructure.blogspot.com/feeds/4525245411917958843/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://soainfrastructure.blogspot.com/2010/08/tuning-oracle-coherenceweb-applications.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/4525245411917958843?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/4525245411917958843?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoaInfrastructure/~3/AMP201WgGBs/tuning-oracle-coherenceweb-applications.html" title="Tuning Oracle Coherence*Web Applications" /><author><name>Steven Pozarycki</name><uri>http://www.blogger.com/profile/02394091549061147655</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><feedburner:origLink>http://soainfrastructure.blogspot.com/2010/08/tuning-oracle-coherenceweb-applications.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8CQXsycSp7ImA9Wx5SFEs.&quot;"><id>tag:blogger.com,1999:blog-2564517520207117824.post-3950783333431048889</id><published>2010-08-10T12:01:00.000-07:00</published><updated>2010-08-10T12:01:00.599-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-10T12:01:00.599-07:00</app:edited><title>Tuning/Troubleshooting Oracle Coherence Applications</title><content type="html">&lt;h4&gt;&lt;span style="font-weight: normal;"&gt;The following is the third of five posts which will list the best practices and performance suggestions for tuning one’s Oracle Coherence environment.&amp;nbsp; This is a general guide that will evolve as new product features are added to Oracle Coherence.&lt;/span&gt;&lt;/h4&gt;&lt;h4&gt;&lt;br /&gt;
&lt;/h4&gt;&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=3950783333431048889" name="_Toc267995749"&gt;Troubleshooting Multicast Issues&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;ol start="start"&gt;&lt;li&gt;If you have Oracle Coherence installed on the hosts between which you're testing multicasting, you can use its &lt;a href="http://coherence.oracle.com/display/COH35UG/Performing+a+Multicast+Connectivity+Test"&gt;multicast connectivity test&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;In addition you can use its &lt;a href="http://coherence.oracle.com/display/COH35UG/Performing+a+Datagram+Test+for+Network+Performance"&gt;datagram test&lt;/a&gt; to measure network throughput. The practical max on a well-tuned gigabit Ethernet link is ~115MB/sec.&lt;/li&gt;
&lt;li&gt;Finally make sure to use: -Djava.net.preferIPv4Stack=true&lt;/li&gt;
&lt;li&gt;Optionally one can use &lt;a href="http://coherence.oracle.com/display/COH35UG/well-known-addresses"&gt;Well-Known-Addresses&lt;/a&gt; (WKA or Unicast) to eliminate any multicast issue.&lt;/li&gt;
&lt;li&gt;If one is on Windows 2003, 2008, Vista, or Windows 7 and are experiencing problems with sharing ports for multicast check the registry for &lt;i&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Afd\Parameters\DisableAddressSharing&lt;/i&gt; and see if it is set to “1”. If so change this to “0”, reboot the machine, and retest. From &lt;a href="http://msdn.microsoft.com/en-us/library/ms740621"&gt;Microsoft&lt;/a&gt;: &lt;i&gt;"Enhanced socket security was added with the release of Windows Server 2003. In previous Microsoft server operating system releases, the default socket security easily allowed processes to hijack ports from unsuspecting applications. In Windows Server 2003, sockets are not in a sharable state by default. Therefore, if an application wants to allow other processes to reuse a port on which a socket is already bound, it must specifically enable it. "&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;If one is on Windows, run the following command to generate some further information on the machine’s networking:&lt;/li&gt;
&lt;/ol&gt;&lt;blockquote&gt;&lt;i&gt;netsh firewall show state verbose=enable&lt;/i&gt;&lt;/blockquote&gt;&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=3950783333431048889" name="_Toc267995750"&gt;Log Messages Explanation&lt;/a&gt;&lt;/h4&gt;&lt;br /&gt;
Review the following &lt;a href="http://coherence.oracle.com/display/COH35UG/TCMP+Log+Messages"&gt;link&lt;/a&gt; for causes and actions to common TCMP (Tangosol Cluster Management Protocol, based on UDP unicast) log messages from Coherence.&lt;div class="blogger-post-footer"&gt;&lt;p&gt;"The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation."&lt;/p&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2564517520207117824-3950783333431048889?l=soainfrastructure.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/tYqkVHPAN2Jbl6Iu6KBV-hVBzWg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tYqkVHPAN2Jbl6Iu6KBV-hVBzWg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/tYqkVHPAN2Jbl6Iu6KBV-hVBzWg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tYqkVHPAN2Jbl6Iu6KBV-hVBzWg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoaInfrastructure/~4/l33MskMppO4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soainfrastructure.blogspot.com/feeds/3950783333431048889/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://soainfrastructure.blogspot.com/2010/08/tuningtroubleshooting-oracle-coherence.html#comment-form" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/3950783333431048889?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/3950783333431048889?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoaInfrastructure/~3/l33MskMppO4/tuningtroubleshooting-oracle-coherence.html" title="Tuning/Troubleshooting Oracle Coherence Applications" /><author><name>Steven Pozarycki</name><uri>http://www.blogger.com/profile/02394091549061147655</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>5</thr:total><feedburner:origLink>http://soainfrastructure.blogspot.com/2010/08/tuningtroubleshooting-oracle-coherence.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0MEQXkzfSp7ImA9Wx5TGEs.&quot;"><id>tag:blogger.com,1999:blog-2564517520207117824.post-6134649448230396153</id><published>2010-08-03T11:50:00.000-07:00</published><updated>2010-08-03T11:50:00.785-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-03T11:50:00.785-07:00</app:edited><title>Troubleshooting Checklist for Oracle Coherence Applications</title><content type="html">&lt;h4&gt;&lt;/h4&gt;The following is the second of five posts which will list the best  practices and performance suggestions for tuning one’s Oracle Coherence  environment.&amp;nbsp; This is a general guide that will evolve as new product  features are added to Oracle Coherence.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=6134649448230396153" name="_Toc267995748"&gt;General Oracle Coherence Performance Questions&lt;/a&gt;&lt;/h4&gt;The following is a general list of questions to review when troubleshooting performance issues with Coherence.&lt;br /&gt;
&lt;ol start="start"&gt;&lt;li&gt;What application server is being used in conjunction with Oracle Coherence?&lt;/li&gt;
&lt;li&gt;Is Oracle Coherence being run within the same JVM as the app-server container or is the data grid setup outside of the app-server container? (i.e. is storage disabled here with –Dtangosol.coherence.distributed.localstorage=false ) &lt;/li&gt;
&lt;li&gt;How many storage nodes are being used for Oracle Coherence? (Is there adequate storage for all the data?)&lt;/li&gt;
&lt;li&gt;What size is the java heaps for these storage nodes?&lt;/li&gt;
&lt;li&gt;Are the out-of-the-box Oracle Coherence configuration files being used from within coherence.jar? (i.e. Coherence itself has not been tuned to the environment/application?) See &lt;a href="http://download.oracle.com/docs/cd/E14526_01/coh.350/e14509/appsamplecacheconfigs.htm#BACDCDEA"&gt;Sample Cache Configuration Files&lt;/a&gt; for details.&lt;/li&gt;
&lt;li&gt;Are configuration files specified via a –D flag to the Oracle Coherence Cache Servers or within a jar file? i.e. -Dtangosol.coherence.override=&amp;lt;file&amp;gt; and -Dtangosol.coherence.cacheconfig=&amp;lt;file&amp;gt; being used?&lt;/li&gt;
&lt;li&gt;What is the Thread-count set for Oracle Coherence?&lt;/li&gt;
&lt;li&gt;What type of partitioning is being used? Is a near-cache being used or replicated? &lt;i&gt;“Partitioned/Distributed cache gives a real linear scalability and should be used in pretty much all scenarios. With Replicated cache the same data are copied over to all the nodes and is very performance taxing if data are changed.” &lt;/i&gt;Information on the &lt;a href="http://coherence.oracle.com/display/COH35UG/Near+Cache"&gt;near-cache&lt;/a&gt;, &lt;a href="http://coherence.oracle.com/display/COH35UG/Partitioned+Cache+Service"&gt;partitioned cache&lt;/a&gt; and &lt;a href="http://coherence.oracle.com/display/COH35UG/Replicated+Cache+Service"&gt;replicated cache&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;Multicast or Unicast? (Review the Multicast Troubleshooting section below.)&lt;/li&gt;
&lt;li&gt;Is this a 32 bit JVM or a 64 bit JVM? JRockit or Sun JVM? &lt;/li&gt;
&lt;li&gt;What garbage collection algorithm is being used? &lt;/li&gt;
&lt;li&gt;Review the &lt;a href="http://download.oracle.com/docs/cd/E14526_01/coh.350/e14509/appdeploy.htm#BIHFJDJE"&gt;Platform-Specific Deployment Considerations&lt;/a&gt; section of the documentation.&lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;p&gt;"The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation."&lt;/p&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2564517520207117824-6134649448230396153?l=soainfrastructure.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/idzCEX_d_6ZqePrlECVfUGtBDe8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/idzCEX_d_6ZqePrlECVfUGtBDe8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/idzCEX_d_6ZqePrlECVfUGtBDe8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/idzCEX_d_6ZqePrlECVfUGtBDe8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoaInfrastructure/~4/APAP9bidsMs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soainfrastructure.blogspot.com/feeds/6134649448230396153/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://soainfrastructure.blogspot.com/2010/08/troubleshooting-checklist-for-oracle.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/6134649448230396153?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/6134649448230396153?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoaInfrastructure/~3/APAP9bidsMs/troubleshooting-checklist-for-oracle.html" title="Troubleshooting Checklist for Oracle Coherence Applications" /><author><name>Steven Pozarycki</name><uri>http://www.blogger.com/profile/02394091549061147655</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><feedburner:origLink>http://soainfrastructure.blogspot.com/2010/08/troubleshooting-checklist-for-oracle.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0MFRn85eSp7ImA9Wx5TGEQ.&quot;"><id>tag:blogger.com,1999:blog-2564517520207117824.post-1837412755893721250</id><published>2010-07-27T11:38:00.001-07:00</published><updated>2010-08-03T20:10:17.121-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-03T20:10:17.121-07:00</app:edited><title>Tuning a Oracle Coherence Application</title><content type="html">The following is the first of five posts which will list the best practices and performance suggestions for tuning one’s Oracle Coherence environment.&amp;nbsp; This is a general guide that will evolve as new product features are added to Oracle Coherence.&amp;nbsp;&amp;nbsp; In general the key performance killers for any data-grid are the:&amp;nbsp; Network, Java Virtual Machine (JVM) configuration and grid configuration.&amp;nbsp; Network is critical and running a multicast test will help validate the environment.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=1837412755893721250" name="_Toc267995746"&gt;Tuning a Oracle Coherence Application&lt;/a&gt;&lt;/h3&gt;&lt;h3 style="font-weight: normal;"&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp; Network Topology:&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt;&lt;ol&gt;&lt;/ol&gt;&lt;ol&gt;&lt;ol start="start"&gt;&lt;li&gt;Check the &lt;a href="http://coherence.oracle.com/display/COH35UG/Performance+Tuning#PerformanceTuning-NetworkTuning"&gt;Network&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Check the &lt;a href="http://coherence.oracle.com/display/COH35UG/Performance+Tuning#PerformanceTuning-PathMTU"&gt;MTU size&lt;/a&gt;.&amp;nbsp;&amp;nbsp; Oracle Coherence uses a packet size based on the standard 1500 byte MTU.&amp;nbsp; If one is on Windows, this operating system includes a fast I/O path for "small" packets, where small is defined as 1024 bytes.&amp;nbsp; Increasing this limit to match the MTU can significantly improve network performance. &lt;a href="http://www.microsoft.com/windows/windowsmedia/howto/articles/optimize_web.aspx#tuning_tcpipregistry"&gt;FastSendDatagramThreshold&lt;/a&gt; is the registry value for this on Windows. To make these changes to your registry, run the included "optimize.reg" registry file in the Oracle Coherence product installation.&lt;/li&gt;
&lt;li&gt;Run the &lt;a href="http://coherence.oracle.com/display/COH35UG/Performing+a+Datagram+Test+for+Network+Performance"&gt;Datagram test&lt;/a&gt; to measure network throughput and check the success rate.&amp;nbsp; The practical max on a well-tuned gigabit Ethernet link is ~115MB/sec.&lt;/li&gt;
&lt;li&gt;Make sure there is a 1 GB network between all servers (avoid mixed speed networks)&lt;/li&gt;
&lt;li&gt;Network Switch tuning (avoid multiple switches)&lt;/li&gt;
&lt;li&gt;Are Cisco switches involved?&amp;nbsp; The solution is to make sure unicast is being used with &lt;a href="http://coherence.oracle.com/display/COH35UG/well-known-addresses"&gt;WKA&lt;/a&gt; (Well-Known Addresses).&amp;nbsp; See the following link with &lt;a href="http://coherence.oracle.com/display/COH35UG/Deployment+Considerations+-+Cisco+Switches"&gt;Cisco Switches&lt;/a&gt; around packet pauses (visible when coherence logging is turned up).&lt;/li&gt;
&lt;li&gt;Check the JMX MBean for packet delivery/receiver success rates when running these basic tests.&lt;/li&gt;
&lt;/ol&gt;&lt;/ol&gt;&lt;br /&gt;
&lt;ol&gt;&lt;ol start="start"&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;ol&gt;&lt;b&gt;Operating System:&lt;/b&gt;&lt;/ol&gt;&lt;ol start="start"&gt;&lt;/ol&gt;&lt;ol start="start"&gt;&lt;ol&gt;&lt;li&gt;Adjust &lt;a href="http://coherence.oracle.com/display/COH35UG/Performance+Tuning#PerformanceTuning-OSTuning"&gt;UDP buffer size&lt;/a&gt; on the operating systems where the Oracle Coherence Servers are running.&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;&lt;/ol&gt;&lt;br /&gt;
&lt;ol start="start"&gt;&lt;ol&gt;&lt;/ol&gt;&lt;b&gt;JVM Tuning:&lt;/b&gt;&lt;/ol&gt;&lt;ol start="start"&gt;&lt;/ol&gt;&lt;ol start="start"&gt;&lt;ul&gt;&lt;li&gt;Start with a Java Heap of 1 GB (-Xms=1g -Xmx=1g) for each Oracle Coherence Server and tune from there based on performance tests, application profile, and the operating system (32 bit or 64 bit OS). A JVM with 1 GB heap uses 1.2 GB of physical RAM.&lt;/li&gt;
&lt;li&gt;Do not configure your JVMs to exceed physical RAM since this will cause swapping and bad performance.&lt;/li&gt;
&lt;/ul&gt;&lt;/ol&gt;&lt;blockquote&gt;&lt;i&gt;1. Run “swap –l”, “top”, or “vmstat” to verify the system is not swapping  and RAM is available&lt;/i&gt; &lt;br /&gt;
&lt;i&gt;2. Allow ~400 MB for the operating system&lt;/i&gt; &lt;br /&gt;
&lt;i&gt;3. Take into account other software running on the system&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;ol start="start"&gt;&lt;ul&gt;&lt;li&gt;If one is using Oracle HotSpot VM, make sure to use the &lt;a href="http://java.sun.com/docs/hotspot/HotSpotFAQ.html#compiler_default"&gt;“-server”&lt;/a&gt; argument.&amp;nbsp;&amp;nbsp; This is a link to all &lt;a href="http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp"&gt;HotSpot VM Options&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;If one is using Oracle JRockit RealTime VM, the following parameters are a good starting point&lt;/li&gt;
&lt;/ul&gt;&lt;/ol&gt;&lt;blockquote&gt;&lt;i&gt;-Xms=1g -Xmx=1g &lt;/i&gt;&lt;i&gt;-XgcPrio:deterministic -XpauseTarget=10ms  -Xverbose:opt,memory,gc,gcpause,memdbg,compaction,starttime,load,cpuinfo,systemgc  -Xverbosetimestamp –Xgcreport &lt;/i&gt;&lt;i&gt;-Xverboselog:/full/path/logfile.log&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;ol start="start"&gt;&lt;ul&gt;&lt;li&gt;If one is running into strange Network issues, make sure to first add the following flag to the Oracle Coherence Server nodes: -Djava.net.preferIPv4Stack=true&lt;/li&gt;
&lt;/ul&gt;&lt;/ol&gt;&lt;br /&gt;
&lt;ol start="start"&gt;&lt;ul&gt;&lt;/ul&gt;&lt;/ol&gt;&lt;ol start="start"&gt;&lt;b&gt;Oracle Coherence Application Tuning&lt;/b&gt;&lt;/ol&gt;&lt;ol start="start"&gt;&lt;/ol&gt;&lt;ol start="start"&gt;&lt;ol start="start"&gt;&lt;li&gt;Use getall() and putall() APIs which will result in a huge performance improvement&lt;/li&gt;
&lt;li&gt;Serialization:&amp;nbsp; Use either the &lt;a href="http://download.oracle.com/otn_hosted_doc/coherence/353/com/tangosol/io/ExternalizableLite.html"&gt;ExternalizableLite&lt;/a&gt; interface or POF (&lt;a href="http://coherence.oracle.com/display/COH35UG/The+Portable+Object+Format"&gt;Portable Object Framework&lt;/a&gt;) from Coherence.&amp;nbsp; POF will result in the best performance gains (up to seven times (7x) compared to java.io.Serializable) however there is more initial code to with POF.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://coherence.oracle.com/display/COH35UG/Implement+Transactions%2C+Locks%2C+and+Concurrency#ImplementTransactions%2CLocks%2CandConcurrency-EntryProcessors"&gt;Entry Processors&lt;/a&gt; -&amp;nbsp; can be used to update data instead of doing:&lt;i&gt;&amp;nbsp; lock(id),&lt;/i&gt;&lt;i&gt; value=getID&lt;/i&gt;&lt;i&gt;, setValue&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;Set once across the wire instead of multiple locks/etc in order to execute business rules where the data lives.&amp;nbsp; Three times (3x) improvement from less network hops.&amp;nbsp; Use invokeAll() API and look into setting the thread count in cache configuration to higher than one for this.&lt;/li&gt;
&lt;li&gt;Use &lt;a href="http://coherence.oracle.com/display/COH35UG/Deliver+events+for+changes+as+they+occur#Delivereventsforchangesastheyoccur-%22Lite%22Events"&gt;“lite” events&lt;/a&gt; such as event listeners which can be configured to receive or not receive old/new values.&lt;/li&gt;
&lt;li&gt;Database integration – &lt;a href="http://wiki.tangosol.com/display/COH33UG/Read-Through,+Write-Through,+Refresh-Ahead+and+Write-Behind+Caching"&gt;Caching Strategy&lt;/a&gt;&amp;nbsp;&lt;/li&gt;

&lt;ol&gt;&lt;li&gt;Coherence Behind - Use Oracle Coherence as L2 Cache for ORM (Oracle TopLink JPA)&lt;/li&gt;
&lt;li&gt;Coherence to the side - Application manages Data Crud in Oracle Coherence next to OR/M&lt;/li&gt;
&lt;li&gt;Coherence on Top - Coherence is the system of record, use cacheloaders and cache stores to integrate with Data Sources&lt;/li&gt;
&lt;/ol&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;div align="left"&gt;Review the &lt;a href="http://coherence.oracle.com/display/COH35UG/Production+Checklist"&gt;Production Checklist&lt;/a&gt; which contains information on the following topics:&lt;/div&gt;&lt;/blockquote&gt;&lt;ol start="start"&gt;&lt;/ol&gt;&lt;ol start="start"&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://coherence.oracle.com/display/COH35UG/Production+Checklist#ProductionChecklist-Network"&gt;Network&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://coherence.oracle.com/display/COH35UG/Production+Checklist#ProductionChecklist-Hardware"&gt;Hardware&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://coherence.oracle.com/display/COH35UG/Production+Checklist#ProductionChecklist-OperatingSystem"&gt;Operating System&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://coherence.oracle.com/display/COH35UG/Production+Checklist#ProductionChecklist-JVM"&gt;JVM&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://coherence.oracle.com/display/COH35UG/Production+Checklist#ProductionChecklist-JavaSecurityManager"&gt;Java Security Manager&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://coherence.oracle.com/display/COH35UG/Production+Checklist#ProductionChecklist-ApplicationInstrumentation"&gt;Application Instrumentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://coherence.oracle.com/display/COH35UG/Production+Checklist#ProductionChecklist-CoherenceEditionsandModes"&gt;Coherence Editions and Modes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://coherence.oracle.com/display/COH35UG/Production+Checklist#ProductionChecklist-CoherenceOperationalConfiguration"&gt;Coherence Operational Configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://coherence.oracle.com/display/COH35UG/Production+Checklist#ProductionChecklist-CoherenceCacheConfiguration"&gt;Coherence Cache Configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://coherence.oracle.com/display/COH35UG/Production+Checklist#ProductionChecklist-LargeClusterConfiguration"&gt;Large Cluster Configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://coherence.oracle.com/display/COH35UG/Production+Checklist#ProductionChecklist-OtherResources"&gt;Other Resources&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/ol&gt;&lt;h4&gt;&lt;/h4&gt;&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;Oracle Coherence Networking Links&lt;/h4&gt;&lt;a href="http://coherence.oracle.com/display/COH35UG/Network+Protocols"&gt;Coherence TCMP Network Protocol Explanation&lt;/a&gt;&amp;nbsp; TCMP stands for “Tangosol Cluster Management Protocol” which is based on UDP Unicast.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;Important Links&lt;/h4&gt;&lt;a href="http://coherence.oracle.com/display/COH35UG/Best+Practices"&gt;Best Practices&amp;nbsp; &lt;/a&gt;&lt;br /&gt;
&lt;a href="http://coherence.oracle.com/display/COH35UG/Performance+Tuning"&gt;Performance Tuning&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://coherence.oracle.com/display/COH35UG/Production+Checklist"&gt;Production Checklist&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://coherence.oracle.com/display/COHFAQ/Home"&gt;Coherence Technical FAQ&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://download.oracle.com/docs/cd/E14526_01/coh.350/e14509/parttesttune.htm#sthref130"&gt;Testing and Tuning Coherence&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://download.oracle.com/docs/cd/E14526_01/coh.350/e14509/appsamplecacheconfigs.htm#BACDCDEA"&gt;Sample Cache Configuration Files&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://download.oracle.com/docs/cd/E14526_01/coh.350/e14509/appdeploy.htm#BIHFJDJE"&gt;Platform-Specific Deployment Considerations&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://download.oracle.com/docs/cd/E14526_01/coh.350/e14509/preloadcache.htm#CACCFCFJ"&gt;Patterns for Pre-Loading the Cache&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;p&gt;"The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation."&lt;/p&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2564517520207117824-1837412755893721250?l=soainfrastructure.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/pVCP5AasNHBYJlPUMWhPRAV4HaY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pVCP5AasNHBYJlPUMWhPRAV4HaY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/pVCP5AasNHBYJlPUMWhPRAV4HaY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pVCP5AasNHBYJlPUMWhPRAV4HaY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoaInfrastructure/~4/rfuvHLnuzaY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soainfrastructure.blogspot.com/feeds/1837412755893721250/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://soainfrastructure.blogspot.com/2010/07/tuning-coherence-application.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/1837412755893721250?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/1837412755893721250?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoaInfrastructure/~3/rfuvHLnuzaY/tuning-coherence-application.html" title="Tuning a Oracle Coherence Application" /><author><name>Steven Pozarycki</name><uri>http://www.blogger.com/profile/02394091549061147655</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><feedburner:origLink>http://soainfrastructure.blogspot.com/2010/07/tuning-coherence-application.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEcBQXw9eyp7ImA9WxFWEkU.&quot;"><id>tag:blogger.com,1999:blog-2564517520207117824.post-3667835699008126363</id><published>2010-05-26T08:30:00.000-07:00</published><updated>2010-05-30T22:00:50.263-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-30T22:00:50.263-07:00</app:edited><title>Oracle Coherence 3.5 Book Review Results</title><content type="html">&lt;span style="font-size: large;"&gt;&lt;b&gt;Review of Oracle Coherence 3.5 Book&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The following is my review of the &lt;a href="http://www.packtpub.com/oracle-coherence-3-5/book?utm_source=soainfrastructure.blogspot.com&amp;amp;utm_medium=bookrev&amp;amp;utm_content=blog&amp;amp;utm_campaign=mdb_003030" style="font-family: Arial,Helvetica,sans-serif;"&gt;Oracle Coherence 3.5 eBook&lt;/a&gt; from Packt Publishing.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;b&gt;High-Level Overview&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;I though this was an excellent book on Oracle Coherence!&amp;nbsp; &lt;/li&gt;
&lt;li&gt;Each chapter builds upon the previous like building blocks to build a solid foundation of knowledge and is an excellent reference book.&amp;nbsp; &lt;/li&gt;
&lt;li&gt;The core chapters (5,6,7,8) are very powerful, a great read and I highly recommend reading this book!&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;b&gt;Detail:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Preface: Review/Refresh of "What Coherence is..." for everyone.&amp;nbsp; More advanced users of Coherence can skip this part.&lt;/li&gt;
&lt;li&gt;Chapter 1: A review and background of RASP, basic testing and foundations of applications/application testing.&amp;nbsp; "Why/What Coherence is..."&amp;nbsp; A good review for people of all levels.&lt;/li&gt;
&lt;li&gt;Chapter 2: Getting started with Coherence from installation to the first application.&amp;nbsp; Excellent starting part for Coherence users to get their hands on starting and troubleshooting a basic Coherence application and setup.&lt;/li&gt;
&lt;li&gt;Chapter 3: Great information on the different types of caches and when to best make use of each one.&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Chapter 4: This goes into the concept of Domain Models and Serialization choices (Portable Object Format - POF)&amp;nbsp; for your application.&lt;/li&gt;
&lt;li&gt;Chapters 5, 6, 7, 8: I really enjoyed these next several chapters since they get into the fun stuff of&amp;nbsp; Coherence!&amp;nbsp;&amp;nbsp; Including:&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;ul&gt;&lt;li&gt;Querying the data-grid with a variety of options in the most performant ways&lt;/li&gt;
&lt;li&gt;Submitting work-requests to the Coherence Data Grid from your application where the power of the Data Grid is used to parallel process and aggregate your request&lt;/li&gt;
&lt;li&gt;Data Grid Events where you can do multiple things like listen for data changes and take various actions.&lt;/li&gt;
&lt;li&gt;Finally using Coherence and backing data stores (the database is the classic example here) to use the power of Coherence as the Data Grid layer and read/write changes to/from the backing data store.&amp;nbsp;&amp;nbsp;&amp;nbsp; All-in-all, these core chapters are very powerful and a great read!&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Chapter 9:&amp;nbsp; This goes into good depth on what a Coherence*Extend client is to the data grid, when to use this, and the how-to's on setting it up.&lt;/li&gt;
&lt;li&gt;Chapter 10 and 11: Integration from .NET and C++ clients into a Coherence Data Grid gives very good insight if this is a use-case for you.&amp;nbsp; If not, it is a great read on the power and flexibility of Coherence to be accessed from multiple technologies outside of Java.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Suggestions:&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;I really liked how Chapter 2 included the hands-on part so more hands-on examples included per chapter (where appropriate) would have been very nice.&amp;nbsp; &lt;/li&gt;
&lt;li&gt;The Coherent Bank application contains *alot* of great code to review and make use of and ties all of the chapters together.&amp;nbsp; I had one issue with the version of the code-sample I downloaded from the website when running the application so hopefully this is updated on the website in the future.&amp;nbsp; My specific exception was when accessing the deployed web-application:&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;Problem accessing /bank/login. Reason:&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testDataCreator' defined in ServletContext resource &lt;/i&gt;&lt;br /&gt;
&lt;i&gt;[/WEB-INF/bank-servlet.xml]: Invocation of init method failed; nested exception is (Wrapped) java.io.NotSerializableException:&amp;nbsp;&amp;nbsp; com.seovic.samples.bank.domain.Customer&lt;/i&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;p&gt;"The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation."&lt;/p&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2564517520207117824-3667835699008126363?l=soainfrastructure.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9i9m-uyxOrxX6hcIZZTMTyYa93E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9i9m-uyxOrxX6hcIZZTMTyYa93E/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/9i9m-uyxOrxX6hcIZZTMTyYa93E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9i9m-uyxOrxX6hcIZZTMTyYa93E/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoaInfrastructure/~4/DPReDnfIivo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soainfrastructure.blogspot.com/feeds/3667835699008126363/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://soainfrastructure.blogspot.com/2010/05/oracle-coherence-35-book-review-results.html#comment-form" title="17 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/3667835699008126363?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/3667835699008126363?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoaInfrastructure/~3/DPReDnfIivo/oracle-coherence-35-book-review-results.html" title="Oracle Coherence 3.5 Book Review Results" /><author><name>Steven Pozarycki</name><uri>http://www.blogger.com/profile/02394091549061147655</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>17</thr:total><feedburner:origLink>http://soainfrastructure.blogspot.com/2010/05/oracle-coherence-35-book-review-results.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8CRn88fCp7ImA9WxFSFkU.&quot;"><id>tag:blogger.com,1999:blog-2564517520207117824.post-6184102830934262486</id><published>2010-04-19T07:21:00.000-07:00</published><updated>2010-04-19T07:21:07.174-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-19T07:21:07.174-07:00</app:edited><title>Coherence 3.5 Book Review</title><content type="html">&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;I am currently reviewing the new &lt;/span&gt;&lt;a href="http://www.packtpub.com/oracle-coherence-3-5/book?utm_source=soainfrastructure.blogspot.com&amp;amp;utm_medium=bookrev&amp;amp;utm_content=blog&amp;amp;utm_campaign=mdb_003030" style="font-family: Arial,Helvetica,sans-serif;"&gt;Oracle Coherence 3.5 eBook&lt;/a&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt; out from Packt Publishing and hope to have some comments out soon.&amp;nbsp; Looks to be a great book and I look forward to reading it! &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;p&gt;"The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation."&lt;/p&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2564517520207117824-6184102830934262486?l=soainfrastructure.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8UYyUaO39-FDDLL7Bn2RGqQhOYc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8UYyUaO39-FDDLL7Bn2RGqQhOYc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/8UYyUaO39-FDDLL7Bn2RGqQhOYc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8UYyUaO39-FDDLL7Bn2RGqQhOYc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoaInfrastructure/~4/B4S9iyda_G8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soainfrastructure.blogspot.com/feeds/6184102830934262486/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://soainfrastructure.blogspot.com/2010/04/coherence-35-book-review.html#comment-form" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/6184102830934262486?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/6184102830934262486?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoaInfrastructure/~3/B4S9iyda_G8/coherence-35-book-review.html" title="Coherence 3.5 Book Review" /><author><name>Steven Pozarycki</name><uri>http://www.blogger.com/profile/02394091549061147655</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>5</thr:total><feedburner:origLink>http://soainfrastructure.blogspot.com/2010/04/coherence-35-book-review.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEUGQH8_eSp7ImA9WxBVFEg.&quot;"><id>tag:blogger.com,1999:blog-2564517520207117824.post-170579948997717208</id><published>2010-02-15T14:12:00.000-08:00</published><updated>2010-02-17T16:17:01.141-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-17T16:17:01.141-08:00</app:edited><title>Setting up Oracle Data Integrator (ODI) with Change Data Capture (CDC): DB Table to WebLogic Server JMS Queue</title><content type="html">&lt;h3&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=170579948997717208" name="_Toc226260763"&gt;Introduction:&lt;/a&gt;&lt;/h3&gt;The following shows detailed steps on how to setup ODI with Change Data Capture on a database table so that all changes to a database table are loaded into a target. In this case the target is a JMS Queue hosted on a WebLogic Server 10.3 container.&lt;br /&gt;
&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=170579948997717208" name="_Toc226260764"&gt;Pre-requisites&lt;/a&gt;&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Download Oracle 10gR2 Database if it is not already installed &lt;/li&gt;
&lt;li&gt;Download &lt;a href="http://www.oracle.com/technology/software/products/odi/index.html"&gt;ODI 10.1.3.5&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Install ODI 10.1.3.5 &lt;/li&gt;
&lt;li&gt;Review &lt;a href="http://www.oracle.com/technology/products/oracle-data-integrator/10.1.3/htdocs/1013_support.html"&gt;ODI Documentation&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Download and install WebLogic Server 10.3 &lt;/li&gt;
&lt;li&gt;Understanding of JMS Queues &lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;&lt;h3&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=170579948997717208" name="_Toc226260765"&gt;Setup ODI Repositories:&lt;/a&gt;&lt;/h3&gt;The following information makes assumptions that this will be setup on a Windows machine however the same concepts would apply to a UNIX/LINUX environment.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Create a Master Repository in an Oracle DB. In this case we will set this up under a user in our local Oracle 10gR2 Database. We will use the “system” user and connect to our local DB which was setup earlier (jdbc:oracle:thin:@localhost:1541:orcl). Goto Start –&amp;gt; All Programs -&amp;gt; &amp;lt;ORACLE_HOME&amp;gt; -&amp;gt;Oracle Data Integrator -&amp;gt; Repository Management -&amp;gt; Create Master Repository &lt;/li&gt;
&lt;li&gt;This will take a couple of minutes to create the necessary ODI information within the database and schema one provided. &lt;/li&gt;
&lt;li&gt;Startup the Topology Manager and create a Work repository. This is needed prior to starting up the Oracle Designer. Goto Start –&amp;gt; All Programs -&amp;gt; &amp;lt;ORACLE_HOME&amp;gt; -&amp;gt; Oracle Data Integrator -&amp;gt; Topology Manager. &lt;/li&gt;
&lt;li&gt;Create a connection to the repository by clicking on the “New” icon and fill in the data like below: (SUPERVISOR/SUNOPSIS are the default user/password and need to be in capitals) &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwEtXjECTI/AAAAAAAAAJ8/EhSgJWNpeq8/s1600-h/clip_image0014.jpg"&gt;&lt;img alt="clip_image001" border="0" height="253" src="http://lh4.ggpht.com/_0GX2KEfK3aA/SrwFNNuLgLI/AAAAAAAAAKA/5J9tPQa5vMk/clip_image001_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image001" width="312" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Goto the repositories tab (the 5&lt;sup&gt;th&lt;/sup&gt; one from the beginning) and create some named work repository. Right click and select “Insert new work repository”. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh5.ggpht.com/_0GX2KEfK3aA/SrwFiWBHX0I/AAAAAAAAAKI/F-iJRM7lhgs/s1600-h/clip_image0034.jpg"&gt;&lt;img alt="clip_image003" border="0" height="218" src="http://lh5.ggpht.com/_0GX2KEfK3aA/SrwGCK7MKEI/AAAAAAAAAKM/Wqc3rEyLRnU/clip_image003_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image003" width="321" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;In the Topology Manager, create a Physical Architecture for the Database Schema where you will be connecting to (the 1&lt;sup&gt;st&lt;/sup&gt; tab at the bottom). (NOTE: It is assumed that there are some tables in this schema already.) Select the technology (in this case “Oracle”), then right click and select “Insert Data Server”. Before clicking “ok” to save, one will have to create the Logical Layer as well (see later steps). Fill in the user/password to the schema one will be connecting to and fill in the JDBC information in the JDBC tab. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwGXSNg7mI/AAAAAAAAAKQ/hR90cgzAIVo/s1600-h/clip_image0054.jpg"&gt;&lt;img alt="clip_image005" border="0" height="227" src="http://lh4.ggpht.com/_0GX2KEfK3aA/SrwG3C3f_yI/AAAAAAAAAKU/LKJCJOrDUsc/clip_image005_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image005" width="322" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://lh3.ggpht.com/_0GX2KEfK3aA/SrwHMYatqDI/AAAAAAAAAKY/sdX_5jWUsWc/s1600-h/clip_image0075.jpg"&gt;&lt;img alt="clip_image007" border="0" height="256" src="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwHsQ_YYYI/AAAAAAAAAKc/lQ74rIdyNi8/clip_image007_thumb2.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image007" width="343" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Next right click this Data Server and select “Insert Physical Schema”. Select the schema one want and then on the “Context” tab is where one will select the Logical Schema. The Logical Schema will first need to be created in the next step before selecting it here and clicking “ok”. (You may get an error while saving this however first save it and then open it up so the Logical Schema can be created.) &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh3.ggpht.com/_0GX2KEfK3aA/SrwICXKZZrI/AAAAAAAAAKg/Hm8FNHYiAqI/s1600-h/clip_image0094.jpg"&gt;&lt;img alt="clip_image009" border="0" height="241" src="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwIiB5BWaI/AAAAAAAAAKk/H47b8fyuXqI/clip_image009_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image009" width="327" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://lh3.ggpht.com/_0GX2KEfK3aA/SrwI3X1RwMI/AAAAAAAAAKo/Z9xkdtyRBd8/s1600-h/clip_image0118.jpg"&gt;&lt;img alt="clip_image011" border="0" height="259" src="http://lh3.ggpht.com/_0GX2KEfK3aA/SrwJXIpSewI/AAAAAAAAAKs/jhWaXYAoGOk/clip_image011_thumb5.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image011" width="336" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;In the Topology Manager, create a Logical Architecture for the Database Schema where you will be connecting to (the 3&lt;sup&gt;rd&lt;/sup&gt; tab at the bottom). This will be needed for the Physical Architecture layer you created. Select the technology (in this case “Oracle”), then right click and select “Insert Logical Schema”. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh3.ggpht.com/_0GX2KEfK3aA/SrwJsUHtP4I/AAAAAAAAAKw/eYCgjIO33xE/s1600-h/clip_image0134.jpg"&gt;&lt;img alt="clip_image013" border="0" height="221" src="http://lh4.ggpht.com/_0GX2KEfK3aA/SrwKMSVKSGI/AAAAAAAAAK0/erixsCRr-go/clip_image013_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image013" width="325" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=170579948997717208" name="_Toc226260766"&gt;Setup ODI for use with WebLogic JMS Queues:&lt;/a&gt;&lt;/h4&gt;The following outlines the pre-work necessary to setup ODI to work with WebLogic JMS Queues.&lt;br /&gt;
&lt;h5&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=170579948997717208" name="_Toc226260767"&gt;Create the JMS queues on WebLogic Server&lt;/a&gt;&lt;/h5&gt;The following outlines the steps necessary to create a basic JMS queue for this example. If one already has a JMS queue defined on a WebLogic Server, this section can be skipped.&lt;br /&gt;
&lt;b&gt;WLS Domain Creation&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;1. Create a default WLS 10.3 Domain. Run &amp;lt;BEA_HOME&amp;gt;\wlserver10.3\common\bin\config.cmd &lt;/li&gt;
&lt;li&gt;2. Select the defaults (7001 as the port, weblogic/weblogic) into some named directory. &lt;/li&gt;
&lt;li&gt;3. Start the newly created domain by running startWebLogic.cmd in the directory where the Domain was created. &lt;/li&gt;
&lt;li&gt;4. Login to the WLS console: http://localhhost:7001/console as weblogic/weblogic &lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Create a JMS Server:&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;1. Services -&amp;gt; Messaging -&amp;gt; JMS Server -&amp;gt; Select New &lt;/li&gt;
&lt;li&gt;2. Create a name, select Persistent Store (File Store). &lt;/li&gt;
&lt;li&gt;3. Target this to the AdminServer &lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Create a JMS Module:&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;1. Services -&amp;gt; Messaging -&amp;gt; JMS Module -&amp;gt; Select New &lt;/li&gt;
&lt;li&gt;2. At the end, select add resources to it. &lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Create a JMS Resource (Queue in this case):&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;1. Select "new" and click "Queue". In this example the JNDI Name is “TestQueueJNDI” and the Queue name is “weblogic.jms.poc.TestQueue”. The Queue name specified here will be the same string used in ODI when defining the Physical Architecture. Please make a note of it. &lt;/li&gt;
&lt;li&gt;2. Click "Create a new Subdeployment" &lt;/li&gt;
&lt;li&gt;3. Target the JMS Server which was just created. &lt;/li&gt;
&lt;/ul&gt;&lt;h5&gt;&amp;nbsp;&lt;/h5&gt;&lt;h5&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=170579948997717208" name="_Toc226260768"&gt;Update ODI to work with WLS JMS&lt;/a&gt;&lt;/h5&gt;The following outlines the pre-work necessary to setup ODI to work/connect to WLS JMS Queues.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Within the WebLogic Server installation one will need to create a jar file which ODI will use for connecting to a WLS JMS Queue. Review the &lt;a href="http://edocs.bea.com/wls/docs103/client/jarbuilder.html"&gt;documentation&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Build the wlfullclient5.jar file for use with ODI by doing the following: &lt;/li&gt;

&lt;ul&gt;&lt;li&gt;First change the directory to the WL_HOME/server/lib directory &lt;/li&gt;
&lt;li&gt;Run the command: &lt;i&gt;java -jar wljarbuilder.jar -profile wlfullclient5&lt;/i&gt; &lt;/li&gt;
&lt;li&gt;Copy the resulting wlfullclient5.jar file to the &amp;lt;ORACLE_HOME&amp;gt;\oracledi\drivers directory &lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Modify the &amp;lt;ORACLE_HOME&amp;gt;\oracledi\bin\odiparams.bat file to use JDK 1.5 instead of the default of JDK 1.4. This is the only ODI file which needs to be modified to use JDK 1.5. Specifically in this file add the following line right before the existing “if” statement: &lt;/li&gt;
&lt;/ul&gt;&lt;blockquote&gt;&lt;i&gt;set ODI_JAVA_HOME=C:\bea10x\jrockit_150_11&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;if "%ODI_JAVA_HOME%" == "" set ODI_JAVA_HOME=%JAVA_HOME%&lt;/i&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;If the ODI Designer is running, shut it down and restart it so the changes take effect. If not, then one will not be able to successfully test the JMS Connection from ODI to WLS. &lt;/li&gt;
&lt;/ul&gt;&lt;h5&gt;&amp;nbsp;&lt;/h5&gt;&lt;h5&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=170579948997717208" name="_Toc226260769"&gt;Create JMS Architecture in ODI Topology Manager&lt;/a&gt;&lt;/h5&gt;After restarting ODI Designer, one can create and test the connections to WebLogic Server JMS Queues. The following outlines the steps required to setup JMS Queues in ODI.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;In the Topology Manager, create a Physical Architecture for the WLS JMS Queue where you will be connecting to (the 1&lt;sup&gt;st&lt;/sup&gt; tab at the bottom). &lt;/li&gt;
&lt;li&gt;Right click on JMS Queue in the Physical Architecture. Fill in the Definition and JNDI tabs to look like the following screenshots. Modify the host:port name and user/password to what is defined in the WebLogic Server Domain one is connecting to. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh5.ggpht.com/_0GX2KEfK3aA/SrwKhrDSjOI/AAAAAAAAAK4/57JIFoWICPo/s1600-h/clip_image0154.jpg"&gt;&lt;img alt="clip_image015" border="0" height="249" src="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwLBXRctVI/AAAAAAAAAK8/8GyTNeoq5LI/clip_image015_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image015" width="326" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://lh4.ggpht.com/_0GX2KEfK3aA/SrwLWvgdFeI/AAAAAAAAALA/WCh-vsHcrlA/s1600-h/clip_image0174.jpg"&gt;&lt;img alt="clip_image017" border="0" height="257" src="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwL2T5Y2jI/AAAAAAAAALE/tJRarhM6mUQ/clip_image017_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image017" width="336" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Clicking “ok” to save. (There may be a message about the Logical Layer however that is created in the next step.) &lt;/li&gt;
&lt;li&gt;Create the Logical Layer for this JMS Queue. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh3.ggpht.com/_0GX2KEfK3aA/SrwMLvWsYJI/AAAAAAAAALI/vqnSGH_V5ow/s1600-h/clip_image0194.jpg"&gt;&lt;img alt="clip_image019" border="0" height="248" src="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwMremonjI/AAAAAAAAALM/l4HNwtEwykU/clip_image019_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image019" width="324" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Make sure the Physical Schema for the JMS Data Server has the Logical Layer defined in the “Context” tab. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh4.ggpht.com/_0GX2KEfK3aA/SrwNAsxJ0vI/AAAAAAAAALQ/C8V_CMHEAnM/s1600-h/clip_image0214.jpg"&gt;&lt;img alt="clip_image021" border="0" height="246" src="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwNge3EjII/AAAAAAAAALU/MMxswRjmfzo/clip_image021_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image021" width="321" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Now one can test the connection to WLS JMS to make sure everything is setup correctly. Open up the Data Server defined for the WLS JMS Queue and click the “Test” button at the bottom. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwN1j6TkTI/AAAAAAAAALY/Vt8qyIKqseI/s1600-h/clip_image0234.jpg"&gt;&lt;img alt="clip_image023" border="0" height="292" src="http://lh5.ggpht.com/_0GX2KEfK3aA/SrwOVWKzlfI/AAAAAAAAALc/dDWwbrOgChw/clip_image023_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image023" width="325" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=170579948997717208" name="_Toc226260770"&gt;ODI Designer:&lt;/a&gt;&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Startup the ODI Designer: Goto Start -&amp;gt; All Programs -&amp;gt; &amp;lt;ORACLE_HOME&amp;gt; -&amp;gt; Oracle Data Integrator -&amp;gt; Designer &lt;/li&gt;
&lt;li&gt;Create a new connection to this new Master Repository and Work Repository. Click the “New” icon next to the default “Login Name” &lt;/li&gt;
&lt;li&gt;Connect with the SUPERVISOR/SUNOPSIS (user/password and all capitals), supply the Oracle Database information where the master repository was created, and the name of the Work Repository which was just created. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh5.ggpht.com/_0GX2KEfK3aA/SrwOqtieeMI/AAAAAAAAALg/-zZRRrvb578/s1600-h/clip_image0244.jpg"&gt;&lt;img alt="clip_image024" border="0" height="267" src="http://lh4.ggpht.com/_0GX2KEfK3aA/SrwPKTFu4FI/AAAAAAAAALk/h7TJuFHZafs/clip_image024_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image024" width="311" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Back in the Oracle Designer we will now create a Model based on the Logical Schema we created in the Topology Manager. &lt;/li&gt;
&lt;li&gt;Create a Project under the Projects tab. &lt;/li&gt;
&lt;li&gt;Next import the Knowledge Modules. Right click the project, select Import, and then “Import Knowledge Modules”. Select the directory under &amp;lt;ORACLE_HOME&amp;gt;\oracledi\impexp, and then select each knowledge module individually. We will select: &lt;/li&gt;
&lt;/ul&gt;&lt;blockquote&gt;&lt;i&gt;· CKM SQL&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;· IKM SQL Incremental Update&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;· IKM SQL to JMS Append&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;· JKM Oracle 10g Consistent (LOGMINER)&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;· LKM SQL to SQL&lt;/i&gt;&lt;/blockquote&gt;&lt;a href="http://lh3.ggpht.com/_0GX2KEfK3aA/SrwPfiJ4BWI/AAAAAAAAALo/Q_AFpmjY16k/s1600-h/clip_image0254.jpg"&gt;&lt;img alt="clip_image025" border="0" height="285" src="http://lh5.ggpht.com/_0GX2KEfK3aA/SrwP_hn-TFI/AAAAAAAAALs/8wVxgz7-qRk/clip_image025_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image025" width="309" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=170579948997717208" name="_Toc226260771"&gt;Create a Model for the Database table&lt;/a&gt;&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Right click and select “Insert Model”. &lt;/li&gt;
&lt;li&gt;In the definition tab, select the technology and Logical Schema (created in the Topology Manager) and then click the “Reverse” button to get the tables for this schema into the model view. Click “ok”. &lt;b&gt;&lt;u&gt;NOTE:&lt;/u&gt;&lt;/b&gt; There are SQL statements to create the test table for the schema user in the APPENDIX section which one can use to test with. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwQUszXr2I/AAAAAAAAALw/WzRo7wpsz6s/s1600-h/clip_image0274.jpg"&gt;&lt;img alt="clip_image027" border="0" height="248" src="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwQ0RdEF6I/AAAAAAAAAL0/X9VPPDmYkGk/clip_image027_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image027" width="324" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Double click the Model name you created and select the Journalizing tab. Make sure that the tab is filled out and looks like the following. Because you want to capture changes to the tables in a consistent fashion, you select the &lt;b&gt;Consistent&lt;/b&gt; option and the &lt;b&gt;JKM Oracle 10g Consistent (LOGMINER)&lt;/b&gt; knowledge module. This knowledge module, shown in the figure below, will capture new and changed data, using the LogMiner feature of Oracle Database 10g. Read the notes section for additional details on the user accessing the tables. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh4.ggpht.com/_0GX2KEfK3aA/SrwRJhOBU-I/AAAAAAAAAL4/X7d4DRzAaMk/s1600-h/clip_image0294.jpg"&gt;&lt;img alt="clip_image029" border="0" height="239" src="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwRpUec_jI/AAAAAAAAAL8/qKT7S71fRMU/clip_image029_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image029" width="313" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Click “ok”. &lt;/li&gt;
&lt;li&gt;Next right-click the tables in turn, and choose &lt;b&gt;Changed Data Capture&lt;/b&gt; -&amp;gt;&lt;b&gt;Add to CDC&lt;/b&gt;. Then edit the model again to select the &lt;b&gt;Journalized Tables&lt;/b&gt; tab. If there are multiple tables use the up and down arrow keys to place the tables in the correct order. &lt;/li&gt;
&lt;li&gt;Next add a subscriber to the journal by returning to the Designer application, right-clicking the Model, and choosing &lt;b&gt;Changed Data Capture&lt;/b&gt; -&amp;gt;&lt;b&gt;Subscriber&lt;/b&gt;-&amp;gt;&lt;b&gt;Subscribe&lt;/b&gt;. You add a new subscriber and execute the code locally to ensure that the code executes correctly. Once this step is complete, you have set up the changed-data capture process and you are ready to begin building your interfaces. &lt;/li&gt;
&lt;li&gt;Now one is ready to create the journal that captures changed data from these two tables. To do this, right-click the model again and choose &lt;b&gt;Changed Data Capture&lt;/b&gt; -&amp;gt;&lt;b&gt;Start Journal&lt;/b&gt;. Click OK to execute the code locally, and then start up the Operator application to check the progress of the operation. If all has gone well, you will be presented with a list of completed steps similar to the following. In order to start the Operator goto Start -&amp;gt; All Programs –&amp;gt; &amp;lt;ORACLE_HOME&amp;gt; -&amp;gt; Oracle Data Integrator -&amp;gt; Operator and login to the repository when presented with the same login screen. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh4.ggpht.com/_0GX2KEfK3aA/SrwR-l815UI/AAAAAAAAAMA/ATzHTRwLsng/s1600-h/clip_image0314.jpg"&gt;&lt;img alt="clip_image031" border="0" height="253" src="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwSedDctZI/AAAAAAAAAME/VefKOy64Dik/clip_image031_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image031" width="307" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;At this point if CDC is working properly the table should have a green icon instead of the yellow/orange icon. If this is not the case, then CDC is not properly setup. &lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=170579948997717208" name="_Toc226260772"&gt;Create a Model for JMS DataStore in ODI Designer&lt;/a&gt;&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Right click and select “Insert Model”. &lt;/li&gt;
&lt;li&gt;In the definition tab, select the technology and Logical Schema (created in the Topology Manager). &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh3.ggpht.com/_0GX2KEfK3aA/SrwSzpKw2qI/AAAAAAAAAMI/4b-LEqeddEw/s1600-h/clip_image0334.jpg"&gt;&lt;img alt="clip_image033" border="0" height="263" src="http://lh4.ggpht.com/_0GX2KEfK3aA/SrwTTQumL1I/AAAAAAAAAMM/lq1AkgPdiMI/clip_image033_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image033" width="325" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Next within this Model, right click and select “Insert Datastore”. &lt;/li&gt;
&lt;li&gt;Create a Datastore making sure the Name and Resource name is the name of the JMS Queue which was created within WebLogic Server. Also note that the “Datastore Type” is set to “table”. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh4.ggpht.com/_0GX2KEfK3aA/SrwTortNAUI/AAAAAAAAAMQ/nLmw_FNG52s/s1600-h/clip_image0354.jpg"&gt;&lt;img alt="clip_image035" border="0" height="250" src="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwUIVpodoI/AAAAAAAAAMU/1HRbpqRnWIg/clip_image035_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image035" width="309" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Within this Datastore, click on the “Files” tab and make sure the format of how the JMS Text Message will look like. This means that the JMS Text Message sent to the queue can have all of the columns of data from the DB table separated by “,” in this case. The delimiter can be anything one chooses. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh3.ggpht.com/_0GX2KEfK3aA/SrwUdknMSfI/AAAAAAAAAMY/xdD3R2bOQtk/s1600-h/clip_image0374.jpg"&gt;&lt;img alt="clip_image037" border="0" height="256" src="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwU9dkEOZI/AAAAAAAAAMc/N3EvGDCQXAc/clip_image037_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image037" width="317" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Next define the columns of data which can be added to this JMS Text message. In this case we are adding all of the columns of data from the DB table into the resulting JMS Message. Right click on the Column name and select “Insert Column”. This will be used in the mapping part in the interface defined later on. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh3.ggpht.com/_0GX2KEfK3aA/SrwVSi1A1zI/AAAAAAAAAMg/RrrP_zFseU0/s1600-h/clip_image0394.jpg"&gt;&lt;img alt="clip_image039" border="0" height="266" src="http://lh3.ggpht.com/_0GX2KEfK3aA/SrwVyYwhjtI/AAAAAAAAAMk/kmrP0yqJf3A/clip_image039_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image039" width="329" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=170579948997717208" name="_Toc226260773"&gt;Create the Interface (DB to WLS JMS)&lt;/a&gt;&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Now we can create a new interface which will take the data from SUPPORT_CASE table in an Oracle Database when CDC happens and load it to a JMS Queue hosted on a WebLogic Server container. &lt;/li&gt;
&lt;li&gt;In the Project tab, right click the interface to create a new interface. &lt;/li&gt;
&lt;li&gt;Make sure the checkbox for “Staging Area Different from Target” &lt;b&gt;&lt;u&gt;is&lt;/u&gt;&lt;/b&gt; selected. Select the Logical Schema for the staging area. In this case it is the Oracle DB. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh3.ggpht.com/_0GX2KEfK3aA/SrwWHnqE84I/AAAAAAAAAMo/NJHUVAB5vqM/s1600-h/clip_image0414.jpg"&gt;&lt;img alt="clip_image041" border="0" height="259" src="http://lh4.ggpht.com/_0GX2KEfK3aA/SrwWnbMKtLI/AAAAAAAAAMs/dAAFsFWRMPw/clip_image041_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image041" width="321" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Click on the Diagram tab and drag and drop the tables from the model for the target (“weblogic.jms.poc.testQueue” Datastore in this example) and the table for the source onto the respective locations on the Diagram Tab. &lt;/li&gt;
&lt;li&gt;Join and map any columns to the target column in the Diagram tab. &lt;/li&gt;
&lt;li&gt;Also on the diagram tab on the Interface, select the source, enable “Journalized Data Only”. Make sure the filter created has the correct subscriber name one wants. The resulting picture should look something like this: &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwW8l0XOfI/AAAAAAAAAMw/sZR8i8Q4Uzc/s1600-h/clip_image0434.jpg"&gt;&lt;img alt="clip_image043" border="0" height="264" src="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwXcnD_vZI/AAAAAAAAAM0/toR3hOImElk/clip_image043_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image043" width="327" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Click on the Flow tab to see how the data will be combined. Here one will see two boxes. One for the Staging Area (which is on the Database) and one on the Target Area (the WLS JMS Queue). Click on the Target Area and in the IKM dropdown box select “IKM SQL to JMS Append’. Click “apply” and there should be no errors. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh4.ggpht.com/_0GX2KEfK3aA/SrwXxwIIOnI/AAAAAAAAAM4/fOz__iEpZCw/s1600-h/clip_image0455.jpg"&gt;&lt;img alt="clip_image045" border="0" height="289" src="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwYRrBj7HI/AAAAAAAAAM8/XFkxXxBtnnI/clip_image045_thumb2.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image045" width="355" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Next select the &lt;b&gt;Controls&lt;/b&gt; tab to make sure the Control Knowledge Module was selected. This is used for handling constraint errors in the target table. Select the &lt;b&gt;CKM SQL Knowledge Module&lt;/b&gt;, which will handle erroneous data for any ISO-92-compliant database. Click “OK”. &lt;/li&gt;
&lt;li&gt;The interface is now successfully created to load journalized data from the DB table into a WLS JMS Queue. Next the Package and Scenario will be created to automate the flow of this at runtime. &lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;&lt;h3&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=170579948997717208" name="_Toc226260774"&gt;Create the ODI Packages and Execute:&lt;/a&gt;&lt;/h3&gt;Now create an Oracle Data Integrator package to carry out the following steps:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Check the SUPPORT_CASE journalized data to see if new or changed data records have been added. &lt;/li&gt;
&lt;li&gt;If journalized data is detected, extend the journal window. &lt;/li&gt;
&lt;li&gt;Execute the interface to read from the journalized data and load the target data store which in this case will be a WebLogic Server JMS Queue. &lt;/li&gt;
&lt;li&gt;Purge the journal window. &lt;/li&gt;
&lt;li&gt;Start this package again. (This will be in a loop ready for new journal changes.) Creating this package and then deploying it as an Oracle Data Integrator scenario effectively creates a real-time, continuously running ETL process. &lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;   &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;  &lt;br /&gt;
&lt;h5&gt;&lt;/h5&gt;&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=170579948997717208" name="_Toc226260775"&gt;Create the Package and Scenario for setting up CDC&lt;/a&gt;&lt;/h4&gt;The purpose of this is to automate setting up CDC within one’s environment.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;1. To create this package, navigate to the Projects tab in the Designer application, locate the folder containing the interfaces you defined earlier, find the Packages entry, right-click it, and select Insert Package. Give the package a name and then navigate to the Diagram tab in the package details dialog box. &lt;/li&gt;
&lt;li&gt;2. The next step in this package will be to drag the Model just created onto the canvas. Within the General Tab of this step, select the Drop down under “Type” and select “Journalizing Mode”. &lt;/li&gt;
&lt;li&gt;3. Select “Stop” under Journalizing to stop this if it was already running so it can be successfully rerun. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh4.ggpht.com/_0GX2KEfK3aA/SrwYmvohwiI/AAAAAAAAANA/_gh7L2A9Lrw/s1600-h/clip_image0474.jpg"&gt;&lt;img alt="clip_image047" border="0" height="256" src="http://lh5.ggpht.com/_0GX2KEfK3aA/SrwZGol-j2I/AAAAAAAAANE/1gqDJBZdk8I/clip_image047_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image047" width="317" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;4. The next step in this package will be to drag the Model just created onto the canvas again. Within the General Tab of this step, select the Drop down under “Type” and select “Journalizing Mode”. &lt;/li&gt;
&lt;li&gt;5. Under the “Journalizing” section of the General tab, select “Start” and “Add Subscribers”. Add the “SUBA” subscriber to the list. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwZb5xyYyI/AAAAAAAAANI/mvw6LIEBSRI/s1600-h/clip_image0494.jpg"&gt;&lt;img alt="clip_image049" border="0" height="253" src="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwZ7sMPjxI/AAAAAAAAANM/fix_Mdf7tPo/clip_image049_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image049" width="313" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;6. Connect the first step to this step with a green “ok” arrow and a red “ko” arrow. &lt;/li&gt;
&lt;li&gt;7. Right click on this package to create a Scenario. &lt;/li&gt;
&lt;li&gt;8. This scenario can be executed either from the tool by right clicking and selecting “Execute” or by running this from the command line. &lt;/li&gt;
&lt;li&gt;9. Execute this Scenario so that Journaling is initially started. The next section will explain how to create and setup the main CDC process in a loop so that changes are continuously consumed. &lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=170579948997717208" name="_Toc226260776"&gt;Create the Package and Scenario for the Main CDC process&lt;/a&gt;&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;1. To create this package, navigate to the Projects tab in the Designer application, locate the folder containing the interfaces you defined earlier, find the Packages entry, right-click it, and select Insert Package. Give the package a name and then navigate to the Diagram tab in the package details dialog box. &lt;/li&gt;
&lt;li&gt;2. Using the toolbox on the right, go to the Event Detection folder and add the OdiWaitForLogData tool to the package canvas, as shown in the figure below. This tool will monitor the journalized data on a regular basis. In this case the step name has been changed to “Waiting for Changes”. &lt;/li&gt;
&lt;li&gt;3. In this step update the following parameters: &lt;/li&gt;

&lt;ul&gt;&lt;li&gt;a. Logical Schema: Change this to the Logical Schema being used in your interface &lt;/li&gt;
&lt;li&gt;b. Subscriber: The subscriber name &lt;/li&gt;
&lt;li&gt;c. CDC Set: Change this to your Model Name and the Logical Schema name. It is in the form of: &amp;lt;%=odiRef.getObjectName("L","model_code","logical_schema", "D")%&amp;gt; &lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;blockquote&gt;Example: &lt;i&gt;&amp;lt;%=odiRef.getObjectName("L","ORACLE_SPOZ2_MODEL","Oracle 10gR2 Logical Schema SPOZ2", "D")%&amp;gt;&lt;/i&gt;&lt;/blockquote&gt;&lt;a href="http://lh4.ggpht.com/_0GX2KEfK3aA/SrwaQ4oYC7I/AAAAAAAAANQ/2zeFt-tS_dE/s1600-h/clip_image0514.jpg"&gt;&lt;img alt="clip_image051" border="0" height="264" src="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwawoizVPI/AAAAAAAAANU/sLE5vJhGg9g/clip_image051_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image051" width="325" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;4. The next step in this package will be to drag the Model just created containing the Database table onto the canvas. Within the General Tab of this step, select the Drop down under “Type” and select “Journalizing Mode”. &lt;/li&gt;
&lt;li&gt;5. Under the “Consumption” section of the General tab, select “Extend Window” and “Lock Subscribers”. Add the “SUBA” subscriber to the list. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh3.ggpht.com/_0GX2KEfK3aA/SrwbF5fHrTI/AAAAAAAAANY/e5Gnv9zmLxI/s1600-h/clip_image0534.jpg"&gt;&lt;img alt="clip_image053" border="0" height="275" src="http://lh4.ggpht.com/_0GX2KEfK3aA/SrwblZACvhI/AAAAAAAAANc/VKvaJ5v2OSM/clip_image053_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image053" width="339" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;6. Connect the first step to this step with a green “ok” arrow. &lt;/li&gt;
&lt;li&gt;7. Next Drag the Interface just created for Populating the WLS JMS Queue after the previous step. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh6.ggpht.com/_0GX2KEfK3aA/Srwb6lEnrxI/AAAAAAAAANg/dk2sG_w2FWM/s1600-h/clip_image0554.jpg"&gt;&lt;img alt="clip_image055" border="0" height="270" src="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwcaQ086UI/AAAAAAAAANk/JdyiXl3OipQ/clip_image055_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image055" width="332" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;8. Connect the second step to this step for the interface with a green “ok” arrow. &lt;/li&gt;
&lt;li&gt;9. The next step in this package will be to drag the Model again onto the canvas after the interface. Within the General Tab of this step, select the Drop down under “Type” and select “Journalizing Mode”. &lt;/li&gt;
&lt;li&gt;10. Under the “Consumption” section of the General tab, select “Purge Journal” and “Unlock Subscribers”. Add the “SUBA” subscriber to the list. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh3.ggpht.com/_0GX2KEfK3aA/Srwcvp4ATdI/AAAAAAAAANo/o6AAQldIVaU/s1600-h/clip_image0574.jpg"&gt;&lt;img alt="clip_image057" border="0" height="258" src="http://lh5.ggpht.com/_0GX2KEfK3aA/SrwdPVOfuTI/AAAAAAAAANs/PCF4dkZkIQA/clip_image057_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image057" width="318" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;11. Connect the third step from the interface to this step with a green “ok” arrow. &lt;/li&gt;
&lt;li&gt;12. Right click on this package to create a Scenario. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh3.ggpht.com/_0GX2KEfK3aA/Srwdknd0z0I/AAAAAAAAANw/wFs5LuglwW8/s1600-h/clip_image0594.jpg"&gt;&lt;img alt="clip_image059" border="0" height="270" src="http://lh6.ggpht.com/_0GX2KEfK3aA/SrweET8E7wI/AAAAAAAAAN0/d51hpq_xGIg/clip_image059_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image059" width="334" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;13. After creating this Scenario, open up the package just created. &lt;/li&gt;
&lt;li&gt;14. In this package, drag and drop the scenario to the last step in the list after “Purge and Unlock”. &lt;/li&gt;
&lt;li&gt;15. Connect the fourth step from the “Purge and UnLock” step to this final step (the scenario) with a green “ok” arrow. &lt;/li&gt;
&lt;li&gt;16. Click on the named scenario which was just added to the package and make sure to select “Asynchronous” in the parameters listed under the General tab. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh3.ggpht.com/_0GX2KEfK3aA/SrweZqlkQ2I/AAAAAAAAAN4/V_b5Bd0uJEY/s1600-h/clip_image0614.jpg"&gt;&lt;img alt="clip_image061" border="0" height="270" src="http://lh6.ggpht.com/_0GX2KEfK3aA/Srwe5UuYNlI/AAAAAAAAAN8/WzHH1geJIJI/clip_image061_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image061" width="332" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;17. Click “ok” to save and close the package. &lt;/li&gt;
&lt;li&gt;18. Right click the scenario created in step 12 and click “Regenerate”. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh6.ggpht.com/_0GX2KEfK3aA/SrwfOo4HmkI/AAAAAAAAAOA/QeXbE29HzjI/s1600-h/clip_image0634.jpg"&gt;&lt;img alt="clip_image063" border="0" height="262" src="http://lh5.ggpht.com/_0GX2KEfK3aA/SrwfuQcz94I/AAAAAAAAAOE/92bhYoi3hKQ/clip_image063_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image063" width="323" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;19. The reason for doing steps 13 through 17 is to avoid any issues around log files growing too quickly and too large in the work repository. Plus one would not be able to clean the log file here. &lt;/li&gt;
&lt;li&gt;20. This scenario can be executed either from the tool by right clicking and selecting “Execute” or by running this from the command line. &lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=170579948997717208" name="_Toc226260777"&gt;Testing the Main CDC Scenario:&lt;/a&gt;&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;1. Make sure the Journal has been started by executing the scenario you created. Example: “SETTING_UP_CDC_SCEN”. &lt;/li&gt;
&lt;li&gt;2. Make sure the main CDC scenario is executing by right clicking the named Scenario (for example “SUPPORT_CASE_TO_WLS_JMS_Q_SCEN”) and then starting the “Operator” utility. Here you should see something like this (notice the green icon that does not have a checkmark): &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh3.ggpht.com/_0GX2KEfK3aA/SrwgDUiNkjI/AAAAAAAAAOI/shcbLt-fFts/s1600-h/clip_image0654.jpg"&gt;&lt;img alt="clip_image065" border="0" height="244" src="http://lh4.ggpht.com/_0GX2KEfK3aA/SrwgjAinFkI/AAAAAAAAAOM/rfe38ZelYsE/clip_image065_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image065" width="319" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;3. Goto the Model section, right click on the table with CDC setup on it and select “Data”. &lt;/li&gt;
&lt;li&gt;4. In the window which comes up, change some data and hit enter. Click “ok” so the changes take effect. (Notice Changes were made to the name to add “7777” to it). &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh6.ggpht.com/_0GX2KEfK3aA/Srwg4XSAAYI/AAAAAAAAAOQ/oM-I6RHJJq8/s1600-h/clip_image0674.jpg"&gt;&lt;img alt="clip_image067" border="0" height="261" src="http://lh3.ggpht.com/_0GX2KEfK3aA/SrwhYH-msnI/AAAAAAAAAOU/4A0BYstScgE/clip_image067_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image067" width="323" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;5. Go back to the Operator utility, click Refresh and you’ll notice that the Package ran and the interface to populate the JMS Queue executed. Double click on the “Pop. WLS JMS Queue” and select the “Execution” tab. There you will notice that the “Number of Inserts” shows a “1” meaning that one JMS message was sent to the target WLS JMS Queue. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh6.ggpht.com/_0GX2KEfK3aA/Srwht9wSqxI/AAAAAAAAAOY/MJ_p7wb25No/s1600-h/clip_image0694.jpg"&gt;&lt;img alt="clip_image069" border="0" height="295" src="http://lh3.ggpht.com/_0GX2KEfK3aA/SrwiNvuQU6I/AAAAAAAAAOc/jUKqnP3gSY0/clip_image069_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image069" width="331" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;6. Also notice that the scenario was stopped and restarted (by adding the scenario to the package to start again) as to avoid any log issues in the ODI Work Repository. &lt;/li&gt;
&lt;li&gt;7. Login into the WebLogic Server Console, click on “Services”, “Messaging”, “JMS Modules”, the name of the JMS Module created, the name of the Queue created, click the Monitoring tab, select the box next to the Queue name and then click “Show Messages”. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh5.ggpht.com/_0GX2KEfK3aA/Srwiiyhdx1I/AAAAAAAAAOg/Z5Ua4Pr9_Og/s1600-h/clip_image0714.jpg"&gt;&lt;img alt="clip_image071" border="0" height="267" src="http://lh4.ggpht.com/_0GX2KEfK3aA/SrwjCl7Z__I/AAAAAAAAAOk/lZxY8Z_cp7k/clip_image071_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image071" width="324" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;8. Click on the Message ID to view the contents of the message in the JMS Queue. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh5.ggpht.com/_0GX2KEfK3aA/SrwjYDV0xvI/AAAAAAAAAOo/GIsIKM29SsA/s1600-h/clip_image0734.jpg"&gt;&lt;img alt="clip_image073" border="0" height="273" src="http://lh4.ggpht.com/_0GX2KEfK3aA/Srwj35bAWQI/AAAAAAAAAOs/ALKM-WrabdM/clip_image073_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image073" width="332" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;9. Notice the change which was made to the “name” and that each field from the DB table is separated by a “,” (as was previously setup in the “Files” tab of the data store defined in the Model). &lt;/li&gt;
&lt;li&gt;10. This scenario will continue to run (by design in the Package created) until one chooses to stop it. &lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;&lt;h3&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=170579948997717208" name="_Toc226260778"&gt;APPENDIX:&lt;/a&gt;&lt;/h3&gt;SQL statements to create the sample SUPPORT_CASE and SUPPORT_CASE_TRG tables.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;drop table support_case;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;create table support_case&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;(&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;customerid varchar2(20),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;name varchar2(50),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;email varchar2(30),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;address varchar2(50),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;city varchar2(40),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;state varchar2(20),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;zip varchar2(15),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;country varchar2(30),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;phone varchar2(20),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;orderid varchar2(20),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;constraint supportcase_pk primary key(customerid)&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;INSERT INTO support_case VALUES('1','Scott King','sking@oracle.com', '200 Main Street', 'New York', 'NY', '10022', 'USA', '212-555-1212', '200');&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;INSERT INTO support_case VALUES('2','Steven Pozarycki', &lt;a href="mailto:%27steve@oracle.com%27"&gt;'steve@oracle.com'&lt;/a&gt;, '22 Pinckney Street', 'Morris Plains', 'NJ', '07950', 'USA', '617-863-4444', '500');&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;INSERT INTO support_case VALUES('3', 'Murali M', 'murali@oracle.com', '180 Patriots Road', 'Boston', 'MA', '02116', 'USA', '617-285-2222', '300');&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;INSERT INTO support_case VALUES('4','Lloyd Doe, &lt;a href="mailto:%27lloyd@oracle.com%27"&gt;'lloyd@oracle.com'&lt;/a&gt;, '56 Cambridge Street', 'Boston', 'MA', '02116', 'USA', '617-452-3333', '400');&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;commit;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;drop table support_case_trg;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;create table support_case_trg&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;(&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;customerid varchar2(20),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;name varchar2(50),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;email varchar2(30),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;address varchar2(50),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;city varchar2(40),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;state varchar2(20),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;zip varchar2(15),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;country varchar2(30),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;phone varchar2(20),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;orderid varchar2(20),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;constraint supportcase_trg_pk primary key(customerid)&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;commit;&lt;/i&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;p&gt;"The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation."&lt;/p&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2564517520207117824-170579948997717208?l=soainfrastructure.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/IC_Qo_zouAxvMVx0JZ7GNoIWSNY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/IC_Qo_zouAxvMVx0JZ7GNoIWSNY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/IC_Qo_zouAxvMVx0JZ7GNoIWSNY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/IC_Qo_zouAxvMVx0JZ7GNoIWSNY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoaInfrastructure/~4/V7oxDfVtwXk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soainfrastructure.blogspot.com/feeds/170579948997717208/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://soainfrastructure.blogspot.com/2009/02/setting-up-oracle-data-integrator-odi_15.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/170579948997717208?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/170579948997717208?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoaInfrastructure/~3/V7oxDfVtwXk/setting-up-oracle-data-integrator-odi_15.html" title="Setting up Oracle Data Integrator (ODI) with Change Data Capture (CDC): DB Table to WebLogic Server JMS Queue" /><author><name>Steven Pozarycki</name><uri>http://www.blogger.com/profile/02394091549061147655</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://lh4.ggpht.com/_0GX2KEfK3aA/SrwFNNuLgLI/AAAAAAAAAKA/5J9tPQa5vMk/s72-c/clip_image001_thumb1.jpg?imgmax=800" height="72" width="72" /><thr:total>4</thr:total><feedburner:origLink>http://soainfrastructure.blogspot.com/2009/02/setting-up-oracle-data-integrator-odi_15.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUDR3gzfyp7ImA9WxBWEE4.&quot;"><id>tag:blogger.com,1999:blog-2564517520207117824.post-1544071128623251541</id><published>2010-02-02T07:29:00.000-08:00</published><updated>2010-02-01T06:24:36.687-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-01T06:24:36.687-08:00</app:edited><title>Setting up Oracle Data Integrator (ODI) with Change Data Capture (CDC) between two Database Tables</title><content type="html">&lt;h3&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=1544071128623251541" name="_Toc226193761"&gt;Introduction:&lt;/a&gt;&lt;/h3&gt;The following shows detailed steps on how to setup ODI with Change Data Capture on a database table so that all changes to a database table are loaded into a target. In this case a different database table is the target however the target could be anything.&lt;br /&gt;
&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=1544071128623251541" name="_Toc226193762"&gt;Pre-requisites&lt;/a&gt;&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;1. Download Oracle 10gR2 Database if it is not already installed &lt;/li&gt;
&lt;li&gt;2. Download &lt;a href="http://www.oracle.com/technology/software/products/odi/index.html"&gt;ODI 10.1.3.5&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;3. Install ODI 10.1.3.5 &lt;/li&gt;
&lt;li&gt;4. Review &lt;a href="http://www.oracle.com/technology/products/oracle-data-integrator/10.1.3/htdocs/1013_support.html%20"&gt;ODI Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;h3&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=1544071128623251541" name="_Toc226193763"&gt;Setup ODI:&lt;/a&gt;&lt;/h3&gt;The following information makes assumptions that this will be setup on a Windows machine however the same concepts would apply to a UNIX/LINUX environment.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Create a Master Repository in an Oracle DB. In this case we will set this up under a user in our local Oracle 10gR2 Database. We will use the “system” user and connect to our local DB which was setup earlier (jdbc:oracle:thin:@localhost:1541:orcl). Goto Start -&amp;gt; All Programs -&amp;gt; &amp;lt;ORACLE_HOME&amp;gt; –&amp;gt; Oracle Data Integrator -&amp;gt; Repository Management -&amp;gt; Create Master Repository &lt;/li&gt;
&lt;li&gt;This will take a couple of minutes to create the necessary ODI information within the database and schema one provided. &lt;/li&gt;
&lt;li&gt;Startup the Topology Manager and create a Work repository. This is needed prior to starting up the Oracle Designer. Goto Start -&amp;gt; All Programs -&amp;gt; &amp;lt;ORACLE_HOME&amp;gt; -&amp;gt; Oracle Data Integrator -&amp;gt; Topology Manager. &lt;/li&gt;
&lt;li&gt;Create a connection to the repository by clicking on the “New” icon and fill in the data like below: (SUPERVISOR/SUNOPSIS are the default user/password and need to be in capitals) &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh3.ggpht.com/_0GX2KEfK3aA/SrvNun7VTTI/AAAAAAAAAGc/D9dNpbhmrz4/s1600-h/clip_image0015.jpg"&gt;&lt;img alt="clip_image001" border="0" height="243" src="http://lh3.ggpht.com/_0GX2KEfK3aA/SrvOOSfukxI/AAAAAAAAAGg/ZW6AAOnXM-s/clip_image001_thumb2.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image001" width="361" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Goto the repositories tab (the 5&lt;sup&gt;th&lt;/sup&gt; one from the beginning) and create some named work repository. Right click and select “Insert new work repository”. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh6.ggpht.com/_0GX2KEfK3aA/SrvOjqGsmtI/AAAAAAAAAGk/Gjl7rNcI1lM/s1600-h/clip_image0034.jpg"&gt;&lt;img alt="clip_image003" border="0" height="231" src="http://lh3.ggpht.com/_0GX2KEfK3aA/SrvPDaEaJ9I/AAAAAAAAAGo/LhJOlzMXfXQ/clip_image003_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image003" width="340" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;In the Topology Manager, create a Physical Architecture for the Database Schema where you will be connecting to (the 1&lt;sup&gt;st&lt;/sup&gt; tab at the bottom). (NOTE: It is assumed that there are some tables in this schema already.) Select the technology (in this case “Oracle”), then right click and select “Insert Data Server”. Before clicking “ok” to save, one will have to create the Logical Layer as well (see later steps). Fill in the user/password to the schema one will be connecting to and fill in the JDBC information in the JDBC tab. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh4.ggpht.com/_0GX2KEfK3aA/SrvPYvKuqmI/AAAAAAAAAGs/h333Z73szb0/s1600-h/clip_image0057.jpg"&gt;&lt;img alt="clip_image005" border="0" height="268" src="http://lh3.ggpht.com/_0GX2KEfK3aA/SrvP4Up-CLI/AAAAAAAAAGw/ro3GUihCIK0/clip_image005_thumb4.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image005" width="330" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://lh5.ggpht.com/_0GX2KEfK3aA/SrvQNwxG5ZI/AAAAAAAAAG0/9Rys7WrR3TI/s1600-h/clip_image0074.jpg"&gt;&lt;img alt="clip_image007" border="0" height="256" src="http://lh5.ggpht.com/_0GX2KEfK3aA/SrvQtmxDuiI/AAAAAAAAAG4/hnsc9wcg9_E/clip_image007_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image007" width="347" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Next right click this Data Server and select “Insert Physical Schema”. Select the schema one want and then on the “Context” tab is where one will select the Logical Schema. The Logical Schema will first need to be created in the next step before selecting it here and clicking “ok”. (You may get an error while saving this however first save it and then open it up so the Logical Schema can be created.) &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh4.ggpht.com/_0GX2KEfK3aA/SrvRCg7ac2I/AAAAAAAAAG8/uHDntKDkvSc/s1600-h/clip_image0094.jpg"&gt;&lt;img alt="clip_image009" border="0" height="279" src="http://lh5.ggpht.com/_0GX2KEfK3aA/SrvRiRVcajI/AAAAAAAAAHA/kHiJ5gBrOA8/clip_image009_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image009" width="378" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://lh6.ggpht.com/_0GX2KEfK3aA/SrvR3r8AyII/AAAAAAAAAHE/R40lvi-KSgQ/s1600-h/clip_image0115.jpg"&gt;&lt;img alt="clip_image011" border="0" height="283" src="http://lh5.ggpht.com/_0GX2KEfK3aA/SrvSXX6gX3I/AAAAAAAAAHI/OsUGvOluBTU/clip_image011_thumb2.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image011" width="387" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;In the Topology Manager, create a Logical Architecture for the Database Schema where you will be connecting to (the 3&lt;sup&gt;rd&lt;/sup&gt; tab at the bottom). This will be needed for the Physical Architecture layer you created. Select the technology (in this case “Oracle”), then right click and select “Insert Logical Schema”. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh3.ggpht.com/_0GX2KEfK3aA/SrvSsaqmCFI/AAAAAAAAAHM/W47GH5gNQc8/s1600-h/clip_image0134.jpg"&gt;&lt;img alt="clip_image013" border="0" height="266" src="http://lh6.ggpht.com/_0GX2KEfK3aA/SrvTMNlOGfI/AAAAAAAAAHQ/AS_3aEXoaZY/clip_image013_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image013" width="392" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Startup the ODI Designer: Goto Start -&amp;gt; All Programs -&amp;gt; &amp;lt;ORACLE_HOME&amp;gt; -&amp;gt; Oracle Data Integrator -&amp;gt; Designer &lt;/li&gt;
&lt;li&gt;Create a new connection to this new Master Repository and Work Repository. Click the “New” icon next to the default “Login Name” &lt;/li&gt;
&lt;li&gt;Connect with the SUPERVISOR/SUNOPSIS (user/password and all capitals), supply the Oracle Database information where the master repository was created, and the name of the Work Repository which was just created. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh5.ggpht.com/_0GX2KEfK3aA/SrvThZy0vZI/AAAAAAAAAHU/GMZA3jzuIYc/s1600-h/clip_image0144.jpg"&gt;&lt;img alt="clip_image014" border="0" height="277" src="http://lh3.ggpht.com/_0GX2KEfK3aA/SrvUBIiDtlI/AAAAAAAAAHY/6FmcRihUSlM/clip_image014_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image014" width="323" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Back in the Oracle Designer we will now create a Model based on the Logical Schema we created in the Topology Manager. &lt;/li&gt;
&lt;li&gt;Create a Project under the Projects tab. &lt;/li&gt;
&lt;li&gt;Next import the Knowledge Modules. Right click the project, select Import, and then “Import Knowledge Modules”. Select the directory under &amp;lt;ORACLE_HOME&amp;gt;\oracledi\impexp, and then select each knowledge module individually. We will select: &lt;/li&gt;

&lt;ul&gt;&lt;ul&gt;&lt;ul&gt;&lt;ul&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;· CKM SQL&lt;/i&gt; &lt;/li&gt;
&lt;li&gt;&lt;i&gt;· IKM SQL Incremental Update&lt;/i&gt; &lt;/li&gt;
&lt;li&gt;&lt;i&gt;· JKM Oracle 10g Consistent (LOGMINER)&lt;/i&gt; &lt;/li&gt;
&lt;li&gt;&lt;i&gt;· LKM SQL to SQL&lt;/i&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;a href="http://lh3.ggpht.com/_0GX2KEfK3aA/SrvUWH1bTfI/AAAAAAAAAHc/m7lXS-x_tag/s1600-h/clip_image0154.jpg"&gt;&lt;img alt="clip_image015" border="0" height="280" src="http://lh6.ggpht.com/_0GX2KEfK3aA/SrvU1y3vBNI/AAAAAAAAAHg/_vuxgzeQDE8/clip_image015_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image015" width="304" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Create a Model. Right click and select “Insert Model”. &lt;/li&gt;
&lt;li&gt;In the definition tab, select the technology and Logical Schema (created in the Topology Manager) and then click the “Reverse” button to get the tables for this schema into the model view. Click “ok”. &lt;b&gt;&lt;u&gt;NOTE:&lt;/u&gt;&lt;/b&gt; There are SQL statements to create the test tables for the schema user in the APPENDIX section which one can use to test with. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh6.ggpht.com/_0GX2KEfK3aA/SrvVLLYiTBI/AAAAAAAAAHk/ckC9-ECzIlM/s1600-h/clip_image0174.jpg"&gt;&lt;img alt="clip_image017" border="0" height="242" src="http://lh5.ggpht.com/_0GX2KEfK3aA/SrvVrKjdlwI/AAAAAAAAAHo/WwAL7IHvRaQ/clip_image017_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image017" width="316" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Double click the Model name you created and select the Journalizing tab. Make sure that the tab is filled out and looks like the following. Because you want to capture changes to the tables in a consistent fashion, you select the &lt;b&gt;Consistent&lt;/b&gt; option and the &lt;b&gt;JKM Oracle 10g Consistent (LOGMINER)&lt;/b&gt; knowledge module. This knowledge module, shown in the figure below, will capture new and changed data, using the LogMiner feature of Oracle Database 10g. Read the notes section for additional details on the user accessing the tables. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh3.ggpht.com/_0GX2KEfK3aA/SrvWAocVeOI/AAAAAAAAAHs/t_wW8ZjuS4A/s1600-h/clip_image0194.jpg"&gt;&lt;img alt="clip_image019" border="0" height="265" src="http://lh3.ggpht.com/_0GX2KEfK3aA/SrvWhbXuH8I/AAAAAAAAAHw/TBFC6IR_5s4/clip_image019_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image019" width="346" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Click “ok”. &lt;/li&gt;
&lt;li&gt;Next right-click the tables in turn, and choose &lt;b&gt;Changed Data Capture&lt;/b&gt; -&amp;gt;&lt;b&gt;Add to CDC&lt;/b&gt;. Then edit the model again to select the &lt;b&gt;Journalized Tables&lt;/b&gt; tab. If there are multiple tables use the up and down arrow keys to place the tables in the correct order. &lt;/li&gt;
&lt;li&gt;Next add a subscriber to the journal by returning to the Designer application, right-clicking the Model, and choosing &lt;b&gt;Changed Data Capture&lt;/b&gt; -&amp;gt;&lt;b&gt;Subscriber&lt;/b&gt;-&amp;gt;&lt;b&gt;Subscribe&lt;/b&gt;. You add a new subscriber and execute the code locally to ensure that the code executes correctly. Once this step is complete, you have set up the changed-data capture process and you are ready to begin building your interfaces. &lt;/li&gt;
&lt;li&gt;Now one is ready to create the journal that captures changed data from these two tables. To do this, right-click the model again and choose &lt;b&gt;Changed Data Capture&lt;/b&gt; -&amp;gt;&lt;b&gt;Start Journal&lt;/b&gt;. Click OK to execute the code locally, and then start up the Operator application to check the progress of the operation. If all has gone well, you will be presented with a list of completed steps similar to the following. In order to start the Operator goto Start à All Programs à &amp;lt;ORACLE_HOME&amp;gt; à Oracle Data Integrator à Operator and login to the repository when presented with the same login screen. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh6.ggpht.com/_0GX2KEfK3aA/SrvW2W2BouI/AAAAAAAAAH0/pdzvO2JJW88/s1600-h/clip_image0214.jpg"&gt;&lt;img alt="clip_image021" border="0" height="277" src="http://lh3.ggpht.com/_0GX2KEfK3aA/SrvXWDbHP_I/AAAAAAAAAH4/3_SE7DmnNIA/clip_image021_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image021" width="336" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;At this point if CDC is working properly the table should have a green icon instead of the yellow/orange icon. If this is not the case, then CDC is not properly setup. &lt;/li&gt;
&lt;li&gt;Now we can create a new interface which will take the data from SUPPORT_CASE table in an Oracle Database when CDC happens and load it to a different table called SUPPORT_CASE_TRG in an Oracle Database. &lt;/li&gt;
&lt;li&gt;In the Project tab, right click the interface to create a new interface. Drag and drop the tables from the model onto the respective target and source locations on the Diagram Tab. &lt;/li&gt;
&lt;li&gt;Join and map any columns to the target column in the Diagram tab. &lt;/li&gt;
&lt;li&gt;Click on the Flow tab to see how the data will be combined. &lt;/li&gt;
&lt;li&gt;Next select the &lt;b&gt;Controls&lt;/b&gt; tab to make sure the Control Knowledge Module was selected, used for handling constraint errors in the target table. Select the &lt;b&gt;CKM SQL Knowledge Module&lt;/b&gt;, which will handle erroneous data for any ISO-92-compliant database. Click “apply”. &lt;/li&gt;
&lt;li&gt;Next test the interface. To do this, click Execute at the bottom right corner of the interface dialog and then open to the Operator application to check the progress of the interface. Within the operator application it will show the execution of the interface loading the data into the SUPPORT_CASE_TRG table: &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh6.ggpht.com/_0GX2KEfK3aA/SrvXsRJN8zI/AAAAAAAAAH8/qAfSrvRlcLs/s1600-h/clip_image0234.jpg"&gt;&lt;img alt="clip_image023" border="0" height="257" src="http://lh4.ggpht.com/_0GX2KEfK3aA/SrvYMERE8eI/AAAAAAAAAIA/0FlEx1vTizE/clip_image023_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image023" width="327" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Now that we know the interface works, we can update the interface to load the changed data via the Journal tables were created earlier. You can verify that the four records were put into the SUPPORT_CASE_TRG table by right clicking on the table and selecting “View Data”. &lt;/li&gt;
&lt;li&gt;Prepare the Data with Consistent Journaling only: On the model: right click -&amp;gt; Changed Data Capture -&amp;gt; Consumption -&amp;gt; Extend window &lt;/li&gt;
&lt;li&gt;Then Lock the subscriber which will be consuming on the Model. On the model: right click -&amp;gt; Changed Data Capture -&amp;gt; Consumption -&amp;gt; Lock Subscribers &lt;/li&gt;
&lt;li&gt;Go back into the Diagram tab on the Interface, select the source, enable “Journalized Data Only” and click “Apply”. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh3.ggpht.com/_0GX2KEfK3aA/SrvYhUxeZqI/AAAAAAAAAIE/yHH7F9jUVvg/s1600-h/clip_image0254.jpg"&gt;&lt;img alt="clip_image025" border="0" height="233" src="http://lh6.ggpht.com/_0GX2KEfK3aA/SrvZA0t_3eI/AAAAAAAAAII/84Qxw-g5y1c/clip_image025_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image025" width="305" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Click on the filter icon in the Diagram and make sure the subscriber is the one you locked earlier. In this case “SUBA”. The Implementation tab should look like this: &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh4.ggpht.com/_0GX2KEfK3aA/SrvZWMWEgCI/AAAAAAAAAIM/Es10745WE1Y/s1600-h/clip_image0274.jpg"&gt;&lt;img alt="clip_image027" border="0" height="262" src="http://lh3.ggpht.com/_0GX2KEfK3aA/SrvZ12SklUI/AAAAAAAAAIQ/nw1oX7VmSTI/clip_image027_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image027" width="324" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;To test this updated interface, you update some records in the SUPPORT_CASE table (right click, select “Data”, modify a record and click “apply”). Right click the SUPPORT_CASE table: Changed Data Capture -&amp;gt; Journal Data and it should show changes in the Journal table. &lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;&lt;h3&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=1544071128623251541" name="_Toc226193764"&gt;Create the ODI Package and Execute:&lt;/a&gt;&lt;/h3&gt;Now create an Oracle Data Integrator package to carry out the following steps:&lt;br /&gt;
&lt;ul&gt;&lt;ul&gt;&lt;li&gt;Check the SUPPORT_CASE journalized data to see if new or changed data records have been added. &lt;/li&gt;
&lt;li&gt;If journalized data is detected, extend the journal window. &lt;/li&gt;
&lt;li&gt;Execute the interface to read from the journalized data and load the target data store. &lt;/li&gt;
&lt;li&gt;Purge the journal window. &lt;/li&gt;
&lt;li&gt;Start this package again. (This will be in a loop ready for new journal changes.) Creating this package and then deploying it as an Oracle Data Integrator scenario effectively creates a real-time, continuously running ETL process. &lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;   &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;  &lt;br /&gt;
&lt;h5&gt;&lt;/h5&gt;&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=1544071128623251541" name="_Toc226193765"&gt;Create the Package and Scenario for setting up CDC&lt;/a&gt;&lt;/h4&gt;The purpose of this is to automate setting up CDC within one’s environment.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;1. To create this package, navigate to the Projects tab in the Designer application, locate the folder containing the interfaces you defined earlier, find the Packages entry, right-click it, and select Insert Package. Give the package a name and then navigate to the Diagram tab in the package details dialog box. &lt;/li&gt;
&lt;li&gt;2. The next step in this package will be to drag the Model just created onto the canvas. Within the General Tab of this step, select the Drop down under “Type” and select “Journalizing Mode”. &lt;/li&gt;
&lt;li&gt;3. Select “Stop” under Journalizing to stop this if it was already running so it can be successfully rerun. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh4.ggpht.com/_0GX2KEfK3aA/SrvaK5VpoaI/AAAAAAAAAIU/5Ownl3X71Nc/s1600-h/clip_image0294.jpg"&gt;&lt;img alt="clip_image029" border="0" height="250" src="http://lh5.ggpht.com/_0GX2KEfK3aA/SrvaqmGb6bI/AAAAAAAAAIY/copYUpO-Us0/clip_image029_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image029" width="310" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;4. The next step in this package will be to drag the Model just created onto the canvas again. Within the General Tab of this step, select the Drop down under “Type” and select “Journalizing Mode”. &lt;/li&gt;
&lt;li&gt;5. Under the “Journalizing” section of the General tab, select “Start” and “Add Subscribers”. Add the “SUBA” subscriber to the list. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh5.ggpht.com/_0GX2KEfK3aA/Srva_lSD7BI/AAAAAAAAAIc/oYf0In9KgjQ/s1600-h/clip_image0314.jpg"&gt;&lt;img alt="clip_image031" border="0" height="253" src="http://lh6.ggpht.com/_0GX2KEfK3aA/Srvbf2XD7yI/AAAAAAAAAIg/lp5MmvvaOs8/clip_image031_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image031" width="313" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;6. Connect the first step to this step with a green “ok” arrow and a red “ko” arrow. &lt;/li&gt;
&lt;li&gt;7. Right click on this package to create a Scenario. &lt;/li&gt;
&lt;li&gt;8. This scenario can be executed either from the tool by right clicking and selecting “Execute” or by running this from the command line. &lt;/li&gt;
&lt;li&gt;9. Execute this Scenario so that Journaling is initially started. The next section will explain how to create and setup the main CDC process in a loop so that changes are continuously consumed. &lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=1544071128623251541" name="_Toc226193766"&gt;Create the Package and Scenario for the Main CDC process&lt;/a&gt;&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;1. To create this package, navigate to the Projects tab in the Designer application, locate the folder containing the interfaces you defined earlier, find the Packages entry, right-click it, and select Insert Package. Give the package a name and then navigate to the Diagram tab in the package details dialog box. &lt;/li&gt;
&lt;li&gt;2. Using the toolbox on the right, go to the Event Detection folder and add the OdiWaitForLogData tool to the package canvas, as shown in the figure below. This tool will monitor the journalized data on a regular basis. In this case the step name has been changed to “Waiting for Changes”. &lt;/li&gt;
&lt;li&gt;3. In this step update the following parameters: &lt;/li&gt;

&lt;ul&gt;&lt;ul&gt;&lt;ul&gt;&lt;ul&gt;&lt;li&gt;a. Logical Schema: Change this to the Logical Schema being used in your interface &lt;/li&gt;
&lt;li&gt;b. Subscriber: The subscriber name &lt;/li&gt;
&lt;li&gt;c. CDC Set: Change this to your Model Name and the Logical Schema name. It is in the form of: &amp;lt;%=odiRef.getObjectName("L","model_code","logical_schema", "D")%&amp;gt; &lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;i&gt;Example: &amp;lt;%=odiRef.getObjectName("L","ORACLE_SPOZ2_MODEL","Oracle 10gR2 Logical Schema SPOZ2", "D")%&amp;gt;&lt;/i&gt;&lt;/blockquote&gt;&lt;a href="http://lh4.ggpht.com/_0GX2KEfK3aA/Srvb1O7EtmI/AAAAAAAAAIk/TsFm2MhgTDY/s1600-h/clip_image0334.jpg"&gt;&lt;img alt="clip_image033" border="0" height="263" src="http://lh3.ggpht.com/_0GX2KEfK3aA/SrvcU9sgEGI/AAAAAAAAAIo/ofsBKHK8GUE/clip_image033_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image033" width="325" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;4. The next step in this package will be to drag the Model just created onto the canvas. Within the General Tab of this step, select the Drop down under “Type” and select “Journalizing Mode”. &lt;/li&gt;
&lt;li&gt;5. Under the “Consumption” section of the General tab, select “Extend Window” and “Lock Subscribers”. Add the “SUBA” subscriber to the list. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh6.ggpht.com/_0GX2KEfK3aA/SrvcqIByfiI/AAAAAAAAAIs/8fUSkfJ1T3U/s1600-h/clip_image0354.jpg"&gt;&lt;img alt="clip_image035" border="0" height="246" src="http://lh5.ggpht.com/_0GX2KEfK3aA/SrvdJpLTvqI/AAAAAAAAAIw/Jzo1ChHSM1o/clip_image035_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image035" width="304" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;6. Connect the first step to this step with a green “ok” arrow. &lt;/li&gt;
&lt;li&gt;7. Next Drag the Interface just created after the previous step. &lt;/li&gt;
&lt;li&gt;8. Connect the second step to this step for the interface with a green “ok” arrow. &lt;/li&gt;
&lt;li&gt;9. The next step in this package will be to drag the Model again onto the canvas after the interface. Within the General Tab of this step, select the Drop down under “Type” and select “Journalizing Mode”. &lt;/li&gt;
&lt;li&gt;10. Under the “Consumption” section of the General tab, select “Purge Journal” and “Unlock Subscribers”. Add the “SUBA” subscriber to the list. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh5.ggpht.com/_0GX2KEfK3aA/Srvde0Xi2oI/AAAAAAAAAI0/YE9_g6ewllk/s1600-h/clip_image0374.jpg"&gt;&lt;img alt="clip_image037" border="0" height="263" src="http://lh4.ggpht.com/_0GX2KEfK3aA/Srvd-d43uQI/AAAAAAAAAI4/jfRgDbgyyuc/clip_image037_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image037" width="325" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;11. Connect the third step from the interface to this step with a green “ok” arrow. &lt;/li&gt;
&lt;li&gt;12. Right click on this package to create a Scenario. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh3.ggpht.com/_0GX2KEfK3aA/SrveTibNiII/AAAAAAAAAI8/Dfmgvq-G_iI/s1600-h/clip_image0394.jpg"&gt;&lt;img alt="clip_image039" border="0" height="263" src="http://lh5.ggpht.com/_0GX2KEfK3aA/SrvezIXR4CI/AAAAAAAAAJA/hA4v3KwoNsY/clip_image039_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image039" width="326" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;13. After creating this Scenario, open up the package just created. &lt;/li&gt;
&lt;li&gt;14. In this package, drag and drop the scenario to the last step in the list after “Purge and Unlock”. &lt;/li&gt;
&lt;li&gt;15. Connect the fourth step from the “Purge and UnLock” step to this final step (the scenario) with a green “ok” arrow. &lt;/li&gt;
&lt;li&gt;16. Click on the named scenario which was just added to the package and make sure to select “Asynchronous” in the parameters listed under the General tab. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh6.ggpht.com/_0GX2KEfK3aA/SrvfIRnFcII/AAAAAAAAAJE/61BowfSbm7Y/s1600-h/clip_image0414.jpg"&gt;&lt;img alt="clip_image041" border="0" height="265" src="http://lh3.ggpht.com/_0GX2KEfK3aA/SrvfoMNDyHI/AAAAAAAAAJI/rx9rDXSyf-c/clip_image041_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image041" width="326" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;17. Click “ok” to save and close the package. &lt;/li&gt;
&lt;li&gt;18. Right click the scenario created in step 12 and click “Regenerate”. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh6.ggpht.com/_0GX2KEfK3aA/Srvf9OOaJ9I/AAAAAAAAAJM/1AYGsUqcalA/s1600-h/clip_image0434.jpg"&gt;&lt;img alt="clip_image043" border="0" height="258" src="http://lh4.ggpht.com/_0GX2KEfK3aA/Srvgc_x51rI/AAAAAAAAAJQ/jrWy0I-JpCM/clip_image043_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image043" width="318" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;19. The reason for doing steps 13 through 17 is to avoid any issues around log files growing too quickly and too large in the work repository. Plus one would not be able to clean the log file here. &lt;/li&gt;
&lt;li&gt;20. This scenario can be executed either from the tool by right clicking and selecting “Execute” or by running this from the command line. &lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=1544071128623251541" name="_Toc226193767"&gt;Testing the Main CDC Scenario:&lt;/a&gt;&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;1. Make sure the Journal has been started by executing the scenario you created. Example: “SETTING_UP_CDC_SCEN”. &lt;/li&gt;
&lt;li&gt;2. Make sure the main CDC scenario is executing by right clicking the named Scenario and then starting the “Operator” utility. Here you should see something like this (notice the green icon that does not have a checkmark): &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh6.ggpht.com/_0GX2KEfK3aA/Srvgxw_XlfI/AAAAAAAAAJU/t90g-ZyIloI/s1600-h/clip_image0454.jpg"&gt;&lt;img alt="clip_image045" border="0" height="238" src="http://lh6.ggpht.com/_0GX2KEfK3aA/SrvhRtukI_I/AAAAAAAAAJY/1Vut95RHAuA/clip_image045_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image045" width="311" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;3. Goto the Model section, right click on the table with CDC setup on it and select “Data”. &lt;/li&gt;
&lt;li&gt;4. In the window which comes up, change some data and hit enter. Click “ok” so the changes take effect. (Notice Changes were made to the name to add “7777” to it). &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh5.ggpht.com/_0GX2KEfK3aA/SrvhmwqmWoI/AAAAAAAAAJc/ntJPzWMw-WE/s1600-h/clip_image0474.jpg"&gt;&lt;img alt="clip_image047" border="0" height="267" src="http://lh3.ggpht.com/_0GX2KEfK3aA/SrviGZ8289I/AAAAAAAAAJg/OKLF0GZlfNY/clip_image047_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image047" width="331" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;5. Go back to the Operator utility, click Refresh and you’ll notice that the Package ran. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh6.ggpht.com/_0GX2KEfK3aA/SrviblkgG0I/AAAAAAAAAJk/I4RFB02eQiw/s1600-h/clip_image0494.jpg"&gt;&lt;img alt="clip_image049" border="0" height="265" src="http://lh3.ggpht.com/_0GX2KEfK3aA/Srvi7NU7ICI/AAAAAAAAAJo/HnaSd571CxE/clip_image049_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image049" width="347" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;6. Double click on the “CDC Changes Consumed” and select the “Execution” tab. There you will notice that the “Number of Updates” shows a “1” meaning that one row was updated in the target table. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh3.ggpht.com/_0GX2KEfK3aA/SrvjQTxiljI/AAAAAAAAAJs/dccYIzBB4H4/s1600-h/clip_image0514.jpg"&gt;&lt;img alt="clip_image051" border="0" height="271" src="http://lh4.ggpht.com/_0GX2KEfK3aA/SrvjwIlQNXI/AAAAAAAAAJw/HsMido0Txl8/clip_image051_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image051" width="354" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;7. Verify that changes were made to the target table in the database by right clicking on the target table and selecting “Data”. &lt;/li&gt;
&lt;li&gt;8. This scenario will continue to run (by design in the Package created) until one chooses to stop it. &lt;/li&gt;
&lt;/ul&gt;&lt;a href="http://lh5.ggpht.com/_0GX2KEfK3aA/SrvkFeA8K-I/AAAAAAAAAJ0/78RmodALDYU/s1600-h/clip_image0534.jpg"&gt;&lt;img alt="clip_image053" border="0" height="271" src="http://lh6.ggpht.com/_0GX2KEfK3aA/Srvkk-snWZI/AAAAAAAAAJ4/1TbG_7HgDcw/clip_image053_thumb1.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image053" width="335" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;&lt;h3&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=1544071128623251541" name="_Toc226193768"&gt;APPENDIX:&lt;/a&gt;&lt;/h3&gt;SQL statements to create the sample SUPPORT_CASE and SUPPORT_CASE_TRG tables.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;drop table support_case;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;create table support_case&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;(&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;customerid varchar2(20),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;name varchar2(50),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;email varchar2(30),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;address varchar2(50),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;city varchar2(40),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;state varchar2(20),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;zip varchar2(15),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;country varchar2(30),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;phone varchar2(20),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;orderid varchar2(20),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;constraint supportcase_pk primary key(customerid)&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;INSERT INTO support_case VALUES('1','Scott King','sking@oracle.com', '200 Main Street', 'New York', 'NY', '10022', 'USA', '212-555-1212', '200');&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;INSERT INTO support_case VALUES('2','Steven Pozarycki', &lt;/i&gt;&lt;a href="mailto:%27steve@oracle.com%27"&gt;&lt;i&gt;'steve@oracle.com'&lt;/i&gt;&lt;/a&gt;&lt;i&gt;, '22 Pinckney Street', 'Morris Plains', 'NJ', '07950', 'USA', '617-863-4444', '500');&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;INSERT INTO support_case VALUES('3', 'Murali M, 'murali@oracle.com', '180 Patriots Road', 'Boston', 'MA', '02116', 'USA', '617-285-2222', '300');&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;INSERT INTO support_case VALUES('4','Lloyd Smith', &lt;/i&gt;&lt;a href="mailto:%27lloyd.e.smith@oracle.com%27"&gt;&lt;i&gt;'lloyd.e.smith@oracle.com'&lt;/i&gt;&lt;/a&gt;&lt;i&gt;, '56 Cambridge Street', 'Boston', 'MA', '02116', 'USA', '617-452-3333', '400');&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;commit;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;drop table support_case_trg;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;create table support_case_trg&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;(&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;customerid varchar2(20),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;name varchar2(50),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;email varchar2(30),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;address varchar2(50),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;city varchar2(40),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;state varchar2(20),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;zip varchar2(15),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;country varchar2(30),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;phone varchar2(20),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;orderid varchar2(20),&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;constraint supportcase_trg_pk primary key(customerid)&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;commit;&lt;/i&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;p&gt;"The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation."&lt;/p&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2564517520207117824-1544071128623251541?l=soainfrastructure.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/N5rjvmGVMPlnfX8ICxxAFqGCfaA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/N5rjvmGVMPlnfX8ICxxAFqGCfaA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/N5rjvmGVMPlnfX8ICxxAFqGCfaA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/N5rjvmGVMPlnfX8ICxxAFqGCfaA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoaInfrastructure/~4/4dS3BlutEjQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soainfrastructure.blogspot.com/feeds/1544071128623251541/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://soainfrastructure.blogspot.com/2009/02/setting-up-oracle-data-integrator-odi.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/1544071128623251541?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/1544071128623251541?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoaInfrastructure/~3/4dS3BlutEjQ/setting-up-oracle-data-integrator-odi.html" title="Setting up Oracle Data Integrator (ODI) with Change Data Capture (CDC) between two Database Tables" /><author><name>Steven Pozarycki</name><uri>http://www.blogger.com/profile/02394091549061147655</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://lh3.ggpht.com/_0GX2KEfK3aA/SrvOOSfukxI/AAAAAAAAAGg/ZW6AAOnXM-s/s72-c/clip_image001_thumb2.jpg?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://soainfrastructure.blogspot.com/2009/02/setting-up-oracle-data-integrator-odi.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYERX85eip7ImA9WxNbF0g.&quot;"><id>tag:blogger.com,1999:blog-2564517520207117824.post-4471167264457432491</id><published>2009-11-20T13:55:00.000-08:00</published><updated>2009-11-20T13:55:04.122-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-20T13:55:04.122-08:00</app:edited><title>Oracle Entitlements Server (OES) and Oracle Virtual Private Database (VPD) Integration</title><content type="html">&lt;h6&gt;&lt;/h6&gt;&lt;h6&gt;&lt;/h6&gt;&lt;h6&gt;&lt;/h6&gt;&lt;h3&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="_Toc212016768"&gt;&lt;/a&gt;&lt;/h3&gt;The following guide centers around integration of Oracle Entitlements Server (OES) and Oracle Virtual Private Database (VPD). It is also known as &lt;b&gt;Fine-Grained Access Control&lt;/b&gt; (FGAC), and some call it &lt;b&gt;Row Level Security&lt;/b&gt; (RLS). The database package used for VPD is called DBMS_RLS. The main functionality of VPD is to automatically add extra where clauses to SQL statements. Depending on how you defined your VPD policies, it can be applied to select, update, insert, and/or delete statements of specific tables.   &lt;br /&gt;
This document will include information on the manual steps on setting up this integration up for any table within a schema. The current &lt;a href="http://www.blogger.com/%28http://download.oracle.com/docs/cd/E12890_01/ales/docs32/installssms/Config_OracleSSM.html"&gt;documentation&lt;/a&gt; offers a specific example however that puts all of the SQL behind the scenes where a DB administrator may not allow one to run automated SQL scripts.  &lt;br /&gt;
&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;&lt;h3&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="_Toc212016769"&gt;Prerequisites&lt;/a&gt;&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="wp1087192"&gt;&lt;/a&gt;Oracle 10g Release 2 (10.2.0.1.0) is installed and configured. &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="wp1087194"&gt;&lt;/a&gt;The OES Administration Server has already been installed on one system and is running successfully. &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="wp1087426"&gt;&lt;/a&gt;Web Service SSM is installed and on another system (or the same system), as described in &lt;a href="http://download.oracle.com/docs/cd/E12890_01/ales/docs32/installssms/SSM_Configs.html"&gt;Configuring SSMs Using ConfigTool&lt;/a&gt;. The Web Service SSM needs to be installed and configured properly before you install the Oracle SSM. If not, then this is covered in the first section. &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="wp1087459"&gt;&lt;/a&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="wp1087196"&gt;&lt;/a&gt;The Oracle SSM and the Web Service SSM instance must be on the same system. &lt;/li&gt;
&lt;li&gt;Typically one will have one WebService SSM per physical machine. &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="wp1087198"&gt;&lt;/a&gt;The currently logged on user must belong to the &lt;code&gt;ora_dba&lt;/code&gt; group on Windows or &lt;code&gt;dba&lt;/code&gt; group on UNIX. &lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="wp1087205"&gt;&lt;/a&gt;For instance, if the currently logged on user is 'joe' then 'joe' needs to be in the &lt;code&gt;ora_dba&lt;/code&gt; or &lt;code&gt;dba&lt;/code&gt; group, as appropriate. &lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="wp1087206"&gt;&lt;/a&gt;This is required in order to connect as "system" user with a DB administrator role. &lt;/li&gt;
&lt;li&gt;The following steps in this document have been done on a Windows system only. &lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;&lt;h3&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="_Toc212016770"&gt;Architecture of the OES/VPD Integration&lt;/a&gt;&lt;/h3&gt;&lt;a href="http://lh6.ggpht.com/_0GX2KEfK3aA/SruZYNDuhKI/AAAAAAAAACU/8zq2UWlyO-o/s1600-h/clip_image002%5B6%5D.gif"&gt;&lt;img alt="clip_image002" border="0" height="266" src="http://lh3.ggpht.com/_0GX2KEfK3aA/SruZYYemRgI/AAAAAAAAACY/kP99i51jhaU/clip_image002_thumb%5B3%5D.gif?imgmax=800" style="border-width: 0px; display: inline;" title="clip_image002" width="450" /&gt;&lt;/a&gt;  &lt;br /&gt;
&lt;b&gt;   &lt;br /&gt;
&lt;/b&gt;  &lt;br /&gt;
&lt;h3&gt;&lt;/h3&gt;&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;&lt;h3&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="_Toc212016771"&gt;Steps to Configure the Oracle-SSM for VPD&lt;/a&gt;&lt;/h3&gt;The following steps are listed in the order required for this to properly work. The DB administrator will need to run their section of steps before the “DB USER” steps can be completed and so forth.  &lt;br /&gt;
&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="_Toc212016772"&gt;SSM Creation:&lt;/a&gt;&lt;/h4&gt;This is done by the user currently logged onto the Windows system where the OES SSM binaries have been installed. The following will create instances of the SSMs who do the work of enforcing the policies which are written in the OES Administration Server and distributed to these end-points.  &lt;br /&gt;
&lt;h5&gt;&amp;nbsp;&lt;/h5&gt;&lt;h5&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="_Toc212016773"&gt;Create the WebService SSM instance&lt;/a&gt;&lt;/h5&gt;&lt;ul&gt;&lt;li&gt;Goto: OES_HOME\ales32-ssm\webservice-ssm\adm &lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Backup the myssm_config.properties and edit the file with settings for your environment. A &lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491#_WebService_SSM_%E2%80%9Cmyssm_config.proper"&gt;sample myssm_config.properties&lt;/a&gt; is provided in the Appendix section. &lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Verify that the settings are “ok”: ConfigTool.bat -check myssm_config.properties &lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Process the settings: ConfigTool.bat -process myssm_config.properties &lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;The following is the output from the tool if it successfully runs: &lt;/li&gt;
&lt;/ul&gt;&lt;i&gt;&lt;/i&gt;  &lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;Is Admin in the same BEA-HOME as SSM: [default: Yes]:&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Give the location of the Admin: c:\bea922\ales32-admin&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Checking if default ARME port is free: 8000&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Checking if default SSMWS port is free: 9000&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Generating policy files based on templates...&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Checking if SSM instance already present&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Checking to see if SSM ARME port is free.&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Checking JDBC parameters...&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Checking to see if asipassword was run...&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Check completed successfully.&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Starting to make changes...&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Creating SSM instance...&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Done creating SSM instance.&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Loading ALES Policy. Please wait ...&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Number of Identities processed : 1, time is: Thu Oct 16 2008 11:01:45 EDT&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Number of Resources processed : 15, time is: Thu Oct 16 2008 11:01:50 EDT&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Number of ARME and SCM processed : 1, time is: Thu Oct 16 2008 11:01:52 EDT&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Number of Resource Bindings processed : 2, time is: Thu Oct 16 2008 11:01:53 EDT&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Number of Users and Groups processed : 1, time is: Thu Oct 16 2008 11:01:54 EDT&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Number of Declarations processed : 55, time is: Thu Oct 16 2008 11:01:55 EDT&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Number of Resource Attributes processed : 45, time is: Thu Oct 16 2008 11:01:57 EDT&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Number of Authorization and Role Mapping Rules processed : 1, time is: Thu Oct 16 2008 11:01:59 EDT&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Set password for user: admin&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;New password of user //user/WSDir/admin/ set.&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Done loading ALES Policy.&lt;/i&gt;    &lt;br /&gt;
&lt;/blockquote&gt;&lt;i&gt;&lt;/i&gt;  &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Based on the properties file (ssm.instance.name = ssmws) this will create an instance in the following directory: OES_HOME\ales32-ssm\webservice-ssm\instance\ssmws &lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;It also does the following:      &lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Creates a resource in the tree: (ales.resource.root = //app/policy/ssmws) &lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;ul&gt;&lt;li&gt;Creates the user for this SSM (ssm.admin.name = admin) in the Identity directory configured (ales.identity.dir = WSDir) &lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;ul&gt;&lt;li&gt;Creates a SSM Configuration ID (ssm.conf.id = ssmws) in OES with the security providers configured. &lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Next, create another user in the “WSDir” Identity where the WebService SSM instance is bound to. In this case we will create a user called “spoz” which will be used later on. &lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;ul&gt;&lt;li&gt;Logon to the Administration Console for the OES Administration Server: &lt;a href="https://localhost:7010/asi"&gt;https://localhost:7010/asi&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Click on “Identity” in the left-hand pane. &lt;/li&gt;
&lt;li&gt;Click on “WSDir” in the right-hand pane (which we just created) &lt;/li&gt;
&lt;li&gt;Click the “Edit Users” button with the “WSDir” Name highlighted. &lt;/li&gt;
&lt;li&gt;On the next window one should notice “WSDir-&amp;gt;Users” at the top of the page. &lt;/li&gt;
&lt;li&gt;Select “New” to add a new user called “spoz” and click “ok” so there is an “entry” for this subject here. This will use the password which is set in the database for authentication. &lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Start the WebService-SSM: OES_HOME\ales32-ssm\webservice-ssm\instance\ssmws\bin\WLESws.bat (“console” option or “start” option) to make sure this process starts successfully. If it is started successfully in “console” mode, one should see the following output. If not, then check the “OES_HOME\ales32-ssm\webservice-ssm\instance\ssmws\bin\system_console.log” file for this instance. Example output (the “Error” below will only happen on the initial start time since it is checking for the existence of a file): &lt;/li&gt;
&lt;/ul&gt;&lt;blockquote&gt;&lt;i&gt;OES_HOME\ales32-ssm\webservice-ssm\instance\ssmws\bin&amp;gt;WLESws.bat console&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Starting "SSMWS.ssmws.SPOZ03" in console mode...&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;--&amp;gt; Wrapper Started as Console&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Launching a JVM...&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Wrapper (Version 3.0.5)&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Phoenix&lt;/i&gt;&lt;i&gt; 4.0.4&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;2008-10-16 11:27:20,183 [Phoenix-Monitor] ERROR com.bea.security.providers.autho&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;rization.asi.ARME.engine.UpdateManager - arme can not find state.chk file.&lt;/i&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;ARME is started now&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;Shutdown the WebService-SSM in order to configure the Oracle SSM instance in the next section. If this process is run in the foreground it can be stopped with Ctrl-C or if it is run in the background it can be stopped with OES_HOME\ales32-ssm\webservice-ssm\instance\ssmws\bin\WLESws.bat stop &lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Configure the WebService SSM instance with the following additional value in its configuration file. The configuration file in question will be located at the following directory where INSTANCE_HOME is the “ssmws” token one user earlier:&lt;i&gt;&lt;/i&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;i&gt;&lt;/i&gt;  &lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;OES_HOME\ales32-ssm\webservice-ssm\instance\&amp;lt;INSTANCE_NAME&amp;gt;\config\WLESws.wrapper.conf&lt;/i&gt;    &lt;br /&gt;
&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;Verify that the content of the file has a line such as the following (the number reference below does not matter as long as it is not duplicated in the file). OES_HOME refers to the directory where the OES SSM product was installed and should be substituted here:&lt;i&gt;&lt;/i&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;i&gt;&lt;/i&gt;  &lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;wrapper.java.classpath.66=OES_HOME/ales32-ssm/webservice-ssm/lib/CredentialHolder.jar&lt;/i&gt;    &lt;br /&gt;
&lt;/blockquote&gt;&lt;h5&gt;&amp;nbsp;&lt;/h5&gt;&lt;h5&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="_Toc212016774"&gt;Update the WebService SSM Installation Directory:&lt;/a&gt;&lt;/h5&gt;&lt;u&gt;NOTE:&lt;/u&gt; The following two steps only need to be done once per machine where the SSM binaries are installed.  &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Make sure the following text is added to the following file and the file is formatted correctly as an XML file:: OES_HOME\ales32-ssm\webservice-ssm\lib\com\bea\security\ssmws\soap\.castor.xml &lt;/li&gt;
&lt;/ul&gt;&lt;blockquote&gt;&lt;i&gt;&amp;lt;class name="com.bea.security.ssmws.credentials.ORACredentialHolderImpl"&amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&amp;lt;map-to cst:xml="simpletextidentityassertion" /&amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&amp;lt;field name="cookie" type="java.lang.String" &amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&amp;lt;bind-xml node="text"/&amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&amp;lt;/field&amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&amp;lt;/class&amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&amp;lt;class name="com.bea.security.ssmws.credentials.ORAEncodedCredentialHolderImpl"&amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&amp;lt;map-to cst:xml="encodedtextidentityassertion" /&amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&amp;lt;field name="cookie" type="java.lang.String" &amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&amp;lt;bind-xml node="text"/&amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&amp;lt;/field&amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&amp;lt;/class&amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;Also make sure the following text is added to this additional file and the file is formatted correctly as an XML file: OES_HOME\ales32-ssm\webservice-ssm\lib\com\bea\security\credentials\.castor.xml &lt;/li&gt;
&lt;/ul&gt;&lt;blockquote&gt;&lt;i&gt;&amp;lt;class name="com.bea.security.ssmws.credentials.ORACredentialHolderImpl"&amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&amp;lt;map-to cst:xml="simpletextidentityassertion" cst:ns-uri="http://security.bea.com/ssmws/ssm-soap-types-1.0.xsd" /&amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&amp;lt;field name="cookie" type="java.lang.String" &amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&amp;lt;bind-xml node="text"/&amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&amp;lt;/field&amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&amp;lt;/class&amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&amp;lt;class name="com.bea.security.ssmws.credentials.ORAEncodedCredentialHolderImpl"&amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&amp;lt;map-to cst:xml="encodedtextidentityassertion" cst:ns-uri="http://security.bea.com/ssmws/ssm-soap-types-1.0.xsd" /&amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&amp;lt;field name="cookie" type="java.lang.String" &amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&amp;lt;bind-xml node="text"/&amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&amp;lt;/field&amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&amp;lt;/class&amp;gt;&lt;/i&gt;    &lt;br /&gt;
&lt;/blockquote&gt;&lt;h5&gt;&amp;nbsp;&lt;/h5&gt;&lt;h5&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="_Toc212016775"&gt;Create the Oracle SSM instance&lt;/a&gt;&lt;/h5&gt;&lt;ul&gt;&lt;li&gt;First run the OES_HOME\ales32_SSM\oracle-ssm\adm\instancewizard.cmd command to create an Oracle SSM instance. During the install it will ask for three settings which are outlined below with sample values: &lt;/li&gt;
&lt;/ul&gt;&lt;blockquote&gt;&lt;b&gt;&lt;u&gt;Instance name:&lt;/u&gt;&lt;/b&gt; oraclessm (The name which is used to create a directory structure on disk)    &lt;br /&gt;
&lt;b&gt;&lt;u&gt;SM WS Port:&lt;/u&gt;&lt;/b&gt; 9000 (This is the WebService Port value used earlier when creating a WebService SSM instance.)    &lt;br /&gt;
&lt;b&gt;&lt;u&gt;SM WS Config ID:&lt;/u&gt;&lt;/b&gt; ssmws (This is the WebService SSM instance configuration ID name used earlier.)    &lt;br /&gt;
&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;At completion of the utility the instance will be located at: OES_HOME\ales32-ssm\oracle-ssm\instance\oraclessm &lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Finally restart the WebService SSM instance you created earlier. OES_HOME\ales32-ssm\webservice-ssm\instance\ssmws\bin\WLESws.bat (“console” option or “start” option) to make sure this process starts successfully. &lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="_Toc212016776"&gt;DB administrator Steps:&lt;/a&gt;&lt;/h4&gt;These are the steps that are required to be run by the DB administrator user to initially setup the database and schema for the DB user who will be accessing the tables within that schema later on. Please make sure that the proper “SQLPlus” executable is in one’s path so it is pointing to the correct TNSNAMES.ora file.  &lt;br /&gt;
If one already has an existing schema, then step 1 can be ignored and the rest of the steps would need to be followed.  &lt;br /&gt;
&lt;ol&gt;&lt;li&gt;In the database instance directory of the ORACLE_HOME (ORACLE_DB_INSTALL_DIR\ORACLE_DB_NAME in this case), create an "ssm-properties" directory and create an oracle-ssm.properties file in that directory. See the Appendix for the &lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491#_oracle-ssm.properties_file_Sample"&gt;sample oracle-ssm.properties&lt;/a&gt; file after updating with the correct values for your system. &lt;/li&gt;
&lt;/ol&gt;&lt;ol&gt;&lt;li&gt;If you are creating a new user, then the following SQL should be run as the DB administrator user. Example where ORCL is the SID: &lt;/li&gt;
&lt;/ol&gt;&lt;blockquote&gt;SQLPLUS system/password@ORCL   &lt;br /&gt;
&lt;i&gt;CREATE TABLESPACE spoz_DATA DATAFILE 'C:\oracle\product\10.2.0\db1\oradata\spoz_DATA.dbf' size 384M autoextend on;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;CREATE USER spoz IDENTIFIED BY password DEFAULT TABLESPACE spoz_DATA QUOTA UNLIMITED ON spoz_DATA;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;GRANT JAVASYSPRIV TO spoz;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;GRANT JAVA_ADMIN TO spoz;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;GRANT DBA TO spoz;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;ALTER USER spoz QUOTA UNLIMITED ON spoz_DATA;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;COMMIT;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;DISCONNECT;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;EXIT;&lt;/i&gt;    &lt;br /&gt;
&lt;/blockquote&gt;&lt;i&gt;&lt;/i&gt;  &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;  &lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Whichever schema you are using (the newly created one from step 1 or an existing one), the following SQL script should be run as the DB administrator user to set the database. Example where “SPOZ” is what was created in step 1: &lt;/li&gt;
&lt;/ol&gt;&lt;blockquote&gt;SQLPLUS system/password@ORCL @setDataBase.sql SPOZ&lt;br /&gt;
&lt;i&gt;-------------------------------------------------------------------&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;--setDataBase.sql Script to Grant the Privileges (executed by sys as sysdba user generally)&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;-------------------------------------------------------------------&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;-- If sys is granting privilege then he must login as sysdba&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;GRANT CREATE SESSION TO &amp;amp;&amp;amp;1;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;GRANT CREATE ANY TABLE TO &amp;amp;&amp;amp;1;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;GRANT CREATE ANY PROCEDURE TO &amp;amp;&amp;amp;1;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;GRANT JAVASYSPRIV TO &amp;amp;&amp;amp;1;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;-- The following grant line may have to be done by the DB Admin&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;GRANT EXECUTE ON DBMS_RLS TO &amp;amp;&amp;amp;1;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;-- The following grant statements are optional and should not be allowed in a production database.&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;GRANT ALTER ANY PROCEDURE TO &amp;amp;&amp;amp;1;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;GRANT CREATE ANY TRIGGER TO &amp;amp;&amp;amp;1;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;GRANT ALTER ANY TRIGGER TO &amp;amp;&amp;amp;1;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;GRANT DROP ANY TRIGGER TO &amp;amp;&amp;amp;1;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;-- These are required&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;EXEC DBMS_JAVA.grant_permission('&amp;amp;&amp;amp;1', 'SYS:java.util.PropertyPermission', '*', 'read,write');&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;EXEC DBMS_JAVA.grant_permission('&amp;amp;&amp;amp;1', 'SYS:java.security.SecurityPermission', 'putProviderProperty.JsafeJCE', '' );&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;EXEC DBMS_JAVA.grant_permission('&amp;amp;&amp;amp;1', 'SYS:java.lang.RuntimePermission', 'getProtectionDomain', '' );&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;COMMIT;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;Disconnect;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;EXIT&lt;/i&gt;&lt;br /&gt;
&lt;/blockquote&gt;&lt;i&gt;&lt;/i&gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Next, load the necessary Java JAR files into the schema one is using. If there are some errors/failures about not finding some class files which could not be resolved, then it is ok to ignore these. In the following scripts they are loading the specified jar files into the “SPOZ” schema created in step 1. &lt;/li&gt;
&lt;/ol&gt;&lt;b&gt;&lt;u&gt;Where:&lt;/u&gt;&lt;/b&gt;  &lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;/u&gt;&lt;/b&gt;  &lt;br /&gt;
&lt;blockquote&gt;&lt;u&gt;ORACLE_DB_INSTALL_DIR&lt;/u&gt; = The name of the directory where the Oracle DB Product was installed on this Windows system.    &lt;br /&gt;
&lt;u&gt;ORACLE_DB_NAME&lt;/u&gt; = The name of the DB instance which is currently running on this system.    &lt;br /&gt;
&lt;u&gt;OES_HOME&lt;/u&gt; = The name of the home directory on this system where the OES Product was installed.    &lt;br /&gt;
&lt;/blockquote&gt;&lt;b&gt;&lt;u&gt;“Parameterized” Commands:&lt;/u&gt;&lt;/b&gt;  &lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;/u&gt;&lt;/b&gt;  &lt;br /&gt;
&lt;blockquote&gt;ORACLE_DB_INSTALL_DIR\ORACLE_DB_NAME\bin\loadjava.bat -resolve -schema spoz OES_HOME/ales32-ssm/oracle-ssm/lib/saaj.jar   &lt;br /&gt;
ORACLE_DB_INSTALL_DIR\ORACLE_DB_NAME\bin\loadjava.bat -resolve -schema spoz OES_HOME/ales32-ssm/oracle-ssm/lib/jaxrpc.jar    &lt;br /&gt;
ORACLE_DB_INSTALL_DIR\ORACLE_DB_NAME\bin\loadjava.bat -resolve –schema spoz OES_HOME/ales32-ssm/oracle-ssm/lib/wsdl4j-1.5.1.jar    &lt;br /&gt;
ORACLE_DB_INSTALL_DIR\ORACLE_DB_NAME\bin\loadjava.bat -resolve –schema spoz OES_HOME/ales32-ssm/oracle-ssm/lib/log4j.jar    &lt;br /&gt;
ORACLE_DB_INSTALL_DIR\ORACLE_DB_NAME\bin\loadjava.bat -resolve –schema spoz OES_HOME/ales32-ssm/oracle-ssm/lib/commons-logging-1.0.4.jar    &lt;br /&gt;
ORACLE_DB_INSTALL_DIR\ORACLE_DB_NAME\bin\loadjava.bat -resolve -schema spoz OES_HOME/ales32-ssm/oracle-ssm/examples/tools/axis_1.3/lib/commons-discovery-0.2.jar     &lt;br /&gt;
ORACLE_DB_INSTALL_DIR\ORACLE_DB_NAME\bin\loadjava.bat -resolve -schema spoz OES_HOME/ales32-ssm/oracle-ssm/examples/tools/axis_1.3/lib/axis.jar    &lt;br /&gt;
ORACLE_DB_INSTALL_DIR\ORACLE_DB_NAME\bin\loadjava.bat -resolve -schema spoz OES_HOME/ales32-ssm/oracle-ssm/lib/ssmwsClientStub.jar    &lt;br /&gt;
ORACLE_DB_INSTALL_DIR\ORACLE_DB_NAME\bin\loadjava.bat -resolve -schema spoz OES_HOME/ales32-ssm/oracle-ssm/lib/OracleSsm.jar    &lt;br /&gt;
&lt;/blockquote&gt;&lt;b&gt;&lt;u&gt;“Full Example Commands”:&lt;/u&gt;&lt;/b&gt; (To minimize parameter substitution)  &lt;br /&gt;
&lt;blockquote&gt;C:\oracle\product\10.2.0\db1\BIN\loadjava.bat -resolve -schema spoz C:/bea922/ales32-ssm/oracle-ssm/lib/saaj.jar   &lt;br /&gt;
C:\oracle\product\10.2.0\db1\BIN\loadjava.bat -resolve -schema spoz C:/bea922/ales32-ssm/oracle-ssm/lib/jaxrpc.jar    &lt;br /&gt;
C:\oracle\product\10.2.0\db1\BIN\loadjava.bat -resolve -schema spoz C:/bea922/ales32-ssm/oracle-ssm/lib/wsdl4j-1.5.1.jar    &lt;br /&gt;
C:\oracle\product\10.2.0\db1\BIN\loadjava.bat -resolve -schema spoz C:/bea922/ales32-ssm/oracle-ssm/lib/log4j.jar    &lt;br /&gt;
C:\oracle\product\10.2.0\db1\BIN\loadjava.bat -resolve -schema spoz C:/bea922/ales32-ssm/oracle-ssm/lib/commons-logging-1.0.4.jar    &lt;br /&gt;
C:\oracle\product\10.2.0\db1\BIN\loadjava.bat -resolve -schema spoz C:/bea922/ales32-ssm/oracle-ssm/examples/tools/axis_1.3/lib/commons-discovery-0.2.jar    &lt;br /&gt;
C:\oracle\product\10.2.0\db1\BIN\loadjava.bat -resolve -schema spoz C:/bea922/ales32-ssm/oracle-ssm/examples/tools/axis_1.3/lib/axis.jar    &lt;br /&gt;
C:\oracle\product\10.2.0\db1\BIN\loadjava.bat -resolve -schema spoz C:/bea922/ales32-ssm/oracle-ssm/lib/ssmwsClientStub.jar    &lt;br /&gt;
C:\oracle\product\10.2.0\db1\BIN\loadjava.bat -resolve -schema spoz C:/bea922/ales32-ssm/oracle-ssm/lib/OracleSsm.jar    &lt;br /&gt;
&lt;/blockquote&gt;&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="_Toc212016777"&gt;“DB USER” Steps:&lt;/a&gt;&lt;/h4&gt;These are the steps that are required to be run by the database user who has access to the named schema that either already exists or has just been created by the DB administrator user in the previous section.  &lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Run SQLPlus as the user with access to the schema (“SPOZ” in this case) and verify that there are java objects loaded. Example: &lt;/li&gt;
&lt;/ol&gt;&lt;blockquote&gt;SQLPLUS spoz/password@ORCL   &lt;br /&gt;
&lt;/blockquote&gt;Then run:  &lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;SELECT object_name, object_type, status FROM user_objects WHERE object_type IN ('JAVA SOURCE', 'JAVA CLASS', 'JAVA RESOURCE') ORDER BY object_type, object_name;&lt;/i&gt;    &lt;br /&gt;
&lt;/blockquote&gt;&lt;ol&gt;&lt;li&gt;Optionally create a “test” table where one will enable these policies on. If not, then one will already have a table which will need to be secured and step 2 can be skipped. &lt;/li&gt;
&lt;/ol&gt;&lt;blockquote&gt;&lt;i&gt;CREATE TABLE cust_payment_info(first_name varchar2(11), last_name varchar2(10), order_number number(5), credit_card_number varchar2(16));&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;INSERT INTO cust_payment_info values ('Jon', 'Oldfield', 10001, '5446959708812985');&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;INSERT INTO cust_payment_info values ('Chris', 'White', 10002, '5122358046082560');&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;INSERT INTO cust_payment_info values ('Alan', 'Squire', 10003, '5595968943757920');&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;INSERT INTO cust_payment_info values ('Mike', 'Anderson', 10004, '4929889576357400');&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;INSERT INTO cust_payment_info values ('Annie', 'Schmidt', 10005, '4556988708236902');&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;INSERT INTO cust_payment_info values ('Elliott', 'Meyer', 10006, '374366599711820');&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;INSERT INTO cust_payment_info values ('Celine', 'Smith', 10007, '4716898533036');&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;INSERT INTO cust_payment_info values ('Steve', 'Haslam', 10008, '340975900376858');&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;INSERT INTO cust_payment_info values ('Albert', 'Einstein', 10009, '310654305412389');&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;commit;&lt;/i&gt;    &lt;br /&gt;
&lt;/blockquote&gt;&lt;ol&gt;&lt;li&gt;Create the functions within the DB which use the OES Plugin. &lt;/li&gt;
&lt;/ol&gt;&lt;blockquote&gt;SQLPLUS spoz/password@ORCL @functions.sql   &lt;br /&gt;
&lt;i&gt;-------------------------------------------------------------------&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;--functions.sql Script to Create the functions (executed by the schema user where the java classes need to be loaded)&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;-------------------------------------------------------------------&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;CREATE OR REPLACE FUNCTION selectFilter(schema in VARCHAR2,tab IN VARCHAR2, dbname IN VARCHAR2, client_id IN VARCHAR2, action IN VARCHAR2) RETURN VARCHAR2 AS LANGUAGE JAVA&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;NAME 'com.bea.security.oraclessm.OracleSSM.selectFilter(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String) return java.lang.String';&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;COMMIT;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;CREATE OR REPLACE FUNCTION addSelectFilter(schema IN VARCHAR2, tab IN VARCHAR2) RETURN VARCHAR2 AS&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;dbname VARCHAR2(2000);&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;client_id VARCHAR2(2000);&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;result VARCHAR2(2000);&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;BEGIN&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;dbname := Lower(sys_context('USERENV','DB_NAME'));&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;client_id := (Sys_Context('USERENV','CLIENT_IDENTIFIER'));&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;result := selectFilter(Lower(schema), Lower(tab), dbname, client_id, 'select');&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;DBMS_SESSION.SET_IDENTIFIER('');&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;RETURN result;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;END;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;COMMIT;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;CREATE OR REPLACE FUNCTION addUpdateFilter(schema IN VARCHAR2, tab IN VARCHAR2) RETURN VARCHAR2 AS&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;dbname VARCHAR2(2000);&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;client_id VARCHAR2(2000);&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;result VARCHAR2(2000);&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;BEGIN&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;dbname := Lower(sys_context('USERENV','DB_NAME'));&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;client_id := (Sys_Context('USERENV','CLIENT_IDENTIFIER'));&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;result := selectFilter(Lower(schema), Lower(tab), dbname, client_id, 'update');&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;DBMS_SESSION.SET_IDENTIFIER('');&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;RETURN result;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;RETURN result;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;END;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;COMMIT;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;CREATE OR REPLACE FUNCTION addDeleteFilter(schema IN VARCHAR2, tab IN VARCHAR2) RETURN VARCHAR2 AS&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;dbname VARCHAR2(2000);&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;client_id VARCHAR2(2000);&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;result VARCHAR2(2000);&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;BEGIN&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;dbname := Lower(sys_context('USERENV','DB_NAME'));&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;client_id := (Sys_Context('USERENV','CLIENT_IDENTIFIER'));&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;result := selectFilter(Lower(schema), Lower(tab), dbname, client_id, 'delete');&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;DBMS_SESSION.SET_IDENTIFIER('');&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;RETURN result;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;END;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;COMMIT;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;CREATE OR REPLACE FUNCTION setClientIdentifier(token VARCHAR2) RETURN VARCHAR2 AS&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;BEGIN&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;DBMS_SESSION.SET_IDENTIFIER(token); &lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;RETURN 'done';&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;END;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;COMMIT;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;CREATE OR REPLACE PROCEDURE init AS LANGUAGE JAVA&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;NAME 'com.bea.security.oraclessm.OracleSSM.init()';&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;COMMIT;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;CREATE OR REPLACE TRIGGER LOGON_TRIGGER&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;AFTER LOGON ON SCHEMA&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;BEGIN&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;init;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;END;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;COMMIT;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;EXIT&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;-------------------------------------------------------------------&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;-- End of document&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;-------------------------------------------------------------------&lt;/i&gt;    &lt;br /&gt;
&lt;/blockquote&gt;&lt;ol&gt;&lt;li&gt;Optional: One can still run a “select * from cust_payment_info;” at this point and see the data from the tables. This same behavior would also still apply to the already existing table as well. &lt;/li&gt;
&lt;/ol&gt;&lt;blockquote&gt;&lt;i&gt;SQL&amp;gt; select * from cust_payment_info;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;FIRST_NAME LAST_NAME ORDER_NUMBER CREDIT_CARD_NUMB&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;----------- ---------- ------------ ----------------&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Jon Oldfield 10001 5446959708812985&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Chris White 10002 5122358046082560&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Alan Squire 10003 5595968943757920&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Mike Anderson 10004 4929889576357400&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Annie Schmidt 10005 4556988708236902&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Elliott Meyer 10006 374366599711820&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Celine Smith 10007 4716898533036&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Steve Haslam 10008 340975900376858&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Albert Einstein 10009 310654305412389&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;9 rows selected.&lt;/i&gt;    &lt;br /&gt;
&lt;/blockquote&gt;&lt;ol&gt;&lt;li&gt;Create the policies with the DB on the “test” table from step 3 or on the actual table one is using. The script has references to the name of the schema, in this case it is “spoz”. NOTE: If one has an already existing table, then this is the point where the following policies would apply to one’s table name. Please use the following SQL statements and substitute your “table name” with the table name in these scripts (called “cust_payment_info”). &lt;/li&gt;
&lt;/ol&gt;&lt;blockquote&gt;SQLPLUS spoz/password@ORCL @oraclessm_policy.sql   &lt;br /&gt;
&lt;i&gt;-------------------------------------------------------------------&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;--oraclessm_policy.sql Script to Create the functions (executed by the schema user where the java classes need to be loaded)&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;-------------------------------------------------------------------&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;execute dbms_rls.add_policy(object_schema =&amp;gt; 'spoz', object_name =&amp;gt; 'cust_payment_info',policy_name =&amp;gt; 'selectPolicy', function_schema =&amp;gt;'spoz', policy_function =&amp;gt; 'addSelectFilter',statement_types =&amp;gt; 'SELECT', update_check =&amp;gt; FALSE, ENABLE =&amp;gt; TRUE, static_policy =&amp;gt; FALSE, policy_type =&amp;gt; dbms_rls.context_sensitive, long_predicate =&amp;gt; TRUE, sec_relevant_cols =&amp;gt; NULL,sec_relevant_cols_opt =&amp;gt; NULL)&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;execute dbms_rls.add_policy(object_schema =&amp;gt; 'spoz', object_name =&amp;gt; 'cust_payment_info',policy_name =&amp;gt; 'updatePolicy', function_schema =&amp;gt;'spoz', policy_function =&amp;gt; 'addUpdateFilter',statement_types =&amp;gt; 'UPDATE', update_check =&amp;gt; FALSE, ENABLE =&amp;gt; TRUE, static_policy =&amp;gt; FALSE, policy_type =&amp;gt; dbms_rls.context_sensitive, long_predicate =&amp;gt; TRUE, sec_relevant_cols =&amp;gt; NULL,sec_relevant_cols_opt =&amp;gt; NULL)&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;execute dbms_rls.add_policy(object_schema =&amp;gt; 'spoz', object_name =&amp;gt; 'cust_payment_info',policy_name =&amp;gt; 'deletePolicy', function_schema =&amp;gt;'spoz', policy_function =&amp;gt; 'addDeleteFilter',statement_types =&amp;gt; 'DELETE', update_check =&amp;gt; FALSE, ENABLE =&amp;gt; TRUE, static_policy =&amp;gt; FALSE, policy_type =&amp;gt; dbms_rls.context_sensitive, long_predicate =&amp;gt; TRUE, sec_relevant_cols =&amp;gt; NULL,sec_relevant_cols_opt =&amp;gt; NULL)&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;COMMIT&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Disconnect&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;EXIT&lt;/i&gt;    &lt;br /&gt;
&lt;/blockquote&gt;&lt;ol&gt;&lt;li&gt;At this point, if one now runs a “select * from cust_payment_info;” (or a “select” from the existing table one has enforced policies on in step 5) they will not see any data from the tables since this is now being enforced by OES: &lt;/li&gt;
&lt;/ol&gt;&lt;blockquote&gt;&lt;i&gt;SQL&amp;gt; select * from cust_payment_info;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;select * from cust_payment_info&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;*&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;ERROR at line 1:&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;ORA-28112: failed to execute policy function&lt;/i&gt;    &lt;br /&gt;
&lt;/blockquote&gt;&lt;h5&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="_Toc212016778"&gt;Back out the policies on the DB table:&lt;/a&gt;&lt;/h5&gt;One can back out the policies setup on the “test” table by running the following SQL statements as the “spoz” user in this example. The same methodology would also apply to any table where these policies were applied to.  &lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;SQLPLUS spoz/password@ORCL @oraclessm_drop_policy.sql   &lt;br /&gt;
&lt;i&gt;-------------------------------------------------------------------&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;--oraclessm_drop_policy.sql Script to Drop the functions (executed by the schema user where the java classes need to be loaded)&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;-------------------------------------------------------------------&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;execute dbms_rls.drop_policy(object_schema =&amp;gt; 'spoz', object_name =&amp;gt; 'cust_payment_info', policy_name =&amp;gt; 'selectPolicy')&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;execute dbms_rls.drop_policy(object_schema =&amp;gt; 'spoz', object_name =&amp;gt; 'cust_payment_info', policy_name =&amp;gt; 'updatePolicy')&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;execute dbms_rls.drop_policy(object_schema =&amp;gt; 'spoz', object_name =&amp;gt; 'cust_payment_info', policy_name =&amp;gt; 'deletePolicy')&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;COMMIT&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Disconnect&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;EXIT&lt;/i&gt;    &lt;br /&gt;
&lt;/blockquote&gt;At this point, if one now runs a “select * from cust_payment_info;” they will now see all of the original data since the DB policies are no longer in effect. This also does not invoke the OES Plugin to goto the OES Authorization engine.  &lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;SQL&amp;gt; select * from cust_payment_info;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;FIRST_NAME LAST_NAME ORDER_NUMBER CREDIT_CARD_NUMB&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;----------- ---------- ------------ ----------------&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Jon Oldfield 10001 5446959708812985&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Chris White 10002 5122358046082560&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Alan Squire 10003 5595968943757920&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Mike Anderson 10004 4929889576357400&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Annie Schmidt 10005 4556988708236902&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Elliott Meyer 10006 374366599711820&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Celine Smith 10007 4716898533036&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Steve Haslam 10008 340975900376858&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Albert Einstein 10009 310654305412389&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;9 rows selected.&lt;/i&gt;    &lt;br /&gt;
&lt;/blockquote&gt;&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="_Toc212016779"&gt;Setup the Policies within the OES Administration Server and Distribute to the SSMs&lt;/a&gt;&lt;/h4&gt;The following will set up a resource tree and policies on the “test” table we have been using so far in the examples. If one has an already existing table that they have applied policies to, then one would be able to follow the structure below and substitute their “table name” for cust_payment_info since the structure and simple policies could be the same.  &lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Login to the OES Entitlements Administration Console (&lt;a href="https://localhost:7010/entitlementsadministration"&gt;https://localhost:7010/entitlementsadministration&lt;/a&gt; ) &lt;/li&gt;
&lt;/ol&gt;&lt;ol&gt;&lt;li&gt;Next we will setup the OES Resource tree for the sample test table called “cust_payment_info”. If one has used an existing table, then the same structure below will apply however one would substitute their table name for “cust_payment_info” below. From a high level, the following is how the resource tree in ALES looks like: &lt;/li&gt;
&lt;/ol&gt;&lt;blockquote&gt;//app/policy/   &lt;br /&gt;
ssmws (binding level to the WebService-SSM)    &lt;br /&gt;
orcl (SID level)    &lt;br /&gt;
spoz (schema level)    &lt;br /&gt;
cust_payment_info (table level)    &lt;br /&gt;
&lt;/blockquote&gt;&lt;ol&gt;&lt;li&gt;In Order to create this structure, one will goto the resource node at “ssmws” (this is the binding point to the WebService SSM so everything being enforced by this SSM will fall under this node). &lt;/li&gt;
&lt;li&gt;Once on the “ssmws” node, click “New” to create a new resource. In this case it would be “orcl” for the SID level we will be under. &lt;/li&gt;
&lt;li&gt;Next select “orcl” and repeat the procedure to create the resource “spoz” for the schema level name. &lt;/li&gt;
&lt;li&gt;Finally repeat and create the table(s) one has enforced with the DB policies earlier (the dbms_rls.add_policy SQL statement) &lt;/li&gt;
&lt;li&gt;The following is a picture of what the resource tree looks like along with the policies for the cust_payment_info table. Instructions on how to create these policies will be outlined in the next step. &lt;/li&gt;
&lt;/ol&gt;&lt;a href="http://lh6.ggpht.com/_0GX2KEfK3aA/SruZYutoNUI/AAAAAAAAACE/4NLnm58XJiI/s1600-h/clip_image004%5B3%5D.jpg"&gt;&lt;img alt="clip_image004" border="0" height="205" src="http://lh3.ggpht.com/_0GX2KEfK3aA/SruZYhIFq8I/AAAAAAAAACI/ArlTBDKBlh8/clip_image004_thumb.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image004" width="244" /&gt;&lt;/a&gt;  &lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Setup OES Policies for the Resource structure under the WebService SSM binding. &lt;/li&gt;
&lt;/ol&gt;&lt;ol&gt;&lt;ol&gt;&lt;li&gt;Once one has highlighted the resource in question (in this case cust_payment_info resource), then click “New” in the right-hand pane to create a New authorization policy. &lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;&lt;a href="http://lh5.ggpht.com/_0GX2KEfK3aA/SruZY3-62gI/AAAAAAAAACM/5DPVfuZ4Qfk/s1600-h/clip_image006%5B3%5D.jpg"&gt;&lt;img alt="clip_image006" border="0" height="196" src="http://lh6.ggpht.com/_0GX2KEfK3aA/SruZZJOqMUI/AAAAAAAAACQ/_faGdqEszpw/clip_image006_thumb.jpg?imgmax=800" style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="clip_image006" width="244" /&gt;&lt;/a&gt;  &lt;br /&gt;
&lt;ol&gt;&lt;ol&gt;&lt;li&gt;This will open a pop-up window where one can specify the “effect”, action, subject and any constraint on the policy. &lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;&lt;ol&gt;&lt;ol&gt;&lt;li&gt;Once “ok” is clicked, one can create as many policies as desired. &lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;&lt;ol&gt;&lt;ol&gt;&lt;li&gt;Once that is done, click on the “Save and Distribute” hyperlink at the top of the page to push the policies out to the SSMs so the new policies can be immediately be enforced. &lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;&lt;ol&gt;&lt;li&gt;If one was to export these policies into a text file, they would look like the following: &lt;/li&gt;
&lt;/ol&gt;&lt;blockquote&gt;&lt;i&gt;grant( //priv/select, //app/policy/ssmws/orcl/spoz/cust_payment_info, //user/WSDir/spoz/) if report_as("Apply_Where","order_number = 10002");&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;grant( //priv/delete, //app/policy/ssmws/orcl/spoz/cust_payment_info, //user/WSDir/spoz/) if report_as("Apply_Where","order_number = 10002");&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;grant( //priv/update, //app/policy/ssmws/orcl/spoz/cust_payment_info, //user/WSDir/spoz/) if report_as("Apply_Where","order_number = 10002");&lt;/i&gt;    &lt;br /&gt;
&lt;/blockquote&gt;&lt;ol&gt;&lt;li&gt;Finally login to the Administration Configuration Console (&lt;a href="https://localhost:7010/asi"&gt;https://localhost:7010/asi&lt;/a&gt;) to perform the following steps only for the first time when the WebService SSM named “ssmws” is created. This is to create a new Identity Asserter. &lt;/li&gt;
&lt;/ol&gt;&lt;ol&gt;&lt;ol&gt;&lt;li&gt;Go to SSM Configuration of the Web Service SSM (named “ssmws” in this case) and click on Authentication. &lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;&lt;ol&gt;&lt;ol&gt;&lt;li&gt;Click Configure a new “FGACIdentityAsserter” and click “create”. &lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;&lt;ol&gt;&lt;ol&gt;&lt;li&gt;Click on the “Details” tab of the “FGACIdentityAsserter” and enter the value of “oraclessm111111111111111” for the Key (This value is from the ORACLE_HOME\ssm-properties\oracle-ssm.properties) and click Apply. &lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;&lt;ol&gt;&lt;ol&gt;&lt;li&gt;Go to Deployment. On Configuration tab, distribute configuration. &lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;&lt;ol&gt;&lt;ol&gt;&lt;li&gt;Restart the Web Service SSM instance. &lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="_Toc212016780"&gt;Test the Example&lt;/a&gt;&lt;/h4&gt;In order to test this example one can do the following when accessing the table being secured within the Schema:  &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Run SQLPlus to connect to the Schema: &lt;/li&gt;
&lt;/ul&gt;&lt;blockquote&gt;&lt;i&gt;SQLPLUS spoz/password@ORCL&lt;/i&gt;    &lt;br /&gt;
&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;Run some SQL doing a select from the table in question and observe the results: &lt;/li&gt;
&lt;/ul&gt;&lt;blockquote&gt;&lt;i&gt;SQL&amp;gt; select * from cust_payment_info;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;FIRST_NAME LAST_NAME ORDER_NUMBER CREDIT_CARD_NUMB&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;----------- ---------- ------------ ----------------&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Chris White 10002 5122358046082560&lt;/i&gt;    &lt;br /&gt;
&lt;/blockquote&gt;This shows that the OES policy on the cust_payment_info table for the user “spoz” is in effect now. Instead of returning all of the rows as what previously would have happened, the policy is adding a where clause that adds “WHERE ORDER_NUMBER = 10002”. This is the written out policy within OES:  &lt;br /&gt;
&lt;b&gt;&lt;u&gt;OES Policy:&lt;/u&gt;&lt;/b&gt;  &lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;/u&gt;&lt;/b&gt;  &lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;grant&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Privilege: select&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Resource: //app/policy/ssmws/orcl/spoz/cust_payment_info&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Subject: //user/WSDir/spoz/) &lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Constraint: report_as("Apply_Where","order_number = 10002")&lt;/i&gt;    &lt;br /&gt;
&lt;/blockquote&gt;&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="_Toc212016781"&gt;Troubleshooting&lt;/a&gt;&lt;/h4&gt;If the issue at hand is troubleshooting in development “why” a particular policy was either a GRANT or DENY then the best thing to do would be to enable debugging with the SSM instance’s log4j.properties file which is located in the “config” directory of the SSM instance. Once that is done, restart the SSM instance, run the application in question to exercise the policy, and then look into the SSM “instance” log directory for the system_console.log file. Open this file up in a text editor, scroll to the bottom and look for the policy decision in question to understand why a policy evaluated the way it did.  &lt;br /&gt;
&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="_Toc212016782"&gt;&lt;/a&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="_Toc210200104"&gt;Step by Step Details on Debugging an SSM Instance:&lt;/a&gt;&lt;/h4&gt;Enable debugging on the WebService-SSM to see verbose debug logging as the application is run. This is a good place to look in order to determine why something is or is not authorized. To enable debugging goto the OES_HOME\ales32-ssm\webservice-ssm\instance\ssmws\config directory.  &lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Edit the log4j.properties file and uncomment these lines: &lt;/li&gt;
&lt;/ol&gt;&lt;blockquote&gt;&lt;i&gt;log4j.logger.com.bea.security.providers.authorization = DEBUG&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;log4j.logger.com.wles.util.DebugStore=DEBUG&lt;/i&gt;    &lt;br /&gt;
&lt;/blockquote&gt;&lt;ol&gt;&lt;li&gt;Clear out the log files in OES_HOME\ales32-ssm\webservice-ssm\instance\ssmws\log &lt;/li&gt;
&lt;/ol&gt;&lt;ol&gt;&lt;li&gt;Re-run the SQL example. &lt;/li&gt;
&lt;/ol&gt;&lt;ol&gt;&lt;li&gt;View the “system_console.log” file under OES_HOME\ales32-ssm\webservice-ssm\instance\ssmws\log &lt;/li&gt;
&lt;/ol&gt;&lt;ol&gt;&lt;li&gt;This will show examples of a correct authorization such as: &lt;/li&gt;
&lt;/ol&gt;&lt;blockquote&gt;&lt;i&gt;2008-10-17 13:21:48,730 [SocketListener0-1] DEBUG com.wles.util.DebugStore - queryAccess: DebugStore: &lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;========== Policy Evaluation Info ==========&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;RequestResource is: &lt;b&gt;//app/policy/ssmws/orcl/spoz/cust_payment_info&lt;/b&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;UserInfo:&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Name: //user/WSDir/spoz/&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Groups: //sgrp/WSDir/allusers/ &lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Resource Present: true&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Roles Granted: NONE&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Role Mapping Policies: NONE&lt;/i&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;ATZ Policies:&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;i&gt;1. Result: true; Policy Type: grant&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Privilege: &lt;b&gt;//priv/select&lt;/b&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Resource: &lt;b&gt;//app/policy/ssmws/orcl/spoz/cust_payment_info&lt;/b&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Subject: &lt;b&gt;//user/WSDir/spoz/&lt;/b&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Constraints: &lt;b&gt;report_as("Apply_Where","order_number = 10002")&lt;/b&gt;&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Delegator: null&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;========== Policy Evaluation Info ==========&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;2008-10-17 13:21:48,730 [SocketListener0-1] DEBUG com.bea.security.providers.authorization.asi.ARME.engine.ARME - unlock policy lock for read&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;2008-10-17 13:21:48,746 [SocketListener0-1] DEBUG com.bea.security.providers.authorization.asi.AuthorizationProviderImpl - result is GRANT&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;2008-10-17 13:21:48,746 [SocketListener0-1] DEBUG com.bea.security.providers.authorization.asi.AccessResultLogger - Subject Subject:&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Principal: WSDir&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;Principal: spoz&lt;/i&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;privilege select resource //app/policy/ssmws/orcl/spoz/cust_payment_info result PERMIT        &lt;br /&gt;
&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;/blockquote&gt;&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;&lt;h3&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="_Toc212016783"&gt;Appendix&lt;/a&gt;&lt;/h3&gt;&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="_Toc212016784"&gt;&lt;/a&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="_WebService_SSM_“myssm_config.proper"&gt;&lt;/a&gt;WebService SSM “myssm_config.properties” sample&lt;/h4&gt;Items in bold are ones that should be changed depending on your installation directory, webservice instance name, hostnames and ports.  &lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;### This files lists properties for the SSM configuration tool&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### The ConfigTool will interactively prompt for values which&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### are commented out&lt;/i&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;### SSM's config-id&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;### You can use the name of your application for this value&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;ssm.conf.id = ssmws&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;### Database password for user oes10gr3 &lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;db.password = password&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;### OES Admin Server password&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;ales.admin.password = password&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;### SSM Username and passord --&amp;gt; make it admin/password&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;ssm.admin.name = admin&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;ssm.admin.password = password&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;i&gt;#####################################################&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### If you have not installed OES Admin and SSM in the &lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### same BEA-HOME, you will need to specify the values below.&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### If any commented out values are required. The ConfigTool &lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### will interactively prompt for values which are commented &lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### out&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;#####################################################&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### This is the type of SSM&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### the tool will load policies and configuration from &lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### BEAHOME/ales*-ssm/webservice-ssm/config/ssm.type&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;ssm.type = webservice-ssm&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### Database user name&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;# db.login = db_user&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### OES Admin username&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;# ales.admin.name = system&lt;/i&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;### name of the SSM instance directory&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;ssm.instance.name = ssmws&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;i&gt;### the OES application node name&lt;/i&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;### This is like the root resource for the SSM&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;ales.resource.root = //app/policy/ssmws&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;### OES identity directory name&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;ales.identity.dir = WSDir&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;### Database JDBC URL:&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;i&gt;### Oracle -&amp;gt; jdbc:oracle:thin:@&amp;lt;server&amp;gt;:&amp;lt;port&amp;gt;:&amp;lt;sid&amp;gt; &lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### Sybase -&amp;gt; jdbc:sybase:Tds:&amp;lt;server&amp;gt;:&amp;lt;port&amp;gt; &lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### Sql Server -&amp;gt; jdbc:sqlserver://&amp;lt;server&amp;gt;:&amp;lt;port&amp;gt; &lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### Pointbase -&amp;gt; jdbc:pointbase:server://&amp;lt;server&amp;gt;/ales &lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### &lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### values: &lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### &amp;lt;server&amp;gt;: name or IP address of database machine &lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### &amp;lt;port&amp;gt;: port where the database listener is running &lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### &amp;lt;sid&amp;gt;: SID for oracle database &lt;/i&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;db.jdbc.url = jdbc:oracle:thin:@localhost:1521:XE&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;i&gt;### Database JDBC Driver:&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### Oracle: oracle.jdbc.driver.OracleDriver&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### Sybase: com.sybase.jdbc3.jdbc.SybDriver&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### Sql: com.microsoft.sqlserver.jdbc.SQLServerDriver&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### Pointbase: com.pointbase.jdbc.jdbcUniversalDriver&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### DB2: com.ibm.db2.jcc.DB2Driver &lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;# db.jdbc.driver = oracle.jdbc.driver.OracleDriver&lt;/i&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;### ARME's port number, by default this is 8000&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;arme.port = 8000&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;### Webservice SSM port number, default 9000&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;ssmws.port = 9000&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&lt;i&gt;### You can optionally specify an Ant script of your choice&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### This will be executed after the configuration is complete. &lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;# custom.ant.script = /your-home-dir/CustomAntScript.xml&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### If you want to use SSM ConfigTool for a SSM which is installed without SCM, &lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;### you need to uncomment the below line and set the proper SCM name&lt;/i&gt;    &lt;br /&gt;
&lt;i&gt;#scm.name = adminconfig&lt;/i&gt;    &lt;br /&gt;
&lt;/blockquote&gt;&lt;h4&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="_Toc212016785"&gt;&lt;/a&gt;&lt;a href="http://www.blogger.com/post-edit.g?blogID=2564517520207117824&amp;amp;postID=4471167264457432491" name="_oracle-ssm.properties_file_Sample"&gt;&lt;/a&gt;oracle-ssm.properties file Sample (for DB administrator user)&lt;/h4&gt;Items in bold are ones that should be changed depending on your installation directory, webservice instance name, hostnames and ports.  &lt;br /&gt;
&lt;blockquote&gt;&lt;div align="left"&gt;&lt;i&gt;# File : oracle-ssm.properties&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;# Purpose : For use by Oracle WS-SSM client&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;# Flag to have FGACIdentityAsserter to be used to assert the identity of the client identifier...true means use FGACIdentityAsserter&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;useClientIdAsserter=true&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;# Flag to decide whether to use clear text or encoding for identity assertion of schema username&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;useSchemaClearTextAsserter=true&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;# Flag to decide the type of token required, whether base64-encoded or clear text&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;# Note : This flag is used only when useClientIdAsserter is true&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;isClientIdAsserterBase64Encoded=false&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;# Token type for third party identity asserter&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;# Note : This is a place holder&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;tokenType&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;# Shared secret between Oracle Web Services SSM client and ALES Web Services SSM&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;# Note : This same value (case-sensitive) needs to be given in the key field while configuring the FGACIdentityAsserter&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;secret=oraclessm111111111111111&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;# Oracle User Env (Note: Not setting any value here...leave this AS IS)&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;oracle.userenv&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;# System Users (Note: Not setting any value here...leave this AS IS)&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;system.users&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;# ALES Web Services SSM instance name&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;config.name=ssmws&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;# Host name of the machine where ALES Web Services SSM is installed&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;hostname=SPOZ03.amer.bea.com&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;# SSL port used for ALES Web Services SSM&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;port=9000&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;# Protocol used for accessing ALES Web Services SSM (Note : Leave it AS IS)&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;protocol=http&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;# Log4J properties file location with '/' as path separator&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;log4jConfigFile=C:/bea922/ales32-ssm/webservice-ssm/instance/ssmws/config/log4j.properties&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;# ALES Credential Type&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;ALES_CREDENTIAL_TYPE=ALESIdentityAssertion&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;# ALES Token Type&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;ALES_TOKEN_TYPE=ALESIdentityAssertion&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;# Digest Algorithm&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;DIGEST_ALGO=SHA1&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;# Password File&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;PASSWORD_FILE=C:/bea922/ales32-shared/keys/password.xml&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;# Key File&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;KEY_FILE=C:/bea922/ales32-shared/keys/password.key&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;# Alias for KeyEntry in %ALES_SSM_HOME%/webservice-ssm/instance/&amp;lt;instance_name&amp;gt;/ssl/identity.jks&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;CERT_ALIAS=wles-ssm&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;# KeyStore type&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;KEYSTORE_TYPE=jks&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;# Trusted Keystore&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;TRUSTED_KEYSTORE=C:/bea922/ales32-shared/keys/demoProviderTrust.jks&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;# Alias for KeyEntry in %ALES_SSM_HOME%/webservice-ssm/instance/&amp;lt;instance_name&amp;gt;/ssl/demo_provider_trust.jks&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;KEY_ALIAS=demo_provider_trust&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;# Identity Keystore at %ALES_SSM_HOME%/webservice-ssm/instance/&amp;lt;instance_name&amp;gt;/ssl/identity.jks&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;IDENTITY_KEYSTORE=C:/bea922/ales32-shared/keys/identity.jceks&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;# Trusted Keystore&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;i&gt;SIGNATURE_ALGO=MD5withRSA&lt;/i&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;# List of JARs to be loaded into Oracle JVM&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;oracle.ssm.jar.1=C:/bea922/ales32-ssm/oracle-ssm/lib/saaj.jar&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;oracle.ssm.jar.2=C:/bea922/ales32-ssm/oracle-ssm/lib/jaxrpc.jar&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;oracle.ssm.jar.3=C:/bea922/ales32-ssm/oracle-ssm/lib/wsdl4j-1.5.1.jar&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;oracle.ssm.jar.4=C:/bea922/ales32-ssm/oracle-ssm/lib/log4j.jar&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;oracle.ssm.jar.5=C:/bea922/ales32-ssm/oracle-ssm/lib/commons-logging-1.0.4.jar&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;oracle.ssm.jar.6=C:/bea922/ales32-ssm/oracle-ssm/examples/tools/axis_1.3/lib/commons-discovery-0.2.jar&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;oracle.ssm.jar.7=C:/bea922/ales32-ssm/oracle-ssm/examples/tools/axis_1.3/lib/axis.jar&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;oracle.ssm.jar.8=C:/bea922/ales32-ssm/oracle-ssm/lib/ssmwsClientStub.jar&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;div align="left"&gt;&lt;b&gt;&lt;i&gt;oracle.ssm.jar.9=C:/bea922/ales32-ssm/oracle-ssm/lib/OracleSsm.jar&lt;/i&gt;&lt;/b&gt;      &lt;br /&gt;
&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;p&gt;"The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation."&lt;/p&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2564517520207117824-4471167264457432491?l=soainfrastructure.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/09XgQdEdrYZ9Zim91QiNPj7YqO8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/09XgQdEdrYZ9Zim91QiNPj7YqO8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/09XgQdEdrYZ9Zim91QiNPj7YqO8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/09XgQdEdrYZ9Zim91QiNPj7YqO8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoaInfrastructure/~4/ofhOcBJ0vYc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soainfrastructure.blogspot.com/feeds/4471167264457432491/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://soainfrastructure.blogspot.com/2009/11/oracle-entitlements-server-oes-and.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/4471167264457432491?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/4471167264457432491?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoaInfrastructure/~3/ofhOcBJ0vYc/oracle-entitlements-server-oes-and.html" title="Oracle Entitlements Server (OES) and Oracle Virtual Private Database (VPD) Integration" /><author><name>Steven Pozarycki</name><uri>http://www.blogger.com/profile/02394091549061147655</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://lh3.ggpht.com/_0GX2KEfK3aA/SruZYYemRgI/AAAAAAAAACY/kP99i51jhaU/s72-c/clip_image002_thumb%5B3%5D.gif?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://soainfrastructure.blogspot.com/2009/11/oracle-entitlements-server-oes-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUMRH85eSp7ImA9WxNXFUw.&quot;"><id>tag:blogger.com,1999:blog-2564517520207117824.post-696145488177215267</id><published>2009-10-02T13:10:00.000-07:00</published><updated>2009-10-02T13:11:25.121-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-02T13:11:25.121-07:00</app:edited><title>Oracle Entitlements Server 10gR3 and Coherence 3.5 Integration</title><content type="html">The following is intended to show the current integration points around Coherence and the Oracle Entitlements Server (OES) product. The will show how a Coherence application can be configured to call out to an OES Security Module for an entitlement decision by the OES engine. The granularity of a resource provided by Coherence is to the cache-name which can be used to determine if a specific authenticated user has access to a named cache in the grid.   &lt;br /&gt;
&lt;br /&gt;
The value of this solution is that someone could enforce distributed policies on a named cache in the data grid so that not just “anyone” can access their data. The policies would be centrally configured and then automatically distributed to all of the endpoints (OES SSMs) for enforcement at the client level. This would eliminate the need to update the client side Coherence permissions.xml file on each individual client which could be a large maintenance task. If someone is interested in securing access to a named cache in Coherence this can achieved by following the general guide at Coherence Security Framework and implementing the com.tangosol.net.security.AccessController interface to call out to an OES SSM (Security Service Module). In this case the RMI-SSM is best used for performance reasons.   &lt;br /&gt;
&lt;br /&gt;
The AccessController class can be generic in nature and the code provided later on could be easily reused. However the configuration for the Coherence side would be specific to the SSM, its location, and other configuration variables for OES.   &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://3.bp.blogspot.com/_0GX2KEfK3aA/SqQGwreC1pI/AAAAAAAAAA0/qgqerr3CwjU/s1600-h/Coherence_Secured_with_OES_RMI_SSM.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5378431288359442066" src="http://3.bp.blogspot.com/_0GX2KEfK3aA/SqQGwreC1pI/AAAAAAAAAA0/qgqerr3CwjU/s320/Coherence_Secured_with_OES_RMI_SSM.jpg" style="cursor: pointer; display: block; height: 110px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;   &lt;br /&gt;
Currently only the name of the cache is exposed as a resource that one can write policies on from the Coherence ClusterPermission object. Coherence does not currently give you the name of the Object key if one has to goto that level.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: medium;"&gt;&lt;span style="font-weight: bold;"&gt;“How-To” secure a Coherence Application with OES SSM:&lt;/span&gt;&lt;/span&gt;   &lt;br /&gt;
&lt;br /&gt;
It is assumed that one has already installed and configured the OES product (OES Admin Server and OES SSMs) and Oracle Coherence product prior to this.&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;u&gt;NOTE:&lt;/u&gt;&lt;/b&gt;&amp;nbsp; A Jdeveloper sample project is available upon request. :)  &lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: medium;"&gt;&lt;span style="font-weight: bold;"&gt;OES Setup:&lt;/span&gt;&lt;/span&gt;   &lt;br /&gt;
&lt;br /&gt;
1. The following step only needs to be done once per machine. The reason is that the OES 10gR3 installation kit does not do this out-of-the-box during installation. Create the rmi-ssm directory structure by running the OES_HOME\ales32-ssm\webservice-ssm\adm\rmi-adm\create_rmi_ssm.(bat/sh) utility. This will create an OES_HOME\ales32-ssm\rmi-ssm directory with all of the material needed for this SSM.   &lt;br /&gt;
&lt;br /&gt;
2. Create an instance of an RMI-SSM by running the OES_HOME\ales32-ssm\rmi-ssm\adm\ConfigTool.(bat/sh) utility which use a configuration file to automatically create the SSM instance and configure this in the OES Admin Server which has the necessary policies. A sample “myssm_config.properties” file is located in the JDeveloper Project under the “OES_RMI_Setup” directory.   &lt;br /&gt;
&lt;br /&gt;
3. Build the Username Identity Asserter. This is used in this example to assert the identity passed in from the Coherence application as valid. It is assumed that the authentication done on the client side is valid and OES is being strictly used as an authorization engine. Follow the instructions listed in the OES_HOME\ales32-ssm\rmi-ssm\examples\SampleProviders\UsernameAsserter directory. You will need to copy this JAR file to the Admin Server side and the RMI-SSM instance.   &lt;br /&gt;
&lt;br /&gt;
4. Configure the Username Identity Asserter in the “CoherenceSSM” entry on the OES Admin Server (which was just created in step 2). Login to: https://localhost:7010/asi (default user/password is: admin/password) and look on the left-hand side under Security Configurations -&amp;gt; Service Control Managers -&amp;gt; adminconfig -&amp;gt; CoherenceSSM -&amp;gt; Authentication Providers to create a new instance of “Username Identity Asserter”. It will look like the following:   &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://1.bp.blogspot.com/_0GX2KEfK3aA/SqQG8w__pII/AAAAAAAAAA8/vieuqbcFUQc/s1600-h/shot1.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5378431496002446466" src="http://1.bp.blogspot.com/_0GX2KEfK3aA/SqQG8w__pII/AAAAAAAAAA8/vieuqbcFUQc/s320/shot1.jpg" style="cursor: pointer; display: block; height: 226px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;   &lt;br /&gt;
&lt;br /&gt;
5. OES does need to know what the name of the user is since policies are written based on a Subject. For this example, we can enter the names of our users in the “asi” identity directory since the RMI-SSM points to this. In this case it will be the user names created in the keystore for the Coherence side of things (steve, larry, and bill are the sample users).   &lt;br /&gt;
&lt;br /&gt;
6. Create a sample group (Coherence_Group), put the user names from the “asi” identity directory into this group, and later (step 8) create a policy on the “testCache” resource which only allows members of this group access. This is what it would look like in the Entitlements Administration Console (https://localhost:7010/entitlementsadministration):   &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://1.bp.blogspot.com/_0GX2KEfK3aA/SqQHHqnkh_I/AAAAAAAAABE/ovAAEHhHPkg/s1600-h/shot2.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5378431683267954674" src="http://1.bp.blogspot.com/_0GX2KEfK3aA/SqQHHqnkh_I/AAAAAAAAABE/ovAAEHhHPkg/s320/shot2.jpg" style="cursor: pointer; display: block; height: 230px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;   &lt;br /&gt;
&lt;br /&gt;
7. Create the resource tree under the binding name of the “CoherenceSSM” you just created. For example it would look like this: CoherenceSSM/testCache and CoherenceSSM/__ASTR_ (this is the literal value for the “*” that can be passed in from Coherence as well).   &lt;br /&gt;
&lt;br /&gt;
8. Create the Authorization Policy on both of those resources (testCache and __ASTR_). For this example I allowed the “Coherence_Group” access to these resources only. This group contained “steve”, “larry”, and “bill”. This is what the authorization policy will look like on the CoherenceSSM/testCache:   &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://2.bp.blogspot.com/_0GX2KEfK3aA/SqQHSQbKjfI/AAAAAAAAABM/Vp7ZvjTrZVs/s1600-h/shot3.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5378431865215159794" src="http://2.bp.blogspot.com/_0GX2KEfK3aA/SqQHSQbKjfI/AAAAAAAAABM/Vp7ZvjTrZVs/s320/shot3.jpg" style="cursor: pointer; display: block; height: 230px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;   &lt;br /&gt;
&lt;br /&gt;
9. Copy the “pdpproxy” directory (OES_HOME\ales32-ssm\rmi-ssm\instance\CoherenceSSM\pdpproxy) to a separate location since the Coherence “client” application will need access to it (or you can modify the command line parameters to point to this). In this case it is part of the JDeveloper project already. You may need to modify the pdpproxy\PDPClientConfiguration.properties to make sure the names in this file match your environment.   &lt;br /&gt;
&lt;br /&gt;
10. Modify the “security.properties” which is also on the Coherence client side (in the JDeveloper project) so that the name matches what you have configured. In this case it would be “CoherenceSSM”.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: medium;"&gt;&lt;span style="font-weight: bold;"&gt;Coherence Setup:&lt;/span&gt;&lt;/span&gt;   &lt;br /&gt;
&lt;br /&gt;
1. Create a sample Coherence application. (This is already in the JDeveloper project and called “com.oracle.oes.coherence.client.OESCoherenceClient”.)   &lt;br /&gt;
&lt;br /&gt;
2. Add a runAs() method around what you are trying to secure. Example:   &lt;br /&gt;
&lt;span style="font-style: italic;"&gt;&lt;/span&gt;PrivilegedAction action = new PrivilegedAction() {   &lt;br /&gt;
&lt;br /&gt;
public Object run() {   &lt;br /&gt;
&lt;br /&gt;
// All processing here is with access rights assigned to the Subject   &lt;br /&gt;
&lt;br /&gt;
CacheFactory.ensureCluster();   &lt;br /&gt;
&lt;br /&gt;
// create or get a named cache called mycache   &lt;br /&gt;
&lt;br /&gt;
NamedCache myCache = CacheFactory.getCache("testCache");   &lt;br /&gt;
&lt;br /&gt;
// put key, value pair into the cache.   &lt;br /&gt;
&lt;br /&gt;
myCache.put("key1", "Hello world");   &lt;br /&gt;
&lt;br /&gt;
System.out.println("Client Code: Inside runAs() end");   &lt;br /&gt;
&lt;br /&gt;
return null;   &lt;br /&gt;
&lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
};   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Modify the run configuration in JDeveloper to include the coherence configuration and the OES configuration. An example of this is located in the JDeveloper project (in the *.jpr file) and look for the “Security_Run_Storage” section.   &lt;br /&gt;
&lt;br /&gt;
4. Make sure there is a “-Djava.security.auth.login.config=” flag which points to a JAAS configuration file. This configuration file contains the keystore used in this example for Authentication from the Coherence application. In the JDeveloper project look at the “Coherence_Keystore.conf” file and make sure that the information in this file points to the correct location of the Keystore.jks file (this will be created in step6).   &lt;br /&gt;
&lt;br /&gt;
5. Modify the tangosol-coherence.xml file and make sure it points to the AccessController class which contains the code to call the OES RMI-SSM. For example:   &lt;br /&gt;
&lt;br /&gt;
com.oracle.oes.coherence.impl.OES_AccessController   &lt;br /&gt;
&lt;br /&gt;
……..   &lt;br /&gt;
&lt;br /&gt;
6. Create a keystore with some users configured. You can run the following set of commands to create the keystore (assuming you have Java 1.5 executable set in your environment):   &lt;br /&gt;
&lt;br /&gt;
keytool -genkey -v -keystore ./keystore.jks -storepass password -alias steve -keypass password -dname CN=steve,OU=MyUnit   &lt;br /&gt;
&lt;br /&gt;
keytool -genkey -v -keystore ./keystore.jks -storepass password -alias larry -keypass password -dname CN=larry,OU=MyUnit   &lt;br /&gt;
&lt;br /&gt;
keytool -genkey -v -keystore ./keystore.jks -storepass password -alias bill -keypass password -dname CN=bill,OU=MyUnit   &lt;br /&gt;
&lt;br /&gt;
keytool -genkey -v -keystore ./keystore.jks -storepass password -alias dave -keypass password -dname CN=dave,OU=MyUnit   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Testing:   &lt;br /&gt;
&lt;br /&gt;
1. Start the RMI-SSM. For example: “OES_HOME\ales32-ssm\rmi- ssm\instance\CoherenceSSM\bin\WLESrmi.bat console” and make sure this starts successfully.   &lt;br /&gt;
&lt;br /&gt;
2. Start JDeveloper, import the JDeveloper project, and modify the classpaths to point to the correct installation location of OES and Coherence on your machine.   &lt;br /&gt;
&lt;br /&gt;
3. Right click and run the “com.oracle.oes.coherence.client.OESCoherenceClient”. If everything is configured correctly this will invoke the AccessController class with the authenticated user “steve” (“com.oracle.oes.coherence.impl.OES_AccessController”), contact the RMI-SSM (which is already running), and render an authorization decision. If the client is “hanging” at initializing the Security Services Framework, check that the PDPClientConfiguration.properties is configured on the command line of the Coherence client and also enable debugging in the AccessController and OES_Authorization_Impl code by setting the DEBUG value to true. This will be the output within JDeveloper:   &lt;br /&gt;
&lt;br /&gt;
Oracle Coherence Version 3.4.1/407   &lt;br /&gt;
&lt;br /&gt;
Grid Edition: Development mode   &lt;br /&gt;
&lt;br /&gt;
Copyright (c) 2000-2008 Oracle. All rights reserved.   &lt;br /&gt;
&lt;br /&gt;
Client Code: Inside runAs() begin: security action   &lt;br /&gt;
&lt;br /&gt;
2009-02-04 11:33:53.926/3.345 Oracle Coherence GE 3.4.1/407 (thread=Cluster, member=n/a): Service Cluster joined the cluster with senior service member n/a   &lt;br /&gt;
&lt;br /&gt;
2009-02-04 11:33:57.176/6.595 Oracle Coherence GE 3.4.1/407 (thread=Cluster, member=n/a): Created a new cluster "cluster:0x30D1" with Member(Id=1, Timestamp=2009-02-04 11:33:53.66, Address=169.254.25.129:8088, MachineId=26952, Location=machine:SPOZ03,process:4724, Edition=Grid Edition, Mode=Development, CpuCount=2, SocketCount=1) UID=0xA9FE19810000011F422373FC69481F98   &lt;br /&gt;
&lt;br /&gt;
2009-02-04 11:33:57.222/6.641 Oracle Coherence GE 3.4.1/407 (thread=Main Thread, member=1): Loaded cache configuration from file "C:\spoz\coherence\OES_COH\coherence-cache-config.xml"   &lt;br /&gt;
&lt;br /&gt;
Subject is:[CN=steve, OU=MyUnit]   &lt;br /&gt;
&lt;br /&gt;
clusterPermission actions are:join, and ServiceName is:DistributedCache   &lt;br /&gt;
&lt;br /&gt;
(com.tangosol.net.ClusterPermission service=DistributedCache,cache=* join)   &lt;br /&gt;
&lt;br /&gt;
Cache Name is:*   &lt;br /&gt;
&lt;br /&gt;
accessResult is:true for   &lt;br /&gt;
&lt;br /&gt;
subject:[CN=steve, OU=MyUnit]   &lt;br /&gt;
&lt;br /&gt;
resource:*   &lt;br /&gt;
&lt;br /&gt;
2009-02-04 11:33:57.910/7.329 Oracle Coherence GE 3.4.1/407 (thread=DistributedCache, member=1): Service DistributedCache joined the cluster with senior service member 1   &lt;br /&gt;
&lt;br /&gt;
Subject is:[CN=steve, OU=MyUnit]   &lt;br /&gt;
&lt;br /&gt;
clusterPermission actions are:join, and ServiceName is:DistributedCache   &lt;br /&gt;
&lt;br /&gt;
(com.tangosol.net.ClusterPermission service=DistributedCache,cache=testCache join)   &lt;br /&gt;
&lt;br /&gt;
Cache Name is:testCache   &lt;br /&gt;
&lt;br /&gt;
accessResult is:true for   &lt;br /&gt;
&lt;br /&gt;
subject:[CN=steve, OU=MyUnit]   &lt;br /&gt;
&lt;br /&gt;
resource:testCache   &lt;br /&gt;
&lt;br /&gt;
Client Code: Inside runAs() end   &lt;br /&gt;
&lt;br /&gt;
Value in cache is Hello world   &lt;br /&gt;
&lt;br /&gt;
Process exited with exit code 0.   &lt;br /&gt;
&lt;br /&gt;
4. Change the code and pass in the user “dave” who is in the keystore however not part of the Coherence_Group for the entitlements policy as shown in the earlier screenshot. When the client is run one will see the following messages in JDeveloper and the AccessControlException is thrown as per the Coherence checkPermission API:   &lt;br /&gt;
&lt;br /&gt;
accessResult is:false for   &lt;br /&gt;
&lt;br /&gt;
subject:[CN=dave, OU=MyUnit]   &lt;br /&gt;
&lt;br /&gt;
resource:*   &lt;br /&gt;
&lt;br /&gt;
Deny and throw exception   &lt;br /&gt;
&lt;br /&gt;
Exception in thread "Main Thread" java.security.AccessControlException: Insufficient rights to perform the operation (com.tangosol.net.ClusterPermission service=DistributedCache,cache=* join) for Subject:[CN=dave, OU=MyUnit]   &lt;br /&gt;
&lt;br /&gt;
5. You can enable debugging on the RMI SSM instance to determine why access was or was not granted for the named cache.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: medium;"&gt;&lt;span style="font-weight: bold;"&gt;Coherence Client Code Example:&lt;/span&gt;&lt;/span&gt;   &lt;br /&gt;
&lt;br /&gt;
package com.oracle.oes.coherence.client;   &lt;br /&gt;
&lt;br /&gt;
import com.tangosol.net.CacheFactory;   &lt;br /&gt;
import com.tangosol.net.NamedCache;   &lt;br /&gt;
import com.tangosol.net.security.Security;   &lt;br /&gt;
import java.security.PrivilegedAction;   &lt;br /&gt;
import javax.security.auth.Subject;   &lt;br /&gt;
import com.oracle.oes.coherence.impl.OES_AccessController;   &lt;br /&gt;
&lt;br /&gt;
import java.security.AccessControlException;   &lt;br /&gt;
&lt;br /&gt;
public class OESCoherenceClient {   &lt;br /&gt;
public OESCoherenceClient() {   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
public static void main(String[] args) {   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if (args.length != 1) {   &lt;br /&gt;
System.out.println("Please supply a user name");   &lt;br /&gt;
System.exit(0);   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
String sName = args[0].toString();   &lt;br /&gt;
&lt;br /&gt;
char[] acPassword = null;   &lt;br /&gt;
acPassword = "password".toCharArray();   &lt;br /&gt;
&lt;br /&gt;
System.out.println("*** Starting Client ***");   &lt;br /&gt;
// It is assume that the main application has the username/password already from the "client"   &lt;br /&gt;
Subject subject = Security.login(sName, acPassword);   &lt;br /&gt;
&lt;br /&gt;
// The coherence client only has to pass in their credentials and configure the tangosol-coherence.xml   &lt;br /&gt;
// file to use the com.oracle.oes.coherence.impl.OES_AccessController class in the class-name of the   &lt;br /&gt;
// access-controller section of that XML file. Each client does not need to know or reimplement the   &lt;br /&gt;
// OES code. They would just need to wrap their coherence calls inside a runAs() method as per   &lt;br /&gt;
// normal JAAS security.   &lt;br /&gt;
&lt;br /&gt;
// Do something with the cache where an entitlement decision is rendered by OES based on the   &lt;br /&gt;
// subject, resource (testCache here), and the action/permission.   &lt;br /&gt;
PrivilegedAction action = new PrivilegedAction() {   &lt;br /&gt;
public Object run() {   &lt;br /&gt;
// All processing here is taking place with access rights assigned to the corresponding Subject   &lt;br /&gt;
System.out.println("Client Code: Inside runAs() begin: security action");   &lt;br /&gt;
CacheFactory.ensureCluster();   &lt;br /&gt;
&lt;br /&gt;
// create or get a named cache called mycache   &lt;br /&gt;
NamedCache myCache = CacheFactory.getCache("testCache");   &lt;br /&gt;
// put key, value pair into the cache.   &lt;br /&gt;
myCache.put("key1", "Hello world");   &lt;br /&gt;
System.out.println("Client Code: Inside runAs() end");   &lt;br /&gt;
return null;   &lt;br /&gt;
}   &lt;br /&gt;
};   &lt;br /&gt;
Security.runAs(subject, action);   &lt;br /&gt;
&lt;br /&gt;
// Access the cache since it is already secured above for the same named cache   &lt;br /&gt;
NamedCache myCache = CacheFactory.getCache("testCache");   &lt;br /&gt;
System.out.println("Value in cache is " + myCache.get("key1"));   &lt;br /&gt;
&lt;br /&gt;
}   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: medium;"&gt;&lt;span style="font-weight: bold;"&gt;Example of AccessController Implementation for Integration with OES:&lt;/span&gt;&lt;/span&gt;   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
package com.oracle.oes.coherence.impl;   &lt;br /&gt;
&lt;br /&gt;
import com.bea.security.*;   &lt;br /&gt;
&lt;br /&gt;
import com.tangosol.net.CacheFactory;   &lt;br /&gt;
import com.tangosol.net.ClusterPermission;   &lt;br /&gt;
&lt;br /&gt;
import com.tangosol.run.xml.SimpleParser;   &lt;br /&gt;
&lt;br /&gt;
import com.tangosol.run.xml.XmlDocument;   &lt;br /&gt;
import com.tangosol.run.xml.XmlElement;   &lt;br /&gt;
import com.tangosol.run.xml.XmlHelper;   &lt;br /&gt;
import com.tangosol.util.LiteSet;   &lt;br /&gt;
import com.tangosol.util.Resources;   &lt;br /&gt;
import com.tangosol.util.SafeHashMap;   &lt;br /&gt;
import java.io.*;   &lt;br /&gt;
import java.net.URL;   &lt;br /&gt;
import java.security.*;   &lt;br /&gt;
import java.security.cert.CertPath;   &lt;br /&gt;
import java.security.cert.X509Certificate;   &lt;br /&gt;
&lt;br /&gt;
import java.util.*;   &lt;br /&gt;
import javax.security.auth.Subject;   &lt;br /&gt;
import javax.security.auth.x500.X500Principal;   &lt;br /&gt;
import javax.security.auth.x500.X500PrivateCredential;   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class OES_AccessController implements com.tangosol.net.security.AccessController {   &lt;br /&gt;
&lt;br /&gt;
private boolean DEBUG = false;   &lt;br /&gt;
private boolean nonOESDebug = false;   &lt;br /&gt;
private java.security.KeyStore m_store;   &lt;br /&gt;
private XmlElement m_xmlPermits;   &lt;br /&gt;
private Map m_mapPublicKey;   &lt;br /&gt;
public static final String PROPERTY_CONFIG = "tangosol.security.config";   &lt;br /&gt;
public static final String KEYSTORE_TYPE;   &lt;br /&gt;
public static final String SIGNATURE_ALGORITHM;   &lt;br /&gt;
public static final Signature SIGNATURE_ENGINE;   &lt;br /&gt;
public static final String BOUND_SSM_NAME = "CoherenceSSM/";   &lt;br /&gt;
&lt;br /&gt;
// OES   &lt;br /&gt;
private OES_Authorization_Impl oesEng = new OES_Authorization_Impl();   &lt;br /&gt;
private SecurityRuntime rt = null;   &lt;br /&gt;
private PolicyDomain pd = null;   &lt;br /&gt;
private AuthenticationService atnSvc = null;   &lt;br /&gt;
private AuthorizationService atzSvc = null;   &lt;br /&gt;
&lt;br /&gt;
private void debugPrintPrivate (String s) {   &lt;br /&gt;
if (nonOESDebug) System.out.println(s);   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
private void debugPrint (String s) {   &lt;br /&gt;
if (DEBUG) System.out.println(s);   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
public OES_AccessController(File fileKeyStore, File filePermits)   &lt;br /&gt;
throws IOException, AccessControlException   &lt;br /&gt;
{   &lt;br /&gt;
System.out.println("************************ IN Access Controller************");   &lt;br /&gt;
&lt;br /&gt;
m_mapPublicKey = new SafeHashMap();   &lt;br /&gt;
if(!filePermits.exists() || !filePermits.canRead())   &lt;br /&gt;
throw new IOException("Permission file is not accessible: " + filePermits.getAbsolutePath());   &lt;br /&gt;
try   &lt;br /&gt;
{   &lt;br /&gt;
KeyStore store = KeyStore.getInstance(KEYSTORE_TYPE);   &lt;br /&gt;
store.load(new FileInputStream(fileKeyStore), null);   &lt;br /&gt;
m_store = store;   &lt;br /&gt;
}   &lt;br /&gt;
catch(Exception e)   &lt;br /&gt;
{   &lt;br /&gt;
System.out.println("Failed to load keystore: " + fileKeyStore.getAbsolutePath()+" exception:"+e.toString());   &lt;br /&gt;
}   &lt;br /&gt;
try   &lt;br /&gt;
{   &lt;br /&gt;
m_xmlPermits = (new SimpleParser()).parseXml(new FileInputStream(filePermits));   &lt;br /&gt;
}   &lt;br /&gt;
catch(Exception e)   &lt;br /&gt;
{   &lt;br /&gt;
System.out.println( "Failed to load permissions: " + filePermits.getAbsolutePath()+" exception:"+e.toString());   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
//   &lt;br /&gt;
// Setup the services which call the OES SSM (PDP) and returns results to this Java class for enforcement (PEP)   &lt;br /&gt;
// This will use the configuration file specified in the -Dpdp.configuration.properties.location=   &lt;br /&gt;
// flag set on the coherence client...   &lt;br /&gt;
//   &lt;br /&gt;
&lt;br /&gt;
String pdname = oesEng.tryGetPolicyDomainName();   &lt;br /&gt;
System.out.println("--&amp;gt; pdname returned from the security.properties file is:"+pdname);   &lt;br /&gt;
&lt;br /&gt;
rt = oesEng.initializeSSM(pdname);   &lt;br /&gt;
if (rt == null) {   &lt;br /&gt;
System.out.println("Failed to initialize the setup to the OES SSM");   &lt;br /&gt;
System.exit(-1);   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
// Fetch our policy domain from the runtime   &lt;br /&gt;
pd = oesEng.tryGetPolicyDomain(rt, pdname);   &lt;br /&gt;
if (pd == null) {   &lt;br /&gt;
System.out.println("Failed to get the policy domain "+pdname+" for the OES SSM");   &lt;br /&gt;
System.exit(-2);   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
// Get the authentication service from the policy domain so that the identity (subject passed here)   &lt;br /&gt;
// can be asserted with the sample "User Name" Identity Asserter. OES will assume that authentication   &lt;br /&gt;
// has already taken place successfully.   &lt;br /&gt;
atnSvc = oesEng.tryGetAuthenticationService(pd);   &lt;br /&gt;
if (atnSvc == null) {   &lt;br /&gt;
System.out.println("Failed to get the Authentication service for the OES SSM");   &lt;br /&gt;
System.exit(-3);   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
// Get the authorization service from the policy domain   &lt;br /&gt;
atzSvc = oesEng.tryGetAuthorizationService(pd);   &lt;br /&gt;
if (atzSvc == null) {   &lt;br /&gt;
System.out.println("Failed to get the Authorization service for the OES SSM");   &lt;br /&gt;
System.exit(-4);   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/**   &lt;br /&gt;
* The checkPermission API is the main method exposed by Coherence 3.4 where OES can plug-in and render   &lt;br /&gt;
* a decision (grant/deny) based on the subject, action, resource passed in. The accessResult value is   &lt;br /&gt;
* what is returned from the OES engine. If a deny is returned, then an exception is thrown as per the   &lt;br /&gt;
* Coherence API documentation. See:   &lt;br /&gt;
* http://download.oracle.com/otn_hosted_doc/coherence/340/com/tangosol/net/security/AccessController.html   &lt;br /&gt;
*/   &lt;br /&gt;
public void checkPermission(ClusterPermission clusterPermission,   &lt;br /&gt;
Subject subject) {   &lt;br /&gt;
// This same method can be called multiple times from a Coherence client. For example:   &lt;br /&gt;
// joining the cluster, try to join a cache, etc...   &lt;br /&gt;
// The current permissions from Coherence are: ALL, CREATE, DESTROY, JOIN, NONE   &lt;br /&gt;
// Currently the most granular information one can get from Coherence is the name of the   &lt;br /&gt;
// cache and not the actual object. See:   &lt;br /&gt;
// http://download.oracle.com/otn_hosted_doc/coherence/340/com/tangosol/net/ClusterPermission.html   &lt;br /&gt;
&lt;br /&gt;
debugPrint("Subject is:"+subject.getPrincipals());   &lt;br /&gt;
String actionATZ = clusterPermission.getActions();   &lt;br /&gt;
&lt;br /&gt;
debugPrint("clusterPermission actions are:"+actionATZ+", and ServiceName is:"+clusterPermission.getServiceName());   &lt;br /&gt;
debugPrint(clusterPermission.toString());   &lt;br /&gt;
&lt;br /&gt;
// Get the actual name of the cache to pass to OES as the resource   &lt;br /&gt;
String cacheNameATZ = clusterPermission.getName();   &lt;br /&gt;
int cachePos = cacheNameATZ.indexOf("cache=");   &lt;br /&gt;
cacheNameATZ = cacheNameATZ.substring(cachePos+6);   &lt;br /&gt;
debugPrint("Cache Name is:"+cacheNameATZ);   &lt;br /&gt;
&lt;br /&gt;
// How should we best handle the "*" as a resource? This can either be added as a resource   &lt;br /&gt;
// in OES or it can be ignored if desired   &lt;br /&gt;
//if (cacheNameATZ.equals("*")) {   &lt;br /&gt;
// debugPrint("Cache is actually a * here... ");   &lt;br /&gt;
//}   &lt;br /&gt;
&lt;br /&gt;
// Start authentication which will assert the identity passed in. The Identity Asserter configured in   &lt;br /&gt;
// OES for this RMI-SSM will let all identities passed since we are relying on the calling application   &lt;br /&gt;
// to have been authenticated by some means (keystore, OAM, etc). OES needs some identity in which   &lt;br /&gt;
// entitlements policies can be written   &lt;br /&gt;
AuthenticIdentity ident = oesEng.tryAuthenticate(atnSvc, subject);   &lt;br /&gt;
if (ident == null) {   &lt;br /&gt;
System.out.println("Failed to authenticate the identiy within the OES SSM");   &lt;br /&gt;
System.exit(-5);   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
HashMapContext appContext = new HashMapContext();   &lt;br /&gt;
RuntimeResource resource = new RuntimeResource(BOUND_SSM_NAME+cacheNameATZ, "exampleResource");   &lt;br /&gt;
RuntimeAction action = new RuntimeAction(actionATZ, "exampleAction");   &lt;br /&gt;
&lt;br /&gt;
// Call the OES authorization engine with the identity, resource, action and any hashmap context needed   &lt;br /&gt;
AccessResult accessResult = oesEng.tryAuthorize(atzSvc, ident, resource, action, appContext);   &lt;br /&gt;
System.out.println("accessResult is:"+accessResult.isAllowed()+" for\n\t subject:"+subject.getPrincipals()+"\n\t resource:"+resource);   &lt;br /&gt;
&lt;br /&gt;
// if the result is a DENY throw an exception. Otherwise it is a grant and do nothing since this is a void method...   &lt;br /&gt;
if (!accessResult.isAllowed()) {   &lt;br /&gt;
System.out.println("Deny and throw exception");   &lt;br /&gt;
throw new AccessControlException("Insufficient rights to perform the operation "+clusterPermission+" for Subject:"+subject.getPrincipals());   &lt;br /&gt;
} // of if   &lt;br /&gt;
&lt;br /&gt;
} // of checkPermissions   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//////////////////////////////////////////////////////////////////////////////////////////////////////   &lt;br /&gt;
//////////////////////////////////////////////////////////////////////////////////////////////////////   &lt;br /&gt;
&lt;br /&gt;
/**   &lt;br /&gt;
/* All helper methods for this AccessController to do the work of encrypt and decrypt   &lt;br /&gt;
* information from the keystore where the identity and passwords are stored. This is essentially   &lt;br /&gt;
* what the DefaultController does in Coherence. There is no OES code from this point forward.   &lt;br /&gt;
*/   &lt;br /&gt;
public SignedObject encrypt(Object o, Subject subjEncryptor)   &lt;br /&gt;
throws IOException, GeneralSecurityException   &lt;br /&gt;
{   &lt;br /&gt;
&lt;br /&gt;
Set setPrivateCreds = subjEncryptor.getPrivateCredentials();   &lt;br /&gt;
if(setPrivateCreds == null)   &lt;br /&gt;
throw new GeneralSecurityException("Subject without private credentials");   &lt;br /&gt;
for(Iterator iter = setPrivateCreds.iterator(); iter.hasNext();)   &lt;br /&gt;
{   &lt;br /&gt;
Object oCred = iter.next();   &lt;br /&gt;
PrivateKey keyPrivate = null;   &lt;br /&gt;
if(oCred instanceof PrivateKey)   &lt;br /&gt;
keyPrivate = (PrivateKey)oCred;   &lt;br /&gt;
else   &lt;br /&gt;
if(oCred instanceof X500PrivateCredential)   &lt;br /&gt;
keyPrivate = ((X500PrivateCredential)oCred).getPrivateKey();   &lt;br /&gt;
if(keyPrivate != null)   &lt;br /&gt;
return encrypt((Serializable)o, keyPrivate);   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
throw new GeneralSecurityException("Not sufficient credentials");   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
public Object decrypt(SignedObject so, Subject subjEncryptor,   &lt;br /&gt;
Subject subjDecryptor) throws ClassNotFoundException, IOException, GeneralSecurityException {   &lt;br /&gt;
debugPrintPrivate("In decrypt for my AccessController class");   &lt;br /&gt;
PublicKey keyPublic;   &lt;br /&gt;
Iterator iter;   &lt;br /&gt;
&lt;br /&gt;
keyPublic = (PublicKey)m_mapPublicKey.get(subjEncryptor);   &lt;br /&gt;
if(keyPublic != null)   &lt;br /&gt;
return decrypt(so, keyPublic);   &lt;br /&gt;
Set setKeys = null;   &lt;br /&gt;
if(subjDecryptor != null)   &lt;br /&gt;
{   &lt;br /&gt;
Set setDecryptorCreds = subjDecryptor.getPublicCredentials();   &lt;br /&gt;
if(setDecryptorCreds != null &amp;amp;&amp;amp; equalsMostly(subjDecryptor, subjEncryptor))   &lt;br /&gt;
setKeys = extractPublicKeys(setDecryptorCreds);   &lt;br /&gt;
}   &lt;br /&gt;
if(setKeys == null)   &lt;br /&gt;
setKeys = findPublicKeys(subjEncryptor);   &lt;br /&gt;
iter = setKeys.iterator();   &lt;br /&gt;
debugPrintPrivate("about to loop...");   &lt;br /&gt;
do {   &lt;br /&gt;
if(!iter.hasNext()) {   &lt;br /&gt;
break; /* Loop/switch isn't completed */   &lt;br /&gt;
} else {   &lt;br /&gt;
keyPublic = (PublicKey)iter.next();   &lt;br /&gt;
Object o;   &lt;br /&gt;
o = decrypt(so, keyPublic);   &lt;br /&gt;
m_mapPublicKey.put(subjEncryptor, keyPublic);   &lt;br /&gt;
return o;   &lt;br /&gt;
}   &lt;br /&gt;
// throw new GeneralSecurityException("Failed in looping for credentials");   &lt;br /&gt;
} while (true);   &lt;br /&gt;
&lt;br /&gt;
throw new GeneralSecurityException("Failed to match credentials for " + subjEncryptor);   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
protected SignedObject encrypt(Serializable o, PrivateKey keyPrivate)   &lt;br /&gt;
throws IOException, GeneralSecurityException   &lt;br /&gt;
{   &lt;br /&gt;
return new SignedObject(o, keyPrivate, SIGNATURE_ENGINE);   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
protected Object decrypt(SignedObject so, PublicKey keyPublic)   &lt;br /&gt;
throws ClassNotFoundException, IOException, GeneralSecurityException   &lt;br /&gt;
{   &lt;br /&gt;
if(so.verify(keyPublic, SIGNATURE_ENGINE))   &lt;br /&gt;
return so.getObject();   &lt;br /&gt;
else   &lt;br /&gt;
throw new SignatureException("Invalid signature");   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
protected boolean equalsMostly(Subject subject1, Subject subject2)   &lt;br /&gt;
{   &lt;br /&gt;
debugPrintPrivate("In equalsMostly... hardcode since this equals() method listed doesn't resolve to anything in public Coherence docs");   &lt;br /&gt;
//return equals(subject1.getPrincipals(), subject2.getPrincipals()) &amp;amp;&amp;amp; equals(subject1.getPublicCredentials(), subject2.getPublicCredentials());   &lt;br /&gt;
return true;   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
protected Set extractPublicKeys(Set setPubCreds)   &lt;br /&gt;
{   &lt;br /&gt;
Set setCerts = extractCertificates(setPubCreds);   &lt;br /&gt;
Set setKeys = new LiteSet();   &lt;br /&gt;
Certificate cert;   &lt;br /&gt;
for(Iterator iter = setCerts.iterator(); iter.hasNext(); setKeys.add(cert.getPublicKey()))   &lt;br /&gt;
cert = (Certificate)iter.next();   &lt;br /&gt;
&lt;br /&gt;
return setKeys;   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
protected Set extractCertificates(Set setPubCreds)   &lt;br /&gt;
{   &lt;br /&gt;
Set setCerts = new LiteSet();   &lt;br /&gt;
Iterator iter = setPubCreds.iterator();   &lt;br /&gt;
do   &lt;br /&gt;
{   &lt;br /&gt;
if(!iter.hasNext())   &lt;br /&gt;
break;   &lt;br /&gt;
Object oCred = iter.next();   &lt;br /&gt;
if(oCred instanceof CertPath)   &lt;br /&gt;
{   &lt;br /&gt;
CertPath certPath = (CertPath)oCred;   &lt;br /&gt;
List listCert = certPath.getCertificates();   &lt;br /&gt;
if(!listCert.isEmpty())   &lt;br /&gt;
setCerts.add(listCert.get(0));   &lt;br /&gt;
} else   &lt;br /&gt;
if(oCred instanceof Certificate)   &lt;br /&gt;
{   &lt;br /&gt;
Certificate cert = (Certificate)oCred;   &lt;br /&gt;
setCerts.add(cert);   &lt;br /&gt;
} else   &lt;br /&gt;
if(oCred instanceof Certificate[])   &lt;br /&gt;
{   &lt;br /&gt;
Certificate acert[] = (Certificate[])oCred;   &lt;br /&gt;
if(acert.length &amp;gt; 0)   &lt;br /&gt;
setCerts.add(acert[0]);   &lt;br /&gt;
} else   &lt;br /&gt;
{   &lt;br /&gt;
CacheFactory.log("Unsupported credentials: " + oCred.getClass(), 2);   &lt;br /&gt;
}   &lt;br /&gt;
} while(true);   &lt;br /&gt;
return setCerts;   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
protected Set findPublicKeys(Subject subject)   &lt;br /&gt;
throws GeneralSecurityException   &lt;br /&gt;
{   &lt;br /&gt;
java.security.KeyStore store = m_store;   &lt;br /&gt;
Set setCerts = extractCertificates(subject.getPublicCredentials());   &lt;br /&gt;
Set setPpals = new LiteSet();   &lt;br /&gt;
Set setKeys = new LiteSet();   &lt;br /&gt;
Iterator iter = setCerts.iterator();   &lt;br /&gt;
do   &lt;br /&gt;
{   &lt;br /&gt;
if(!iter.hasNext())   &lt;br /&gt;
break;   &lt;br /&gt;
java.security.cert.Certificate cert = (java.security.cert.Certificate)iter.next();   &lt;br /&gt;
if(store.getCertificateAlias(cert) != null &amp;amp;&amp;amp; (cert instanceof X509Certificate))   &lt;br /&gt;
{   &lt;br /&gt;
X509Certificate certX509 = (X509Certificate)cert;   &lt;br /&gt;
setPpals.add(new X500Principal(certX509.getIssuerDN().getName()));   &lt;br /&gt;
setKeys.add(cert.getPublicKey());   &lt;br /&gt;
}   &lt;br /&gt;
} while(true);   &lt;br /&gt;
if(!setPpals.containsAll(subject.getPrincipals()))   &lt;br /&gt;
{   &lt;br /&gt;
CacheFactory.log("Unable to verify the Principal set: " + subject.getPrincipals(), 2);   &lt;br /&gt;
setKeys.clear();   &lt;br /&gt;
}   &lt;br /&gt;
return setKeys;   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
//////////////////////////////////////////////////////////////////////////////////////////////////////   &lt;br /&gt;
//////////////////////////////////////////////////////////////////////////////////////////////////////   &lt;br /&gt;
&lt;br /&gt;
static   &lt;br /&gt;
{   &lt;br /&gt;
String sConfig = System.getProperty("tangosol.security.config");   &lt;br /&gt;
XmlDocument xml = null;   &lt;br /&gt;
String sKeystoreType = "JKS";   &lt;br /&gt;
String sAlgorithm = "SHA1withDSA";   &lt;br /&gt;
if(sConfig != null &amp;amp;&amp;amp; sConfig.length() &amp;gt; 0)   &lt;br /&gt;
{   &lt;br /&gt;
URL url = Resources.findResource(sConfig, null);   &lt;br /&gt;
Throwable e = null;   &lt;br /&gt;
if(url != null)   &lt;br /&gt;
try   &lt;br /&gt;
{   &lt;br /&gt;
xml = XmlHelper.loadXml(url.openStream());   &lt;br /&gt;
}   &lt;br /&gt;
catch(Throwable t)   &lt;br /&gt;
{   &lt;br /&gt;
e = t;   &lt;br /&gt;
}   &lt;br /&gt;
if(xml == null)   &lt;br /&gt;
{   &lt;br /&gt;
System.out.println("Unable to load DefaultController configuration file \"" + sConfig + "\";");   &lt;br /&gt;
if(e != null)   &lt;br /&gt;
System.out.println("e is:"+e);   &lt;br /&gt;
System.out.println("Using default configuration.");   &lt;br /&gt;
}   &lt;br /&gt;
}   &lt;br /&gt;
try   &lt;br /&gt;
{   &lt;br /&gt;
if(xml == null)   &lt;br /&gt;
xml = XmlHelper.loadXml(com.tangosol.net.security.DefaultController.class, "ISO-8859-1");   &lt;br /&gt;
sKeystoreType = xml.getSafeElement("keystore-type").getString(sKeystoreType);   &lt;br /&gt;
sAlgorithm = xml.getSafeElement("signature-algorithm").getString(sAlgorithm);   &lt;br /&gt;
}   &lt;br /&gt;
catch(Throwable e) {System.out.println("In throwable for static?"); }   &lt;br /&gt;
Signature engine;   &lt;br /&gt;
try   &lt;br /&gt;
{   &lt;br /&gt;
engine = Signature.getInstance(sAlgorithm);   &lt;br /&gt;
}   &lt;br /&gt;
catch(Exception e)   &lt;br /&gt;
{   &lt;br /&gt;
throw new ExceptionInInitializerError(e);   &lt;br /&gt;
}   &lt;br /&gt;
KEYSTORE_TYPE = sKeystoreType;   &lt;br /&gt;
SIGNATURE_ALGORITHM = sAlgorithm;   &lt;br /&gt;
SIGNATURE_ENGINE = engine;   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: medium;"&gt;&lt;span style="font-weight: bold;"&gt;OES Authorization Client Code:&lt;/span&gt;&lt;/span&gt;   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
package com.oracle.oes.coherence.impl;   &lt;br /&gt;
&lt;br /&gt;
import com.bea.security.*;   &lt;br /&gt;
&lt;br /&gt;
import java.io.*;   &lt;br /&gt;
&lt;br /&gt;
import java.util.Enumeration;   &lt;br /&gt;
import java.util.Properties;   &lt;br /&gt;
&lt;br /&gt;
import javax.security.auth.Subject;   &lt;br /&gt;
&lt;br /&gt;
/**   &lt;br /&gt;
* This class does the work of connecting to the OES SSM and providing the Coherence Client   &lt;br /&gt;
* (in the checkPermissions method) an easy way to call the isAccessAllowed API from OES.   &lt;br /&gt;
*/   &lt;br /&gt;
public class OES_Authorization_Impl {   &lt;br /&gt;
&lt;br /&gt;
public OES_Authorization_Impl() {   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
private boolean DEBUG = false;   &lt;br /&gt;
&lt;br /&gt;
// To enable quick performance stats on ATZ calls for a maximum looping number   &lt;br /&gt;
// disable debug on the RMI-SSM and this will be in sub-millisecond time after the   &lt;br /&gt;
// first ATZ call.   &lt;br /&gt;
private boolean QUICK_PERF = false;   &lt;br /&gt;
private int MAX_LOOP = 100;   &lt;br /&gt;
&lt;br /&gt;
// Default policy domain name however it will read the security.properties file in   &lt;br /&gt;
// the working directory for the actual name.   &lt;br /&gt;
public static final String DEFAULT_CONFIGURATION_ID = "asiadmin";   &lt;br /&gt;
&lt;br /&gt;
// Token type expected by the User Name Identity Asserter configured in the OES SSM   &lt;br /&gt;
private static String USERID_TOKEN_TYPE = "USERID_TOKEN";   &lt;br /&gt;
&lt;br /&gt;
protected String tryGetPolicyDomainName() {   &lt;br /&gt;
// Check for the standard system property   &lt;br /&gt;
String configId = System.getProperty("wles.realm");   &lt;br /&gt;
&lt;br /&gt;
Properties props = new Properties();   &lt;br /&gt;
if (configId == null) {   &lt;br /&gt;
try {   &lt;br /&gt;
props.load(new BufferedInputStream(new FileInputStream("security.properties")));   &lt;br /&gt;
&lt;br /&gt;
String realmName = props.getProperty("wles.realm");   &lt;br /&gt;
if (realmName != null) {   &lt;br /&gt;
configId = realmName;   &lt;br /&gt;
} else {   &lt;br /&gt;
String realm1Name = props.getProperty("wles.realm.1");   &lt;br /&gt;
if (realm1Name != null) {   &lt;br /&gt;
configId = realm1Name;   &lt;br /&gt;
} else {   &lt;br /&gt;
configId = DEFAULT_CONFIGURATION_ID;   &lt;br /&gt;
}   &lt;br /&gt;
}   &lt;br /&gt;
} catch (java.io.IOException e) {   &lt;br /&gt;
// File does not exist - ignore and set configId to default value   &lt;br /&gt;
configId = DEFAULT_CONFIGURATION_ID;   &lt;br /&gt;
}   &lt;br /&gt;
}   &lt;br /&gt;
return configId;   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
protected SecurityRuntime initializeSSM(String configId) {   &lt;br /&gt;
SecurityRuntime rt = null;   &lt;br /&gt;
&lt;br /&gt;
// Initialize this applications configuration   &lt;br /&gt;
debugPrint("Initializing the Security Runtime for configId--&amp;gt; "+configId);   &lt;br /&gt;
AppConfig cfg = new AppConfig("Java API Example Application");   &lt;br /&gt;
&lt;br /&gt;
cfg.useConfiguration(configId);   &lt;br /&gt;
//   &lt;br /&gt;
// Add this application naming definitions to the config   &lt;br /&gt;
try {   &lt;br /&gt;
// default file name located in the working directory of this project. This   &lt;br /&gt;
// API call is required with the contents of this file.   &lt;br /&gt;
cfg.addNameAuthorityDefinitionFile("exampleNames.xml");   &lt;br /&gt;
&lt;br /&gt;
} catch (FileNotFoundException fnfExc) {   &lt;br /&gt;
System.out.println(fnfExc.getLocalizedMessage());   &lt;br /&gt;
return rt;   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
debugPrint("Cfg AppName is:"+cfg.getApplicationName());   &lt;br /&gt;
debugPrint("Cfg Client UID is:"+cfg.getClientUID());   &lt;br /&gt;
String list[] = cfg.getPolicyDomainURLs();   &lt;br /&gt;
&lt;br /&gt;
if (list != null ) {   &lt;br /&gt;
for (int i=0;i&lt;list.length 1="" ;="" a="" accessresult="" actual="" an="" and="" appcontextelement="" as="" atn="" atnsvc="null;" atz="" atzsvc="null;" authentication="" authenticationservice="" authenticidentity="" authorization="" authorizationservice="" before="" call="" can="" catch="" cfg="" cn="joeUser&amp;quot;" cnpos="parsedSubject.indexOf(&amp;quot;CN=&amp;quot;);" collector="(SimpleResponseContextCollector)collectorElement.getValue();" collectorelement="SimpleResponseContextCollector.makeContextElement();" commapos="parsedSubject.indexOf(&amp;quot;,&amp;quot;);" configuration="" console="" contain="" contexts="" could="" create="" current="" debug="" debuginfo="" decision="" do="" domain="" e="myprops.keys();" engine="" enumeration="" examin="" example="" exception="" fetch="" fields="" for="" from="" get="" getting="" has="" hashmapcontext="" have="" i="0;" ident="null;" if="" in="" individual="" information="" initialize="" initialized="" instance="" int="" isaccessallowed="" just="" key="(String)" keystore="" long="" main="" max_loop="" milliseconds="" myprops="cfg.getPDPConfiguration();" name="" not="" object="" oes="" of="" or="" out="" parameterexception="" parse="" parsedsubject="subject.getPrincipals().toString();" pd="null;" policies="" policy="" policydomain="" print="" prior="" properties="" property="" protected="" reach="" reason="" request="" response="" retrieved="" retrieving="" return="" rt="SecurityRuntime.getInstance();" runtime="" runtimeaction="" runtimeresource="" section="" security="" securityruntime="" server="" service="" servicenotavailableexception="" simpleresponsecontextcollector="" some="" ssmconfigid="" stored="" string="" subject="" t1="System.currentTimeMillis();" t2="System.currentTimeMillis();" t="" the="" this="" throwable="" time="" times="" to="" transport="" trust="" try="" uncomment="" used="" user="" username="" value="myprops.getProperty(key);" we="" will="" with="" you=""&gt;&lt;max_loop ;i++)="" accessresult="atzSvc.isAccessAllowed(ident," atz="" avg="" do="" else="" just="" milliseconds="" no="" t2="System.currentTimeMillis();" t="" this="" time1="" time2="" time="" to="" total=""&gt; Access Allowed: " + String.valueOf(accessResult.isAllowed()));   &lt;br /&gt;
debugPrint("---&amp;gt; Decision Time: " + accessResult.getDecisionTime().toString());   &lt;br /&gt;
&lt;br /&gt;
// By default the data is returned separated by the rule which generated it (i.e. one response context per rule).   &lt;br /&gt;
// The "getMergedContexts" method will merge all the response contexts into a single context.   &lt;br /&gt;
HashMapContext responseContext =   &lt;br /&gt;
(HashMapContext)collector.getMergedContexts();   &lt;br /&gt;
if (responseContext != null) {   &lt;br /&gt;
if (responseContext.size() != 0) {   &lt;br /&gt;
AppContextElement[] res =   &lt;br /&gt;
responseContext.getElements(responseContext.getNames());   &lt;br /&gt;
for (int i = 0; i &amp;lt; responseContext.size(); i++) {   &lt;br /&gt;
debugPrint(" Response context: " +   &lt;br /&gt;
res[i].getName() + "=" +   &lt;br /&gt;
res[i].getValue());   &lt;br /&gt;
}   &lt;br /&gt;
} else {   &lt;br /&gt;
debugPrint(" Response context has 0 elements");   &lt;br /&gt;
}   &lt;br /&gt;
} else {   &lt;br /&gt;
debugPrint(" Response context is NULL");   &lt;br /&gt;
}   &lt;br /&gt;
collector.clear();   &lt;br /&gt;
&lt;br /&gt;
} catch (Exception e) {   &lt;br /&gt;
System.out.println(e.getLocalizedMessage());   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
return accessResult;   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
private void debugPrint(String s) {   &lt;br /&gt;
if (DEBUG)   &lt;br /&gt;
System.out.println(s);   &lt;br /&gt;
}   &lt;br /&gt;
&lt;br /&gt;
} // of class   &lt;br /&gt;
&lt;/max_loop&gt;&lt;/list.length&gt;&lt;div class="blogger-post-footer"&gt;&lt;p&gt;"The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation."&lt;/p&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2564517520207117824-696145488177215267?l=soainfrastructure.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/fEEVgDSNGHcs2RRfleIizWOaeDE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fEEVgDSNGHcs2RRfleIizWOaeDE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/fEEVgDSNGHcs2RRfleIizWOaeDE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fEEVgDSNGHcs2RRfleIizWOaeDE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoaInfrastructure/~4/RGjz6OIX-NQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soainfrastructure.blogspot.com/feeds/696145488177215267/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://soainfrastructure.blogspot.com/2009/09/oracle-entitlements-server-10gr3-and.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/696145488177215267?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/696145488177215267?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoaInfrastructure/~3/RGjz6OIX-NQ/oracle-entitlements-server-10gr3-and.html" title="Oracle Entitlements Server 10gR3 and Coherence 3.5 Integration" /><author><name>Steven Pozarycki</name><uri>http://www.blogger.com/profile/02394091549061147655</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://3.bp.blogspot.com/_0GX2KEfK3aA/SqQGwreC1pI/AAAAAAAAAA0/qgqerr3CwjU/s72-c/Coherence_Secured_with_OES_RMI_SSM.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://soainfrastructure.blogspot.com/2009/09/oracle-entitlements-server-10gr3-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0ANSH4_cSp7ImA9WxNRF00.&quot;"><id>tag:blogger.com,1999:blog-2564517520207117824.post-7377805958728911981</id><published>2009-09-11T18:56:00.000-07:00</published><updated>2009-09-11T15:56:39.049-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-11T15:56:39.049-07:00</app:edited><title>Oracle Entitlements Server (OES) Using Oracle Coherence for Access to Distributed Attribute Data</title><content type="html">The value of this solution is that someone can use the data in the grid to create specific entitlement policies.  The data used for the entitlement could be updated at anytime using a Coherence application to dynamically change the result of a policy at run-time based on business needs or conditions.&lt;br /&gt;&lt;br /&gt;This use-case can be done for accessing distributed attribute data in a cache grid. Many end-users already use Oracle Coherence and re-using the information from a Coherence Grid with OES would strengthen a distributed SOA environment.  These name/value pairs from a Coherence Grid can be used as attributes within Oracle Entitlements Server (OES).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;How does this currently work?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;OES can use the Oracle Coherence product to access an Oracle Coherence Data Grid.  At startup of the OES Security Module, the Coherence product will startup and connect to a configured Coherence cluster containing distributed data.  Once Coherence connects, it automatically gets a copy of all the data already within that grid.  The data can be retrieved with a custom OES Attribute Retriever for use in Authorization Policy decisions for an application.  See the diagram below which shows how this works "Out-of-the-Box" today:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_0GX2KEfK3aA/SqGCO1B7PoI/AAAAAAAAAAs/ECoSRzrVGJg/s1600-h/OES_Coh_Drawing.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 478px; height: 234px;" src="http://2.bp.blogspot.com/_0GX2KEfK3aA/SqGCO1B7PoI/AAAAAAAAAAs/ECoSRzrVGJg/s320/OES_Coh_Drawing.jpg" alt="" id="BLOGGER_PHOTO_ID_5377722621322018434" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Current Solution for OES/Coherence Attribute Retrievers &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This use-case can currently be solved using OES and Coherence.  In the description below a WebLogic Portal application was used with OES, a custom attribute retriever and Coherence in a sample domain/test environment.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;NOTE:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Any application can be used for testing and a "WebLogic Portal" application is not necessary.  It is used as an example here of what it would look like.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt; Setup you WLS Domain:&lt;/li&gt;&lt;br /&gt;Add the coherence jar files to the setDomainEnv.bat/sh script and make sure you specify a host for the Coherence Cluster being used as mentioned above:&lt;br /&gt;&lt;br /&gt;set COHERENCE_OPTIONS=-Dtangosol.coherence.localhost=169.254.25.129&lt;br /&gt;set JAVA_OPTIONS=%JAVA_OPTIONS% %COHERENCE_OPTIONS%&lt;br /&gt;&lt;br /&gt;@REM SET THE CLASSPATH&lt;br /&gt;set COHERENCE_DIR=&lt;your&gt;\coherence-3.3.1\lib&lt;br /&gt;set COHERENCE_LIBS=%COHERENCE_DIR%\tangosol.jar;%COHERENCE_DIR%\coherence.jar;%COHERENCE_DIR%\coherence-web.jar&lt;br /&gt;set CLASSPATH=%PRE_CLASSPATH%;%WEBLOGIC_CLASSPATH%;%POST_CLASSPATH%;%WLP_POST_CLASSPATH%;%COHERENCE_LIBS%&lt;br /&gt;&lt;br /&gt;NOTE:  Coherence is using the default cache-config.xml file which is bundled within the coherence jar files.  The implication of this is that Coherence is not tune for performance and if one wants to override this, then a -Dtangosol.coherence.cacheconfig=&lt;location&gt; flag would need to be applied to the java start line for WebLogic Server pointing to the coherence configuration file of choice.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Run a client to load the data into the coherence grid.  In this case the only cluster member of the Coherence Grid is the Coherence Server started within the container.  The idea is that there is *already* an existing Coherence Grid with Distributed Data which one will connect to.&lt;br /&gt;&lt;/li&gt;&lt;/location&gt;&lt;/your&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Start the WLS Domain which has its security enforced by OES with the startWebLogic.cmd/sh file.  Within OES an Attribute Retriever is used which gets the requested attribute from the Coherence Grid.  See the sample Attribute Retriever Code below.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Make sure the Attribute Retriever and attribute being used is configured within the Authorization Provider of the WLS container.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Test your sample application to see if your policy which has the attribute being retrieved will retrieve it from the Coherence Grid.  In this example, a Portal application was used and I modified the following resource within the OES Administration Console to check the value of the attribute we are retrieving:&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Resources:&lt;/span&gt;             BEAPortalSample/wlp/portalAndALES_WAR/com_bea_p13n/Page/QL_portal_Education_and_Support&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Constraint:&lt;/span&gt;            checkIncominAttrRet(accesspage, execPage) and coh_AccessPage = "OK"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Subjects:&lt;/span&gt;                 USER:beaID:weblogic&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Access the Portal application URL and login.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;If the Coherence Grid is running, then the value of "OK" should be returned in the Attribute Retriever&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;As a test, change the value in the Grid for the "coh_AccessPage" attribute to something other than "OK".&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Logout of the Portal application and log back in.  This time you will see a different result and the user not authorized to see the page.  If you are having problems with the authorization, please review the previous blog on Troubleshooting authorization decisions.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;OES Custom Attribute Retriever Code&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Coherence added code is in &lt;span style="font-weight: bold;"&gt;bold&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;package com.bea.ales.sample2;&lt;br /&gt;&lt;br /&gt;import com.bea.security.providers.authorization.asi.AttributeRetriever;&lt;br /&gt;import weblogic.security.spi.Resource;&lt;br /&gt;import weblogic.security.service.ContextHandler;&lt;br /&gt;&lt;br /&gt;import javax.security.auth.Subject;&lt;br /&gt;import java.util.*;&lt;br /&gt;&lt;br /&gt;// Modify the build path for this application to include&lt;br /&gt;// the tangosol.jar and coherence.jar files within one's environment.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;import com.tangosol.net.CacheFactory;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;import com.tangosol.net.NamedCache;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* Implementation for performing attribute retrieval.&lt;br /&gt;* This plugin can get to remote repositories to figure out the value&lt;br /&gt;* of a certain attribute at runtime.  Multiple retrievers may be&lt;br /&gt;* registered for the same attribute name, they will be called in&lt;br /&gt;* order until one returns a non-null result.&lt;br /&gt;*/&lt;br /&gt;public class CohAttributeRetriever implements AttributeRetriever {&lt;br /&gt;&lt;br /&gt;private static final String cohaccessPage = "coh_AccessPage";&lt;br /&gt;private String[] attributes = {cohaccessPage };&lt;br /&gt;private NamedCache myCache = null;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// “Prime” the Coherence information within the constructor&lt;br /&gt;// of the AttributeRetriever&lt;br /&gt;public CohAttributeRetriever() {&lt;br /&gt;&lt;br /&gt; &lt;span style="font-weight: bold;"&gt;CacheFactory.ensureCluster();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;        myCache = CacheFactory.getCache("mycache");&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;/**&lt;br /&gt;* Returns the names of attributes handled by this class.&lt;br /&gt;* indicates that the retriever will be considered capable of&lt;br /&gt;* handling any attribute name.&lt;br /&gt;*&lt;br /&gt;* @return the names associated with this object&lt;br /&gt;*/&lt;br /&gt;public String[] getHandledAttributeNames() {&lt;br /&gt;return attributes;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* Retrieve the value of the named attribute.&lt;br /&gt;* Additional authorization request data&lt;br /&gt;* is made available to allow for more complex attribute retrieval.&lt;br /&gt;*&lt;br /&gt;* @param name          the name of the needed attribute&lt;br /&gt;* @param subject       the subject associated with the request&lt;br /&gt;* @param roles         the role membership of the subject&lt;br /&gt;* @param resource      the resource associated with the request&lt;br /&gt;* @param contextHandle the context associated with the request&lt;br /&gt;* @return the attributes value, or &lt;code&gt;null&lt;/code&gt; if not found&lt;br /&gt;*/&lt;br /&gt;public Object getAttributeValue(String name,&lt;br /&gt;                    Subject subject,&lt;br /&gt;                    Map roles,&lt;br /&gt;                    Resource resource,&lt;br /&gt;                    ContextHandler contextHandle) {&lt;br /&gt;&lt;br /&gt;// Set default value&lt;br /&gt;String attrValue = "no";&lt;br /&gt;&lt;br /&gt;if (name.equals(cohaccessPage)) {&lt;br /&gt;&lt;br /&gt;try {&lt;br /&gt;&lt;br /&gt;// The only call to the Coherence Named Cache to get&lt;br /&gt;// whatever attribute is needed from the Coherence Grid&lt;br /&gt;&lt;br /&gt; &lt;span style="font-weight: bold;"&gt;attrValue = (String)myCache.get(cohaccessPage);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;System.out.println("--&gt; COH Value is \"" + attrValue + "\"");&lt;br /&gt;} catch (Exception e) {&lt;br /&gt;   System.out.println("E:"+e.getLocalizedMessage()+" "+ e);&lt;br /&gt;}&lt;br /&gt;finally {}&lt;br /&gt;return attrValue;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// default value returned...&lt;br /&gt;return attrValue;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}//end of AttributeRetriever&lt;div class="blogger-post-footer"&gt;&lt;p&gt;"The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation."&lt;/p&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2564517520207117824-7377805958728911981?l=soainfrastructure.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/NidBwfExDILBqKdk9FMNLU0Qb8k/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NidBwfExDILBqKdk9FMNLU0Qb8k/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/NidBwfExDILBqKdk9FMNLU0Qb8k/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NidBwfExDILBqKdk9FMNLU0Qb8k/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoaInfrastructure/~4/frUtSbcIxOY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soainfrastructure.blogspot.com/feeds/7377805958728911981/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://soainfrastructure.blogspot.com/2009/09/oracle-entitlements-server-oes-using.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/7377805958728911981?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/7377805958728911981?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoaInfrastructure/~3/frUtSbcIxOY/oracle-entitlements-server-oes-using.html" title="Oracle Entitlements Server (OES) Using Oracle Coherence for Access to Distributed Attribute Data" /><author><name>Steven Pozarycki</name><uri>http://www.blogger.com/profile/02394091549061147655</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/_0GX2KEfK3aA/SqGCO1B7PoI/AAAAAAAAAAs/ECoSRzrVGJg/s72-c/OES_Coh_Drawing.jpg" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://soainfrastructure.blogspot.com/2009/09/oracle-entitlements-server-oes-using.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUYCRHo5cCp7ImA9WxNREEQ.&quot;"><id>tag:blogger.com,1999:blog-2564517520207117824.post-7534952069769740409</id><published>2009-09-04T13:27:00.000-07:00</published><updated>2009-09-04T13:46:05.428-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-04T13:46:05.428-07:00</app:edited><title>Step by Step Details on Debugging an Oracle Entitlements Server (OES) Security Module Instance</title><content type="html">The following details how-to troubleshoot authorization failures in an Oracle Entitlements Server Security Module Instance. The OES product is available for download from the following &lt;a href="http://www.oracle.com/technology/software/products/oes/index.html"&gt;link&lt;/a&gt;.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;What is OES? From the &lt;a href="http://download.oracle.com/docs/cd/E12890_01/ales/docs32/index.html"&gt;OES documentation&lt;/a&gt;: &lt;span style="font-style: italic;"&gt;"Oracle Entitlements Server provides fine-grained entitlement management solution that secures critical applications with performance and reliability. By combining centralized policy management with distributed policy decision-making and enforcement, it allows you to rapidly adapt to changing business requirements. Typical uses include fine-grained entitlements for application functionality, dynamic data redaction and privacy at the source, and controlling access to web service endpoints."&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Troubleshooting:&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;If the issue at hand is troubleshooting in development “why” a particular policy was either a GRANT or DENY then the best thing to do would be to enable debugging with the SSM instance’s log4j.properties file which is located in the “config” directory of the SSM instance. Once that is done, restart the SSM instance, run the application in question to exercise the policy, and then look into the SSM “instance” log directory for the system_console.log file. Open this file up in a text editor, scroll to the bottom and look for the policy decision in question to understand why a policy evaluated the way it did.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step by Step Details on Debugging an SSM Instance:&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;Enable debugging on the RMI-SSM to see verbose debug logging as the application is run. This is a good place to look in order to determine why something is or is not authorized. To enable debugging in this example, goto the OES_HOME\ales32-ssm\rmi-ssm\instance\\config directory. In the following example there is an RMI-SSM instance called "CoherenceSSM" which one will see referenced.
&lt;br /&gt;
&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Edit the log4j.properties file and uncomment these lines:  log4j.logger.com.bea.security.providers.authorization = DEBUG log4j.logger.com.wles.util.DebugStore=DEBUG&lt;/li&gt;&lt;li&gt;Clear out the log files in BEA_HOME\ales32-ssm\rmi-ssm\instance\CoherenceSSM\log&lt;/li&gt;&lt;li&gt;Re-start the SSM instance.&lt;/li&gt;&lt;li&gt;View the “system_console.log” file under BEA_HOME\ales32-ssm\rmi-ssm\instance\CoherenceSSM\log&lt;/li&gt;&lt;li&gt;This will show an example of an incorrect authorization because the user “dave” is not part of the Coherence_Group for this resource:
&lt;br /&gt;&lt;/li&gt;
&lt;br /&gt;2009-02-03 21:18:49,969 [RMI TCP Connection(2)-141.144.104.221] DEBUG com.wles.util.DebugStore - queryAccess: DebugStore:
&lt;br /&gt;========== Policy Evaluation Info ==========
&lt;br /&gt;RequestResource is: //app/policy/CoherenceSSM/__ASTR_
&lt;br /&gt;UserInfo:
&lt;br /&gt;Name: //user/asi/dave/
&lt;br /&gt;Groups: //sgrp/asi/allusers/
&lt;br /&gt;Resource Present: true
&lt;br /&gt;Roles Granted: NONE
&lt;br /&gt;Role Mapping Policies: NONE
&lt;br /&gt;ATZ Policies: NONE
&lt;br /&gt;========== Policy Evaluation Info ==========
&lt;br /&gt;2009-02-03 21:18:49,969 [RMI TCP Connection(2)-141.144.104.221] DEBUG com.bea.security.providers.authorization.asi.ARME.engine.ARME - unlock policy lock for read
&lt;br /&gt;2009-02-03 21:18:49,969 [RMI TCP Connection(2)-141.144.104.221] DEBUG com.bea.security.providers.authorization.asi.AuthorizationProviderImpl - result is UNKNOWN
&lt;br /&gt;2009-02-03 21:18:49,969 [RMI TCP Connection(2)-141.144.104.221] INFO  com.bea.security.providers.authorization.asi.AccessResultLogger - Subject Subject:
&lt;br /&gt;Principal: asi
&lt;br /&gt;Principal: dave
&lt;br /&gt;privilege join resource //app/policy/CoherenceSSM/__ASTR_ result ABSTAIN
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;li&gt;This will show an example of an correct authorization because the user “steve” IS part of the Coherence_Group for this resource:
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;2009-02-03 21:21:57,969 [RMI TCP Connection(4)-141.144.104.221] DEBUG com.wles.util.DebugStore - queryAccess: DebugStore:&lt;/span&gt;&lt;/li&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;========== Policy Evaluation Info ==========&lt;/span&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;RequestResource is: //app/policy/CoherenceSSM/testCache&lt;/span&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;UserInfo:&lt;/span&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Name: //user/asi/steve/&lt;/span&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Groups: //sgrp/asi/Coherence_Group/ //sgrp/asi/allusers/&lt;/span&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Resource Present: true&lt;/span&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Roles Granted: NONE&lt;/span&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Role Mapping Policies: NONE&lt;/span&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;ATZ Policies:&lt;/span&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;1. Result: true; Policy Type: grant&lt;/span&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    Privilege: any&lt;/span&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    Resource: //app/policy/CoherenceSSM/testCache&lt;/span&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    Subject: //sgrp/asi/Coherence_Group/&lt;/span&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    Constraints: NONE&lt;/span&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    Delegator: null&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;========== Policy Evaluation Info ==========&lt;/span&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;2009-02-03 21:21:57,969 [RMI TCP Connection(4)-141.144.104.221] DEBUG com.bea.security.providers.authorization.asi.ARME.engine.ARME - unlock policy lock for read&lt;/span&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;2009-02-03 21:21:57,969 [RMI TCP Connection(4)-141.144.104.221] DEBUG com.bea.security.providers.authorization.asi.AuthorizationProviderImpl - result is GRANT&lt;/span&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;2009-02-03 21:21:57,969 [RMI TCP Connection(4)-141.144.104.221] DEBUG com.bea.security.providers.authorization.asi.AccessResultLogger - Subject Subject:&lt;/span&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Principal: asi&lt;/span&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Principal: steve&lt;/span&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Principal: Coherence_Group&lt;/span&gt;
&lt;br /&gt;&lt;span style="font-style: italic;"&gt;privilege join resource //app/policy/CoherenceSSM/testCache result PERMIT&lt;/span&gt;
&lt;br /&gt;&lt;/ol&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;p&gt;"The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation."&lt;/p&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2564517520207117824-7534952069769740409?l=soainfrastructure.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2B_k1C0K3vS0wTz9BmHXZf9dym0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2B_k1C0K3vS0wTz9BmHXZf9dym0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2B_k1C0K3vS0wTz9BmHXZf9dym0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2B_k1C0K3vS0wTz9BmHXZf9dym0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoaInfrastructure/~4/sWXB7VXxqrc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://soainfrastructure.blogspot.com/feeds/7534952069769740409/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://soainfrastructure.blogspot.com/2009/09/step-by-step-details-on-debugging.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/7534952069769740409?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2564517520207117824/posts/default/7534952069769740409?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoaInfrastructure/~3/sWXB7VXxqrc/step-by-step-details-on-debugging.html" title="Step by Step Details on Debugging an Oracle Entitlements Server (OES) Security Module Instance" /><author><name>Steven Pozarycki</name><uri>http://www.blogger.com/profile/02394091549061147655</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><feedburner:origLink>http://soainfrastructure.blogspot.com/2009/09/step-by-step-details-on-debugging.html</feedburner:origLink></entry></feed>

