<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:thr="http://purl.org/syndication/thread/1.0"><id>tag:blogger.com,1999:blog-6871409708513245659</id><updated>2026-02-05T11:24:04.779-08:00</updated><category term="jdeveloper"/><category term="announcements"/><category term="curiosities"/><category term="ADF"/><category term="performance"/><category term="tools"/><category term="xml"/><category term="javaone"/><category term="cache"/><category term="certification"/><category term="events"/><category term="ias"/><category term="memory"/><category term="oracleas"/><category term="reviews"/><category term="web 2.0"/><category term="oracle"/><category term="AOP"/><category term="benchmark"/><category term="best-practices"/><category term="jaxb"/><category term="logging"/><category term="regular expressions"/><category term="security"/><category term="sql"/><category term="sqldeveloper"/><category term="timezone"/><category term="tips"/><category term="webcenter"/><title type="text">Java 2 Go!</title><subtitle type="html">Sharing some tech knowledge on Java and Oracle...</subtitle><link href="http://java2go.blogspot.com/feeds/posts/default" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default?redirect=false" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/" rel="alternate" type="text/html"/><link href="http://pubsubhubbub.appspot.com/" rel="hub"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default?start-index=26&amp;max-results=25&amp;redirect=false" rel="next" type="application/atom+xml"/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05439924633149516920</uri><email>noreply@blogger.com</email><gd:image height="16" rel="http://schemas.google.com/g/2005#thumbnail" src="https://img1.blogblog.com/img/b16-rounded.gif" width="16"/></author><generator uri="http://www.blogger.com" version="7.00">Blogger</generator><openSearch:totalResults>44</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-7169501763648871535</id><published>2012-05-14T17:29:00.000-07:00</published><updated>2012-06-27T11:22:55.141-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ADF"/><category scheme="http://www.blogger.com/atom/ns#" term="security"/><title type="text">Oracle ADF with SSO – The Definitive Guide</title><content type="html">&lt;p style="text-align: right"&gt;&lt;i&gt;by Fábio Souza &amp; Eduardo Rodrigues&lt;/i&gt;&lt;/p&gt;
&lt;h4&gt;
Introduction&lt;/h4&gt;
We know. It’s been a looooooong time again. But once you read this post, we are quite sure you’ll be happy we took the time to write it. And it’s also our very first post officially signed by 2 authors. As they say: two heads think better than one.  &lt;br /&gt;
&lt;br /&gt;
Recently, we’ve been challenged with the task of setting up an internal “production” environment intended to run and support some internal applications. As part of this challenge, we were required to somehow integrate this environment with our company’s LDAP and SSO solutions. Since this was the first time we were facing those requirements, we started to do a lot of research (googling) on the topics involved. For our great surprise (well... not really), we could not find one single place or document that would give us a birds-eye view in an objective and consolidated form. We did find multiple blogs and documents scattered throughout the Net, each one talking about different pieces. But we had to do all the hard work of filtering, refining and compiling all this data, discarding all wrong/outdated information while keeping only what’s really relevant, correct and up-to-date. And believe me when I say... it’s a lot of information!  &lt;br /&gt;
&lt;br /&gt;
That’s the motivation behind this post. Share the final outcome of this research with readers, in the form of a “step-by-step” guide, so that nobody should need to go through all the hassle again. &lt;br /&gt;
&lt;br /&gt;
So, let’s cut to the chase.&lt;br /&gt;
&lt;h4&gt;
Environment Scheme&lt;/h4&gt;
This diagram tries to give a nice overview of all the pieces involved in this post.&lt;br /&gt;
&lt;br /&gt;
&lt;b id="internal-source-marker_0.40967162838205695"&gt;&lt;img height="515" src="https://lh3.googleusercontent.com/4JV7Q3jjdKLrehech_9Fd-VxV1Mldiye6eUr2k5BSiL9FN8Jl51hxLKBx4Mx8ar9MCiXPXVKRbJ_FwSJdg2EtFXDEGneO1WYzPMlONynqPi1_OmbSaw" width="640" /&gt;&lt;/b&gt;

&lt;br /&gt;
&lt;h4&gt;
Access Flow with SSO&lt;/h4&gt;
&lt;div&gt;
&lt;b id="internal-source-marker_0.40967162838205695"&gt;&lt;img src="https://lh6.googleusercontent.com/AIvW7oeE5vbfgg3JU8Sh9eRxD8GUYovmmvmWaSuxFq5o9ogH0N7Ad_h8qQ5yMtWFJGlfuhwAmC4N8X6tRsS1YR3x2Cr8YVyxJXLO7C-J3qpTkhcn2aQ" /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h4&gt;
SSO Configuration&lt;/h4&gt;
This section describes the steps to integrate the existing environment with the selected SSO Solution. In this example, the SSO solution is based on the following products:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Oracle Access Manager (OAM)&lt;br /&gt;&lt;br /&gt;Provides access control services with centralized authentication, policy-based authorizations, and auditing with rich identity administration functionality such as delegated administration and workflows. It protects resources at the point of access, delegating authentication and authorization decisions to a central authority.&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;Oracle Internet Directory (OID)&lt;br /&gt;&lt;br /&gt;This is our Identity Store and plays the role of our LDAP server at the same time. This is where all users are authenticated against and their security profiles are fetched from.&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;Oracle Weblogic Server (WLS) with these security providers&lt;/li&gt;
&lt;ul&gt;&lt;br /&gt;
&lt;li&gt;Oracle SSO Assertion Provider&lt;br /&gt;&lt;br /&gt;This component does the mapping between the SSO-authenticated user and his/her identity in the identity store (OID in our case)&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;OID Authentication Provider&lt;br /&gt;&lt;br /&gt;This component is responsible for the communication between Weblogic and the OID server. It is able of authenticating users against OID and also of creating its JAAS security context, which will be used by JavaEE applications. Because our objective here is to integrate with SSO, this particular component will not be responsible for authentication but for the creation of security contexts only.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;li&gt;Oracle HTTP Server (OHS) with these modules&lt;/li&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;weblogic_module&lt;br /&gt;&lt;br /&gt;This OHS module does the bridge between OHS and Weblogic for specified locations (URIs). It's also capable of mapping multiple Weblogic nodes (cluster) and performing simple but handy Round Robin load balancing.&lt;/li&gt;
&lt;br /&gt;
&lt;li&gt;mod_osso&lt;br /&gt;&lt;br /&gt;This module is designed to work with both Oracle SSO and OAM. Based on a configured set of protected locations (URIs) it can identify when a user needs to be authenticated and then redirect the user to the SSO login page and then back to the originally requested URL.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
The instructions below have been carefully written in order to isolate each of the components’ configuration. If you have a different environment but some of your components are the same, you can still follow the configuration instructions for matching components. For example, even if you are using Webgate instead of mod_osso, you can still follow the OID instructions.&lt;br /&gt;
&lt;div style="margin: 10pt;  display: inline-block; border-color: orange; border-style: dotted; border-width: 1px; color: grey; font-size: 90%; font-style: italic; padding: 10px;"&gt;
&lt;img align="top" src="https://encrypted-tbn2.google.com/images?q=tbn:ANd9GcSLbBDZj2TpwiSp7E0o0icthwD57EVS8pF5rAFD_gGXogvC8xEcrw" style="border: 0; float: left; height: 24px; margin-top: -10px;" /&gt;At the end of this section there is a Weblogic Authentication Provider review. Many errors can be avoided by following the instructions described there. Don't skip that review!&lt;/div&gt;
&lt;br /&gt;
&lt;h4&gt;Configuring weblogic_module&lt;/h4&gt;
This module is usually installed and loaded out-of-the-box with OHS. It can be manually configured in file&amp;nbsp;&lt;code&gt;$ORACLE_INSTANCE/config/$COMPONENT_TYPE/$COMPONENT_NAME/&lt;b&gt;mod_wl_ohs.conf&lt;/b&gt;&lt;/code&gt;. Bellow is a sample:&lt;br /&gt;
&lt;div style="margin: 10pt; display: inline-block; border-color: blue; border-style: dotted; border-width: 1px; padding: 10px;"&gt;
&lt;code&gt;
LoadModule weblogic_module "${ORACLE_HOME}/ohs/modules/mod_wl_ohs.so"&lt;br /&gt;
&lt;br /&gt;
# This empty block is needed to save mod_wl related configuration from EM to this file when changes are made at the Base Virtual Host Level&lt;br /&gt;
&amp;lt;IfModule weblogic_module=&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;# list all nodes in our Weblogic cluster&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;WebLogicCluster mynode1:80,mynode2:80&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;# log/debug options&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;# Debug ON&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;# WLLogFile /tmp/weblogic.log&lt;br /&gt;
&amp;lt;/ifmodule&amp;gt;&lt;br/&gt;&lt;br /&gt;
&amp;lt;Location /myapp&amp;gt;&lt;br/&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;SetHandler weblogic-handler&lt;br/&gt;
&amp;lt;/Location&amp;gt;&lt;br /&gt;
&lt;/code&gt;
&lt;/div&gt;&lt;br /&gt;
As you can imagine, the setup above will take care of redirecting all requests coming in OHS under &lt;b&gt;/myapp&lt;/b&gt; to one of the nodes in our Weblogic cluster.
&lt;h4&gt;Configuring mod_osso&lt;/h4&gt;
You'll need to create an intermediate text file called &lt;b&gt;osso.txt&lt;/b&gt; with the properties bellow. All values will have to be obtained from your OAM/SSO administrator, based on the URL being protected:&lt;br/&gt;
&lt;div style="margin: 10pt; display: inline-block; width: auto; border-color: blue; border-style: dotted; border-width: 1px; padding: 10px;"&gt;
&lt;code&gt;
sso_server_version =&lt;br/&gt;
cipher_key =&lt;br/&gt;
site_id =&lt;br/&gt;
site_token =&lt;br/&gt;
login_url =&lt;br/&gt;
logout_url =&lt;br/&gt;
cancel_url =&lt;br/&gt;
sso_timeout_cookie_name =&lt;br/&gt;
sso_timeout_cookie_key =&lt;br/&gt;
&lt;/code&gt;
&lt;/div&gt;&lt;br/&gt;
Encrypt (obfuscate) file &lt;b&gt;osso.txt&lt;/b&gt; into file &lt;b&gt;osso.conf&lt;/b&gt; by running the following command (don’t forget to include “root” at the end):&lt;br/&gt;
&lt;code&gt;$ORACLE_HOME/ohs/bin/iasobf osso.txt osso.conf root&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;
In file &lt;code&gt;$ORACLE_INSTANCE/config/$COMPONENT_TYPE/$COMPONENT_NAME/httpd.conf&lt;/code&gt; &amp;nbsp;under the &lt;b&gt;include&lt;/b&gt; section there is a commented line including &lt;b&gt;mod_osso.conf&lt;/b&gt;.&amp;nbsp;Uncomment this line so that the include takes effect.&amp;nbsp;Here is an example of what that line looks like:&lt;br /&gt;
&lt;code&gt;# Include the configuration files needed for mod_osso&lt;br /&gt;
include "${ORACLE_INSTANCE}/config/${COMPONENT_TYPE}/${COMPONENT_NAME}/mod_osso.conf"&lt;/code&gt;
&lt;br /&gt;
&lt;br /&gt;
Go to $ORACLE_INSTANCE/config/$COMPONENT_TYPE/$COMPONENT_NAME and copy file &lt;b&gt;mod_osso.conf&lt;/b&gt; from subfolder &lt;b&gt;"disabled"&lt;/b&gt; and then edit the file like this:&lt;br/&gt;

&lt;div style="margin: 10pt; display: inline-block; width: auto; border-color: blue; border-style: dotted; border-width: 1px; padding: 10px;"&gt;
&lt;code&gt;
LoadModule osso_module $ORACLE_HOME/ohs/modules/mod_osso.so&lt;br/&gt;&lt;br/&gt;
&amp;lt;IfModule mod_osso.c&amp;gt;&lt;br/&gt;&lt;br/&gt;
# In this example we are not using SSL, thats why OssoSecureCookies  is off&lt;br/&gt;
OssoSecureCookies off&lt;br/&gt;
OssoIdleTimeout off&lt;br/&gt;
&lt;br/&gt;# OssoIpCheck should be set to off when protected resources are accessed via proxies or VPNs&lt;br/&gt;
OssoIpCheck on &lt;br/&gt;
# make sure file osso.conf is in the same directory as mod_osso.conf&lt;br/&gt;
OssoConfigFile osso.conf&lt;br/&gt;
&lt;br/&gt;# Location is the URI you want to protect.&lt;br/&gt;
# /myapp is set here just as an example.&lt;br/&gt;
# you must set your own&lt;br/&gt;
&amp;lt;Location /myapp&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Require valid-user&lt;br/&gt;
&amp;nbsp;&amp;nbsp;AuthType Osso&lt;br/&gt;
&amp;lt;/Location&amp;gt;&lt;br/&gt;&lt;br/&gt;
&amp;lt;/IfModule&amp;gt;
&lt;/code&gt;
&lt;/div&gt;&lt;br/&gt;
And don't forget to restart OHS! :)&lt;br/&gt;
&lt;div style="margin: 10pt;  display: inline-block; border-color: orange; border-style: dotted; border-width: 1px; color: grey; font-size: 90%; font-style: italic; padding: 10px;"&gt;
&lt;table border="0"&gt;&lt;tr&gt;&lt;td valign="middle"&gt;&lt;img align="absmiddle" src="https://encrypted-tbn2.google.com/images?q=tbn:ANd9GcSLbBDZj2TpwiSp7E0o0icthwD57EVS8pF5rAFD_gGXogvC8xEcrw" style="border: 0; height: 24px;"/&gt;&lt;/td&gt;&lt;td&gt;If the mods are messing up the interception of requests, it might be a good idea to have the &lt;b&gt;Include&lt;/b&gt; statement for &lt;b&gt;mod_osso.conf&lt;/b&gt; come before the one for &lt;b&gt;mod_wl_ohs.conf&lt;/b&gt; in &lt;b&gt;httpd.conf&lt;/b&gt; so the mods will intercept the requests in the correct order. Unpredictable errors may occur if URLs that must be interpreted by mod_osso are being intercepted by the mod_wl_ohs first.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
&lt;h4&gt;Creating the SSO Assertion Provider in your Weblogic Domain&lt;/h4&gt;
&lt;ol&gt;&lt;li&gt;Open the Weblogic Console application&lt;/li&gt;
&lt;li&gt;Go to Security Realms &amp;gt; myrealm &amp;gt; Providers&lt;/li&gt;
&lt;li&gt;Select &lt;b&gt;New&lt;/b&gt; under the Authentication Providers table&lt;/li&gt;
&lt;li&gt;Give a name for the new provider, select its type, and click OK. For example:&lt;br/&gt;
&lt;i&gt;Name: OSSO Identity Asserter&lt;br/&gt;
Type: OSSOIdentityAsserter&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;Click OK&lt;/li&gt;
&lt;li&gt;Click on the name of the newly added provider&lt;/li&gt;
&lt;li&gt;In the &lt;b&gt;Common&lt;/b&gt; tab, set the appropriate values for common parameters and set the Control Flag to &lt;b&gt;OPTIONAL&lt;/b&gt; and then save the settings&lt;/li&gt;&lt;/ol&gt;
&lt;h4&gt;Creating the Oracle Internet Directory Authentication Provider&lt;/h4&gt;
The OID Authentication Provider creation is pretty simple. You just need to fill up a form with the LDAP server info (there are tons of how-tos in sites and blogs about it). The tricky part is to put it to work with an ADF application when you are not using the default “username attribute”. OK, I will translate that. Imagine that in your company &lt;b&gt;“mail”&lt;/b&gt; is the LDAP attribute used to authenticate an user. Normally you would just need to configure the “User Name Attribute” in the OID Authentication Provider configuration screen with value &lt;b&gt;“mail”&lt;/b&gt; but that alone won’t be enough for ADF to be aware of this change. To make it work, you must properly configure the file &lt;b&gt;jps-config.xml&lt;/b&gt; that’s being used by your Weblogic domain, which will most likely be located in &lt;b&gt;&amp;lt;domain_path&amp;gt;/config/fmwconfig&lt;/b&gt;. You’ll need to modify this file with something like:&lt;br/&gt;

&lt;div style="margin: 10pt; display: inline-block; width: auto; border-color: blue; border-style: dotted; border-width: 1px; padding: 10px;"&gt;
&lt;code&gt;
(...)&lt;br/&gt;
&amp;lt;serviceInstance name="idstore.ldap" provider="idstore.ldap.provider"&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;property name="idstore.config.provider" value="oracle.security.jps.wls.internal.idstore.WlsLdapIdStoreConfigProvider"/&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;property name="CONNECTION_POOL_CLASS" value="oracle.security.idm.providers.stdldap.JNDIPool"/&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;!-- The lines below define which attribute will be used as username --&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;property name="username.attr" value="mail"/&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;property name="user.login.attr" value="mail"/&amp;gt;&lt;br/&gt;
&amp;lt;/serviceInstance&amp;gt;&lt;br/&gt;
(...)
&lt;/code&gt;
&lt;/div&gt;&lt;br/&gt;
&lt;div style="margin: 10pt;  display: inline-block; border-color: orange; border-style: dotted; border-width: 1px; color: grey; font-size: 90%; font-style: italic; padding: 10px;"&gt;
&lt;img align="top" src="https://encrypted-tbn2.google.com/images?q=tbn:ANd9GcSLbBDZj2TpwiSp7E0o0icthwD57EVS8pF5rAFD_gGXogvC8xEcrw" style="border: 0; float: left; height: 24px; margin-top: -10px;" /&gt;This same change must be replicated on each and every node when using a Weblogic cluster.&lt;/div&gt;&lt;br/&gt;
Since we’re very nice guys and our intention is make readers’ life easier, we’ve created a wlst script that should do most of the work automatically: create the Authentication Provider and configure the jps-config.xml. It can be found &lt;a href="https://docs.google.com/document/pub?id=1TgjV_hXrHW0VslgPBElx5prgv4YcLaY9wq9BfpzKmnU" target="_blank"&gt;here&lt;/a&gt; and instructions may be found in comments inside the file.&lt;br/&gt;
&lt;h4&gt;Reviewing Authentication Providers in Weblogic&lt;/h4&gt;
&lt;ul&gt;&lt;li&gt;Oracle SSO Asserter: set as the first one in the providers list and set its Control Flag to "Optional"&lt;/li&gt;
&lt;li&gt;OID Authentication Provider: set as the second one and set its Control Flag to "Sufficient"&lt;/li&gt;
&lt;li&gt;Weblogic's DefaultAuthenticator: set as the third one and set its Control Flag set to "Optional"&lt;/li&gt;
&lt;li&gt;Weblogic's DefaultIdentityAsserter: must be the last one in the providers list&lt;/li&gt;&lt;/ul&gt;&lt;br/&gt;
The idea here is to guarantee that Oracle SSO Asserter and OID Authentication providers are triggered in the right order, before any other provider. The User/Role API in ADF is able to query data from only one provider. Oracle Platform Security Services (OPSS) initializes the identity store service with the LDAP authenticator chosen from the list of configured LDAP authenticators according with the following algorithm:&lt;br/&gt;
&lt;ol&gt;&lt;li&gt;Consider the subset of LDAP authenticators configured. Note that, since the context is assumed to contain at least one LDAP authenticator, this subset won't be empty.&lt;/li&gt;
&lt;li&gt;Within this subset, keep only the providers configured with the higher control flag. The flag ordering is: REQUIRED &gt; REQUISITE &gt; SUFFICIENT &gt; OPTIONAL&lt;/li&gt;
&lt;li&gt;Within the remaining subset, keep only the first provider configured in the context.&lt;/li&gt;&lt;/ol&gt;
The LDAP authentication provider singled out will be the one chosen to initialize the identity store service.&lt;br/&gt;
&lt;h4&gt;Configuring the Application to work with SSO&lt;/h4&gt;
Independently of which products you are using to enable SSO in your environment, you still have to configure your application to use this infrastructure. In our example we are using OAM + mod_osso, but what this section covers can be used in any environment using a Weblogic Server with the following items:
&lt;ul&gt;&lt;li&gt;Application Development Framework (ADF) Runtime installed (for installation, check this &lt;a target=_blank href="http://www.oracle.com/technetwork/developer-tools/adf/downloads/index.html"&gt;link&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Authentication Provider&lt;/li&gt;
&lt;li&gt;Identity Asserter&lt;/li&gt;&lt;/ul&gt;

In this section we'll cover the scenario in which the authorization is defined by the application itself.
&lt;h4&gt;Enabling ADF Security&lt;/h4&gt;

&lt;ol&gt;&lt;li&gt;In JDeveloper, select "Application &gt; Secure &gt; Config ADF Security"&lt;/li&gt;
&lt;li&gt;Select "ADF Authentication and Authorization" and click on finish.&lt;/li&gt;&lt;/ol&gt;
You will notice that files &lt;b&gt;jazn-data.xml&lt;/b&gt; and &lt;b&gt;jps-config.xml&lt;/b&gt; were auto generated for you. It is really important to understand their roles so check this &lt;a target=_blank href="http://fusionsecurity.blogspot.com/2010/09/opss-artifacts-life-cycle-in-adf_27.html"&gt;article&lt;/a&gt; from our friend, Mr. Andre Correa.&lt;br/&gt;

&lt;br/&gt;ADF Security uses jazn-data.xml to setup application authorization (or security policies). Follow the guideline below to configure it:
&lt;ol&gt;&lt;li&gt;Create Entitlements to define access for a group of resources. For example, "Basic Access" entitlement could include "view" permission on every page/taskflow that regular authenticated users can see.&lt;/li&gt;
&lt;li&gt;Create application roles to group users by access level. For example: "Application Users" could group all users that are granted with "Basic Access" entitlement. "Application Administrators" could group only those users granted with "Basic Access" and "Admin Section" entitlements.&lt;/li&gt;
&lt;li&gt;Create Enterprise Roles that correspond 1:1 with LDAP groups and then associate them with your application roles. For example: Enterprise Role with name = "VP's Org" could be mapped to application role "Application Users".&lt;/li&gt;&lt;/ol&gt;
It is highly recommended use of wildcards when configuring resources in jazn-data.xml. Unfortunately, this cannot yet be done through the "Overview" tab in JDeveloper. Nevertheless, it is more than worth it to manually change the XML source. For example:&lt;br/&gt;
&lt;div style="margin: 10pt; display: inline-block; border-color: blue; border-style: dotted; border-width: 1px; padding: 10px;"&gt;
&lt;code&gt;
&amp;lt;!-- Using wildcards to configure resources --&amp;gt;&lt;br/&gt;
&amp;lt;resources&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;resource&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;name&amp;gt;oracle.appbuild.teamcal.pageDefs.*&amp;lt;/name&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;display-name&amp;gt;All Pages&amp;lt;/display-name&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;description&amp;gt;oracle.appbuild.teamcal.pageDefs.*&amp;lt;/description&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;type-name-ref&amp;gt;RegionResourceType&amp;lt;/type-name-ref&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/resource&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;resource&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;name&amp;gt;/WEB-INF/.*&amp;lt;/name&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;display-name&amp;gt;All Task Flows&amp;lt;/display-name&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;description&amp;gt;/WEB-INF/.*&amp;lt;/description&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;type-name-ref&amp;gt;TaskFlowResourceType&amp;lt;/type-name-ref&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/resource&amp;gt;&lt;br/&gt;
&amp;lt;/resources&amp;gt;&lt;br/&gt;
&lt;/code&gt;&lt;/div&gt;
&lt;h4&gt;Using the Weblogic Identity Store&lt;/h4&gt;

When we started looking for the best approach to use the JavaEE container's Identity Store, we’ve found this example:
&lt;div style="margin: 10pt; display: inline-block; border-color: blue; border-style: dotted; border-width: 1px; padding: 10px;"&gt;
&lt;code&gt;
import oracle.security.idm.IdentityStore;&lt;br/&gt;
import oracle.security.idm.UserProfile;&lt;br/&gt;
import oracle.security.jps.JpsContext;&lt;br/&gt;
import oracle.security.jps.JpsContextFactory;&lt;br/&gt;
import oracle.security.jps.service.idstore.IdentityStoreService;&lt;br/&gt;
&lt;br/&gt;
// THIS IS JUST AN EXAMPLE, WE ARE NOT CONSIDERING PERFORMANCE AND THREAD SAFETY ISSUES.&lt;br/&gt;
private UserProfile findUserProfile(String username) throws Exception {&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;JpsContextFactory ctxFactory = JpsContextFactory.getContextFactory();&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;JpsContext ctx = ctxFactory.getContext();&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;IdentityStoreService idstoreService = ctx.getServiceInstance(IdentityStoreService.class);&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;identityStore = idstoreService.getIdmStore();&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;UserProfile userProfile = identityStore.searchUser(username).getUserProfile();&lt;br/&gt;
}
&lt;/code&gt;&lt;/div&gt;&lt;br/&gt;

Even though this approach works fine, it is completely tied to the underlying security implementation (JPS in our case). Fortunately, we were able to find a more elegant and easy way to achieve the same thing, using only ADF APIs:
&lt;br/&gt;
&lt;div style="margin: 10pt; display: inline-block; border-color: blue; border-style: dotted; border-width: 1px; padding: 10px;"&gt;
&lt;code&gt;
import oracle.adf.share.security.identitymanagement.AttributeFilter;&lt;br/&gt;
import oracle.adf.share.security.identitymanagement.UserManager;&lt;br/&gt;
import oracle.security.idm.UserProfile;&lt;br/&gt;
&lt;br/&gt;
// THIS IS JUST AN EXAMPLE, WE ARE NOT CONSIDERING PERFORMANCE AND THREAD SAFETY ISSUES.&lt;br/&gt;
private UserProfile findUserProfile(String username) {&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;// UserManager is automatically configured to use the container's Identity Provider and it is not thread-safe&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;UserManager userManager = new UserManager();&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;AttributeFilter[] filter = { new AttributeFilter("USER_ID", username) };&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;ArrayList userProfiles = userManager.getUserProfileList(1, filter);&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;UserProfile userProfile = (UserProfile)userProfiles.get(0);&lt;br/&gt;
&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;return userProfile;&lt;br/&gt;
}
&lt;/code&gt;&lt;/div&gt;&lt;br/&gt;
&lt;h4&gt;Configuring Logout&lt;/h4&gt;

In our environment, using OAM + mod_osso, the application would have to execute a well defined procedure to perform a proper single sign-off. Thankfully, ADF can take care of all logout details by itself. Using ADF this task becomes transparent to the application. There are two ways to implement the logout:
&lt;ul&gt;&lt;li&gt;Using &lt;b&gt;adfAuthentication&lt;/b&gt; servlet&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Call &lt;web_context&gt;/adfAuthentication with the following parameters:&lt;br/&gt;
&lt;i&gt;logout: must be "true"&lt;br/&gt;
end_url: URL where the browser will be redirected to after the logout&lt;/i&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;li&gt;Programatically&lt;br/&gt;
&lt;div style="margin: 10pt; display: inline-block; border-color: blue; border-style: dotted; border-width: 1px; padding: 10px;"&gt;
&lt;code&gt;
import oracle.adf.share.security.AuthenticationService;&lt;br/&gt;
import oracle.adf.share.security.authentication.AuthenticationServiceUtil;&lt;br/&gt;
(...)&lt;br/&gt;
AuthenticationService service = AuthenticationServiceUtil.getAuthenticationService();&lt;br/&gt;
String logoutURL = "/face/home/jspx"; // the end_url&lt;br/&gt;
service.logout(logoutURL, null);&lt;br/&gt;
(...)
&lt;/code&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;h4&gt;Deploying the SSO-protected Application&lt;/h4&gt;

When you deploy an application using JDeveloper Application's default settings, many things are done automatically such as database connections deployment and credentials update. This is fine when you are making local tests, but when you want to deploy to production server the situation changes. In our environment we already have a system-level DataSource setup in Weblogic for our application to use. We also have an identity store that contains all users and groups that we need. That said, our deployment is configured as follows:
&lt;ul&gt;&lt;li&gt;Inside Application Properties, go to Deployment &gt; Weblogic&lt;/li&gt;
&lt;li&gt;Inside “Security Deployment Options”, select "Update weblogic-application.xml with the following..."&lt;/li&gt;
&lt;li&gt;Check the box "Application Policies" (this will make all security policies configured in your jazn-data.xml migrates to the application server)&lt;/li&gt;
&lt;li&gt;Uncheck "Credentials" (this will prevent the copy of your local cwallet.sso to the application server)&lt;/li&gt;
&lt;li&gt;Uncheck "Users and Groups" (we are using the identity store already configured in WLS, there is no need to upload any local users and groups)&lt;/li&gt;
&lt;li&gt;Uncheck "Auto Generate and Synchronize WebLogic JDBC Descriptors During Deployment" (the DataSource is already configured in the Weblogic so there is no need to deploy a new one)&lt;/li&gt;&lt;/ul&gt;

Make sure that the right authentication method is configured in your application's &lt;b&gt;web.xml&lt;/b&gt;:&lt;br/&gt;

&lt;div style="margin: 10pt; display: inline-block; border-color: blue; border-style: dotted; border-width: 1px; padding: 10px;"&gt;
&lt;code&gt;
(...)&lt;br/&gt;
&amp;lt;login-config&amp;gt;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;auth-method&amp;gt;CLIENT-CERT&amp;lt;/auth-method&amp;gt;&lt;br/&gt;
&amp;lt;/login-config&amp;gt;&lt;br/&gt;
(...)&lt;br/&gt;
&lt;/code&gt;&lt;/div&gt;&lt;br/&gt;

&lt;div style="margin: 10pt;  display: inline-block; border-color: orange; border-style: dotted; border-width: 1px; color: grey; font-size: 90%; font-style: italic; padding: 10px;"&gt;
&lt;table border="0"&gt;&lt;tr&gt;&lt;td valign="middle"&gt;&lt;img border="0" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGRRkDSdJy3IQ2vTBAoYWuLlcUKNu2QD6F519Ez-Fid3w-svgdxCWunN7Ne1dUOTJCgixPkpJkYlUP9v4jfr9CViMCTFfb6UiXrWmoZ1LNRlgj_K2ZKtECTNDBoLj0saE2LeMzUhUGLQc/s200/images.jpg" /&gt;&lt;/td&gt;&lt;td&gt;When you have a database connection in your project and you deploy your application with box "Auto Generate and Synchronize WebLogic JDBC Descriptors During Deployment" checked, a datasource named “&amp;lt;db_connection_name&amp;gt;&lt;b&gt;DS&lt;/b&gt;” will be deployed together with your application.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/br&gt;

&lt;h4&gt;Reference&lt;/h4&gt;

&lt;a target=_blank href="http://www.oracle.com/technetwork/middleware/id-mgmt/index-090417.html"&gt;OAM Home Page&lt;/a&gt;&lt;br/&gt;
&lt;a target=_blank href="http://www.oracle.com/technetwork/middleware/id-mgmt/overview/index-082035.html"&gt;OID Home Page&lt;/a&gt;&lt;br/&gt;
&lt;a target=_blank href="http://www.oracle.com/technetwork/developer-tools/adf/downloads/index.html"&gt;Application Development Runtime&lt;/a&gt;&lt;br/&gt;
&lt;a target=_blank href="http://fusionsecurity.blogspot.com/2011/08/couple-of-things-you-need-to-know-about.html"&gt;Article about User/Role API&lt;/a&gt;&lt;br/&gt;
&lt;a target=_blank href="http://fusionsecurity.blogspot.com/2010/09/opss-artifacts-life-cycle-in-adf_27.html"&gt;Article about OPSS Artifacts&lt;/a&gt;&lt;br/&gt;
&lt;a href="https://docs.google.com/document/pub?id=1TgjV_hXrHW0VslgPBElx5prgv4YcLaY9wq9BfpzKmnU" target="_blank"&gt;OID Configuration WLST Script&lt;/a&gt;&lt;br/&gt;

&lt;h4&gt;Special Thanks&lt;/h4&gt;
We would like to give special thanks to &lt;a href="http://www.linkedin.com/in/andrecorreaneto" target="_blank"&gt;Mr. Andre Correa&lt;/a&gt; for his help during our research and also for kindly reviewing this post.&lt;br/&gt;</content><link href="http://java2go.blogspot.com/feeds/7169501763648871535/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/7169501763648871535" rel="replies" title="10 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/7169501763648871535" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/7169501763648871535" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2012/05/oracle-adf-with-sso-definitive-guide.html" rel="alternate" title="Oracle ADF with SSO – The Definitive Guide" type="text/html"/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05439924633149516920</uri><email>noreply@blogger.com</email><gd:image height="16" rel="http://schemas.google.com/g/2005#thumbnail" src="https://img1.blogblog.com/img/b16-rounded.gif" width="16"/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGRRkDSdJy3IQ2vTBAoYWuLlcUKNu2QD6F519Ez-Fid3w-svgdxCWunN7Ne1dUOTJCgixPkpJkYlUP9v4jfr9CViMCTFfb6UiXrWmoZ1LNRlgj_K2ZKtECTNDBoLj0saE2LeMzUhUGLQc/s72-c/images.jpg" width="72"/><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-1702275062038132940</id><published>2011-01-26T12:38:00.001-08:00</published><updated>2011-03-16T18:16:08.092-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ADF"/><category scheme="http://www.blogger.com/atom/ns#" term="reviews"/><category scheme="http://www.blogger.com/atom/ns#" term="web 2.0"/><category scheme="http://www.blogger.com/atom/ns#" term="webcenter"/><title type="text">Web 2.0 Solutions with Oracle WebCenter 11g (book review)</title><content type="html">&lt;p align="right"&gt;&lt;i&gt;by Fábio Souza&lt;/i&gt;&lt;/p&gt;Hello People! This was supposed to be a post to celebrate the new year, but, as you all can notice, the things didn't happen the way I was expecting (again haha). Today I will talk about this strategic product and (as promised) I will make my review about the book &lt;a href="http://link.packtpub.com/jnuaZN"&gt;Web 2.0 Solutions with Oracle WebCenter 11g&lt;/a&gt;.&lt;br /&gt;&lt;h4&gt;About WebCenter &lt;/h4&gt;&lt;h5&gt;The Goal&lt;/h5&gt;Today we interact with content/information on the internet not just as a spectator, but also as a collaborator: we help on the knowledge construction in a dynamic way. This can be done when you put “Like” in something that your friend is saying on the Facebook, when you write an article on Wikipedia or when you post your comment on your favorite blog. All this meta-information, in some way, helps to spread the knowledge and to make it be easier to be found.&lt;br /&gt;To make this possible in the business world, we need a next-generation enterprise workplace: a portal that leverages Web 2.0 technologies, user-focused and community-centric.  The goal is to tie together people, ideas, content, processes, systems, and enterprise applications.&lt;br /&gt;&lt;h5&gt;The Product&lt;/h5&gt;Oracle WebCenter 11g is Oracle's strategical product to deal with E2.0. It provides services such as: discussion forums, wikis, blogs, and tagging, directly from the context of a portal or an application. It worth to mention that Oracle WebCenter is integrated and certified with Oracle Universal Content Management (UCM), Oracle Identity Management Suite, Oracle SOA Suite, Oracle Enterprise Manager, and Oracle eBusiness Suite, as well as PeopleSoft, Siebel, and JD Edwards enterprise applications.&lt;br /&gt;&lt;h5&gt;The Components&lt;/h5&gt;&lt;img alt="Webcenter Architecture" border="0" height="290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb5SorJcvvcq-xMQ0MYlHcp-46RZIkPw-XIlIKxso0Yls7hUjMTNs5TTZwgA4GYbb4BumgxwYTew4hrR0S0gJUEQ3i5CXjG0uE5PpKzhq_KX3v_l_Dqm7mSj420_iqV9Irjc3FwxXsLi_D/?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin-left: 0px; margin-right: 0px;" title="Webcenter Architecture" width="619" /&gt;&lt;br /&gt;&lt;h5&gt;Oracle WebCenter Framework:&lt;/h5&gt;It is an ADF extension that, besides including all its functionalities/facilities, contains several components that make possible (and easy) to construct a portal, as if it was a common web application. The framework uses the Oracle Metadata Services (MDS), that offers a layer to store customization data, avoiding a mix between code and metadata (The MDS is widely explored on Oracle Composer).&lt;br /&gt;To put the Webcenter Framework to work, you just have to download the extension on you JDeveloper, it will make all the framework components available to be used on your own applications. Its good to remember that JDeveloper provides an integrated development environment for composite J2EE applications, business processes, BI applications, and enterprise portals.&lt;br /&gt;There is some good information about JDeveloper on my previous post, &lt;a href="http://java2go.blogspot.com/2010/06/jdeveloper-overview-and-book-review.html"&gt;check it out&lt;/a&gt;!&lt;br /&gt;&lt;div&gt;&lt;h5&gt;WebCenter Services:&lt;/h5&gt;This is the component that give access to the infrastructure that, not only turns your corporate environment into a “social network”, but take it beyond.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Social Networking Services - Enables users to maximize productivity through collaboration. &lt;/li&gt;&lt;li&gt;People Connection – Enables users to assemble their business networks like linked-in&lt;/li&gt;&lt;li&gt;Discussions - Provides the ability to create and participate in threaded discussion. This is an embedded version of Forums provided by Jive Software. &lt;/li&gt;&lt;li&gt;Announcements - Enables users to post, personalize, and manage announcements. &lt;/li&gt;&lt;li&gt;Instant Messaging and Presence (IMP) - Provides the ability to observe the online presence status of other authenticated users (whether online, offline, busy, or idle) and to contact them. &lt;/li&gt;&lt;li&gt;Blog - Enables blogging functionality within the context of an application. This feature comes from an embedded version of open source package jzWiki. &lt;/li&gt;&lt;li&gt;Wiki - Self-service, community, oriented-content publishing and sharing. This is an embedded version of open source package jzWiki. &lt;/li&gt;&lt;li&gt;Shared Services - Provides features for both social networking and personal productivity. &lt;/li&gt;&lt;li&gt;Documents - Provides content management and storage capabilities, including content upload, file and folder creation and management, file check out, versioning, and so on. This functionality requires licensing of a JCR (JSR-170) compliant document repository product. &lt;/li&gt;&lt;li&gt;Links - Provides the ability to view, access, and associate related information; for example, you can link to a solution document from a discussion thread. &lt;/li&gt;&lt;li&gt;Lists - Enables users to create, publish, and manage lists. (Available only in WebCenter Spaces) &lt;/li&gt;&lt;li&gt;Page - Provides the ability to create and manage pages at runtime. &lt;/li&gt;&lt;li&gt;Tags - Provides the ability to assign one or more personally relevant keywords to a given page or document. This feature is similar to the del.cio.us website. &lt;/li&gt;&lt;li&gt;Events - Provides group calendars, which users can use to schedule meetings, appointments, and any other type of team get-together. This feature requires deployment of a separate calendaring server, which may be Oracle Beehive or Microsoft Exchange. (Available only in WebCenter Spaces) &lt;/li&gt;&lt;li&gt;Personal Productivity Services - Focuses on the requirements of an individual, rather than a group. &lt;/li&gt;&lt;li&gt;Mail - Provides integration with IMAP and SMTP mail servers to enable users to perform simple mail functions such as viewing, reading, creating, and deleting messages, creating messages with attachments, and replying to or forwarding existing messages. &lt;/li&gt;&lt;li&gt;Notes - Provides the ability to "jot down" and retain quick bits of personally relevant information. (Available only in WebCenter Spaces) &lt;/li&gt;&lt;li&gt;Recent Activities - Provides a summary view of recent changes to documents, discussions, and announcements. &lt;/li&gt;&lt;li&gt;RSS - Provides the ability to publish content from WebCenter Web 2.0 Services as news feeds in RSS 2.0 and Atom 1.0 formats. In addition, the RSS service enables you to publish news feeds from external sources on your application pages. &lt;/li&gt;&lt;li&gt;Search - Provides the ability to search tags, services, an application, or an entire site. This makes use of a license limited version of Oracle's search product. &lt;/li&gt;&lt;li&gt;Worklist - Provides a personal, at-a-glance view of business processes that require attention. These can include a request for document review and other types of business process that come directly from enterprise applications.&lt;/li&gt;&lt;/ul&gt;The WebCenter Services benefits can be reaped by the whole Webcenter Suite Portal stack*:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Oracle Portal &lt;/li&gt;&lt;li&gt;Oracle WebLogic Portal &lt;/li&gt;&lt;li&gt;Oracle WebCenter Interaction &lt;/li&gt;&lt;/ul&gt;&lt;small&gt;* &lt;i&gt;There are some restrictions&lt;/i&gt;&lt;/small&gt;&lt;/div&gt;&lt;div&gt;&lt;h5&gt;Oracle Composer:&lt;/h5&gt;Oracle Composer is an innovative component that enables any application or portal to be customized (changes that affects the general visualization) or personalized (changes made by a person that affects the that person's own visualization) after it has been deployed and is in use. The personalizations/customizations are managed by Oracle Metadata Services (MDS). Oracle Composer is designed to be extremely easy to use so that business users and end users can edit any page with a few clicks of the mouse. Oracle Composer runs in all modern browsers and provides a rich, dynamic way to edit JSF application and portal pages.&lt;br /&gt;The developers can use the Webcenter Framework to design portal applications that uses Oracle Composer.&lt;/div&gt;&lt;div&gt;&lt;h5&gt;&lt;/h5&gt;&lt;h5&gt;Oracle WebCenter Spaces:&lt;/h5&gt;A ready-to-use application that pulls together all the WebCenter features:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Webcenter Services &lt;/li&gt;&lt;li&gt;Webcenter Composer &lt;/li&gt;&lt;li&gt;Oracle MDS &lt;/li&gt;&lt;li&gt;Easy to integrate with applications developed with Webcenter Framework &lt;/li&gt;&lt;li&gt;Easy to integrate with any other application (actually this can be achieved using the Oracle ADF Model layer) &lt;/li&gt;&lt;/ul&gt;The focus is to empower teams to quickly and efficiently manage their information, applications, projects, and people. Oracle WebCenter Spaces is prepared to work effectively with project teams and work groups, including teams that span multiple geographies or include external members.&lt;br /&gt;&lt;h5&gt;Notes&lt;/h5&gt;A new release of Oracle Webcenter Suite 11g &lt;a href="http://www.oracle.com/us/corporate/press/291980"&gt;is already available&lt;/a&gt;. This post does not cover the new features/changes.&lt;br /&gt;&lt;h4&gt;Web 2.0 Solutions with Oracle WebCenter 11g – Book Review&lt;/h4&gt;&lt;h5&gt;Introduction&lt;/h5&gt;&lt;a href="http://link.packtpub.com/jnuaZN"&gt;&lt;img align="left" alt="Web 2.0" height="164" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrtyA3utDNQzMS-vK4Jy6sxzFpJiuSRnSH6SCZ8dxxYtwYUv-ZBB0ZhrPa9_U5iynGBhSyEPV2Nv4Jm0yev8P97kKJ_f20EkIHEOcxqznKF1G-vIrAfZGRaNdiIZ9757ABCGofdyAOqAJF/?imgmax=800" style="border: 1px; border0style: solid; border-color: black; margin: 0; float: right;" title="Web 2.0" width="137" /&gt;&lt;/a&gt;Oracle Webcenter 11g is a very new product and because of that there are few books talking about it. &lt;a href="http://link.packtpub.com/jnuaZN"&gt;Web 2.0 Solutions with Oracle WebCenter 11g&lt;/a&gt; is a very practical book that presents the main concepts of WebCenter. The book has around 250 pages, 10 chapters and lots of illustrations that make the reading very soft, fast and easy. There is also a source code (for download) that may help to accomplish the exercises that come with the book.&lt;br /&gt;&lt;br /&gt;Some concepts (overview) that can be found in the book:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Web 2.0 &lt;br /&gt;&lt;/li&gt;&lt;li&gt;Enterprise 2.0 &lt;/li&gt;&lt;li&gt;Oracle WebCenter Suite &lt;/li&gt;&lt;li&gt;ADF Faces &lt;/li&gt;&lt;li&gt;ADF Business Components &lt;/li&gt;&lt;li&gt;Forum &lt;/li&gt;&lt;li&gt;Wiki &lt;/li&gt;&lt;li&gt;Blog &lt;/li&gt;&lt;li&gt;Search in enterprise applications &lt;/li&gt;&lt;li&gt;Organization with Tagging and Linking &lt;/li&gt;&lt;li&gt;RSS &lt;/li&gt;&lt;/ul&gt;&lt;h5&gt;Public &lt;/h5&gt;The book aims Java/Portal Developers who want to try the very first steps with WebCenter. The book helps to understand how the components work and how the main available tools can be used. It is a great book for those that are starting with ADF and WebCenter. If you already have tried by yourself the development of simple applications with Oracle WebCenter, certainly you will skip some chapters, but, if you have a good experience with the product, the book definitely is not for you.&lt;br /&gt;&lt;h5&gt;What caught my attention &lt;/h5&gt;&lt;ul&gt;&lt;li&gt;The book is practical guide to give the first steps in the WebCenter World &lt;/li&gt;&lt;li&gt;The “Hello World” application is very “sophisticated”, and its idea is to show a typical enterprise application architecture. &lt;/li&gt;&lt;li&gt;The book comes with a good material about Discussions, Wiki, and Blog Services &lt;/li&gt;&lt;/ul&gt;&lt;h5&gt;What I missed the most &lt;/h5&gt;&lt;ul&gt;&lt;li&gt;Although it is not the focus of the book to go into questions of sophisticated software architecture, it could indicate sources to readers who want to take the next steps. &lt;/li&gt;&lt;li&gt;The book does not goes inside the ADF Task Flow subject, it only mentions it. &lt;/li&gt;&lt;/ul&gt;&lt;h5&gt;Chapters Overview&lt;/h5&gt;Chapter 1, What is Oracle WebCenter?&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Introduction to Web 2.0, Enterprise 2.0 and Oracle WebCenter Suite &lt;/li&gt;&lt;/ul&gt;Chapter 2, WebCenter Installation and Configuration&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Presents the "Webcenter Component Building Blocks" &lt;/li&gt;&lt;li&gt;Walkthrough to install the WebCenter Suite in a development environment. &lt;/li&gt;&lt;/ul&gt;Chapter 3, Setting up the Development Environment&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Walkthrough to install JDeveloper + WebCenter Plugin + SVN &lt;/li&gt;&lt;/ul&gt;Chapter 4, Getting Started with WebCenter Development&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Development of a sophisticated “Hello World” application, composed of a webservice, consumed by a portlet, consumed by a WebCenter application. This application gives a good idea of a real WebCenter application. &lt;/li&gt;&lt;/ul&gt;Chapter 5, Design and Personalization&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Presents the ADF Faces Rich Client &lt;/li&gt;&lt;li&gt;ADF Faces components overview &lt;/li&gt;&lt;li&gt;Presents the ADF Business Components &lt;/li&gt;&lt;li&gt;Shows the development of a WebCenter Application:      &lt;ul&gt;&lt;li&gt;View Layer: Constructed with ADF Faces, it is composed by a template and a JSF page &lt;/li&gt;&lt;li&gt;Model Layer: Constructed with ADF Business Components, it uses the schema that comes with the book (can be downloaded at the packt website)     &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;Chapter 6, Portlets&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Talk about the types of portlets you can build with WebCenter &lt;/li&gt;&lt;li&gt;Shows the portlet development with ADF and JSF Bridge      &lt;ul&gt;&lt;li&gt;View Layer: Constructed with ADF Faces, it is composed by a JSF page, exposed as a portlet –&amp;gt; The page uses ADF Data Visualization Components! Very cool! &lt;/li&gt;&lt;li&gt;Model Layer: Constructed with ADF Business Components, it uses the same schema that comes with the book &lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;After the portlet creation it is shown how to consume it &lt;/li&gt;&lt;/ul&gt;Chapter 7, Discussions, Wiki, and Blog Services&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Presents the concepts about Forum, Wiki and Blog &lt;/li&gt;&lt;li&gt;Presents and shows how to use ADF TaskFlows to consume Discussion Services &lt;/li&gt;&lt;li&gt;Lists the ways to use Wiki and Blog. There are examples of two of then:      &lt;ul&gt;&lt;li&gt;    Using an IFrame (included in a custom WebCenter application page) &lt;/li&gt;&lt;li&gt;    Using the Web Clipping portlet. &lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;Chapter 8, Search Service&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The chapter talks about the following concepts:      &lt;ul&gt;&lt;li&gt;Searching enterprise applications (in our case WebCenter applications) &lt;/li&gt;&lt;li&gt;Organizing information with tagging and linking &lt;/li&gt;&lt;li&gt;RSS and its importance &lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;There is also examples using WebCenter applications to: &lt;/li&gt;&lt;ul&gt;&lt;li&gt;Integrate with WebCenter Tags Service (it uses ADF Security for Authentication/Authorization) &lt;/li&gt;&lt;li&gt;Integrate with the WebCenter Links Service&lt;/li&gt;&lt;li&gt;Integrate with the WebCenter RSS Service &lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;Chapter 9, Personalization with Oracle Composer&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Presents personalization for two different roles: developers and end users&lt;/li&gt;&lt;li&gt;As developers, we prepare a dynamic environment for end users:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Lists, explains and uses Composer’s  components&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;As end user, we personalize the page&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Resource Catalog Overview&lt;/li&gt;&lt;li&gt;MDS Overview  &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;Chapter 10, Oracle WebCenter Spaces Overview&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Presents Oracle WebCenter Personal Spaces: Practical guide to page creation&lt;/li&gt;&lt;li&gt;Presents Oracle WebCenter Group Spaces: Practical guide to group creation&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Sources&lt;/h4&gt;I took lots of things from those sources, including whole stretches (they were perfect):&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E14571_01/webcenter.1111/e10147/index.htm"&gt;Getting Started with Oracle WebCenter 11g&lt;/a&gt;&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E14571_01/webcenter.1111/e10147/Topic_1.2.htm"&gt;Getting Started with Oracle WebCenter 11g – The Solution&lt;/a&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Oracle_WebCenter#WebCenter_services_capabilities"&gt;WebCenter Services Capabilities&lt;/a&gt;&lt;br /&gt;&lt;a href="http://link.packtpub.com/jnuaZN"&gt;Web 2.0 Solutions with Oracle WebCenter 11g&lt;/a&gt;&lt;/div&gt;</content><link href="http://java2go.blogspot.com/feeds/1702275062038132940/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/1702275062038132940" rel="replies" title="1 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/1702275062038132940" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/1702275062038132940" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2011/01/web-20-solutions-with-oracle-webcenter.html" rel="alternate" title="Web 2.0 Solutions with Oracle WebCenter 11g (book review)" type="text/html"/><author><name>Fábio Saraiva de Souza</name><uri>http://www.blogger.com/profile/16902881356214004208</uri><email>noreply@blogger.com</email><gd:image height="32" rel="http://schemas.google.com/g/2005#thumbnail" src="//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-nnda2emlkg_FekZT6tmRBMEVgWYkNfGXOKE0aSR9YUqZcNSQdZM5SJd5cpaUfgjW8QNUrXAuBYUQX7hPPpo1lnb5_P0d92ByuxIy6UKv0xcCcuYj2aUw4AgUoNZevg/s220/2.JPG" width="19"/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb5SorJcvvcq-xMQ0MYlHcp-46RZIkPw-XIlIKxso0Yls7hUjMTNs5TTZwgA4GYbb4BumgxwYTew4hrR0S0gJUEQ3i5CXjG0uE5PpKzhq_KX3v_l_Dqm7mSj420_iqV9Irjc3FwxXsLi_D/s72-c?imgmax=800" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-5648773890017226601</id><published>2010-12-02T13:57:00.000-08:00</published><updated>2010-12-02T13:57:10.933-08:00</updated><title type="text">Happy Holidays everyone!</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.oracle.com/technology" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://www.oracle.com/ocom/groups/public/@otn/documents/webcontent/192156.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;</content><link href="http://java2go.blogspot.com/feeds/5648773890017226601/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/5648773890017226601" rel="replies" title="0 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/5648773890017226601" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/5648773890017226601" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2010/12/happy-holidays-everyone.html" rel="alternate" title="Happy Holidays everyone!" type="text/html"/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05439924633149516920</uri><email>noreply@blogger.com</email><gd:image height="16" rel="http://schemas.google.com/g/2005#thumbnail" src="https://img1.blogblog.com/img/b16-rounded.gif" width="16"/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-3970701329755160454</id><published>2010-12-01T12:07:00.000-08:00</published><updated>2010-12-01T12:07:07.096-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ADF"/><title type="text">Creating a centered page layout using ADF Faces (only)</title><content type="html">&lt;p style="text-align: right"&gt;&lt;em&gt;by Eduardo Rodrigues&lt;/em&gt;&lt;/p&gt;&lt;p&gt;It’s been a long time since I last posted here about my old friend: ADF. But now that I’m working in ADF BC’s awesome development team, I was already feeling the self-pressure and urge to go back to this vast subject. Let’s start easy though.&lt;/p&gt;&lt;p&gt;As you all might have noticed, ADF has gone a long way since it’s early days. ADF Faces 11g is quite different from its 10g predecessor. One of the differences, besides all the rich components and built-in AJAX capabilities, is the fact that some of the components that were present in 10g have moved from ADF Faces library to &lt;a href="http://myfaces.apache.org/trinidad/index.html"&gt;Apache Trinidad&lt;/a&gt; (or MyFaces). One of those components was the “rowLayout”. That layout component certainly makes it very easy to center its content in relation to the entire page, both horizontally and vertically. However, using Trinidad components ad tag libraries alongside with ADF Faces, although possible, may not be always desired. So, the question is: how to achieve same layout using only ADF Faces’ layout manager?&lt;/p&gt;&lt;p&gt;If you’re somewhat used to the particularities of ADF Faces’ layout manager, you probably already know that setting up a container that not only stretches 100% of the page’s (or of its parent container’s) height but also centers its content vertically is not as easy and straightforward as one would think.&lt;/p&gt;&lt;p&gt;Thinking fast, the first approach most come up with (including myself) is this:&lt;/p&gt;&lt;p&gt;&lt;strong&gt;panelStretchLayout&lt;/strong&gt; (only center facet enabled) &lt;strong&gt;&amp;gt;&lt;/strong&gt; &lt;strong&gt;panelGroupLayout&lt;/strong&gt; (Layout = horizontal ; Valign = middle) &lt;strong&gt;&amp;gt;&lt;/strong&gt; &lt;strong&gt;panelGroupLayout&lt;/strong&gt; (Layout = vertical ; Halign = center)&lt;/p&gt;&lt;p&gt;Pretty intuitive and simple, right? Yes! But the layout manager doesn’t seem to agree.&lt;img style="border-bottom-style: none; border-right-style: none; border-top-style: none; border-left-style: none" class="wlEmoticon wlEmoticon-confusedsmile" align="absMiddle" src="http://lh3.ggpht.com/_F7mwJPejsqM/TPajsSTPBXI/AAAAAAAATMY/NSLfg006BUo/wlEmoticon-confusedsmile%5B2%5D.png?imgmax=800" /&gt;&lt;/p&gt;&lt;p&gt;The problem with this layout structure is basically the fact that a horizontal panelGroupLayout &lt;u&gt;&lt;strong&gt;does not&lt;/strong&gt;&lt;/u&gt; support being stretched inside a panelStretchLayout facet. This is actually clearly documented: &lt;a title="http://goo.gl/GYVud" href="http://goo.gl/GYVud"&gt;http://goo.gl/GYVud&lt;/a&gt;&lt;/p&gt;&lt;p&gt;After a lot of trial-and-fail, I eventually found a way (thanks to my good friends and ADF gurus Maiko Rocha and George Maggessy).&lt;/p&gt;&lt;p&gt;The layout structure is this:&lt;/p&gt;&lt;p&gt;&lt;strong&gt;panelStretchLayout&lt;/strong&gt; (top, bottom and center facets enabled; TopHeight = 33% ; BottomHeight = 33%) &lt;strong&gt;&amp;gt;&lt;/strong&gt; &lt;strong&gt;panelGroupLayout&lt;/strong&gt; (Layout = vertical ; Halign = center)&lt;/p&gt;&lt;p&gt;Even if you don’t need any content going in the Top or Bottom facets, it’s important to add at least an empty panelGroupLayout to both of them just to ensure the specified 33% of height will be allocated.&lt;/p&gt;&lt;p&gt;To wrap up, here’s a complete source code example of a page with a page-centered login form:&lt;/p&gt;&lt;br /&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="html"&gt;xml&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;='1.0'&lt;/span&gt; &lt;span class="attr"&gt;encoding&lt;/span&gt;&lt;span class="kwrd"&gt;='UTF-8'&lt;/span&gt;?&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;jsp:root&lt;/span&gt; &lt;span class="attr"&gt;xmlns:jsp&lt;/span&gt;&lt;span class="kwrd"&gt;="http://java.sun.com/JSP/Page"&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;="2.1"&lt;/span&gt;
          &lt;span class="attr"&gt;xmlns:f&lt;/span&gt;&lt;span class="kwrd"&gt;="http://java.sun.com/jsf/core"&lt;/span&gt;
          &lt;span class="attr"&gt;xmlns:af&lt;/span&gt;&lt;span class="kwrd"&gt;="http://xmlns.oracle.com/adf/faces/rich"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;jsp:directive.page&lt;/span&gt; contentType="text/html;charset=UTF-8"&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;f:view&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;af:document&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="d1"&lt;/span&gt; &lt;span class="attr"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;="Login Page"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;af:form&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="f1"&lt;/span&gt; &lt;span class="attr"&gt;defaultCommand&lt;/span&gt;&lt;span class="kwrd"&gt;="#{'pgTplt:cbLogin'}"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;af:panelStretchLayout&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="psl1"&lt;/span&gt; &lt;span class="attr"&gt;startWidth&lt;/span&gt;&lt;span class="kwrd"&gt;="33%"&lt;/span&gt; &lt;span class="attr"&gt;endWidth&lt;/span&gt;&lt;span class="kwrd"&gt;="33%"&lt;/span&gt;
                                   &lt;span class="attr"&gt;topHeight&lt;/span&gt;&lt;span class="kwrd"&gt;="33%"&lt;/span&gt; &lt;span class="attr"&gt;bottomHeight&lt;/span&gt;&lt;span class="kwrd"&gt;="33%"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;f:facet&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="center"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;af:panelGroupLayout&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="pgl1"&lt;/span&gt; &lt;span class="attr"&gt;layout&lt;/span&gt;&lt;span class="kwrd"&gt;="vertical"&lt;/span&gt;
                                     &lt;span class="attr"&gt;halign&lt;/span&gt;&lt;span class="kwrd"&gt;="center"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;af:panelFormLayout&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="pflLogin"&lt;/span&gt; &lt;span class="attr"&gt;rows&lt;/span&gt;&lt;span class="kwrd"&gt;="2"&lt;/span&gt; &lt;span class="attr"&gt;maxColumns&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;af:inputText&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="itUsername"&lt;/span&gt; &lt;span class="attr"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;="Username"&lt;/span&gt;
                                  &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="#{Login.username}"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;af:inputText&lt;/span&gt; &lt;span class="attr"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;="Password"&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="itPassword"&lt;/span&gt; &lt;span class="attr"&gt;secret&lt;/span&gt;&lt;span class="kwrd"&gt;="true"&lt;/span&gt;
                                  &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="#{Login.password}"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;af:spacer&lt;/span&gt; &lt;span class="attr"&gt;width&lt;/span&gt;&lt;span class="kwrd"&gt;="10"&lt;/span&gt; &lt;span class="attr"&gt;height&lt;/span&gt;&lt;span class="kwrd"&gt;="10"&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="s1"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;af:commandButton&lt;/span&gt; &lt;span class="attr"&gt;text&lt;/span&gt;&lt;span class="kwrd"&gt;="Login"&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="cbLogin"&lt;/span&gt;
                                      &lt;span class="attr"&gt;actionListener&lt;/span&gt;&lt;span class="kwrd"&gt;="#{Login.doLogin}"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
                  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;af:panelFormLayout&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;af:panelGroupLayout&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;f:facet&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;f:facet&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="bottom"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;af:panelGroupLayout&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="pgl2"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
              &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;f:facet&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;f:facet&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="top"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;af:panelGroupLayout&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="pgl3"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
              &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;f:facet&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;af:panelStretchLayout&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;af:form&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;af:document&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;f:view&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;jsp:root&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;p&gt;And this is how the page above should look like:&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;a href="http://lh4.ggpht.com/_F7mwJPejsqM/TPajtJpZJRI/AAAAAAAATMc/7DwXRsh3H1M/s1600-h/image%5B8%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_F7mwJPejsqM/TPajtkzYLXI/AAAAAAAATMg/VekuZ1WMOmU/image_thumb%5B4%5D.png?imgmax=800" width="622" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;</content><link href="http://java2go.blogspot.com/feeds/3970701329755160454/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/3970701329755160454" rel="replies" title="8 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/3970701329755160454" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/3970701329755160454" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2010/12/creating-centered-page-layout-using-adf.html" rel="alternate" title="Creating a centered page layout using ADF Faces (only)" type="text/html"/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05439924633149516920</uri><email>noreply@blogger.com</email><gd:image height="16" rel="http://schemas.google.com/g/2005#thumbnail" src="https://img1.blogblog.com/img/b16-rounded.gif" width="16"/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://lh3.ggpht.com/_F7mwJPejsqM/TPajsSTPBXI/AAAAAAAATMY/NSLfg006BUo/s72-c/wlEmoticon-confusedsmile%5B2%5D.png?imgmax=800" width="72"/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-672276688629559610</id><published>2010-11-24T16:19:00.001-08:00</published><updated>2010-11-25T01:34:59.063-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="announcements"/><category scheme="http://www.blogger.com/atom/ns#" term="web 2.0"/><title type="text">Our second official book review in on its way...</title><content type="html">&lt;p align="right"&gt;&lt;em&gt;by Fábio Souza&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Hi everyone, are you doing well? I'm fine, thanks for asking.   &lt;br /&gt;Well, I was wondering these days : "It would be a good idea to change the topic for a little while and talk about a product". It seems that someone at Packt Publishing heard me, and, to incentive myself, they invited us to write a review of a new book .   &lt;br /&gt;The topic is hot: Webcenter 11g. As you all know (I hope :)) this is a strategic product that arose to compete in the Enterprise 2.0 market. &lt;/p&gt;  &lt;p&gt;The book is:  &lt;br /&gt;&lt;a href="http://link.packtpub.com/jnuaZN"&gt;Web 2.0 Solutions with Oracle WebCenter 11g&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I'm very excited to read the book, but I can already tell you some good things about it:  &lt;br /&gt;- Vince Casarez is one of its reviewers   &lt;br /&gt;- It covers all the product's main points (installation, environment setup, custom applications, and so on)   &lt;br /&gt;- There is a Oracle WebCenter Spaces Overview &lt;/p&gt;  &lt;p&gt;I hope to be posting the review soon! &lt;/p&gt;  &lt;p&gt;Ahhh! I almost forgot (kidding, I was planning it) to say that our big friend and also architect master, &lt;a href="http://georgemaggessy.blogspot.com/"&gt;George Maggessy&lt;/a&gt;, helped the writers with his WebCenter knowledge. &lt;/p&gt;  &lt;p&gt;See you!&lt;/p&gt;</content><link href="http://java2go.blogspot.com/feeds/672276688629559610/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/672276688629559610" rel="replies" title="0 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/672276688629559610" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/672276688629559610" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2010/11/our-second-official-book-review-in-on.html" rel="alternate" title="Our second official book review in on its way..." type="text/html"/><author><name>Fábio Saraiva de Souza</name><uri>http://www.blogger.com/profile/16902881356214004208</uri><email>noreply@blogger.com</email><gd:image height="32" rel="http://schemas.google.com/g/2005#thumbnail" src="//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-nnda2emlkg_FekZT6tmRBMEVgWYkNfGXOKE0aSR9YUqZcNSQdZM5SJd5cpaUfgjW8QNUrXAuBYUQX7hPPpo1lnb5_P0d92ByuxIy6UKv0xcCcuYj2aUw4AgUoNZevg/s220/2.JPG" width="19"/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-3738686761237906416</id><published>2010-07-17T14:55:00.000-07:00</published><updated>2010-07-17T14:55:33.894-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ADF"/><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper"/><category scheme="http://www.blogger.com/atom/ns#" term="reviews"/><category scheme="http://www.blogger.com/atom/ns#" term="xml"/><title type="text">JDeveloper Overview and (book) Review</title><content type="html">&lt;p&gt;Dear visitors,  &lt;br /&gt;
I will pretend I forgot that I'm about a year without posting anything and I will go straight to the subject that I owe to you: The review of the book "&lt;a target='packtpub' href="http://www.packtpub.com/processing-xml-documents-with-oracle-jdeveloper-11g/book/mid/060409wpdui4"&gt;Processing XML documents with Oracle JDeveloper 11g&lt;/a&gt;". Before start I would like to make an introduction to JDeveloper.&lt;/p&gt;&lt;h4&gt;About JDeveloper&lt;/h4&gt;&lt;h5&gt;Introduction &lt;/h5&gt;&lt;p&gt;JDeveloper is the Oracle's Strategic IDE. Besides being used to develop Oracle's products it is a tool that has the goal to support all Oracle's technological stack, and also the majority of Java EE patterns and derivables. For example: you can draw a BPEL flow that orchestrates several services available in Oracle Service Bus, develop WSRP portlets that will be consumed by your Oracle Portal, implement EJBs that can be easily published like Web Services, or even build an portal that follows the E2.0 trend with Webcenter ADF components. &lt;/p&gt;&lt;h5&gt;Main features&lt;/h5&gt;&lt;p&gt;• Integrated enterprise development environment  &lt;br /&gt;
• Visual and declarative editors   &lt;br /&gt;
• Complete development lifecycle coverage   &lt;br /&gt;
• Built-in development framework   &lt;br /&gt;
• Advanced features for Java, Database, Web services, SOA, and Web development &lt;/p&gt;&lt;p&gt;Being a developer, I cannot forget to mention the powerful Oracle ADF (Application Development Framework). I will not cover details but worth it is saying that part of the framework is considered a model JSF implementation -- by the way, it was donated to the Apache Foundation -- and it has a powerful abstraction of the model layer (&lt;a target="jcp" href="http://jcp.org/en/jsr/summary?id=227"&gt;JSR-227&lt;/a&gt;) that, with the JDev's drag-and-drop-declarative interface, makes the development of lowly coupled and highly cohesive applications much simpler and more productive.&lt;/p&gt;&lt;h5&gt;JDeveloper and Netbeans&lt;/h5&gt;&lt;p&gt;Both IDEs are very important and their development will not stop. While support for Oracle's stack will be implemented mostly in JDev, NetBeans will continue to provide a powerful open source IDE.&lt;/p&gt;&lt;h5&gt;License:&lt;/h5&gt;&lt;p&gt;JDeveloper is a free tool, you don't have to purchase it. Besides, there is a runtime license required for any production application if you choose to use Oracle TopLink or the Oracle ADF. This license is already included in all editions of the WebLogic Server. Nevertheless you can use JDev for development/evaluation. There is no special license for academic/open source use, but in many cases the "Free OTN License Agreement" (check it out) for JDeveloper will cover this type of usage.&lt;/p&gt;&lt;p&gt;This is the information that I've found in Oracle's website (see the links at the end of the article). Remember: "license things" can and do change. Always check them first before using the product.&lt;/p&gt;&lt;h5&gt;Curiosities&lt;/h5&gt;&lt;p&gt;For those who are willing to know something about the &lt;a href="http://www.oracle.com/technology/products/jdev/htdocs/11/jdev_history.html"&gt;JDev’s origins&lt;/a&gt;.&lt;/p&gt;&lt;h4&gt;Processing XML documents with Oracle JDeveloper 11g – The Book&lt;/h4&gt;&lt;h5&gt;Introduction&lt;/h5&gt;&lt;p&gt;In my opinion, JDeveloper 11g shows that it has reached a very good maturity with regard to dealing with XML. The idea of this book is to show us several easy-to-use out-of-the-box JDev’s features while, at the same time, it exposes fundamental concepts about XML processing.&lt;/p&gt;&lt;p&gt;Some concepts about XML presented by the book:  &lt;br /&gt;
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;DOM Parser &lt;/li&gt;
&lt;li&gt;SAX Parser &lt;/li&gt;
&lt;li&gt;Validation with XSD &lt;/li&gt;
&lt;li&gt;XML navigation using XPath &lt;/li&gt;
&lt;li&gt;XML transformation using XSLT&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Some JDev's features that are also presented by the book:  &lt;br /&gt;
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;XML Edition(by code and also by its own structure) &lt;/li&gt;
&lt;li&gt;Creation of XSD using drag and drop &lt;/li&gt;
&lt;li&gt;Wizard to generate XMLs using XSDs &lt;/li&gt;
&lt;li&gt;Automatic XML validation (using XSD)&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;The book has 11 chapters and each of those has a well defined scope and they can be read independently (you don't need to follow any particular order). Generally each chapter introduces a different technology with the following order: an overview, discussion about the main features and the demonstration of a practical example. The examples are very simple and made with dozens of print-screens and source codes. Although it has about 370 pages, the big part of them are used to explain these examples, what turns the book more practical than theoretical.&lt;/p&gt;&lt;h5&gt;Public&lt;/h5&gt;&lt;p&gt;In my vision, the book targets to two types of public:  &lt;br /&gt;
1 - Advanced Developers: the book can introduce technologies and may be used as a quick reference guide.   &lt;br /&gt;
2 - Novice Developers: the book &lt;strong&gt;introduces&lt;/strong&gt; fundamental concepts/tools, showing them in a practical way. &lt;/p&gt;&lt;h5&gt;What caught my attention&lt;/h5&gt;&lt;p&gt;The book talks about several recent technologies that are in evidence. There are chapters about DOM 3.0 LS, XSL-FO, XML conversions, and also Oracle Berkley DB. For each approach concerning XML processing, the author always uses the Oracle’s Implementation (Oracle XDK). This is very interesting because it shows us features that you don’t have when using the default interfaces.&lt;/p&gt;&lt;h5&gt;What I missed the most&lt;/h5&gt;&lt;p&gt;There are no details about performance or even about how to choose the right technology for the right problem. And... there is no mention of StAX.  &lt;br /&gt;
Another point to mention is that the book doesn’t talk about the tight-coupling disadvantages that exist when the Oracle XDK implementation is used instead of the default interfaces. &lt;/p&gt;&lt;h5&gt;Chapters overview&lt;/h5&gt;&lt;p&gt;Chapter 1: Creating and Parsing an XML Document  &lt;br /&gt;
&lt;/p&gt;&lt;ul&gt;&lt;li&gt; Introduction to SAX and DOM&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Chapter 2: Creating an XML Schema  &lt;br /&gt;
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Introduction to Schema (XSD) &lt;/li&gt;
&lt;li&gt;How to create a schema using the IDE and its wizards &lt;/li&gt;
&lt;li&gt;How to create XML based on a schema&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Chapter 3: XML Schema Validation  &lt;br /&gt;
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;How to programmatically validate a XML document using schema&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Chapter 4: XPath  &lt;br /&gt;
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;How to use the IDE to "query" the XML using XPath &lt;/li&gt;
&lt;li&gt;How to programmatically "query" the XML using XPath&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Chapter 5: Transforming XML with XSLT  &lt;br /&gt;
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Introduction to XSLT &lt;/li&gt;
&lt;li&gt;How to programmatically use XSLT &lt;/li&gt;
&lt;li&gt;How to use Oracle's XSLT extension function to call Java classes (very interesting, and seems very powerful as well)&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Chapter 6: JSTL XML Tag Library  &lt;br /&gt;
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Introduction to the JSTL XML tag library &lt;/li&gt;
&lt;li&gt;How to configure a web project that uses this tag library in JDev &lt;/li&gt;
&lt;li&gt;Using JSTL to parse and transform a XML document&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Chapter 7: Loading and Saving XML with DOM 3.0 LS  &lt;br /&gt;
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;What is and how to use it &lt;/li&gt;
&lt;li&gt;Exposes advantages of using it&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Chapter 8: Validating an XML Document with DOM 3 Validation  &lt;br /&gt;
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Shows the "dynamic validation", a very relevant functionality that is part of DOM 3.0 LS. This is a very important stretch that I took from inside this chapter: &lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;Oracle XDK 11g is the only XML API that implements the DOM Level 3 Validation specification (&lt;a href="http://www.w3.org/TR/2003/PR-DOM-Level-3-Val-20031215/);"&gt;http://www.w3.org/TR/2003/PR-DOM-Level-3-Val-20031215/&lt;/a&gt;); however, some of the DOM 3 Validation features are not implemented by the Oracle XDK 11g API. A test was run by W3C to determine which of the DOM 3 Validation methods are supported by the XDK 11g implementation. You can refer to the results of the DOM3 Validation test (&lt;a href="http://www.w3.org/2003/11/26-DOM3-Val-Oracle-Result.html)"&gt;http://www.w3.org/2003/11/26-DOM3-Val-Oracle-Result.html&lt;/a&gt;) when developing a DOM 3 Validation application.&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Chapter 9: JAXB 2.0  &lt;br /&gt;
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Introduction to JAXB 2.0 &lt;/li&gt;
&lt;li&gt;How to use JDev to generate the JAXB classes using a schema &lt;/li&gt;
&lt;li&gt;Introduction to the marshalling/unmarshalling process and to the JAXB 2.0 annotations&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Chapter 10: Comparing XML Documents  &lt;br /&gt;
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Overview about tools that can do XML comparison/diff &lt;/li&gt;
&lt;li&gt;Introduces the Oracle XDK 11g. This tool provides an API to work with comparison/diff and to automate the XSL generation. The second feature is achieved based on the original XML and the XML which we want to transform the original one into. Example: XML1 has X differences comparing to XML2. Using these X differences the API knows how to create an XSL that transforms XML1 into XML2&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Chapter 11: Converting XML to PDF  &lt;br /&gt;
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Overview of several tools that generate PDF files &lt;/li&gt;
&lt;li&gt;Short explanation about XSL-FO &lt;/li&gt;
&lt;li&gt;Demonstration on how to transform a XML into XSL-FO document using XSL &lt;/li&gt;
&lt;li&gt;How to use the Apache FOP API to transform a XSL-FO document into a PDF file&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Chapter 12: Converting XML to MS Excel  &lt;br /&gt;
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Overview about several tools to read/write XLS files &lt;/li&gt;
&lt;li&gt;This chapter is not like the others that introduce some standard patterns and concepts. This one just shows how to use Apache POI-HSSF to work with XLS&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Chapter 13: Storing XML in Oracle Berkeley DB XML  &lt;br /&gt;
This is a very interesting chapter because BDB XML is not a subject that is commonly discussed. It's worth to know the basics because it is an efficient way (and also fast) to store and query XMLs. Main points:   &lt;br /&gt;
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Overview about Oracle Berkeley DB XML ("an embeddable XML database for storing and retrieving XML documents"). &lt;/li&gt;
&lt;li&gt;Using BDB XML from command line (basic operations) &lt;/li&gt;
&lt;li&gt;Using BDB XML with a Java API (basic operations)&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Chapter 14: Oracle XML Publisher  &lt;br /&gt;
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Overview about Oracle XML Publisher (now it is called &lt;a href="http://www.oracle.com/technology/products/xml-publisher/index.html"&gt;Oracle BI Publisher&lt;/a&gt;) and its advantages over the Apache FOP/Apache POI (shown on chapters 11 and 12, respectively). &lt;/li&gt;
&lt;li&gt;How to use Oracle XML Publisher + XSL-FO to generate PDF (and how it is possible to generate different formats as well) &lt;/li&gt;
&lt;li&gt;How to create and merge XSL-FO docs &lt;/li&gt;
&lt;li&gt;How to merge PDF docs &lt;/li&gt;
&lt;li&gt;How to use the "Data Engine API" to create an XML document from database data&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;h4&gt;Sources:&lt;/h4&gt;&lt;p&gt;&lt;a target='packtpub' href="http://www.packtpub.com/processing-xml-documents-with-oracle-jdeveloper-11g/book/mid/060409wpdui4"&gt;Processing XML documents with Oracle JDeveloper 11g&lt;/a&gt;   &lt;br /&gt;
&lt;a href="http://www.oracle.com/technology/products/jdev/index.html"&gt;JDeveloper&lt;/a&gt;   &lt;br /&gt;
&lt;a href="http://www.oracle.com/technology/products/jdev/htdocs/11/jdev_history.html"&gt;JDeveloper History&lt;/a&gt;   &lt;br /&gt;
&lt;a href="http://www.oracle.com/technology/products/jdev/htdocs/jdeveloper11gfaq.html"&gt;JDeveloper FAQ&lt;/a&gt;   &lt;br /&gt;
&lt;a href="http://www.oracle.com/technology/tech/java/htdocs/javatoolsfaq.html"&gt;Oracle Java Tools FAQ&lt;/a&gt;&lt;/p&gt;</content><link href="http://java2go.blogspot.com/feeds/3738686761237906416/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/3738686761237906416" rel="replies" title="1 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/3738686761237906416" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/3738686761237906416" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2010/06/jdeveloper-overview-and-book-review.html" rel="alternate" title="JDeveloper Overview and (book) Review" type="text/html"/><author><name>Fábio Saraiva de Souza</name><uri>http://www.blogger.com/profile/16902881356214004208</uri><email>noreply@blogger.com</email><gd:image height="32" rel="http://schemas.google.com/g/2005#thumbnail" src="//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-nnda2emlkg_FekZT6tmRBMEVgWYkNfGXOKE0aSR9YUqZcNSQdZM5SJd5cpaUfgjW8QNUrXAuBYUQX7hPPpo1lnb5_P0d92ByuxIy6UKv0xcCcuYj2aUw4AgUoNZevg/s220/2.JPG" width="19"/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-3148653411275735233</id><published>2010-05-24T21:27:00.001-07:00</published><updated>2010-05-24T21:27:23.764-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="curiosities"/><category scheme="http://www.blogger.com/atom/ns#" term="tools"/><title type="text">How to upgrade your Dell’s BIOS directly from Ubuntu</title><content type="html">&lt;p&gt;I know this post is totally off topic but I faced this same issue last week and I’m pretty sure this will be very handy for a lot of people out there. So why not share it, right?!&lt;/p&gt;  &lt;p&gt;Many people worldwide are migrating from Microsoft Windows to Linux nowadays, specially Ubuntu, which is probably the most friendly and stable distribution currently. I’m sort of one of those people. I’ve always used Unix but mainly at my work environment. But I’ve recently decided to switch one of my desktop PCs, a Dell Optiplex 755, from a 32-bit Windows XP Professional to a brand new 64-bit Ubuntu 10.04. And so far I’m an extremely happy user, I must say (finally making full and intelligent use of my 4GB RAM and certainly much more efficient use of my Core 2 Duo CPU).&lt;/p&gt;  &lt;p&gt;Problem was, as I was eager to get rid of my old Windows XP, I didn’t pay attention to details, such as the PC’s BIOS version. By the moment I realized it was still A14 while the most recent was A17, I had already installed Ubuntu without any dual boot option and spent hours installing cool apps and tweaking everything to my own personal taste. As you probably know, flashing the newest BIOS release from Dell without any DOS or Windows partition on the PC would now be quite a handful and would probably involve using some freeware stuff to create a DOS or Windows recovery bootable CD and then execute Dell’s flash utility from an USB drive or something like that.&lt;/p&gt;  &lt;p&gt;As usual, I sought help from our good friend Google and found some promising blogs and forums on the subject. However, none gave me a full-circle solution. But after some deeper research, I was able to put all necessary pieces together and compile the easiest steps to flash virtually any Dell’s BIOS directly from Ubuntu’s terminal prompt and using the most reliable source: Dell’s upgrade utility itself.&lt;/p&gt;  &lt;p&gt;So, these are the magical steps, compiled from several different forums and articles&amp;#160; (they might work on other Linux distributions as well but I only tried on Ubuntu):&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;apt-get update&lt;/strong&gt; &lt;em&gt;(not always needed, but won’t hurt)&lt;/em&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;apt-get install libsmbios-bin&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;getSystemId&lt;/strong&gt; &lt;em&gt;(will display info about your Dell, including BIOS version, System ID and Service Tag)&lt;/em&gt;       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Download the most recent BIOS upgrade for your system from &lt;a href="http://support.dell.com"&gt;http://support.dell.com&lt;/a&gt; as you would if using Windows &lt;/li&gt;    &lt;li&gt;Execute the downloaded utility on a command line. For example: O755-A17.exe &lt;strong&gt;–writehdrfile        &lt;br /&gt;&lt;/strong&gt;This step can be executed on any Windows machine or directly on Ubuntu using &lt;strong&gt;Wine&lt;/strong&gt; (apt-get install wine). &lt;/li&gt;    &lt;li&gt;&lt;em&gt;(you can skip this step if Wine was used in step 5)&lt;/em&gt; FTP or copy the extracted .hdr file to your Ubuntu &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;modprobe dell_rbu&lt;/strong&gt; &lt;em&gt;(loads the dell_rbu driver)&lt;/em&gt; &lt;/li&gt;    &lt;li&gt;trigger the BIOS upgrade using &lt;strong&gt;dellBiosUpdate –u –f &amp;lt;the .hdr file from step 5&amp;gt;&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;reboot the machine &lt;em&gt;(the BIOS will be automatically upgraded during boot)&lt;/em&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Voilá! You have safely upgraded your Dell’s BIOS directly from Ubuntu, without having to create any external boot CD or USB drive.&lt;/p&gt;  &lt;p&gt;Hope this helps. Enjoy!&lt;/p&gt;  </content><link href="http://java2go.blogspot.com/feeds/3148653411275735233/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/3148653411275735233" rel="replies" title="5 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/3148653411275735233" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/3148653411275735233" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2010/05/how-to-upgrade-your-dells-bios-directly.html" rel="alternate" title="How to upgrade your Dell’s BIOS directly from Ubuntu" type="text/html"/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05439924633149516920</uri><email>noreply@blogger.com</email><gd:image height="16" rel="http://schemas.google.com/g/2005#thumbnail" src="https://img1.blogblog.com/img/b16-rounded.gif" width="16"/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-7620694686311534810</id><published>2010-05-12T13:09:00.000-07:00</published><updated>2010-05-24T20:34:02.975-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="best-practices"/><category scheme="http://www.blogger.com/atom/ns#" term="memory"/><category scheme="http://www.blogger.com/atom/ns#" term="tips"/><title type="text">Micromanaging Memory Consumption</title><content type="html">&lt;p align="right"&gt;&lt;em&gt;by Eduardo Rodrigues&lt;/em&gt;&lt;/p&gt;&lt;p&gt;As we all know, specially since Java 5.0, the JVM guys have been doing good job and have significantly improved a lot of key aspects, specially performance and memory management, which basically translates into our good old friend, the Garbage Collector (a.k.a. GC).&lt;/p&gt;&lt;p&gt;In almost all articles I’ve read on the memory subject, including those from Sun itself, a particular comment was always present. That briefly is:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;font color="#333333" size="2"&gt;&lt;em&gt;The JVM loves small-and-short-living objects.&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;font color="#333333" size="2"&gt;Don’t “nullify” variables (myObject = null;) when you decide they aren’t needed anymore as a way of hinting the GC that the objects once referenced by those variables are OK to be disposed.&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;I guess, after reading this “message” so many times, I finally internalized it in the form of a programming style, if I may. It’s actually very simple and takes advantage of a very basic structure, which is extremely common and kind of taken for granted. I’m talking about the very well-known &lt;strong&gt;code block&lt;/strong&gt;. Yes, I’m talking about those code snippets squeezed and indented between a pair of curly braces like { &amp;lt;my lines of code go here&amp;gt; }.&lt;/p&gt;&lt;p&gt;In general, most programmers use these structures just because they have to as they are mandatory in so many portions of the Java language’s syntax. You need them when declaring classes, methods, try-catch-finally blocks, multi-line for loops, multi-line if-then-else blocks, etc. But the detail many programmers seem to forget is that these code blocks may actually be defined anywhere in a method body, unattached to any particular keyword or command. Even more, code blocks can be nested as well.&lt;/p&gt;&lt;p&gt;Besides being syntactically mandatory, the use of code blocks demarcated by opening and closing curly braces also imply a very important feature of the language. Code blocks also define variables scopes! I’ll explain…&lt;/p&gt;&lt;p&gt;Any variable that happens to declared inside a curly-braces-pair-demarcated code block will “exist” &lt;strong&gt;&lt;u&gt;only&lt;/u&gt;&lt;/strong&gt; within the context of that particular code block (or scope). Such variables are said to be “local variables”. Actually, if we try to use a local variable outside of its scope, we’ll most certainly get a compilation error, because that variable literally doesn’t exist outside that code block (or scope) where it was declared. And right there lies the very code of this best-practice tip.&lt;/p&gt;&lt;p&gt;Specifying well-defined scopes for all your local variables is actually the best way of hinting the GC about what strong references are or not in use when it kicks in. Simple enough, any strong reference coming from a variable declared inside a scope that is currently not being executed, is clearly to be considered as not in use by the GC, thus increasing the chances of proper and prompt disposal of the referenced object (if no other strong references to it exist, of course).&lt;/p&gt;&lt;p&gt;So, in order to better illustrate my case, here is a simple example. First let’s consider this very innocent piece of code:&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Foo
{
   &lt;span class="kwrd"&gt;public&lt;/span&gt; final &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; main(final String args[])
   {
        &lt;span class="kwrd"&gt;try&lt;/span&gt; 
        {
            DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder builder = builderFactory.newDocumentBuilder();
            URL cfgUrl = &lt;span class="kwrd"&gt;this&lt;/span&gt;.getClass().getClassLoader().getResource(&lt;span class="str"&gt;&amp;quot;config.xml&amp;quot;&lt;/span&gt;);
            File cfgFile =  &lt;span class="kwrd"&gt;new&lt;/span&gt; File(cfgUrl.toURI());

            Document cfg = builderFactory.newDocumentBuilder().parse(cfgFile);
            XPath xpath = XPathFactory.newInstance().newXPath();
            Node cfgNode = (Node)xpath.evaluate(&lt;span class="str"&gt;&amp;quot;//*[local-name()='config']&amp;quot;&lt;/span&gt;, cfg, XPathConstants.NODE);

            (...)
           
        } &lt;span class="kwrd"&gt;catch&lt;/span&gt; (Exception ex) {
           ex.printStackTrace();
        }
    }
}&lt;/pre&gt;&lt;p&gt;If we consider that in the very first part, variables builderFactory, builder and cfgUrl are not really needed after cfgFile is instantiated, rewriting that part like this would be preferred:&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Foo
{
   &lt;span class="kwrd"&gt;public&lt;/span&gt; final &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; main(final String args[])
   {
        &lt;span class="kwrd"&gt;try&lt;/span&gt; 
        {
&lt;strong&gt;&lt;font color="#ff0000"&gt;            Document cfg;

            {
                DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
                DocumentBuilder builder = builderFactory.newDocumentBuilder();
                URL cfgUrl = &lt;span class="kwrd"&gt;this&lt;/span&gt;.getClass().getClassLoader().getResource(&lt;span class="str"&gt;&amp;quot;config.xml&amp;quot;&lt;/span&gt;);
                File cfgFile =  &lt;span class="kwrd"&gt;new&lt;/span&gt; File(cfgUrl.toURI());
                cfg = builder.parse(cfgFile);
            }
&lt;/font&gt;&lt;/strong&gt;
            XPath xpath = XPathFactory.newInstance().newXPath();
            Node cfgNode = (Node)xpath.evaluate(&lt;span class="str"&gt;&amp;quot;//*[local-name()='config']&amp;quot;&lt;/span&gt;, cfg, XPathConstants.NODE);

            (...)
           
        } &lt;span class="kwrd"&gt;catch&lt;/span&gt; (Exception ex) {
            ex.printStackTrace();
        }
    }
}&lt;/pre&gt;&lt;p&gt;With that, when the execution is passed the red code block, all local variables declared only in that context will cease to exist for all practical means. This simple example is a mere illustration and certainly doesn’t represent any major benefit but, believe me, in a real life code, using this approach of well-defined scopes for local variables may have a significant and positive impact on your application’s memory consumption profile.&lt;/p&gt;&lt;p&gt;As you can see, this is indeed a very simple Java best-practice tip. It’s easy to adopt, has no collaterals whatsoever and can prove to be very powerful. So, why not use it?&lt;/p&gt;&lt;p&gt;Enjoy!&lt;/p&gt;</content><link href="http://java2go.blogspot.com/feeds/7620694686311534810/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/7620694686311534810" rel="replies" title="6 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/7620694686311534810" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/7620694686311534810" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2010/05/micromanaging-memory-consumption.html" rel="alternate" title="Micromanaging Memory Consumption" type="text/html"/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05439924633149516920</uri><email>noreply@blogger.com</email><gd:image height="16" rel="http://schemas.google.com/g/2005#thumbnail" src="https://img1.blogblog.com/img/b16-rounded.gif" width="16"/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-2781925487101770420</id><published>2010-05-07T17:42:00.000-07:00</published><updated>2010-05-07T17:48:25.753-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="curiosities"/><category scheme="http://www.blogger.com/atom/ns#" term="xml"/><title type="text">The X (Path) File</title><content type="html">&lt;div align="right"&gt;&lt;em&gt;by Eduardo Rodrigues&lt;/em&gt;&lt;/div&gt;&lt;br /&gt;
This week I came across one of those mysterious problems where I had some test cases that needed to verify the content of some DOM trees to guarantee that the test went fine. So, of course, best way to achieve this is using XPath queries. And because the DOM trees involved were all quite simple, I figured writing the XPath queries to verify them would be like a walk in the park. But it wasn’t.&lt;br /&gt;
&lt;br /&gt;
I spent hours and hours trying to figure out what was I doing wrong, googling around but nothing seemed to make any sense at all. Then, just when I was almost giving up and throwing myself through the window, I finally realized that tiny little detail that explained everything and pointed me out to the right solution. The culprit was the default namespace specified in my root element!&lt;br /&gt;
&lt;br /&gt;
Turns out, whenever a namespace URI is specified without any prefix (like xmlns=”http://foo.com/mynamespace”), this is considered to be the document’s default namespace and it usually don’t affect parsers. But, as I found out, it does affect XPath big time. XPath, by definition, will always consider namespaces, even the default one. The problem with that is, because a default namespace don’t have any specific prefix, we completely lose the ability of using the most simple and common path-like approach when writing queries to locate nodes in the DOM tree.&lt;br /&gt;
&lt;br /&gt;
Here’s a very simple example that illustrates the issue very well. Consider the following well-formed XML:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;?&lt;/span&gt;xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;iso-8859-1&amp;quot;?&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;HR&lt;/span&gt; &lt;span class="attr"&gt;Company&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Foo Inc.&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Dept&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1&amp;quot; name=”Board”&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Emp&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;James King&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Salary&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;150000&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Salary&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Emp&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Emp&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;10&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Jon Doe&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Salary&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;100000&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Salary&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ManagerId&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;1&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ManagerId&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Emp&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Emp&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;20&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Jane Smith&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Salary&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;100000&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Salary&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ManagerId&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;1&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ManagerId&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Emp&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Dept&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;HR&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;
If I want to check if there’s really an employee named “Jane Smith” earning a 100K salary in the “Board” department, a very simple XPath query such as “//Dept[@name='Board']/Emp[string(Name)='Jane Smith' and number(Salary)=100000]” would easily do the job.&lt;br /&gt;
&lt;br /&gt;
Now just add an innocent default namespace to the root element:&lt;br /&gt;
&lt;br /&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;HR&lt;/span&gt; xmlns=”http://foo.com/HR” &lt;span class="attr"&gt;Company&lt;/span&gt;&lt;span class="kwrd"&gt;="Foo Inc."&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
and try that very same XPath query that worked so well before. In fact, even the most simple of all queries – “/” – won’t work as expected anymore. That’s just because XPath considers the default namespace context and therefore requires it to be referenced in the query. We just don’t have any way of referring to that namespace in the query since it doesn’t have any prefix associated to it. My particular opinion on this issue is that it represents a huge design flaw in XPath specs., but that’s a completely different (and now pointless) discussion. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, there’s no magic in this case. To keep using XPath queries in this kind of situations, we need to use a more generic (and less compact) syntax where we can be more specific about when we do care about fully qualified (or expanded) names and take namespaces into consideration, or if we just care about local names but do not about namespaces. Bellow is the very same query, using this more generic syntax and these 2 different naming flavors, both providing the exact same outcome:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;If you need (or want) to consider the namespace:&lt;br /&gt;
&lt;pre style="font-size: 8pt;"&gt;//*[namespace-uri()=’http://foo.com/HR’ and local-name()=’Dept’ and @name='Board']/*[namespace-uri()=’http://foo.com/HR’
and local-name()=’Emp’ and string(Name)='Jane Smith' and number(Salary)=100000]&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;If you just care about the elements’ names, then just remove the “namespace-uri” conditions: &lt;br /&gt;
&lt;pre style="font-size: 8pt;"&gt;//*[local-name()=’Dept’ and @name='Board']/*[local-name()=’Emp’ and string(Name)='Jane Smith' and number(Salary)=100000]&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;The reason why I prefer to use function local-name() instead of name() is simply because, together with namespace-uri(), this is the most generic way of selecting nodes since local-name() doesn’t include the prefix, even if there is one. In other words, even if you had a node such as &amp;lt;hr:Dept&amp;gt;, local-name() would return simply “Dept”, while name() would return “hr:Dept”. It’s much more likely that the prefix for a particular namespace will vary amongst different XML files than its actual URI. Therefore, using predicates that combine functions namespace-uri() and local-name() should work in any case, regardless of which prefixes are being used at the moment.&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;br /&gt;
&lt;h4&gt;References&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a target="w3c" href="http://www.w3.org/TR/xpath/"&gt;http://www.w3.org/TR/xpath/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a target="w3c" href="http://www.w3schools.com/xpath/default.asp"&gt;http://www.w3schools.com/xpath/default.asp&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link href="http://java2go.blogspot.com/feeds/2781925487101770420/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/2781925487101770420" rel="replies" title="0 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/2781925487101770420" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/2781925487101770420" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2010/05/x-path-file.html" rel="alternate" title="The X (Path) File" type="text/html"/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05439924633149516920</uri><email>noreply@blogger.com</email><gd:image height="16" rel="http://schemas.google.com/g/2005#thumbnail" src="https://img1.blogblog.com/img/b16-rounded.gif" width="16"/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-4692575565898903304</id><published>2010-05-01T15:26:00.001-07:00</published><updated>2010-05-07T18:24:49.344-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AOP"/><title type="text">The easy-small-simple-quick-step-by-step-how-to article on AspectJ you’ve been looking for is right here</title><content type="html">&lt;div align="right"&gt;&lt;em&gt;by Eduardo Rodrigues&lt;/em&gt;&lt;/div&gt;&lt;br /&gt;
That’s right. Have you ever spent hours of your precious time googling the Web trying to find an easy, small, simple, quick and step-by-step tutorial, article or sample on how to use AspectJ to solve that very simple use case where you only need to add some trace messages when certain methods of a certain library are called (and you don’t have access to its source code)? If your answer is “YES” then this post is exactly what you’ve been looking (maybe even praying) for.&lt;br /&gt;
&lt;br /&gt;
For convenience, readers may download all files mentioned bellow at &lt;a href="http://sites.google.com/site/errodrigues/Home/aspectj_sample.zip?attredirects=0&amp;amp;d=1" title="http://sites.google.com/site/errodrigues/Home/aspectj_sample.zip?attredirects=0&amp;amp;d=1"&gt;http://sites.google.com/site/errodrigues/Home/aspectj_sample.zip?attredirects=0&amp;amp;d=1&lt;/a&gt;&lt;br /&gt;
&lt;h4&gt;Step 0: get the latest stable version of AspectJ&lt;/h4&gt;AspectJ can be downloaded from &lt;a href="http://www.eclipse.org/aspectj/downloads.php"&gt;http://www.eclipse.org/aspectj/downloads.php&lt;/a&gt;. I recommend using the latest stable release, of course. As of now, this would be release 1.6.8.&lt;br /&gt;
&lt;br /&gt;
To install the package, just run “java -jar aspectj-1.6.8.jar”&lt;br /&gt;
&lt;h4&gt;Step 1: write the aspect code&lt;/h4&gt;Well, AspectJ doesn’t really have what I would call a very intuitive syntax so I’ll not try to explain it more than the strictly necessary for this post. A good way to start learning is reading the official documentation at &lt;a href="http://www.eclipse.org/aspectj/docs.php"&gt;http://www.eclipse.org/aspectj/docs.php&lt;/a&gt;.&lt;br /&gt;
In my case, I only needed to write 1 single and very simple aspect capable of capturing all calls to 1 particular method in 1 particular class and then log those calls when the method’s argument was equal to a particular value. In my opinion, this “trace calls” use case is the most simple, obvious and probably one of the most used for any AOP (Aspect Oriented Programming) solution. Therefore, this simple example will probably cover the requirements of most of the readers. That’s what I hope, at least. So here is my aspect &lt;strong&gt;FULLProjection.aj&lt;/strong&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="csharpcode"&gt;import java.util.logging.Logger;
import java.util.logging.Level;
import com.foo.Projection;

&lt;span class="rem"&gt;/**&lt;/span&gt;
&lt;span class="rem"&gt; * Simple trace AspectJ class. In summary, what it does is:&lt;/span&gt;
&lt;span class="rem"&gt; * Before executing any call to method setProjection() on any instance&lt;/span&gt;
&lt;span class="rem"&gt; * of class com.foo.Projection, execute method logFullProjection() defined&lt;/span&gt;
&lt;span class="rem"&gt; * in this aspect.&lt;/span&gt;
&lt;span class="rem"&gt; *&lt;/span&gt;
&lt;span class="rem"&gt; * Modifier "privileged" gives this aspect access to all private members&lt;/span&gt;
&lt;span class="rem"&gt; * of the captured object.&lt;/span&gt;
&lt;span class="rem"&gt; */&lt;/span&gt;
privileged aspect FULLProjection {

&lt;span class="kwrd"&gt;    private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; final Logger logger = Logger.getLogger(Projection.&lt;span class="kwrd"&gt;class&lt;/span&gt;.getName());

&lt;span class="rem"&gt;    /**&lt;/span&gt;
&lt;span class="rem"&gt;     * AspectJ syntax: defining the execution points to be captured at runtime.&lt;/span&gt;
&lt;span class="rem"&gt;     * target(p) sets the target object to be the instance of&lt;/span&gt;
&lt;span class="rem"&gt;     * class Projection which method setProjection() is called on.&lt;/span&gt;
&lt;span class="rem"&gt;     */&lt;/span&gt;
     pointcut tracedCall(Projection p):
          call(&lt;span class="kwrd"&gt;void&lt;/span&gt; Projection.setProjection()) &amp;amp;&amp;amp; target(p);

&lt;span class="rem"&gt;    /**&lt;/span&gt;
&lt;span class="rem"&gt;     * AspectJ syntax: defining what should run right before the&lt;/span&gt;
&lt;span class="rem"&gt;     * pointcut specified above is executed.&lt;/span&gt;
&lt;span class="rem"&gt;     * Argument p will contain the exact instance of class Projection&lt;/span&gt;
&lt;span class="rem"&gt;     * which is being executed at runtime.&lt;/span&gt;
&lt;span class="rem"&gt;     */&lt;/span&gt;
     before(Projection p): tracedCall(p) {
&lt;span class="rem"&gt;          // m_projectionName is a private member of object p.&lt;/span&gt;
&lt;span class="rem"&gt;          // that's why this aspect must be declared as privileged.&lt;/span&gt;
&lt;span class="kwrd"&gt;          if&lt;/span&gt;(&lt;span class="str"&gt;"FULL"&lt;/span&gt;.equals(p.m_projectionName))
               logFullProjectionByZimbra(); &lt;span class="rem"&gt;// call our Java method, which does the trace&lt;/span&gt;
     }

&lt;span class="rem"&gt;    /**&lt;/span&gt;
&lt;span class="rem"&gt;     * Standard Java method to be executed.&lt;/span&gt;
&lt;span class="rem"&gt;     * Just logs the call if it came from any class under mypackage.*&lt;/span&gt;
&lt;span class="rem"&gt;     */&lt;/span&gt;
&lt;span class="kwrd"&gt;     private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; logFullProjection()
     {
&lt;span class="kwrd"&gt;          try&lt;/span&gt; {
               StringBuilder c = &lt;span class="kwrd"&gt;new&lt;/span&gt; StringBuilder(&lt;span class="str"&gt;"FullProjectionCall: "&lt;/span&gt;);
               StackTraceElement st[] = Thread.currentThread().getStackTrace();

&lt;span class="kwrd"&gt;               for&lt;/span&gt; (StackTraceElement e : st)
               {
&lt;span class="kwrd"&gt;                    if&lt;/span&gt;(e.getClassName().startsWith(&lt;span class="str"&gt;"mypackage."&lt;/span&gt;))
                    {
                         c.append(e.getClassName())
                          .append(&lt;span class="str"&gt;":"&lt;/span&gt;)
                          .append(e.getMethodName())
                          .append(&lt;span class="str"&gt;":"&lt;/span&gt;)
                          .append(e.getLineNumber());
                         logger.log(Level.WARNING, c.toString());
&lt;span class="kwrd"&gt;                         break&lt;/span&gt;;
                    }
               }
          } &lt;span class="kwrd"&gt;catch&lt;/span&gt;(Throwable t) {
&lt;span class="kwrd"&gt;               return&lt;/span&gt;;
          }
     }
}&lt;/pre&gt;&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;&lt;br /&gt;
Most recent versions of AspectJ have 3 distinct modes of performing the necessary instrumentation on needed classes:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;instrument the original source code directly (when available) at compile time; &lt;/li&gt;
&lt;li&gt;weave the class files after before using or deploying them as a post-compilation step; &lt;/li&gt;
&lt;li&gt;weave classes on demand at runtime (a specific agent must be configured when starting the JVM). &lt;/li&gt;
&lt;/ol&gt;I won’t discuss the pros and cons. In my my case, option 1 was discarded because I didn’t have access to the source code and option 3 was not good because I didn’t want to mess with the container’s setup. So I chose option 2.&lt;br /&gt;
&lt;h4&gt;Step 2: instrument classes with AspectJ&lt;/h4&gt;Since I decided to use option 2 above, my compilation process didn’t need to change a bit. What I needed was to add a post-compile step in which the necessary AspectJ instrumentation would be performed on already compiled classes. The right tool to do that is AspectJ’s command-line compiler: &lt;strong&gt;ajc&lt;/strong&gt;.&lt;br /&gt;
&lt;br /&gt;
This was the hardest part for me because I could not find any tutorial or example on the Web that would show me, in a direct and simple way, how to use &lt;strong&gt;ajc&lt;/strong&gt;. So, instead of making the same mistake and start trying to describe and explain the compiler tool and its options, I’ll simply paste the shell script I used in my case:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="rem"&gt;# AspectJ's install dir&lt;/span&gt;
ASPECTJ_HOME=/scratch/aspectj
&lt;span class="rem"&gt;# Defining the classpath to be used by ajc&lt;/span&gt;
MYCLASSPATH=&amp;lt;include here all elements needed by the classes to be instrumented&amp;gt;

$ASPECTJ_HOME/bin/ajc -classpath $MYCLASSPATH -argfile my_aspects.cfg&lt;/pre&gt;&lt;br /&gt;
The trick here was to use file my_aspects.cfg to define all other parameters to be passed to &lt;strong&gt;ajc&lt;/strong&gt;. Here is its content:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="csharpcode"&gt;-1.5          &lt;span class="rem"&gt;# Java 1.5 compatibility&lt;/span&gt;
-g            &lt;span class="rem"&gt;# add debug info&lt;/span&gt;
-sourceroots  &lt;span class="rem"&gt;# path containing the aspects to be compiled (FULLProjection.aj in my case)&lt;/span&gt;
/scratch/WORK/aspects
-inpath  &lt;span class="rem"&gt;# path containing the classes to be instrumented (com.foo.Projection inside platform.jar in my case)&lt;/span&gt;
/scratch/WORK/jlib/platform.jar
-outjar  &lt;span class="rem"&gt;# output JAR file (I preferred to have a separate JAR and keep the original)&lt;/span&gt;
/scratch/WORK/platform-instrumented.jar&lt;/pre&gt;&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;&lt;br /&gt;
This file must contain only 1 command-line option per line. When an option requires a subsequent value (like –sourceroots), the value must also be declared on a separate line, subsequent to the option line. A complete reference to &lt;strong&gt;ajc&lt;/strong&gt; can be found at &lt;a href="http://www.eclipse.org/aspectj/doc/released/devguide/ajc-ref.html"&gt;http://www.eclipse.org/aspectj/doc/released/devguide/ajc-ref.html&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Notice that, as long as you don’t choose the runtime instrumentation mode, there’s no need to deploy your aspects with the application. They can be completely separate from your source code as well.&lt;br /&gt;
&lt;h4&gt;Conclusion&lt;/h4&gt;AspectJ as well as any other AOP solution can be a very powerful and useful ally to any software developer. Even as an architectural element by itself. Its possible applications go far beyond the simple use case shown in this post. So, if you’re still undecided, give it a try. Don’t be afraid of using it when necessary and, if you have the opportunity, consider including it as an active component since the beginning of your application’s development cycle.&lt;br /&gt;
&lt;br /&gt;
And remember… if possible, share your experiences with the community (in an objective and clear way, please).&lt;br /&gt;
&lt;br /&gt;
Enjoy!</content><link href="http://java2go.blogspot.com/feeds/4692575565898903304/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/4692575565898903304" rel="replies" title="0 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/4692575565898903304" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/4692575565898903304" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2010/05/easy-small-simple-quick-step-by-step.html" rel="alternate" title="The easy-small-simple-quick-step-by-step-how-to article on AspectJ you’ve been looking for is right here" type="text/html"/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05439924633149516920</uri><email>noreply@blogger.com</email><gd:image height="16" rel="http://schemas.google.com/g/2005#thumbnail" src="https://img1.blogblog.com/img/b16-rounded.gif" width="16"/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-705168536367496357</id><published>2010-04-29T03:20:00.000-07:00</published><updated>2010-05-07T17:49:10.031-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cache"/><category scheme="http://www.blogger.com/atom/ns#" term="memory"/><title type="text">How to write a simple yet “bullet-proof” object cache</title><content type="html">&lt;div align="right"&gt;&lt;em&gt;…continued from a &lt;a href="http://java2go.blogspot.com/2010/03/dont-be-smart-never-implement-resource.html"&gt;previous post&lt;/a&gt;, by Eduardo Rodrigues&lt;/em&gt;&lt;/div&gt;&lt;br /&gt;
As promised, in this post, I’ll explain how we solved the 2nd part of the heap memory exhaustion problem described in my previous post: the skin resources cache. This part was much trickier to fix because we couldn’t simply get rid of the custom cache as we did with the resources bundle. We needed to keep the skins cache for 2 reasons: the cached objects were not instances of java.util.ResourceBundle but a String containing a CSS and they had to be indexed by a specific combination of variables as cache keys, which include skin base name, client locale and user agent. As already mentioned before, what causes the heap exhaustion are the various different possible combinations of the components used to compose the cache keys so the challenge here was to find a safe and efficient way of dealing with any possible amount of entries in our skins cache and also ensuring its size won’t ever cause an OutOfMemoryException that would ultimately crash the JVM.&lt;br /&gt;
&lt;br /&gt;
(I know this will be a rather complicated post but I’ll do my best to keep it as simple as possible.)&lt;br /&gt;
&lt;br /&gt;
The very first and most obvious approach that came to mind was to implement our own “HashMap” using &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ref/package-summary.html" target="_blank"&gt;weak or soft references&lt;/a&gt;, available since JDK 1.2. In a tiny nutshell, objects of these classes wrap the access to a specified target object and they receive a special treatment from the garbage collector (GC). If the only “live” references – meaning references that are valid and currently in use, therefore are not orphans – to an object come from instances of either java.lang.ref.WeakReference or java.lang.ref.SoftReference then such objects, including the Weak/SoftReference objects referencing them, are eligible for discard even if the Weak/SoftReference objects themselves are “alive”. The main difference between a weak and a soft reference is that the former allows the GC to discard them as soon as possible while the latter causes the GC to keep them alive as long as heap space available is not critical yet.&lt;br /&gt;
&lt;br /&gt;
The reason why we didn’t initially think of using class java.util.WeakHashMap is obviously due to the fact that it uses a weak reference as the map’s key and we needed it to be as the map’s value. Another detail is that we wanted to have 2 implementations in hand, one using weak and the other using soft references. That’s because we had some concerns regarding how each solution would affect the GC performance on a heavily loaded and concurrent productions environment. Actually, our concern was more with regard to the soft references. We feared that the leniency of the GC with soft references would potentially cause such objects to quickly accumulate in the heap until the critical point where the GC would have to discard them. Since the amount of soft references to be discarded tends increase fast, this could have a substantial impact on the overall cost for the GC to do its job.&lt;br /&gt;
&lt;br /&gt;
So, we started implementing our first idea, which basically consisted in writing classes WeakCache and SoftCache, both implementing interface java.util.Map and using an internal java.util.HashMap&amp;lt;String, java.lang.ref.WeakReference or java.lang.ref.SoftReference&amp;gt; as backing storage. With that, we also needed to associate each new value reference with its own java.lang.ref.ReferenceQueue since this would apparently be the only way of keeping track of the target objects being discarded by the GC and, thus making it possible for us to remove the corresponding map entry as well. Hopefully, with that we’d ultimately achieve the same functionality offered by java.util.WeakHashMap but adding a soft reference flavor to it and moving the auto-discardable references from the map’s keys to its values.&lt;br /&gt;
&lt;br /&gt;
Looks good. But not good enough.&lt;br /&gt;
&lt;br /&gt;
There are two big issues with the approach described above:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;A WeakReference can be too volatile.      &lt;br /&gt;
&lt;br /&gt;
In theory, even to the point where it can render our WeakCache almost useless. The main reason for this is the fact that, in our particular case, we were dealing with a web application where the view layer is practically 100% implemented as an AJAX client and the skin resources being cached are only used in the mid-tier (where the cache exists) during the user login flow, which is processed in one single request. Therefore, we can pretty much assume that once a login request is over, unless another one that works with the same just-cached skin resource is currently being processed on the same JVM, there won’t be any "hard” references left at all to that object.       &lt;br /&gt;
&lt;br /&gt;
If you are somewhat familiar with Java, you’ll probably agree with me that one of the most certain things about the Garbage Collector is actually its uncertainty. By definition, we can never guarantee when the GC will kick in, much less how it will behave or which objects will be actually discarded during its cycle, therefore, no code should ever rely on any particular assumption regarding any behavioral aspect of the GC. On top of that, if we look closely into the Javadoc for java.lang.ref.WeakReference we’ll also notice that there are no guarantees whatsoever on the exact moment when disposable weakly-referenced objects will in fact be discarded by the GC. In our case, in a worse case scenario, this unpredictability pretty much means that a new skin resource object that’s just been added to our WeakCache during a login request could be immediately discarded by the GC soon after the request was processed by the mid-tier. In other words, depending on the rate at which new login requests would reach the container (or JVM) where the cache lives as well as on the skin resources they would be working with, our WeakCache could tend to be empty most of the time. And that wouldn’t be a very useful cache :)       &lt;br /&gt;
&lt;br /&gt;
The way we solved this “minor set-back”&amp;nbsp; was by adding a configurable structure to our WeakCache, which we called a “hard cache”. The idea is very simple: we just added an internal linked list and an optional argument called “hardCacheSize”. If not needed, then specifying zero as the hardCacheSize (or not specifying it at all) would basically turn the internal hard cache off. But if the hard cache is needed (and it was in our case), then a greater than zero hardCacheSize should be specified in which case, every time a skin resource is added to the cache as a weakly-referenced value in its internal HashMap or when a skin resource is found and fetched directly from the cache, a normal (“hard”) reference to the very same instance of the skin resource is also appended to the internal LinkedList until its size reaches the defined hardCacheSize at which point the first (oldest) node in the list will simply be removed to make room for the one being appended (newest), thus limiting the list’s maximum size so that it will never overflow the hardCacheSize defined. The intention here is to add a simple &lt;a href="http://en.wikipedia.org/wiki/Cache_algorithms#Least_Recently_Used" target="_blank"&gt;LRU&lt;/a&gt; (Least Recently Used) feature to our cache. The more an object is “hit” in the cache, the more hard references to it will exist in the LinkedList and, because its a &lt;u&gt;linked&lt;/u&gt; list, the order in which each hard reference was added is maintained, thus ensuring that its first node will always point to the oldest reference and its last node to the newest. Having at least one hard reference to a cached object coming from the internal hard cache should be enough to prevent the high volatility issue described here.       &lt;br /&gt;
&lt;br /&gt;
If you’re asking why haven’t I mentioned the SoftCache here, it’s not because I forgot. Due to the nature of soft references, at least in theory, they are much less vulnerable to the issue just described.       &lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Efficient monitoring of associated reference queues can be tricky and costly.      &lt;br /&gt;
&lt;br /&gt;
As I mentioned before, the Javadocs for package &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ref/package-summary.html" target="_blank"&gt;java.lang.ref&lt;/a&gt; you’ll see that the recommended way to keep track of which weakly or softly-referenced objects have been disposed by the GC is to associate a java.lang.ref.ReferenceQueue instance with the references. We have two distinct ways to work with this queue:       &lt;br /&gt;
&lt;br /&gt;
2.1. keep polling the queue in a controlled loop to check whether a new discarded reference is available;       &lt;br /&gt;
2.2. “listen” to the queue by using blocking method remove([long timeout]).       &lt;br /&gt;
&lt;br /&gt;
Either way, if we want to keep our cache’s availability high, the smartest way of implementing a reference queue handler in our cache would probably involve the use of background threads or, since we’re talking about a J2EE application using Java 5.0, we should then make use of some executor service available in package &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/package-summary.html" target="_blank"&gt;java.util.concurrent&lt;/a&gt;.       &lt;br /&gt;
&lt;br /&gt;
Needless to say, this certainly represents an overhead both in terms of code writing and complexity. &lt;/li&gt;
&lt;/ol&gt;So, while we were thinking hard to come up with the most efficient, generic and elegant way of finally implementing our weak and soft caches, Mr. Eric Chan, who is one of the main architects in Oracle Beehive team, had a very interesting breakthrough. In short terms, he thought of a very nice way of combining both WeakReference and SoftReference in our weak and soft caches so that they would provide exactly the same functionality without having to deal with those reference queues at all. Basically, instead of using a plain HashMap as our backing storage, we used a java.util.WeakHashMap in both our cache implementations. The hat trick was what and how to store things in it.&lt;br /&gt;
&lt;br /&gt;
Let’s start with the easiest one…&lt;br /&gt;
&lt;h4&gt;The WeakCache&lt;/h4&gt;This one was simple. We just replaced the backing HashMap&amp;lt;Key,Value&amp;gt; with a WeakHashMap&amp;lt;Key,Value&amp;gt; and then we used that internal “hard cache” I mentioned above as an implicit way of controlling which entries in the internal map are still in use and which ones can be disposed. The trick here was to add hard references to the map entries’ keys in the “hard cache” instead of to the values. So, if&amp;nbsp; there aren’t any hard references to a map’s key neither outside the WeakCache nor in the cache’s internal linked list, this naturally implies that the corresponding map entry in the WeakHashMap is available for disposal. To make it easier to understand, look at the diagram bellow, summarizing how the WeakCache works:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &lt;img alt="WeakCache Diagram" border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtd_8MScQIgEZLkKw-f44-ZVqYwj0g2rFnJeypnUXnH5kUgd36BJDKRCoVxjCCgFD7pdAc3NFENFPlnU3PIHF6JVR3PqPOsxot_MmnCsFB1WbA_diG6TiwkXxDWLpEbi8H12Ml04Scvzc/?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="WeakCache Diagram" width="492" /&gt; &lt;br /&gt;
&lt;br /&gt;
Now let’s go on to the trickier one…&lt;br /&gt;
&lt;h4&gt;The SoftCache&lt;/h4&gt;This one was the trickiest. We also replaced the internal HashMap with a WeakHashMap, however the mapped values are SoftReference objects. But instead of simply pointing them directly to the target object being added to the cache, they point to a wrapper class called ValueHolder. The trick here was to not only hold the map entries’ value objects but also their corresponding key objects. And what goes into the internal “hard cache” in this case are hard references to these ValueHolder instances. Therefore, because the internal “hard cache” is the only place where hard references to the softly referenced ValueHolder objects mapped in the internal WeakHashMap are being held and those ValueHolder objects hold hard references to their corresponding map keys, ultimately, we can assume that, provided no external hard references to a key K inside the map exist, the map entry corresponding to that key K will be kept in the map as long as there’s at least 1 instance of ValueHolder containing key K exists in the internal “hard cache”. Otherwise, the weakly referenced key K will be available for disposal and so will be its corresponding map entry.&lt;br /&gt;
&lt;br /&gt;
&lt;img alt="SoftCache Diagram" border="0" height="442" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvjnTZMLZtYlpn3sGcgBtDMq-xT1B-rS1Fi126GWvhyphenhyphenkA-l6MLnPvlyMuw8htEUgSMz_iK08CagFA9MTIpHCrD3kAfmrbN4AkMzXzTs_Fe8bjjpesKvdKMrwF0cM2WrVoA0x6Dq1jTGts/?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="SoftCache Diagram" width="640" /&gt; &lt;br /&gt;
&lt;h4&gt;Explaining the internal “hard cache”&lt;/h4&gt;This is merely an auxiliary structure. Its content &lt;strong&gt;does not&lt;/strong&gt; represent the cache’s actual content, which will always be identical to that of the internal WeakHashMap. This, by the way, is a &lt;em&gt;sine qua non&lt;/em&gt; condition. Other then that, the following rules apply:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;when a new object is added to the cache a new reference to it is also immediately appended to the “hard cache”; &lt;/li&gt;
&lt;li&gt;when an object which exists in the cache is requested, a new reference to this object is appended to the “hard cache”; &lt;/li&gt;
&lt;li&gt;when the amount of elements in the “hard cache” reaches the maximum limit defined for it, then, immediately before any addition of a new reference to the “hard cache”, the oldest one (least recent) will be removed from it in order to open space to the new one (most recent); &lt;/li&gt;
&lt;li&gt;the size limit that is imposed to the “hard cache” &lt;strong&gt;does not&lt;/strong&gt; apply to the cache itself but uniquely and exclusively to the “hard cache”. &lt;/li&gt;
&lt;/ol&gt;From that, we can extract this corollaries:&lt;br /&gt;
&lt;blockquote&gt;The “hard cache” contains only “hard” (or normal) references to objects that exist in the cache, therefore are contained in its internal WeakHashMap, in the natural and sequential order by which those references were added. Hence, the smaller the order of a reference in the “hard cache”, the least recent was its utilization.&lt;br /&gt;
&lt;br /&gt;
There will &lt;strong&gt;never&lt;/strong&gt; be a reference in the “hard cache” to an object that does not exist in the WeakHashMap. The contrary, however, is allowed. In other words: an object may exist in the WeakHashMap even if there aren’t any references to it in the “hard cache”. In this case, that particular object would be available for disposal if it’s not referenced at all from outside the cache.&lt;br /&gt;
&lt;br /&gt;
The quantity &lt;strong&gt;Q&lt;/strong&gt; of references in the “hard cache” to a single cached object may be defined as:&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Q&lt;/strong&gt; = [ 1 &lt;em&gt;(object was simply added to the cache but never requested from it)&lt;/em&gt; , N ]       &lt;br /&gt;
N = [ total # of requests to that object , S ]       &lt;br /&gt;
S = maximum size defined for the “hard cache”&lt;/blockquote&gt;&lt;br /&gt;
From the definition of &lt;strong&gt;Q&lt;/strong&gt; above, in an extreme scenario, nothing prevents that during any given period of time the “hard cache” be completely filled with references to one single object &lt;strong&gt;A&lt;/strong&gt; in the cache. For that, these 3 conditions must be met by a consumer application:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;add object A to the cache; &lt;/li&gt;
&lt;li&gt;make N requests for A to the cache where N = S &lt;em&gt;(size limit defined for the “hard cache”)&lt;/em&gt; – 1; &lt;/li&gt;
&lt;li&gt;the requests mentioned in the previous condition must be contiguous. They cannot intercalate with requests or additions of other objects. &lt;/li&gt;
&lt;/ol&gt;Just to illustrate how both cache will work, consider this scenario:&lt;br /&gt;
Given objects A, B, C, D and E and the following sequence of operations on a cache with a maximum “hard cache” size limited to 10 elements:&lt;br /&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;&lt;br /&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   1: &lt;/span&gt;put ( “c” , C ); &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2: &lt;/span&gt;put ( “a” , A ); &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   3: &lt;/span&gt;put ( “d” , D ); &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4: &lt;/span&gt;get ( “a” ); &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   5: &lt;/span&gt;get ( “e” ); &lt;span class="rem"&gt;// returns null as “e” wasn’t added to the cache yet &lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6: &lt;/span&gt;get ( “a” ); &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   7: &lt;/span&gt;get ( “d” ); &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8: &lt;/span&gt;put ( “b” , B ); &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   9: &lt;/span&gt;put ( “e” , E ); &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10: &lt;/span&gt;get ( “b” );&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  11: &lt;/span&gt;get ( “e” );&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12: &lt;/span&gt;get ( “a” );&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
Then the internal state of the cache would be:&lt;br /&gt;
&lt;br /&gt;
&lt;img alt="Cache's internal state after the fiven sequence of operations" border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDS82b9VC61ZfP0vSAxqgusMnj_aFZgQgB62ZWVJsKpwM9EgOc4ywgU5Jy_OKthru9AyPZomgweg3JWIv3Hnf2rodcZ3DTcTfLgUsKXY_wVUckZ3wCQQKUURYQddfRfHTKitTZ7ztibI4/?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="Cache's internal state after the fiven sequence of operations" width="282" /&gt; &lt;br /&gt;
&lt;br /&gt;
Notice that there are no references (arrows) to the map’s entry containing object &lt;strong&gt;C&lt;/strong&gt; coming from the “hard cache”. Therefore, provided there aren’t any references to &lt;strong&gt;C&lt;/strong&gt; from outside the cache either, if the GC was to execute now, there’s a fair chance the internal state of the cache would become like this:&lt;br /&gt;
&lt;br /&gt;
&lt;img alt="Cache's probable internal state after a GC cycle" border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpnh5sQ8Z07A4x3UU8lnPE2Voehcy2QAtWQw2Bfghiusp2xAd_o55uMjeCFA4ioX-HcbgOL7frgrnjBip4KJ0NXJiI0QKWVCh_MLYGLd41sBYPUI8K44sdiCHaKBCttZgCg_gR6lnG_gM/?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="Cache's probable internal state after a GC cycle" width="281" /&gt; &lt;br /&gt;
&lt;h4&gt;Don’t forget to get the sample code&lt;/h4&gt;For convenience, I’ve also made sample implementations of both caches explained available for download:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://sites.google.com/site/errodrigues/Home/WeakCache.java?attredirects=0&amp;amp;d=1" target="_blank"&gt;WeakCache.java&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="http://sites.google.com/site/errodrigues/Home/SoftCache.java?attredirects=0&amp;amp;d=1" target="_blank"&gt;SoftCache.java&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;Beware of the obvious fact that, being sample implementations, they’re only intended to better illustrate the concepts described here and are not at all to be used as-is in real world applications. Even though they’re very good initial templates. Some of the issues I see for a high-end real world application are:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;the use of wrapper java.util.Collections.synchronizedCollections(…) as a solution for concurrent access to the internal WeakHashMap as opposed to a more fine grained and efficient use of java.util.concurrent.locks.ReentrantReadWriteLock to establish and control all needed critical regions. &lt;/li&gt;
&lt;li&gt;the use of a java.util.LinkedList as the internal “hard cache” has the main advantage of guaranteeing constant performance for the most used operations add(…) and getFirst() but the remove(…) operation on the other hand doesn’t. Actually, this is the main issue with these samples because it tends to add significant overhead when explicitly removing any object from the cache. I don’t really have any quick and ready solution for this particular problem but it could involve using a more sophisticated data structure and/or some parallel processing to mitigate the overhead. &lt;/li&gt;
&lt;/ol&gt;So, enjoy and… &lt;br /&gt;
Keep reading!&lt;br /&gt;
&lt;br /&gt;
&lt;div align="right"&gt;&lt;em&gt;&lt;span style="font-family: arial, sans-serif; font-size: xx-small;"&gt;* credits go to Mr. Eric Chan for the conceptual design and to Mrs. Khushboo Bhatia for the implementation of both caches.&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;</content><link href="http://java2go.blogspot.com/feeds/705168536367496357/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/705168536367496357" rel="replies" title="2 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/705168536367496357" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/705168536367496357" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2010/04/how-to-write-simple-yet-bullet-proof.html" rel="alternate" title="How to write a simple yet “bullet-proof” object cache" type="text/html"/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05439924633149516920</uri><email>noreply@blogger.com</email><gd:image height="16" rel="http://schemas.google.com/g/2005#thumbnail" src="https://img1.blogblog.com/img/b16-rounded.gif" width="16"/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtd_8MScQIgEZLkKw-f44-ZVqYwj0g2rFnJeypnUXnH5kUgd36BJDKRCoVxjCCgFD7pdAc3NFENFPlnU3PIHF6JVR3PqPOsxot_MmnCsFB1WbA_diG6TiwkXxDWLpEbi8H12Ml04Scvzc/s72-c?imgmax=800" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-2754163469390574915</id><published>2010-04-09T13:09:00.000-07:00</published><updated>2010-04-09T13:22:11.532-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="curiosities"/><category scheme="http://www.blogger.com/atom/ns#" term="oracle"/><title type="text">Oracle + Sun + Iron Man 2: Awesome!</title><content type="html">&lt;div style="text-align: center;"&gt;A cool &lt;a target="ironman2" href="http://ironmanmovie.marvel.com/"&gt;Iron Man 2&lt;/a&gt; teaser...&lt;/div&gt;&lt;div align="center"&gt;&lt;iframe align="left" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=ja2go-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=B00005JPS8&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr" style="align: left; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px; float: left"&gt;&lt;/iframe&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,47,0" height="322" id="flashObj" width="486"&gt;&lt;param name="movie" value="http://c.brightcove.com/services/viewer/federated_f9/1640183659?isVid=1&amp;publisherID=1460825906" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;param name="flashVars" value="videoId=73931620001&amp;playerID=1640183659&amp;domain=embed&amp;" /&gt;&lt;param name="base" value="http://admin.brightcove.com" /&gt;&lt;param name="seamlesstabbing" value="false" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="swLiveConnect" value="true" /&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;embed src="http://c.brightcove.com/services/viewer/federated_f9/1640183659?isVid=1&amp;publisherID=1460825906" bgcolor="#FFFFFF" flashVars="videoId=73931620001&amp;playerID=1640183659&amp;domain=embed&amp;" base="http://admin.brightcove.com" name="flashObj" width="486" height="322" seamlesstabbing="false" type="application/x-shockwave-flash" allowFullScreen="true" swLiveConnect="true" allowScriptAccess="always" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;</content><link href="http://java2go.blogspot.com/feeds/2754163469390574915/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/2754163469390574915" rel="replies" title="0 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/2754163469390574915" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/2754163469390574915" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2010/04/oracle-sun-iron-man-2-awesome.html" rel="alternate" title="Oracle + Sun + Iron Man 2: Awesome!" type="text/html"/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05439924633149516920</uri><email>noreply@blogger.com</email><gd:image height="16" rel="http://schemas.google.com/g/2005#thumbnail" src="https://img1.blogblog.com/img/b16-rounded.gif" width="16"/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-2650402603366703879</id><published>2010-03-13T17:07:00.004-08:00</published><updated>2010-03-14T04:09:39.976-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cache"/><category scheme="http://www.blogger.com/atom/ns#" term="curiosities"/><category scheme="http://www.blogger.com/atom/ns#" term="memory"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><title type="text">Don’t be smart. Never implement a resource bundle cache!</title><content type="html">&lt;p align="right"&gt;&lt;em&gt;by Eduardo Rodrigues&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Well, first of all, I’d like to apologize for almost 1 year of complete silence. Since I’ve transferred from Oracle Consulting in Brazil to product development at the HQ in California, it’s been a little bit crazy here. It took a while for me to adjust and adapt to this completely new environment. But I certainly can’t complain, cause it’s been AWESOME! Besides, I'm of the opinion that, if there’s nothing really interesting to say, then it’s better to keep quiet :)&lt;/p&gt;  &lt;p&gt;Having said that, today I want to share an interesting experience I had recently here at work. First I’ll try to summarize the story to provide some context.&lt;/p&gt;  &lt;h4&gt;The Problem&lt;/h4&gt;  &lt;p&gt;A few months ago, a huge transition happened in Oracle’s internal IT production environment when 100% of its employees (something around 80K users) were migrated from old OCS (Oracle Collaboration Suite) 10g to Oracle’s next generation enterprise collaboration solution: Oracle Beehive. Needless to say, the expectations were big and we were all naturally tense, waiting to see how the system would behave.&lt;/p&gt;  &lt;p&gt;Within a week with the system up and running, some issues related to the component I work on (open source Zimbra x Oracle Beehive integration) started to pop up. Among those, the most serious was a mysterious memory leak, which had never been detected before during any stress test or even after more than a year of production, but was now causing containers in the mid-tier cluster to crash after a certain period.&lt;/p&gt;  &lt;p&gt;After a couple days of heap dump and log files analysis, we discovered that the culprit were 2 different resource caches maintained by 2 different components in Zimbra’s servlet layer, both related to its internationalization capabilities. In summary, one was a skin cache and the other was a resource bundle cache.&lt;/p&gt;  &lt;p&gt;Once we dove into Zimbra’s source code, we quickly realized we were not really facing a memory leak per se but an implementation which clearly underestimated the explosive growth in memory consumption that a worldwide deployment like ours has a huge potential to trigger.&lt;/p&gt;  &lt;p&gt;Both caches were simply HashMap objects and, ironically, their keys were actually the key to our problem. The map keys were defined as a combination that included client’s locale, user agent and, in the case of the skins cache, the skin name was also included. Well… you can probably imagine how many different combinations of these elements are possible within a worldwide system deployment, right? Absolutely! In our case, each HashMap would quickly reach 200MB. Of course, consuming 400MB out of 1GB of configured heap space with only 2 objects is not very economic (to say the least).&lt;/p&gt;  &lt;p&gt;So, OK. Great! We found our root cause (which is awesome enough in this kind of hard-to-analyze-production-only bugs). But now comes the harder part: how can we fix it?!&lt;/p&gt;  &lt;h4&gt;The Solution&lt;/h4&gt;  &lt;p&gt;First of all, it’s very important to keep this very important aspect in mind: we were dealing with a source code that wasn’t ours, therefore, keeping changes as minimal as possible was always crucial.&lt;/p&gt;  &lt;p&gt;One thing we noticed right away was the fact that we were most likely creating multiple entries in both maps that ended up containing identical copies of a same skin or resource bundle content. That’s because our system only supported 15 distinct locales, which means, every unsupported client locale would fallback to one of the supported locales, ultimately, the default English locale. However, the map key would still be composed with the client’s locale, thus creating a new map entry, and even worse, mapping to a new copy of the fallback locale. Yes, locales and skins that had already been loaded and processed, were constantly being reloaded, reprocessed and added to the caches.&lt;/p&gt;  &lt;p&gt;So, our first approach was to perform a small intervention with the only intention to prevent any unsupported client locale from originating a new entry in those maps. Ideally, we would want to change the maps’ key composition but we were not very comfortable with this idea, mainly because we were not sure we fully understood all the consequences of that, and fix the problem causing another was not an option.&lt;/p&gt;  &lt;p&gt;Unfortunately, days after patching the system, our containers were crashing with OutOfMemory exceptions again. As we discovered – the hardest way – simply containing the variation of the locale component in the maps’ key composition was enough to slow down the heap consumption but not enough to avoid the OOM crashes.&lt;/p&gt;  &lt;p&gt;Now it was time to put our “fears” aside and dig deeper. And we decided to dig in two simultaneous fronts: the skin cache and the resource bundle cache. In this post, I’ll only talk about the resource bundle front leaving the skin cache front to a next post.&lt;/p&gt;  &lt;p&gt;When I say “resource bundle”, I’m actually referring to Java’s java.util.ResourceBundle, more specifically its subclass java.util.PropertyResourceBundle. With that in mind, 2 strange things caught my attention while looking carefully into the heap dumps:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Each ResourceBundle instance had a “parent” attribute pointing to its next fallback locale and so on, until the ultimate fallback, the default locale. This means that each loaded resource bundle could actually encapsulate other 2 bundles. &lt;/li&gt;    &lt;li&gt;There were multiple ResourceBundle instances (each one with a different memory address) for 1 same locale. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;So, number 1 made me realize that the memory consumption issue was even worse than I thought. But number 2 made no sense at all. Why have a cache that is only stocking objects but is not able to reuse existing ones? So I decided to take a look at the source code of class java.util.ResourceBundle in JDK 5.0. The Javadoc says:&lt;/p&gt;  &lt;p&gt;“&lt;em&gt;Implementations of &lt;code&gt;getBundle&lt;/code&gt; may cache instantiated resource bundles and return the same resource bundle instance multiple times.&lt;/em&gt;”&lt;/p&gt;  &lt;p&gt;Well, turns out Sun’s implementation (the one we use) &lt;strong&gt;DOES CACHE&lt;/strong&gt; instantiated resource bundles. Even better, it uses a soft cache, which means all content is stored as &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ref/SoftReference.html" target="_blank"&gt;soft references&lt;/a&gt;, granting the garbage collector the permission to discard one or more of its entries if it decides it needs to free up more heap space. Problem solved! – I thought. I just needed to completely remove the unnecessary resource bundle cache from Zimbra’s code ant let it take advantage of the JVM’s internal soft cache. And that’s exactly what I tried. But, of course, it wouldn’t be that easy…&lt;/p&gt;  &lt;p&gt;Since at this point I already knew exactly how to simulate the root cause of our problem, I started debugging my modified code and I was amazed when I saw that the internal JVM’s cache was also stocking up multiple copies of bundles for identical locales. The good thing was that now I could understand what was causing #2 above. But why?! The only logical conclusion was, again, to blame the cache’s key composition.&lt;/p&gt;  &lt;p&gt;The JVM’s resource bundle cache also uses a key, which is composed by the bundle’s name + the corresponding java.util.Locale instance + a &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ref/WeakReference.html" target="_blank"&gt;weak reference&lt;/a&gt; to the class loader used to load the bundle. But then, how come a second attempt to load a resource bundle named “/zimbra/msg/ZmMsg_en_us.properties”, corresponding to en_us locale and using the very same class loader was not hitting the cache?&lt;/p&gt;  &lt;p&gt;After a couple hours thinking I was loosing my mind, I finally noticed that, in fact, each time a new load attempt was made, the class loader instance, although of the same type, was never the same. And I also noticed that its type was actually an extended class loader implemented by inner-class com.zimbra.webClient.servlet.JspServlet$ResourceLoader. When I checked that code, I immediately realized that class com.zimbra.webClient.servlet.JspServlet, which itself is an extension of the real JspServlet being used in the container, was overriding method service() and creating a new private instance of custom class loader ResourceLoader and forcefully replacing the current thread’s context class loader with this custom one, which was then utilized to load the resource bundles.&lt;/p&gt;  &lt;p&gt;My first attempt to solve this mess was to make the custom class loader also override methods hashCode() and equals(Object) so they would actually proxy the parent class loader (which was always the original one that was replaced in method service()). Since the web application’s class loader instance would always be the same during the application’s entire life cycle, both hashCode and equals for the custom loader would consistently return the same results at all times, thus causing the composed keys to match and cached bundles to be reused instead of reloaded and re-cached. And I was wrong once again.&lt;/p&gt;  &lt;p&gt;Turns out, as strange as it may look at first sight, when the JVM’s resource bundle cache tries to match keys in its soft cache, instead of calling the traditional equals() to compare the class loader instances, it simply uses the “==” operator, which simply compares their memory addresses. Actually, if we think more about it, we start to understand why they implemented this way. Class loaders are never expected to be constantly instantiated, over and over again, during the life cycle of any application, so why make an overhead method call to equals()?&lt;/p&gt;  &lt;p&gt;Finally, now I knew for sure what was the definitive solution. I just needed to transform the private instances of ResourceLoader into a singleton, keeping all the original logic. Bingo! Now I could see the internal bundle cache being hit as it should be. Problem solved, at last!&lt;/p&gt;  &lt;p&gt;At the end, after having completely removed the custom resource bundle cache implemented in Zimbra’s servlet layer and performed the necessary changes to make Zimbra take full and proper advantage of the built-in bundle cache offered by the JVM, instead of wasting a lot of time and memory reloading and storing hundreds of instances of resource bundles, mostly multiple copies of identical bundles, I could now confirm that despite all different client locales coming in clients' requests, the JVM’s bundle cache was holding no more than those corresponding to the 15 supported locales. With that, we had finally fixed the memory burning issue for good.&lt;/p&gt;  &lt;h4&gt;Conclusion&lt;/h4&gt;  &lt;p&gt;As this article’s title suggests, don’t try to be smarter than the JVM itself without first checking whether it’s doing it’s job well enough or not. Always do carefully read the Javadocs and, if needed, check your JVM’s source code to be sure about its behavior.&lt;/p&gt;  &lt;p&gt;And remember…. never implement a resource bundle cache in your application (at least if you’re using Sun’s JVM) and be very careful when implementing and using your own custom class loaders too.&lt;/p&gt;  &lt;p&gt;That’s all for now and…    &lt;br /&gt;Keep reading!&lt;/p&gt;</content><link href="http://java2go.blogspot.com/feeds/2650402603366703879/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/2650402603366703879" rel="replies" title="3 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/2650402603366703879" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/2650402603366703879" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2010/03/dont-be-smart-never-implement-resource.html" rel="alternate" title="Don’t be smart. Never implement a resource bundle cache!" type="text/html"/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05439924633149516920</uri><email>noreply@blogger.com</email><gd:image height="16" rel="http://schemas.google.com/g/2005#thumbnail" src="https://img1.blogblog.com/img/b16-rounded.gif" width="16"/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-1820908525083110732</id><published>2009-04-09T18:24:00.007-07:00</published><updated>2009-04-10T16:42:56.995-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="announcements"/><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper"/><category scheme="http://www.blogger.com/atom/ns#" term="reviews"/><category scheme="http://www.blogger.com/atom/ns#" term="xml"/><title type="text">Our first official book review in on its way...</title><content type="html">&lt;div align="right"&gt;&lt;em&gt;by Eduardo Rodrigues&lt;/em&gt;&lt;/div&gt;&lt;br /&gt;Great news!&lt;br /&gt;&lt;br /&gt;We have been contacted (surprisingly) by &lt;a target="packt" href="http://www.packtpub.com"&gt;&lt;span style="font-weight:bold;"&gt;Packt Publishing&lt;/span&gt;&lt;/a&gt; a few days ago and asked if we would be interested in read one of their new books and then publish an independent review here in the blog. We were very honored and flattered with the offer, so we obviously accepted it.&lt;br /&gt;&lt;br /&gt;The book is &lt;a target="packt" href="http://www.packtpub.com/processing-xml-documents-with-oracle-jdeveloper-11g/book/mid/060409wpdui4"&gt;"Processing XML documents with Oracle JDeveloper 11g"&lt;/a&gt; by &lt;a target="packt" href="http://www.packtpub.com/author_view_profile/id/201"&gt;Deepak Vohra&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;One good thing that immediately caught my attention as soon as the book arrived today was seeing the name "&lt;a target="frank" href="http://frank.thepeninsulasedge.com/"&gt;Frank Nimphius&lt;/a&gt;" in the list of reviewers. This is certainly a good sign :)&lt;br /&gt;&lt;br /&gt;Anyway, Fabio and I already have the book and we'll both read it and then compile our comments in a 4-hand post to come. We hope it wont take too long (and also hope this will be just the first of many other book reviews to come).&lt;br /&gt;&lt;br /&gt;Cheers and keep reading!</content><link href="http://java2go.blogspot.com/feeds/1820908525083110732/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/1820908525083110732" rel="replies" title="2 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/1820908525083110732" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/1820908525083110732" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2009/04/our-first-official-book-review-in-on.html" rel="alternate" title="Our first official book review in on its way..." type="text/html"/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05439924633149516920</uri><email>noreply@blogger.com</email><gd:image height="16" rel="http://schemas.google.com/g/2005#thumbnail" src="https://img1.blogblog.com/img/b16-rounded.gif" width="16"/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-6286419755537455804</id><published>2009-03-24T11:07:00.012-07:00</published><updated>2009-04-02T11:55:48.259-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="timezone"/><category scheme="http://www.blogger.com/atom/ns#" term="tools"/><title type="text">Java and the Timezones</title><content type="html">&lt;div align="right"&gt;&lt;em&gt;by Fábio Souza&lt;/em&gt;&lt;/div&gt;&lt;br /&gt;Timezone, when using Java, can be something tricky. You can get surprised when you change your OS timezone (something common to countries with DST) and it doesn't take any effect on your Java programs. What does Sun have to say about that? It can be found at their FAQ:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;Do my operating system's timezone patches fix the Java platform's timezone data?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;No. The Java SE platform's timezone data is not read from the local or host operating system. The Java SE platform maintains a private repository of timezone data in locally installed files (.../jre/lib/zi) as part of the Java Runtime Environment (JRE) software. Applying whatever operating system timezone patches (for example Solaris OS, Linux, Windows) will have no effect on the accuracy of the Java SE platform's timezone data.&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/div&gt;Sun recommends you to maintain all JVM up to date to avoid Timezone problems. To specific cases where a Timezone update is needed, they provide a tool called TZUpdater. TZUpdater is a JAR that contains timezone informations provided by &lt;a target="wikipedia" href="http://en.wikipedia.org/wiki/Zoneinfo"&gt;Olson Timezone Database&lt;/a&gt;. To update the JVM's timezone you need to execute TZUpdater's most recent version like this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="font-weight: bold;"&gt;java -jar tzupdater.jar -u&lt;/span&gt; (don't forget to check if you have read/write access to Java's directory structure)&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We are ok about Sun's JVM... But the solution is the same to all JVMs? Not really =), but it is very similar to IBM JVM and Oracle JRockit. In all cases we either have to download a program and execute it to update the installed JVM or wait for the next JVM update release.&lt;br /&gt;&lt;br /&gt;Here are some useful links:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Sun:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://java.sun.com/javase/timezones/"&gt;About Java and Timezone&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://java.sun.com/javase/timezones/tzdata_versions.html"&gt;Timezone Data Versions in the JRE Software&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://java.sun.com/javase/downloads/index.jsp"&gt;Sun's tzupdater download&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://java.sun.com/javase/tzupdater_README.html"&gt;Sun's tzupdater guide&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://java.sun.com/javase/timezones/DST_faq.html"&gt;Sun's FAQ&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;IBM (thanks to my friend and co-worker Frederico Hakamine):&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www-01.ibm.com/support/docview.wss?rs=3068&amp;amp;context=SSNVBF&amp;amp;uid=swg27008911"&gt;Olson x JTZU Releases&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.ibm.com/developerworks/java/jdk/dst/index.html"&gt;Download JTZU&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://download.boulder.ibm.com/ibmdl/pub/software/dw/jdk/dst/readme.htm"&gt;JTZU Guide&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Oracle:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.oracle.com/technology/software/products/jrockit/index.html"&gt;Oracle JRockit's tzupdater download&lt;/a&gt; (this is the JRockit's download page. You can find the tzupdater there)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://edocs.bea.com/jrockit/geninfo/diagnos/tzupdate.html"&gt;Oracle JRockit's tzupdater guide&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</content><link href="http://java2go.blogspot.com/feeds/6286419755537455804/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/6286419755537455804" rel="replies" title="0 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/6286419755537455804" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/6286419755537455804" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2009/03/java-and-timezones.html" rel="alternate" title="Java and the Timezones" type="text/html"/><author><name>Fábio Saraiva de Souza</name><uri>http://www.blogger.com/profile/16902881356214004208</uri><email>noreply@blogger.com</email><gd:image height="32" rel="http://schemas.google.com/g/2005#thumbnail" src="//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-nnda2emlkg_FekZT6tmRBMEVgWYkNfGXOKE0aSR9YUqZcNSQdZM5SJd5cpaUfgjW8QNUrXAuBYUQX7hPPpo1lnb5_P0d92ByuxIy6UKv0xcCcuYj2aUw4AgUoNZevg/s220/2.JPG" width="19"/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-5886129985465333360</id><published>2009-02-10T11:38:00.006-08:00</published><updated>2009-04-02T11:39:45.118-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="certification"/><title type="text">Web Component Developer Exam (SCWCD) for JEE 5</title><content type="html">&lt;div align="right"&gt;&lt;em&gt;by Wellington Carvalho&lt;/em&gt;&lt;/div&gt;&lt;br /&gt;I hope my feedback can help those who want to prepare for The Web Component Developer exam (SCWCD) for JEE 5. I will use the same structure of an older post that Fabio Souza wrote to pass his own experience with SCJP 5 exams. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Main reading resource&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.amazon.com/gp/product/0596516681?ie=UTF8&amp;tag=ja2go-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596516681" target="amazon"&gt;Head First Servlets and JSP: Passing the Sun Certified Web Component Developer Exam&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=ja2go-20&amp;l=as2&amp;o=1&amp;a=0596516681" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;br /&gt;The first edition of the book deals with J2EE 1.4 spec, but the changes in JEE 5 were &lt;br /&gt;most related to EJB 3, so I think you won’t have troubles with the exam! But if you want, the second edition of the Head First Servlets and JSP is prepared for JEE 5 and you can find it here: &lt;a href="http://oreilly.com/catalog/9780596516680/?CMP=AFC-ak_book&amp;ATT=Head+First+Servlets+and+JSP" target="oreilly"&gt;http://oreilly.com/catalog/9780596516680/?CMP=AFC-ak_book&amp;ATT=Head+First+Servlets+and+JSP&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Main resources for exercises&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I used an application similar to Whizlabz named Enthuware. Enthuware is an exercise tool with many tests that covers all the objectives mentioned by Sun. The exercises of Enthuware are very similar to the exam, and you have good explanations, no matter the answer is right or wrong.&lt;br /&gt;&lt;br /&gt;In order to get a better performance in your study you should take the standard tests of Enthuware sequentially and exclusively when you have read the entire SCWCD book.&lt;br /&gt;To evaluate your chapter’s knowledgement you should take the objective-wise tests only after reading the chapter. To get the full version of Enthuware you will spend around US$29,00 which is cheaper than the other: Whizlabz (US$74,95). If you fail the SCWCD exam the company guarantee your money back (must get at least 70% in the tests).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;My study schedule&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;It took me 35 days to read all the 14 chapters and to do all the tests&lt;br /&gt;and exercises of Enthuware. I spent 2 hours and a half per day to read the chapter and 1 hour to do the exercises. In the week before the exam I just took the standard tests and reviewed the material. &lt;br /&gt;&lt;br /&gt;I think this schedule is reasonable to people that is working with JEE, however if you aren’t using JEE in your daily work you should reserve a longer study time.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The exam&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In my opinion the exam is relatively easy to people that have work experience in JEE development, however you need to pay attention to every detail because the exam has good tricks hidden in the code. But don’t get scared. Most of them are covered by Enthuware.&lt;br /&gt;&lt;br /&gt;To take this exam you must know about all the objectives listed by Sun, but with a special care on these below:&lt;br /&gt;&lt;br /&gt;Servlet Technology Model &lt;br /&gt;Expression Language (EL) &lt;br /&gt;Custom Tag Library - Classic Model&lt;br /&gt;JSP Standard Actions&lt;br /&gt;&lt;br /&gt;It is important to remember that you need at least 70% to pass, but trust me (and Enthuware), if you start scoring more than 70% in the standard tests, you will pass easily.</content><link href="http://java2go.blogspot.com/feeds/5886129985465333360/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/5886129985465333360" rel="replies" title="2 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/5886129985465333360" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/5886129985465333360" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2009/02/web-component-developer-exam-scwcd-for.html" rel="alternate" title="Web Component Developer Exam (SCWCD) for JEE 5" type="text/html"/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05439924633149516920</uri><email>noreply@blogger.com</email><gd:image height="16" rel="http://schemas.google.com/g/2005#thumbnail" src="https://img1.blogblog.com/img/b16-rounded.gif" width="16"/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-2988391141226163608</id><published>2008-11-24T11:14:00.018-08:00</published><updated>2009-04-02T11:39:45.118-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="certification"/><title type="text">SCJP 6 Upgrade Exam (310-056)</title><content type="html">&lt;div align="right"&gt;&lt;em&gt;by Fábio Souza&lt;/em&gt;&lt;/div&gt;&lt;br /&gt;Guys and girls,&lt;br /&gt;&lt;br /&gt;I guess the best way to start this post is with my appologies. I really wanted to post it earlier, but you all know how things are =P.&lt;br /&gt;&lt;br /&gt;It has been almost three months from when I took the SCJP 6 upgrade exam (310-056). The exam follows the same SCJP 5's (310-055) difficulty level where it's needed to pay attention to every detail. There is time enough  to do everything calmly but the tricks are there like they were in SCJP 5. The "secret" is still the same: MAKE LOTS OF EXERCISES. In my case, my knowledge on 310-055 was pretty sharp and I just had to work out the new features of Java 6. Lets talk about the exam and how to go for it.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;PS: To get your knowledge on 310-055 "pretty sharp", I recommend my previous post: &lt;a href="http://java2go.blogspot.com/2008/08/scjp-5-and-6.html"&gt;SCJP5 and 6&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Technical information:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Number of Questions: 48&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Score needed: 66% (32 of 48 questions)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Time limit: 150 minutes&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Resource material:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For those who don't have (or want to have) specific SCJP 6 material (the same of the previous post):&lt;br /&gt;&lt;ul&gt;&lt;li&gt;JDK 6 Documentation&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What's New in Java SE 6&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Java SE 6 Key Features&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Java SE 6 Top Ten&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Notable changes in the Java SE 6 Core Libraries&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.amazon.com/gp/product/0072253606?ie=UTF8&amp;tag=ja2go-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0072253606"&gt;SCJP Sun Certified Programmer for Java 5 Study Guide (Exam 310-055)&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=ja2go-20&amp;l=as2&amp;o=1&amp;a=0072253606" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;, by Katherine Sierra (Author), Bert Bates (Author)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;For those who want to buy new material:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.amazon.com/gp/product/0071591060?ie=UTF8&amp;tag=ja2go-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0071591060"&gt;SCJP Sun Certified Programmer for Java 6 Exam 310-065&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=ja2go-20&amp;l=as2&amp;o=1&amp;a=0071591060" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;, by Katherine Sierra (Author), Bert Bates (Author)&lt;sup&gt;*&lt;/sup&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-style: italic;font-size:small;" &gt;* I've never read this book but if the quality is the same of the previous version, there is no doubt it should work.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I made an abstract to help me with the SCJP 6 content by comparing the requisites for both exams (310-055 and 310-065), and studying the Java 6 new features.  Here it is:&lt;br /&gt;&lt;br /&gt;- Ordered and Sorted comparison:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9eCw84kWhi203vam9SnT1zGkpRdyskbFRJXfhgm9NAaAj6RVPegi1pppEZZqBwDHUu0UmRiBlezefE9dWGy55vDnDq_po6ffWkcZVu-kSSoa6vlxaGS9e6oRjuIoJc19Utih3e-ueuGQ0/s1600-h/table1.PNG"&gt;&lt;img style="cursor: pointer; width: 246px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9eCw84kWhi203vam9SnT1zGkpRdyskbFRJXfhgm9NAaAj6RVPegi1pppEZZqBwDHUu0UmRiBlezefE9dWGy55vDnDq_po6ffWkcZVu-kSSoa6vlxaGS9e6oRjuIoJc19Utih3e-ueuGQ0/s320/table1.PNG" alt="Click me" id="BLOGGER_PHOTO_ID_5272559554826500658" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;- NavigableSet and NavigableMap methods comparison:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRZrs8v-Yz0BvXWN5tabB86NvFYRk7Oa7B_uTYEaIGLJvT4ZzA9NGBGs-3-Rs3rGxIx2Kn586cvpTp5YHLmFajeZPlh8rxWwMU8o2n1a-9SI_dKN4-m417CCghA5n9d5f74_c5TAxWvwCY/s1600-h/table2.PNG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 366px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRZrs8v-Yz0BvXWN5tabB86NvFYRk7Oa7B_uTYEaIGLJvT4ZzA9NGBGs-3-Rs3rGxIx2Kn586cvpTp5YHLmFajeZPlh8rxWwMU8o2n1a-9SI_dKN4-m417CCghA5n9d5f74_c5TAxWvwCY/s400/table2.PNG" alt="Click me" id="BLOGGER_PHOTO_ID_5272562193007663090" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;- Other things:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Deque: in this interface's &lt;a href="http://java.sun.com/javase/6/docs/api/java/util/Deque.html"&gt;javadoc&lt;/a&gt; there is a full explanation about the different methods that can be used to add/remover an object of this queue. Be sure that you know the ones that returns an special value (generally &lt;span style="font-style: italic;"&gt;null&lt;/span&gt;) or that throws an exception instead, when something goes wrong.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;ArrayDeque: the best (fastest) way to make FIFO and LIFO queues. This is also the recommended implementation when we need a Stack.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;LinkedList: choose this implementation when objects should be added/removed between the first and the last element.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;java.util.Collections: there are two new methods in this class, &lt;a href="http://java.sun.com/javase/6/docs/api/java/util/Collections.html#newSetFromMap%28java.util.Map%29"&gt;newSetFromMap&lt;/a&gt; and &lt;a href="http://java.sun.com/javase/6/docs/api/java/util/Collections.html#asLifoQueue%28java.util.Deque%29"&gt;asLifoQueue&lt;/a&gt;, learn them.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;java.util.Arrays: avoid &lt;a href="http://java.sun.com/javase/6/docs/api/java/lang/System.html#arraycopy%28java.lang.Object,%20int,%20java.lang.Object,%20int,%20int%29"&gt;System.arraycopy&lt;/a&gt;, use the new methods &lt;a href="http://java.sun.com/javase/6/docs/api/java/util/Arrays.html#copyOf%28T%5B%5D,%20int%29"&gt;Arrays.copyOf&lt;/a&gt; or &lt;a href="http://java.sun.com/javase/6/docs/api/java/util/Arrays.html#copyOfRange%28T%5B%5D,%20int,%20int%29"&gt;Arrays.copyOfRange&lt;/a&gt; instead.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;java.io.File: &lt;a href="http://java.sun.com/javase/6/docs/api/java/io/File.html#getFreeSpace%28%29"&gt;getFreeSpace&lt;/a&gt;, &lt;a href="http://java.sun.com/javase/6/docs/api/java/io/File.html#getTotalSpace%28%29"&gt;getTotalSpace&lt;/a&gt;, &lt;a href="http://java.sun.com/javase/6/docs/api/java/io/File.html#setExecutable%28boolean%29"&gt;setExecutable&lt;/a&gt;, &lt;a href="http://java.sun.com/javase/6/docs/api/java/io/File.html#setWritable%28boolean%29"&gt;setWritable&lt;/a&gt;, &lt;a href="http://java.sun.com/javase/6/docs/api/java/io/File.html#setReadable%28boolean%29"&gt;setReadable&lt;/a&gt;. These are new methods to learn.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;java.io.IOException: there are new constructors that enable exception chaining &lt;a href="http://java.sun.com/javase/6/docs/api/java/io/IOException.html#IOException%28java.lang.String,%20java.lang.Throwable%29"&gt;IOException(String,&lt;br /&gt;Throwable)&lt;/a&gt; and &lt;a href="http://java.sun.com/javase/6/docs/api/java/io/IOException.html#IOException%28java.lang.Throwable%29"&gt;IOException(Throwable)&lt;/a&gt;.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;java.io.Console: this is a new class and its instance should be got using &lt;a href="http://java.sun.com/javase/6/docs/api/java/lang/System.html#console%28%29"&gt;System.console&lt;/a&gt;. I think all of its methods are importants, take a look at the &lt;a href="http://java.sun.com/javase/6/docs/api/java/io/Console.html"&gt;javadoc&lt;/a&gt;. Pay attention to the &lt;a href="http://java.sun.com/javase/6/docs/api/java/io/Console.html#readPassword%28%29"&gt;Console.readPassword&lt;/a&gt;, it will fill an array with the provided password, it is a good think to know how to clean this array. This is a good way: java.util.Arrays.fill(src, '\0') and this is a valid and bizarre way: java.util.Arrays.fill(src, 0, src.length, (char)0).&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;SCJP 6 - To do or not to do&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Because the difference between Java 5 and Java 6 is very little, in my opinion, people who already have the SCJP 5 don't need to worry about SCJP 6. For those who don't have SCJP 5 or any SCJP certificate at all: &lt;span style="font-weight: bold;"&gt;DON'T DO the Java 5 exam; GO STRAIGHT to Java 6&lt;/span&gt;.&lt;br /&gt;In my exam (just to freeze: 310-056), the Java 6 content was kind of ridiculous. Only THREE specific questions. It means (this is not an advice) I could take the SCJP 6 exam without any knowledge about its specific content. I'll tell you how it was like:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;java.io.Console: A question about its usage. It was necessary to know how to get the Console instance and how to get typed lines.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;java.util.NavigableSet and the implementation java.util.TreeSet: The question was about how to use them focusing the method &lt;a href="http://java.sun.com/javase/6/docs/api/java/util/TreeSet.html#subSet%28E,%20boolean,%20E,%20boolean%29"&gt;subset&lt;/a&gt;.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Chosing the best Collection implementation: I don't remember exactly what was asked, but keep this in mind:&lt;/li&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Stack or queue needed: use ArrayDeque.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Removing/Adding elements that might not be at the top or at the bottom: LinkedList.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Sorted Collection (unique elements): TreeSet.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;That is all folks! Please send your comments, corrections and share your own experiences.</content><link href="http://java2go.blogspot.com/feeds/2988391141226163608/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/2988391141226163608" rel="replies" title="4 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/2988391141226163608" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/2988391141226163608" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2008/11/scjp-6-upgrade-exam-310-056.html" rel="alternate" title="SCJP 6 Upgrade Exam (310-056)" type="text/html"/><author><name>Fábio Saraiva de Souza</name><uri>http://www.blogger.com/profile/16902881356214004208</uri><email>noreply@blogger.com</email><gd:image height="32" rel="http://schemas.google.com/g/2005#thumbnail" src="//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-nnda2emlkg_FekZT6tmRBMEVgWYkNfGXOKE0aSR9YUqZcNSQdZM5SJd5cpaUfgjW8QNUrXAuBYUQX7hPPpo1lnb5_P0d92ByuxIy6UKv0xcCcuYj2aUw4AgUoNZevg/s220/2.JPG" width="19"/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9eCw84kWhi203vam9SnT1zGkpRdyskbFRJXfhgm9NAaAj6RVPegi1pppEZZqBwDHUu0UmRiBlezefE9dWGy55vDnDq_po6ffWkcZVu-kSSoa6vlxaGS9e6oRjuIoJc19Utih3e-ueuGQ0/s72-c/table1.PNG" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-611946735951049524</id><published>2008-08-08T04:41:00.007-07:00</published><updated>2009-04-02T11:39:45.118-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="certification"/><title type="text">SCJP 5 and 6</title><content type="html">&lt;div align="right"&gt;&lt;em&gt;by Fábio Souza&lt;/em&gt;&lt;/div&gt;&lt;br /&gt;OK, I know that is a little late to talk about SCJP 5 but I will give my feedback about the exam. This will help people that feels unprepared to take SCJP 6 (that was my case) and the ones that are going to take this new version, what I know is that both exams (5 and 6) are very similar.&lt;br /&gt;&lt;br /&gt;Resources:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Main resource material: &lt;a href="http://www.amazon.com/gp/product/0072253606?ie=UTF8&amp;tag=ja2go-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0072253606"&gt;SCJP Sun Certified Programmer for Java 5 Study Guide (Exam 310-055)&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=ja2go-20&amp;l=as2&amp;o=1&amp;a=0072253606" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;, by Katherine Sierra (Author), Bert Bates (Author). This book is just great! The authors are very careful with the explanations and they also made very good illustrations. Each chapter ends with the "Two-minute Drill" section and the exercises. The "Two-minute Drill" has an abstract about the chapter that makes very easy to review forgotten items. The exercises are very well written, and every answer is explained (both wrong and right).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Main resource material for exercises: MasterExam. My SCJP Sun Certified Programmer for Java 5 Study Guide (Exam 310-055) book came with a CD containing the MasterExam software. This software gives two ways to do its questions, like the real exam or "ad-hoc". The MasterExam's questions are like the book. A "permission" to get a bonus exam also come with the CD, you just need to register on their site and then download the program.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Other resources for exercises that I found:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.blogger.com/www.whizlabs.com"&gt;Whizlabs&lt;/a&gt;: There is a software like MasterExam made by Whizlabs. It seems to be a very good software. Its interface is great and you have the possibility to do "adaptive" tests. I downloaded a trial version from their website and I liked it pretty much.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://epractizelabs.com/"&gt;EPractize&lt;/a&gt;: Their software is like the MasterExam too but it doesn't have any strength point. I didn't like the software's interface. I also downloaded a trial version from their website.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;"TestKiller": This one is an exercise's book and seems to be made by &lt;a href="http://www.blogger.com/www.troytec.com"&gt;Troytec&lt;/a&gt;. It's a very weird book, with a lot of writing mistakes on it. The strength point is that it promises to cover only questions from the real exam. When I took the exam I had the feeling of recognizing one or two questions (I took a look on 60 from 224 questions of this book).&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;My study schedule: That was the way I worked out to pass the exam.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;8 months to read the SCJP Sun Certified Programmer for Java 5 Study Guide (Exam 310-055) and to do all exercises. It took me something like one hour per day (only workdays). It's a good way to start because you can understand how Java works without pushing yourself.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;1 month to read again all "Two-minute Drill" sections and the most complicated chapters (chapters 7, 9, 8, 6, in descending difficulty order, in my opinion).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;4 days (eight hours per day) to do A LOT of exercises. This is the main point. The exercises are full of tricks and the only way to become familiar with those tricks is doing a lot of exercises.&lt;/li&gt;&lt;/ul&gt;The exam: In my opinion, the exam is difficult. You have to be really confident before taking it. A good thing that I noticed was that the time is enough to do everything with attention and patience. In my opinion to take this exam you must know about everything, but with a special care with these points below:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Threads.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Generics.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Methods Override/Overload (and covariant return).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Box/Unbox.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Method calling with widening and autoboxing.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Access Control.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;java and javac commands.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Differences between collections (Ordered, Sorted, Hash).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How equals and hashCode works with collections.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Inner Classes.&lt;/li&gt;&lt;/ul&gt;Differences between SCJP 310-055 and 310-065 (you can find it &lt;a href="http://www.sun.com/training/certification/faq/index.html"&gt;here&lt;/a&gt;):&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Questions concerning System.gc() have been removed.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Coverage of the java.io.Console class has been added.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Coverage of navigable collections has been added.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Several of the previous objectives have been strengthened (so you can expect more questions and more detailed questions on them). These strengthened objectives include: exception handling, collection classes and collection interfaces, assertions, threads, and flow control.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Number of questions: 310-055 = 72; 310-065 = 72&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Pass score: 310-055 = 59%; 310-065 = 65%&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Time limit: 310-055 = 175 minutes; 310-065 = 210 minutes&lt;/li&gt;&lt;/ul&gt;Advice: If you aren't feeling confident to take the SCJP 6 exam just because you don't know what is new in this version, don't take the SCJP 5. I did it and I am a little regretful. There is no "SCJP 5 to 6" exam, there is only one "upgrade" exam to version 6 called "Exam 310-056". In this exam you have to prove your Java 5 knowledge again. Well, soon I will take the 310-056 and then I will post about it.&lt;br /&gt;&lt;br /&gt;Please comment and share your experiences with SCJP (any version is welcome :)).&lt;br /&gt;&lt;br /&gt;Links:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://java.sun.com/javase/6/docs/index.html"&gt;JDK 6 Documentation&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/beta2.html"&gt;What's New in Java SE 6&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://java.sun.com/javase/6/features.jsp"&gt;Java SE 6 Key Features&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blogs.sun.com/dannycoward/entry/java_se_6_top_ten"&gt;Java SE 6 Top Ten&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blogs.sun.com/DaveB/entry/new_improved_in_java_se1"&gt;Notable changes in the Java SE 6 Core Libraries&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</content><link href="http://java2go.blogspot.com/feeds/611946735951049524/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/611946735951049524" rel="replies" title="19 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/611946735951049524" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/611946735951049524" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2008/08/scjp-5-and-6.html" rel="alternate" title="SCJP 5 and 6" type="text/html"/><author><name>Fábio Saraiva de Souza</name><uri>http://www.blogger.com/profile/16902881356214004208</uri><email>noreply@blogger.com</email><gd:image height="32" rel="http://schemas.google.com/g/2005#thumbnail" src="//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-nnda2emlkg_FekZT6tmRBMEVgWYkNfGXOKE0aSR9YUqZcNSQdZM5SJd5cpaUfgjW8QNUrXAuBYUQX7hPPpo1lnb5_P0d92ByuxIy6UKv0xcCcuYj2aUw4AgUoNZevg/s220/2.JPG" width="19"/></author><thr:total>19</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-2620382803738206710</id><published>2008-07-08T11:25:00.003-07:00</published><updated>2009-04-02T11:37:56.616-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="curiosities"/><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper"/><title type="text">There's a cook in JDev's development team indeed</title><content type="html">Sometime ago I was surprised with a peculiar "tip of the day" which simply mentioned a traditional &lt;a href="http://java2go.blogspot.com/2008/04/is-there-cook-in-jdevs-team.html"&gt;angel cake recipe&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Well, today I got the confirmation. There's certainly a cook amongst JDev's developers!&lt;br /&gt;&lt;br /&gt;Look at the "tip" showed to me today:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqrnTgDb1NBPauzOG7tj-3zpNNID95mO4ssF2LZ4UXvIfZB1kDx3mSxFCkB8vZ68htetcELSk4pJgfireDWtcz2NLhHKfi0DocACXUuw-aNhCGWfM0ji9iWXzePZ0ot-dRf1IYCtTRfM8/s1600-h/tip.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqrnTgDb1NBPauzOG7tj-3zpNNID95mO4ssF2LZ4UXvIfZB1kDx3mSxFCkB8vZ68htetcELSk4pJgfireDWtcz2NLhHKfi0DocACXUuw-aNhCGWfM0ji9iWXzePZ0ot-dRf1IYCtTRfM8/s400/tip.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5220716268450556754" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Hmmmm... interesting... :)</content><link href="http://java2go.blogspot.com/feeds/2620382803738206710/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/2620382803738206710" rel="replies" title="0 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/2620382803738206710" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/2620382803738206710" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2008/07/theres-cook-in-jdevs-development-team.html" rel="alternate" title="There's a cook in JDev's development team indeed" type="text/html"/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05439924633149516920</uri><email>noreply@blogger.com</email><gd:image height="16" rel="http://schemas.google.com/g/2005#thumbnail" src="https://img1.blogblog.com/img/b16-rounded.gif" width="16"/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqrnTgDb1NBPauzOG7tj-3zpNNID95mO4ssF2LZ4UXvIfZB1kDx3mSxFCkB8vZ68htetcELSk4pJgfireDWtcz2NLhHKfi0DocACXUuw-aNhCGWfM0ji9iWXzePZ0ot-dRf1IYCtTRfM8/s72-c/tip.gif" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-3294639425788572418</id><published>2008-05-07T17:35:00.004-07:00</published><updated>2009-04-02T11:37:56.617-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper"/><title type="text">Windows XP SP3 crashing JDeveloper 10.1.3.3</title><content type="html">&lt;p align="right"&gt;&lt;em&gt;by Eduardo Rodrigues&lt;/em&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3 style="margin-top: 0; margin-bottom: 0; color: red"&gt;Attention!!!&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;Today, my Windows XP automatically upgraded to SP3 and, after rebooting, my JDev 10.1.3.3 began to crash during its initialization, generating a JVM core dump in directory &amp;lt;JDEV_HOME&amp;gt;\jdev\bin.&lt;br /&gt;&lt;br /&gt;After a quick look into the dump file, I noticed some problem with VFS, so I decided to disable VFS commenting the following line in file &amp;lt;JDEV_HOME&amp;gt;\jdev\bin\jdev.conf:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#AddVMOption -DVFS_ENABLE=true&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Then, thank God, JDev came back to life again. So, don't panic.&lt;br /&gt;&lt;br /&gt;Cheers!</content><link href="http://java2go.blogspot.com/feeds/3294639425788572418/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/3294639425788572418" rel="replies" title="0 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/3294639425788572418" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/3294639425788572418" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2008/05/windows-xp-sp3-crashing-jdeveloper.html" rel="alternate" title="Windows XP SP3 crashing JDeveloper 10.1.3.3" type="text/html"/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05439924633149516920</uri><email>noreply@blogger.com</email><gd:image height="16" rel="http://schemas.google.com/g/2005#thumbnail" src="https://img1.blogblog.com/img/b16-rounded.gif" width="16"/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-8233575562207977875</id><published>2008-04-25T07:28:00.021-07:00</published><updated>2009-04-02T11:39:19.747-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cache"/><category scheme="http://www.blogger.com/atom/ns#" term="ias"/><category scheme="http://www.blogger.com/atom/ns#" term="oracleas"/><title type="text">OracleAS Java Object  Cache</title><content type="html">&lt;div align="right"&gt;&lt;em&gt;by Fábio Souza&lt;/em&gt;&lt;/div&gt;&lt;br /&gt;Before I start, I would like to say that many texts and observations were took from the &lt;a href="http://download.oracle.com/docs/cd/B32110_01/web.1013/b28958/joc.htm#CHDHAAHJ"&gt;Oracle® Containers for J2EE Services Guide 10g (10.1.3.1.0), Chapter 7&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;What is it?&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;The Java Object Cache (JOC) is a OC4J service that makes cache (in memory or disk) of any kind of Java object.&lt;/blockquote&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Use it:&lt;/span&gt; &lt;ul&gt;&lt;li&gt;To store frequently used objects.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;To store objects that are costly to create/retrieve.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;To share objects between applications.&lt;/li&gt;&lt;/ul&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Characteristics:&lt;/span&gt; &lt;ul&gt;&lt;li&gt;By default, cached objects are stored in memory but disk persistence can be configured.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;By default, cached objects are local. The DISTRIBUTE mode can be configured.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;By default, the "write lock" is disabled.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Cached objects doesn't have a "read lock".&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Cached objects are represented by name spaces.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Cached objects are invalidated based on time or an explicit request.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Cached objects can be invalidated by group or individually.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Each cached Java object has a set of associated attributes that control how the object is loaded into the cache, where the object is stored, and how the object is invalidated.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;When an object is invalidated or updated, the invalid version of the object remains in the cache as long as there are references to that particular version of the object.&lt;/li&gt;&lt;/ul&gt;&lt;span style="FONT-WEIGHT: bold"&gt;The Java Object Cache organization:&lt;/span&gt; &lt;ul&gt;&lt;li&gt;Cache Environment. The cache environment includes cache regions, subregions, groups, and attributes. Cache regions, subregions, and groups associate objects and collections of objects. Attributes are associated with cache regions, subregions, groups, and individual objects. Attributes affect how the Java Object Cache manages objects.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Cache Object Types. The cache object types include memory objects, disk objects, pooled objects, and StreamAccess objects.&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-STYLE: italic"&gt;This &lt;/span&gt;&lt;a style="FONT-STYLE: italic" href="http://download.oracle.com/docs/cd/B32110_01/web.1013/b28958/joc.htm#g1087954"&gt;table&lt;/a&gt;&lt;span style="FONT-STYLE: italic"&gt; gives a little description about the cache environment and the object types.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="FONT-WEIGHT: bold"&gt;JOC API:&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;Only "cache.jar" must be added to application's classpath to start with JOC API. This archive is located in &lt;span style="FONT-STYLE: italic"&gt;$ORACLE_HOME\javacache\lib\cache.jar&lt;/span&gt;. A project in JDeveloper just needs to import the built-in "Java Cache" library.&lt;/blockquote&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Distributed Cache Characteristics:&lt;/span&gt; &lt;ul&gt;&lt;li&gt;The cache management is not centralized. Cache updates and invalidation are propagated to all application server nodes.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The OAS' JOC configuration of each OAS node is not propagated to other nodes.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The distributed objects must be in the same namespace in each node.&lt;/li&gt;&lt;/ul&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Distributed Cache Configurations:&lt;br /&gt;&lt;/span&gt;&lt;blockquote&gt;There are two ways to configure JOC: programmatically (using the oracle.ias.cache.Cache class) and through the &lt;span style="FONT-STYLE: italic"&gt;javacache.xml&lt;/span&gt; file. This post only covers &lt;span style="FONT-STYLE: italic"&gt;javacache.xml.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Configuring the &lt;span style="FONT-STYLE: italic"&gt;javacache.xml file:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The &lt;em&gt;javacache.xml&lt;/em&gt; localization is specified in the &lt;em&gt;server.xml&lt;/em&gt; OC4J configuration file (tag: "&lt;code&gt;&amp;lt;javacache-config&amp;gt;&lt;/code&gt;"). To work with &lt;em&gt;javacache.xml&lt;/em&gt; it is necessary to start the container with the -Doracle.ias.jcache=true property.&lt;br /&gt;To run JOC in "distributed mode", &amp;lt;communication&amp;gt; tag must be configured in the javacache.xml file like the example below:&lt;br /&gt;&lt;br /&gt;&lt;code style="FONT-SIZE: 8pt"&gt;&amp;lt;communication&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;!-- "isdistributed" must be "true" to JOC work with DISTRIBUTE marked objects --&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;isdistributed&amp;gt;true&amp;lt;/isdistributed&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;!-- Each JOC node must have a "discoverer" element to itself. --&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;discoverer ip="192.168.0.2" port="7000"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;discoverer ip="192.168.0.3" port="7000"&amp;gt;&lt;br /&gt;&amp;lt;/communication&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Configuring the distributed cached objects:&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;There are three important attributes that we can use when configuring objects: &lt;ul&gt;&lt;li&gt;DISTRIBUTE: used to mark objects that will be shared between applications.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;SYNCHRONIZE: used to allow "write locking" on cached objects.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;SYNCHRONIZE_DEFAULT: the same use as the SYNCHRONIZE attribute, but it can mark only a region or a group. When they are marked, all objects will be allowed to use the write lock.&lt;/li&gt;&lt;/ul&gt;The example below shows a distributed cache utilization:&lt;br /&gt;&lt;br /&gt;&lt;code style="FONT-SIZE: 8pt"&gt;public&amp;nbsp;void&amp;nbsp;defineRegions()&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;Creating&amp;nbsp;attributes&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Attributes&amp;nbsp;remoteRegionAttr&amp;nbsp;=&amp;nbsp;new&amp;nbsp;Attributes();&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;Extracted&amp;nbsp;from&amp;nbsp;Attributes.setFlags()&amp;nbsp;javadoc:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;specifies&amp;nbsp;which&amp;nbsp;of&amp;nbsp;the&amp;nbsp;listed&amp;nbsp;attributes&amp;nbsp;should&amp;nbsp;be&amp;nbsp;set&amp;nbsp;in&amp;nbsp;the&amp;nbsp;Attributes&amp;nbsp;object.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;The&amp;nbsp;flags&amp;nbsp;may&amp;nbsp;be&amp;nbsp;OR'ed&amp;nbsp;together,&amp;nbsp;i.e.,&amp;nbsp;Attributes.DISTRIBUTE&amp;nbsp;|&amp;nbsp;Attributes.SPOOL.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;Any&amp;nbsp;previous&amp;nbsp;settings&amp;nbsp;will&amp;nbsp;be&amp;nbsp;disregard.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*/&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;remoteRegionAttr.setFlags(Attributes.SYNCHRONIZE_DEFAULT&amp;nbsp;|&amp;nbsp;Attributes.DISTRIBUTE);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;try&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;Creates&amp;nbsp;the&amp;nbsp;&amp;quot;RemoteRegion&amp;quot;&amp;nbsp;with&amp;nbsp;the&amp;nbsp;specified&amp;nbsp;attributes.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CacheAccess.defineRegion(&amp;quot;RemoteRegion&amp;quot;,&amp;nbsp;remoteRegionAttr);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;catch&amp;nbsp;(Exception&amp;nbsp;e)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;e.printStackTrace();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public&amp;nbsp;void&amp;nbsp;createCachedObject(Object&amp;nbsp;object)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;CacheAccess&amp;nbsp;access&amp;nbsp;=&amp;nbsp;null;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;try&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;Accessing&amp;nbsp;the&amp;nbsp;created&amp;nbsp;region.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;access&amp;nbsp;=&amp;nbsp;CacheAccess.getAccess(&amp;quot;RemoteRegion&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;Owning&amp;nbsp;cache&amp;nbsp;object's&amp;nbsp;write&amp;nbsp;lock&amp;nbsp;(5&amp;nbsp;seconds&amp;nbsp;to&amp;nbsp;timeout)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;access.getOwnership(&amp;quot;CachedObject&amp;quot;,&amp;nbsp;5000);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;Caching&amp;nbsp;the&amp;nbsp;object&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;access.put(&amp;quot;CachedObject&amp;quot;,&amp;nbsp;object);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;Releasing&amp;nbsp;cache&amp;nbsp;object's&amp;nbsp;write&amp;nbsp;lock&amp;nbsp;(5&amp;nbsp;seconds&amp;nbsp;to&amp;nbsp;timeout)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;access.releaseOwnership(&amp;quot;CachedObject&amp;quot;,&amp;nbsp;5000);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;catch&amp;nbsp;(Exception&amp;nbsp;ex)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ex.printStackTrace();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;finally&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(access&amp;nbsp;!=&amp;nbsp;null)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;Extracted&amp;nbsp;from&amp;nbsp;CacheAccess.close()&amp;nbsp;javadoc:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;releases&amp;nbsp;the&amp;nbsp;resource&amp;nbsp;used&amp;nbsp;by&amp;nbsp;current&amp;nbsp;CacheAccess&amp;nbsp;object.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;Application&amp;nbsp;is&amp;nbsp;required&amp;nbsp;to&amp;nbsp;make&amp;nbsp;this&amp;nbsp;call&amp;nbsp;when&amp;nbsp;it&amp;nbsp;no&amp;nbsp;longer&amp;nbsp;need&amp;nbsp;this&amp;nbsp;CacheAccess&amp;nbsp;instance.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*/&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;access.close();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public&amp;nbsp;Object&amp;nbsp;retrieveCachedObject()&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Object&amp;nbsp;object&amp;nbsp;=&amp;nbsp;null;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;CacheAccess&amp;nbsp;access&amp;nbsp;=&amp;nbsp;null;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;try&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;access&amp;nbsp;=&amp;nbsp;CacheAccess.getAccess(&amp;quot;RemoteRegion&amp;quot;);&amp;nbsp;//&amp;nbsp;Accessing&amp;nbsp;the&amp;nbsp;created&amp;nbsp;region.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;Extracted&amp;nbsp;from&amp;nbsp;CacheAccess.get()&amp;nbsp;javadoc:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;returns&amp;nbsp;a&amp;nbsp;reference&amp;nbsp;to&amp;nbsp;the&amp;nbsp;object&amp;nbsp;associated&amp;nbsp;with&amp;nbsp;name.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;If&amp;nbsp;the&amp;nbsp;object&amp;nbsp;is&amp;nbsp;not&amp;nbsp;currently&amp;nbsp;in&amp;nbsp;the&amp;nbsp;cache&amp;nbsp;and&amp;nbsp;a&amp;nbsp;loader&amp;nbsp;object&amp;nbsp;has&amp;nbsp;been&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;registered&amp;nbsp;to&amp;nbsp;the&amp;nbsp;name&amp;nbsp;of&amp;nbsp;the&amp;nbsp;object,&amp;nbsp;then&amp;nbsp;the&amp;nbsp;object&amp;nbsp;will&amp;nbsp;be&amp;nbsp;loaded&amp;nbsp;into&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;the&amp;nbsp;cache.&amp;nbsp;If&amp;nbsp;a&amp;nbsp;loader&amp;nbsp;object&amp;nbsp;has&amp;nbsp;not&amp;nbsp;been&amp;nbsp;defined&amp;nbsp;for&amp;nbsp;this&amp;nbsp;name,&amp;nbsp;then,&amp;nbsp;for&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;DISTRIBUTE&amp;nbsp;object,&amp;nbsp;the&amp;nbsp;default&amp;nbsp;load&amp;nbsp;method&amp;nbsp;will&amp;nbsp;do&amp;nbsp;a&amp;nbsp;netSearch&amp;nbsp;for&amp;nbsp;the&amp;nbsp;object&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;to&amp;nbsp;see&amp;nbsp;if&amp;nbsp;the&amp;nbsp;object&amp;nbsp;exist&amp;nbsp;in&amp;nbsp;any&amp;nbsp;other&amp;nbsp;cache&amp;nbsp;in&amp;nbsp;the&amp;nbsp;system;&amp;nbsp;for&amp;nbsp;a&amp;nbsp;non&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;DISTRIBUTE&amp;nbsp;object,&amp;nbsp;an&amp;nbsp;ObjectNotFoundException&amp;nbsp;will&amp;nbsp;be&amp;nbsp;thrown.&amp;nbsp;The&amp;nbsp;object&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;returned&amp;nbsp;by&amp;nbsp;get&amp;nbsp;is&amp;nbsp;always&amp;nbsp;a&amp;nbsp;reference&amp;nbsp;to&amp;nbsp;a&amp;nbsp;shared&amp;nbsp;object.&amp;nbsp;Get&amp;nbsp;will&amp;nbsp;always&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;return&amp;nbsp;the&amp;nbsp;latest&amp;nbsp;version&amp;nbsp;of&amp;nbsp;the&amp;nbsp;object.&amp;nbsp;A&amp;nbsp;CacheAccess&amp;nbsp;object&amp;nbsp;will&amp;nbsp;only&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;maintain&amp;nbsp;a&amp;nbsp;reference&amp;nbsp;to&amp;nbsp;one&amp;nbsp;cached&amp;nbsp;object&amp;nbsp;at&amp;nbsp;any&amp;nbsp;given&amp;nbsp;time.&amp;nbsp;If&amp;nbsp;get&amp;nbsp;is&amp;nbsp;called&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;multiple&amp;nbsp;times,&amp;nbsp;the&amp;nbsp;object&amp;nbsp;accessed&amp;nbsp;previously&amp;nbsp;will&amp;nbsp;be&amp;nbsp;released.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*/&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;object&amp;nbsp;=&amp;nbsp;access.get(&amp;quot;CachedObject&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;It's&amp;nbsp;not&amp;nbsp;necessary&amp;nbsp;to&amp;nbsp;own&amp;nbsp;the&amp;nbsp;writing&amp;nbsp;lock&amp;nbsp;to&amp;nbsp;read&amp;nbsp;cached&amp;nbsp;objects.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;catch&amp;nbsp;(Exception&amp;nbsp;ex)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ex.printStackTrace();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;finally&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(access&amp;nbsp;!=&amp;nbsp;null)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;Extracted&amp;nbsp;from&amp;nbsp;CacheAccess.close()&amp;nbsp;javadoc:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;releases&amp;nbsp;the&amp;nbsp;resource&amp;nbsp;used&amp;nbsp;by&amp;nbsp;current&amp;nbsp;CacheAccess&amp;nbsp;object.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;Application&amp;nbsp;is&amp;nbsp;required&amp;nbsp;to&amp;nbsp;make&amp;nbsp;this&amp;nbsp;call&amp;nbsp;when&amp;nbsp;it&amp;nbsp;no&amp;nbsp;longer&amp;nbsp;need&amp;nbsp;this&amp;nbsp;CacheAccess&amp;nbsp;instance.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*/&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;access.close();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;object;&lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Concurrent access sensible applications may need read and write synchronism. Because JOC only offers write lock, I had to "force" read lock. This is the solution I found:&lt;br /&gt;&lt;br /&gt;&lt;code style="FONT-SIZE: 8pt"&gt;/**&lt;br /&gt;&amp;nbsp;*&amp;nbsp;This&amp;nbsp;method&amp;nbsp;reads&amp;nbsp;and&amp;nbsp;updates&amp;nbsp;a&amp;nbsp;cached&amp;nbsp;object&amp;nbsp;forcing&amp;nbsp;synchronizing&amp;nbsp;both&amp;nbsp;to&lt;br /&gt;&amp;nbsp;*&amp;nbsp;reading&amp;nbsp;and&amp;nbsp;writing.&lt;br /&gt;&amp;nbsp;*&amp;nbsp;If&amp;nbsp;it&amp;nbsp;is&amp;nbsp;being&amp;nbsp;executed&amp;nbsp;in&amp;nbsp;multiple&amp;nbsp;threads,&amp;nbsp;each&amp;nbsp;thread&amp;nbsp;will&amp;nbsp;only&amp;nbsp;be&amp;nbsp;able&amp;nbsp;to&lt;br /&gt;&amp;nbsp;*&amp;nbsp;read&amp;nbsp;the&amp;nbsp;object&amp;nbsp;when&amp;nbsp;another&amp;nbsp;thread&amp;nbsp;release&amp;nbsp;it's&amp;nbsp;writing&amp;nbsp;lock.&amp;nbsp;The&amp;nbsp;writing&amp;nbsp;lock&amp;nbsp;will&lt;br /&gt;&amp;nbsp;*&amp;nbsp;be&amp;nbsp;released&amp;nbsp;after&amp;nbsp;a&amp;nbsp;thread&amp;nbsp;finishes&amp;nbsp;it's&amp;nbsp;reading&amp;nbsp;and&amp;nbsp;writing.&lt;br /&gt;&amp;nbsp;*/&lt;br /&gt;public&amp;nbsp;void&amp;nbsp;synchronizedReadUpdateCachedObject()&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;CacheAccess&amp;nbsp;access&amp;nbsp;=&amp;nbsp;null;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;try&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;access&amp;nbsp;=&amp;nbsp;CacheAccess.getAccess(&amp;quot;RemoteRegion&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;access.getOwnership(&amp;quot;CachedObject&amp;quot;,&amp;nbsp;5000);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Object&amp;nbsp;object&amp;nbsp;=&amp;nbsp;access.get(&amp;quot;CachedObject&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.out.println(object.toString());&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Object&amp;nbsp;newCachedObject&amp;nbsp;=&amp;nbsp;&amp;quot;New&amp;nbsp;Cached&amp;nbsp;Object&amp;quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;This&amp;nbsp;is&amp;nbsp;the&amp;nbsp;method&amp;nbsp;used&amp;nbsp;to&amp;nbsp;update&amp;nbsp;cached&amp;nbsp;objects.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;access.replace(&amp;quot;CachedObject&amp;quot;,&amp;nbsp;newCachedObject);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;access.releaseOwnership(&amp;quot;CachedObject&amp;quot;,&amp;nbsp;5000);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;catch&amp;nbsp;(Exception&amp;nbsp;ex)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ex.printStackTrace();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;finally&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(access&amp;nbsp;!=&amp;nbsp;null)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;access.close();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Declarative Cache:&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;The JOC offers a way to configure its regions, subregions, groups and objects using XMLs. To use this feature the "preload-file" tag must be added to the javacache.xml. This tag will point to the XML with the environment definitions. More information at: &lt;a href="http://http//download.oracle.com/docs/cd/B32110_01/web.1013/b28958/joc.htm#i1085809"&gt;http://http//download.oracle.com/docs/cd/B32110_01/web.1013/b28958/joc.htm#i1085809&lt;/a&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;CacheWatchUtil:&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;By default, the Cache Service provides the CacheWatchUtil cache monitoring utility that can display current caches in the system, display a list of cached objects, display caches' attributes, reset cache logger severity, dump cache contents to the log, and so on. It depends on the "dms"library. To execute:&lt;br /&gt;&lt;br /&gt;&lt;code style="FONT-SIZE: 8pt"&gt;java -classpath $ORACLE_HOME\lib\dms.jar;$ORACLE_HOME\javacache\lib\cache.jar oracle.ias.cache.CacheWatchUtil -config=&amp;lt;path_to_javacache.xml&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;span style="FONT-WEIGHT: bold"&gt;More Oracle Application Server 10g caches (entirely took from OC4J documentation):&lt;/span&gt; &lt;ul&gt;&lt;li&gt;Oracle Application Server Web Cache. The Web Cache sits in front of the application servers (Web servers), caching their content and providing that content to Web browsers that request it. When browsers access the Web site, they send HTTP requests to the Web Cache. The Web Cache, in turn, acts as a virtual server to the application servers. If the requested content has changed, the Web Cache retrieves the new content from the application servers.&lt;br /&gt;&lt;br /&gt;The Web Cache is an HTTP-level cache, maintained outside the application, providing fast cache operations. It is a pure, content-based cache, capable of caching static data (such as HTML, GIF, or JPEG files) or dynamic data (such as servlet or JSP results). Given that it exists as a flat content-based cache outside the application, it cannot cache objects (such as Java objects or XML DOM—Document Object Model—objects) in a structured format. In addition, it offers relatively limited postprocessing abilities on cached data.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Web Object Cache. The Web Object Cache is a Web-application-level caching facility. It is an application-level cache, embedded and maintained within a Java Web application. The Web Object Cache is a hybrid cache, both Web-based and object-based. Using the Web Object Cache, applications can cache programmatically, using application programming interface (API) calls (for servlets) or custom tag libraries (for JSPs). The Web Object Cache is generally used as a complement to the Web cache. By default, the Web Object Cache uses the Java Object Cache as its repository.&lt;br /&gt;&lt;br /&gt;A custom tag library or API enables you to define page fragment boundaries and to capture, store, reuse, process, and manage the intermediate and partial execution results of JSP pages and servlets as cached objects. Each block can produce its own resulting cache object. The cached objects can be HTML or XML text fragments, XML DOM objects, or Java serializable objects. These objects can be cached conveniently in association with HTTP semantics. Alternatively, they can be reused outside HTTP, such as in outputting cached XML objects through Simple Mail Transfer Protocol (SMTP), Java Message Service (JMS), Advanced Queueing (AQ), or Simple Object Access Protocol (SOAP).&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;span style="FONT-WEIGHT: bold"&gt;References:&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;a href="http://download.oracle.com/docs/cd/B32110_01/web.1013/b28958/joc.htm#CHDHAAHJ"&gt;Oracle Application Server Containers for J2EE Services Guide 10g Release 3 (10.1.3)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/products/ias/joc/10.1.2/tutorial/index.html"&gt;Oracle Application Server 10g (10.1.2) JOC Tutorial&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/products/ias/joc/10.1.2/javadoc/allclasses-noframe.html"&gt;Oracle Application Server 10g (10.1.2) JOC javadoc&lt;/a&gt;&lt;/blockquote&gt;</content><link href="http://java2go.blogspot.com/feeds/8233575562207977875/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/8233575562207977875" rel="replies" title="2 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/8233575562207977875" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/8233575562207977875" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2008/04/oracleas-java-object-cache.html" rel="alternate" title="OracleAS Java Object  Cache" type="text/html"/><author><name>Fábio Saraiva de Souza</name><uri>http://www.blogger.com/profile/16902881356214004208</uri><email>noreply@blogger.com</email><gd:image height="32" rel="http://schemas.google.com/g/2005#thumbnail" src="//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-nnda2emlkg_FekZT6tmRBMEVgWYkNfGXOKE0aSR9YUqZcNSQdZM5SJd5cpaUfgjW8QNUrXAuBYUQX7hPPpo1lnb5_P0d92ByuxIy6UKv0xcCcuYj2aUw4AgUoNZevg/s220/2.JPG" width="19"/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-4540631752073430833</id><published>2008-04-23T07:04:00.005-07:00</published><updated>2009-04-02T11:39:19.747-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ias"/><category scheme="http://www.blogger.com/atom/ns#" term="oracleas"/><category scheme="http://www.blogger.com/atom/ns#" term="tools"/><title type="text">Diagnostics beyond OracleAS Control Console</title><content type="html">&lt;p align="right"&gt;&lt;em&gt;by Eduardo Rodrigues&lt;/em&gt;&lt;/p&gt;&lt;br /&gt;One of the many companies recently acquired by Oracle is a small one called "&lt;span style="font-weight:bold;"&gt;Auptyma&lt;/span&gt;", whose founder and former CEO, Mr. Virag Saksena, was previously Director of the CRM Performance Group at Oracle. It's main contribution for Oracle's fast growing product line was its "Java Application Monitor" which is now part of the "Oracle Fusion Middleware Management Packs" (that's where &lt;a target="oracle" href="http://www.auptyma.com"&gt;http://www.auptyma.com&lt;/a&gt; now takes us to) and was renamed to "Oracle Application Diagnostics for Java" or simply Oracle &lt;span style="font-weight:bold;"&gt;AD4J&lt;/span&gt; (although it's also referred as JADE as in Java Application Diagnostics Expert). Holy alphabet soup!&lt;br /&gt;&lt;br /&gt;The "new" component integrates the &lt;a target="oracle" href="http://www.oracle.com/technology/products/oem/index.html"&gt;Oracle Enterprise Manager 10g Grid Control&lt;/a&gt; suite but it also lives as a separate product, which is great, specially for us developers. It can be downloaded from &lt;a target="oracle" href="http://www.oracle.com/technology/software/products/oem/htdocs/jade.html"&gt;http://www.oracle.com/technology/software/products/oem/htdocs/jade.html&lt;/a&gt;. The installer is very small and also very easy and intuitive.&lt;br /&gt;&lt;br /&gt;AD4J may seem awkward at first, when you notice the fact that it also installs and uses the old Apache JServ and a PostgreSQL database. But it's worth it!&lt;br /&gt;&lt;br /&gt;I've tried AD4J with my OC4J 10.1.3.3 standalone and I can say it works pretty well and is certainly a much more interesting and useful diagnostics tool than OracleAS 10g Control Console with JVM metrics enabled. My only extra work was to reinstall JDK 1.5.0_14 and reconfigure OC4J to use it (I was already update 15) because it's the most recent JDK 1.5.0 update currently supported by AD4J.&lt;br /&gt;&lt;br /&gt;Its main features includes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Production diagnostics with &lt;u&gt;no application instrumentation&lt;/u&gt;, saving time in reproducing problems.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Visibility into Java activity including in-flight transactions, allowing administrators to proactively identify issues rather than diagnosing after-the-fact (application hangs, crashes, memory leaks, locks).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Tracing of transactions from Java to Database and vice-versa, enabling faster resolution of problems that span different tiers.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Differential heap analysis in production applications.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Possibility to setup alerts based on configured thresholds and forward them using SNMP (which means potential integration with other enterprise monitoring products like OpenView, for instance)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;As you can see, it's a pretty interesting, yet small and simple, diagnostic and monitoring tool for Java applications. You can also check these resources for further info:&lt;ul&gt;&lt;li&gt;&lt;a target="oracle" href="http://www.oracle.com/technology/products/oem/mgmt_solutions/apm.html"&gt;Oracle Enterprise Manager 10g Grid Control - Application Performance Management Focus&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a target="oracle" href="http://www.ukoug.org/assets/uploads/otherpages/MarkMcGillJava15.25.pdf"&gt;an Oracle AD4J presentation&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Cheers and... keep reading!</content><link href="http://java2go.blogspot.com/feeds/4540631752073430833/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/4540631752073430833" rel="replies" title="0 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/4540631752073430833" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/4540631752073430833" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2008/04/diagnostics-beyond-oracleas-control.html" rel="alternate" title="Diagnostics beyond OracleAS Control Console" type="text/html"/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05439924633149516920</uri><email>noreply@blogger.com</email><gd:image height="16" rel="http://schemas.google.com/g/2005#thumbnail" src="https://img1.blogblog.com/img/b16-rounded.gif" width="16"/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-7879516099453967611</id><published>2008-04-20T10:14:00.031-07:00</published><updated>2009-04-02T11:37:56.618-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="benchmark"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><category scheme="http://www.blogger.com/atom/ns#" term="xml"/><title type="text">A comprehensive XML processing benchmark</title><content type="html">&lt;p align="right"&gt;&lt;span style="font-style:italic;"&gt;by Eduardo Rodrigues&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;style&gt;h4 { margin-bottom: 0; font-style: italic; font-size: 110%; text-decoration: none; }&lt;/style&gt;&lt;h4&gt;Introduction&lt;/h4&gt;&lt;br /&gt;I think I've already mentioned it here but, anyway, I'm currently leading a very interesting and challenging project for a big telecom company here in Brazil. This project is basically a complete reconstruction of the current data loading system used to process, validate and load all cellphone statements, which are stored as XML files, into an Oracle CMSDK 9.0.4.2.2 repository. For those who aren't familiar, Oracle CMSDK is an old content management product, which has succeeded the older Oracle iFS (Internet File System). Because it's not an open repository, we are obligated to use its Java API if we want to programmatically load or retrieve data into or from the repository. That, obviously, prevents us from taking advantage of some of the newest tools available like &lt;a target="otn" href="http://www.oracle.com/technology/tech/xml/xmldb/index.html"&gt;Oracle's XML DB&lt;/a&gt; or even the recent &lt;a target="otn" href="http://www.oracle.com/technologies/integration/odi-suite.html"&gt;Oracle Data Integrator&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Motivation&lt;/h4&gt;&lt;br /&gt;One of our biggest concerns in this project is with the performance the new system must deliver. The SLA is really aggressive. So, we decided to make some research to find out the newest XML processing technologies available, try and compare them in order to make sure which ones would really help us in the most efficient way. The only constraints are: we must not consider any non-industry-standard solution nor any non-production (or non-stable) releases.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Test Sceneries&lt;/h4&gt;&lt;br /&gt;That said, based on research and also on previous experience, these were the technologies I've chosen to test and compare:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;JAXP SAX 2 compliant parsers:&lt;br /&gt;&lt;a target="otn" href="http://www.oracle.com/technology/tech/xml/xdkhome.html"&gt;Oracle XDK parsers shipped with JDeveloper 10.1.3.3&lt;/a&gt;&lt;br /&gt;&lt;a target="apache" href="http://xerces.apache.org/xerces2-j/"&gt;Apache Xerces 2.9.1&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;StAX 1 compliant pull parsers (Streaming API for XML):&lt;br /&gt;&lt;a target="sun" href="http://stax-utils.dev.java.net/source/browse/*checkout*/stax-utils/lib/jars/jsr173_1.0_api.jar" &gt;StAX 1.0 (JSR-173) API&lt;/a&gt;&lt;br /&gt;&lt;a target="codehaus" href="http://woodstox.codehaus.org/"&gt;Codehaus Woodstox 3.2.4&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;XML binding:&lt;br /&gt;&lt;a target="sun" href="https://jaxb.dev.java.net/"&gt;Sun's JAXB 2.1.6 Reference Implementation&lt;/a&gt;&lt;br /&gt;&lt;a target="apache" href="http://commons.apache.org/digester/"&gt;Apache Commons Digester 1.8&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;I've initially discarded DOM parsers based on the large average size of the XML files we'll be dealing with. We most certainly can't afford the excessive memory consumption involved. I've also discarded &lt;a target="otn" href="http://www.oracle.com/technology/tech/xml/xdk/staxpreview.html"&gt;Oracle StAX Pull Parser&lt;/a&gt;, because it was still a preview release, and J2SE 5.0 built-in XML parsers, since I know they're a proprietary implementation of Apache Xerces based on a version certainly older than 2.9.1.&lt;br /&gt;&lt;br /&gt;The test scenery designed was very simple and was intended only to measure and compare performance and memory consumption. The test job would be just to parse a real-world XML file containing 1 phone statement, retrieving and counting a predefined set of elements and attributes. In summary, rules were (for privacy's sake, real XML structure won't be revealed):&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Parse all occurrences of "/root/child1/StatementPage" element&lt;/li&gt;&lt;li&gt;For each &amp;lt;StatementPage&amp;gt; do:&lt;/li&gt;&lt;ol&gt;&lt;li&gt;Store and print out value of attribute "/root/child1/StatementPage/PageInfo/@pageNumber"&lt;/li&gt;&lt;li&gt;Store and print out value of attribute "/root/child1/StatementPage/PageInfo/@customerCode"&lt;/li&gt;&lt;li&gt;Store any occurrence of element &amp;lt;ValueRecord&amp;gt;, along with all its attributes, within page's subtree&lt;/li&gt;&lt;li&gt;Print out the number of &amp;lt;ValueRecord&amp;gt; elements stored&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;Print out the total number of &amp;lt;StatementPage&amp;gt; elements parsed&lt;/li&gt;&lt;li&gt;Print out the total number of &amp;lt;ValueRecord&amp;gt; elements parsed&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;Also, every test should be performed for 2 different XML files: a small file (6.5MB), containing a total of 420 statement pages and 19,133 value records and a large one (143MB) with 7,104 pages and 464,357 value records.&lt;br /&gt;&lt;br /&gt;Based on the rules above, I then tested and compared the following technology sets:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Apache Digester using Apache Xerces2 SAX2 parser&lt;/li&gt;&lt;li&gt;Apache Digester using Oracle SAX2 parser&lt;/li&gt;&lt;li&gt;Sun JAXB2 using Xerces2 SAX2 parser&lt;/li&gt;&lt;li&gt;Sun JAXB2 using Oracle SAX2 parser&lt;/li&gt;&lt;li&gt;Sun JAXB2 using Woodstox StAX1 parser&lt;/li&gt;&lt;li&gt;Pure Xerces2 SAX2 parser&lt;/li&gt;&lt;li&gt;Pure Oracle SAX2 parser&lt;/li&gt;&lt;li&gt;Pure Woodstox StAX1 parser&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;Based on this tutorial fragment from Sun: &lt;a target="sun" href="http://java.sun.com/webservices/docs/1.6/tutorial/doc/SJSXP3.html"&gt;http://java.sun.com/webservices/docs/1.6/tutorial/doc/SJSXP3.html&lt;/a&gt; and considering that performance is our primary goal, I've chosen StAX's cursor API (XMLStreamReader) over iterator. Still aiming for performance, all tested parsers have been configured as &lt;span style="font-weight:bold;"&gt;non-validating&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;In time; all tests were executed on a Dell Latitude D620 notebook, with an Intel Centrino DUO T2400 CPU @ 1.83GHz running on Windows XP Professional SP2 and Sun's Java VM 1.5.0_15 in &lt;u&gt;client&lt;/u&gt; mode.&lt;br /&gt;&lt;h4&gt;Results&lt;/h4&gt;&lt;br /&gt;These were the performance results obtained after parsing the small XML file (for obvious reasons, I decided to measure heap usage only when the large file was parsed):&lt;br /&gt;&lt;br /&gt;&lt;a target="chart" title="Performance results for small XML file" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkFtKf5u47jjZGYPQ8b9mYtHXwA35vZ0SRx8anB8P2BkoFbHplR7AT8JO5iDETtG_3dPxhWSRkZEroLIJK_vIAz72JThcDbhynG2Q_dTvaBKGpr6_JiUAo9JL2bWScZUKcnc7_bmK5y3Q/s1600-h/image001.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center; cursor:pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkFtKf5u47jjZGYPQ8b9mYtHXwA35vZ0SRx8anB8P2BkoFbHplR7AT8JO5iDETtG_3dPxhWSRkZEroLIJK_vIAz72JThcDbhynG2Q_dTvaBKGpr6_JiUAo9JL2bWScZUKcnc7_bmK5y3Q/s400/image001.gif" border="0" alt="Performance results for small XML file" id="BLOGGER_PHOTO_ID_5191905758429239282"/&gt;&lt;/a&gt;&lt;br /&gt;As you can see, Apache Digester's performance was extremely and surprisingly poor despite all my efforts to improve it. So, I had no other choice than to discard it for next tests with the large XML file, from which the results are presented bellow:&lt;br /&gt;&lt;br /&gt;&lt;a target="chart" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlr1_dv4jSzBXzpvmJASoChOsjcIqfCLIh2NXat6_K1WHmSe8AgYi284liHHVTSd-qVaNsBoXYAPaTvEFLBAcyT8pS1alyA2ptmlBGzQcvmCdEB1ckXcEzGuD-cGs6-yo-DN-M_xD2A6c/s1600-h/image002.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlr1_dv4jSzBXzpvmJASoChOsjcIqfCLIh2NXat6_K1WHmSe8AgYi284liHHVTSd-qVaNsBoXYAPaTvEFLBAcyT8pS1alyA2ptmlBGzQcvmCdEB1ckXcEzGuD-cGs6-yo-DN-M_xD2A6c/s400/image002.gif" border="0" alt="Performance results for large XML file" id="BLOGGER_PHOTO_ID_5191906767746553858" /&gt;&lt;/a&gt;&lt;br /&gt;Notice that the tendency toward a better performance when &amp;lt;!DOCTYPE&amp;gt; tag is removed from the XML document has been clearly confirmed here.&lt;br /&gt;&lt;br /&gt;As for memory allocation comparison, I've once again narrowed the tests only to the worst case from performance tests above: large XML file including &amp;lt;!DOCTYPE&amp;gt; tag. The results obtained from JDev's memory profiler were:&lt;br /&gt;&lt;br /&gt;&lt;a target="chart" title="Memory allocation for large XML file" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsobJcRNTIlK7PFuhteCcAj_8p9eIJJn40TXxeeo1sw0KpucX57gokgo3dXmrDPuk7bIHG8Ddw4qr7j9dycEJgXOS5EfKH0mxAb_E_bUHKIlSIrICNl13ZqeMKJWeBataXlvlxJdGOHTQ/s1600-h/image003.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsobJcRNTIlK7PFuhteCcAj_8p9eIJJn40TXxeeo1sw0KpucX57gokgo3dXmrDPuk7bIHG8Ddw4qr7j9dycEJgXOS5EfKH0mxAb_E_bUHKIlSIrICNl13ZqeMKJWeBataXlvlxJdGOHTQ/s400/image003.gif" border="0" alt="Memory allocation for large XML file" id="BLOGGER_PHOTO_ID_5191906772041521170" /&gt;&lt;/a&gt;&lt;br /&gt;Another interesting information we can extract from these tests is how much XML binding represents in terms of overhead when compared to a straight parser:&lt;br /&gt;&lt;br /&gt;&lt;a title="Overhead charts" target="chart" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVxsI3CU_gN0m5v5alNUXAukzDQwDdBTsQXyZmDhMUr7qoHZoYYqghEKFTPKMxPYUGITO9asllenigCS0CBBAVfMslmmLn2gr86YQZ8RminNLX39tDgcsx_0BA-53Db4B-eBVSiQqg_1s/s1600-h/image004.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVxsI3CU_gN0m5v5alNUXAukzDQwDdBTsQXyZmDhMUr7qoHZoYYqghEKFTPKMxPYUGITO9asllenigCS0CBBAVfMslmmLn2gr86YQZ8RminNLX39tDgcsx_0BA-53Db4B-eBVSiQqg_1s/s400/image004.gif" border="0" alt="Overhead charts" id="BLOGGER_PHOTO_ID_5192075229248804994" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h4&gt;Conclusion&lt;/h4&gt;&lt;br /&gt;After a careful and thorough revision and confirmation of all results obtained from the tests described here, I tend to recommend a mixed solution. Considering its near 12MB/s throughput verified here, I'd certainly choose pure Woodstox StAX parser every time I'll have to deal with medium to large XML sources but, for convenience,  I'd also choose JAXB 2 whenever there's a XML schema available to compile its classes from and the size of the source XML is not a concern.&lt;br /&gt;&lt;br /&gt;As for complexity, I really can't say that any one of the tested technologies was found considerably more complex to implement than the others. In fact, I don't think this would be an issue for anybody with an average experience with XML processing.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Important Note&lt;/h4&gt;&lt;br /&gt;Just for curiosity, I've also tested &lt;a target="codehaus" href="http://staxmate.codehaus.org/"&gt;Codehaus StaxMate 1.1&lt;/a&gt; along with Woodstox StAX parser. It's a helper library built on top of StAX in order to create an easier to use abstraction layer for StAX cursor API. I can confirm the implementor's affirmation that StaxMate shouldn't represent any significant overhead for performance. In fact, performance results were identical when compared to pure Woodstox StAX parsing the large XML file. I can also say that it really made my job pretty easier. The only reason I won't consider StaxMate is that it depends on a StAX 1.0 API non-standard extension which is being called &lt;span style="font-weight:bold;"&gt;"&lt;a target="codehaus" href="http://woodstox.codehaus.org/Stax2"&gt;StAX2&lt;/a&gt;"&lt;/span&gt; by guys at Codehaus.&lt;br /&gt;&lt;br /&gt;That's all for now.&lt;br /&gt;&lt;br /&gt;Enjoy and... keep reading!</content><link href="http://java2go.blogspot.com/feeds/7879516099453967611/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/7879516099453967611" rel="replies" title="5 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/7879516099453967611" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/7879516099453967611" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2008/04/comprehensive-xml-processing-benchmark.html" rel="alternate" title="A comprehensive XML processing benchmark" type="text/html"/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05439924633149516920</uri><email>noreply@blogger.com</email><gd:image height="16" rel="http://schemas.google.com/g/2005#thumbnail" src="https://img1.blogblog.com/img/b16-rounded.gif" width="16"/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkFtKf5u47jjZGYPQ8b9mYtHXwA35vZ0SRx8anB8P2BkoFbHplR7AT8JO5iDETtG_3dPxhWSRkZEroLIJK_vIAz72JThcDbhynG2Q_dTvaBKGpr6_JiUAo9JL2bWScZUKcnc7_bmK5y3Q/s72-c/image001.gif" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-6381237264286205744</id><published>2008-04-19T13:53:00.003-07:00</published><updated>2009-04-02T11:37:56.618-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="announcements"/><title type="text">Fixed blog's appearance on IE6</title><content type="html">Great news folks!&lt;br /&gt;&lt;br /&gt;We've just fixed our blog's template so it'll be displayed 100% correctly on Internet Explorer 6 browser. Now, we expect this blog to render identically on both Internet Explorer and Firefox (hopefully on all other browsers too).&lt;br /&gt;&lt;br /&gt;Please, let us know if there's still any visualization issues.&lt;br /&gt;&lt;br /&gt;Cheers and... keep reading!</content><link href="http://java2go.blogspot.com/feeds/6381237264286205744/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/6381237264286205744" rel="replies" title="0 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/6381237264286205744" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/6381237264286205744" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2008/04/fixed-blogs-appearance-on-ie6.html" rel="alternate" title="Fixed blog's appearance on IE6" type="text/html"/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05439924633149516920</uri><email>noreply@blogger.com</email><gd:image height="16" rel="http://schemas.google.com/g/2005#thumbnail" src="https://img1.blogblog.com/img/b16-rounded.gif" width="16"/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6871409708513245659.post-4394539543259918859</id><published>2008-04-16T05:58:00.004-07:00</published><updated>2009-04-02T11:37:56.618-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="curiosities"/><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper"/><title type="text">Is there a cook in JDev's team?</title><content type="html">This week I found something at least very curious when I launched my JDeveloper 10.1.3.3 as I do almost every morning. This was the "Tip of the Day" it showed me:&lt;br /&gt;&lt;br /&gt;&lt;img align="absmiddle" style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1zfjzwx7ebrokJkf3aJqMeHBuxzLHUUNjArqfecZdvU8_iEcmP7wV9y9gBd7VRkLp28tqBlsoFkZurGeLaHtIsIFr4i36qqsEqsxiS6ft60PIIU5q3qe1n0-HJWEd2Cg4iDDYBnpKHvg/s400/jdev+tip.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5189828840173648882"/&gt;&lt;br /&gt;&lt;br /&gt;Well, I don't know what this means but, anyway, here is a full recipe, just in case: &lt;a  target="recipe" href="http://www.foodnetwork.com/food/recipes/recipe/0,1977,FOOD_9936_15602,00.html"&gt;http://www.foodnetwork.com/food/recipes/recipe/0,1977,FOOD_9936_15602,00.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;:)</content><link href="http://java2go.blogspot.com/feeds/4394539543259918859/comments/default" rel="replies" title="Post Comments" type="application/atom+xml"/><link href="http://www.blogger.com/comment/fullpage/post/6871409708513245659/4394539543259918859" rel="replies" title="1 Comments" type="text/html"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/4394539543259918859" rel="edit" type="application/atom+xml"/><link href="http://www.blogger.com/feeds/6871409708513245659/posts/default/4394539543259918859" rel="self" type="application/atom+xml"/><link href="http://java2go.blogspot.com/2008/04/is-there-cook-in-jdevs-team.html" rel="alternate" title="Is there a cook in JDev's team?" type="text/html"/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05439924633149516920</uri><email>noreply@blogger.com</email><gd:image height="16" rel="http://schemas.google.com/g/2005#thumbnail" src="https://img1.blogblog.com/img/b16-rounded.gif" width="16"/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1zfjzwx7ebrokJkf3aJqMeHBuxzLHUUNjArqfecZdvU8_iEcmP7wV9y9gBd7VRkLp28tqBlsoFkZurGeLaHtIsIFr4i36qqsEqsxiS6ft60PIIU5q3qe1n0-HJWEd2Cg4iDDYBnpKHvg/s72-c/jdev+tip.jpg" width="72"/><thr:total>1</thr:total></entry></feed>