Automatic Runtime Query/Join Pruning with Declarative SQL Mode View Objects

(author unknown) | Dec 20, 2008 15:02 -0700

I've published example #141 that illustrates how a view object used in 'Declarative' SQL mode formulates its query at runtime, informed by the set of attributes referenced by the page definition of a given page so that it can avoid querying data that's not related to the job at hand (including dropping out tables that are joined where none of the attributes are referenced).

Implementing OK or Cancel with Task Flow Transaction and Savepoint Support

(author unknown) | Dec 20, 2008 14:59 -0700

I've posted example # 140 that illustrates how you can easily implement complex units of work that assemble multiple, transactional task flows with full support for (OK) or (Cancel) without writing any code.

Jan/Feb 2009 Frameworks Column is Out

(author unknown) | Dec 20, 2008 10:50 -0700

The January/February 2009 Oracle Magazine issue is out, and along with it the latest installment in my Frameworks series:

Enjoy.

Christmas Discount For My IT Toolbox Readers

LewisC's An Expert's Guide to Oracle Technology I just learned how to do discounts on my estore. Since I can do that now, I decided to offer $4.00 off my book (list $14.95). That means you can get it for $10.95. I'll delete this discount sometime af...

Momentum and Progress

(author unknown) | Dec 18, 2008 09:18 -0700

Hey gang,

Just a quick update on two areas where we have seen some solid progress in the development of revenue generating programs and enablement efforts...

First, I want to congratulate the team in Thailand for launching a Remarketer Program on December 3rd. Again, the Remarketer Program is targeted for resellers that sell into the midsize technology space and provides the ability to have new channels deliver Oracle products to market without fees. More about the launch in Thailand can be found here:


remark.gif


Oracle Thailand launches Remarketer Program for new resellers through its Value Added Distributors (ENG version)

I would also invite you to read Jose Fernandez-Stoll's blog as he runs this program for me worldwide. Worldwide, the Remarketer Program has generated more brand new resellers in the first half of our fiscal year (ending Nov-30) than all of the previous fiscal year, while doubling the order volume.

The second thing that I would like to tell you all about is that we delivered our first "virtual night-class" bootcamp this week via Live Web Class. The feedback has been tremendous and I would encourage all of you to look into this method of training to reduce costs and learn more about Oracle products during non-billable hours. More about this particular class can be found on Oracle Mix. Specific comment thread is here.

Best of luck closing out the calendar year.

Good Selling,

Judson

What Should I Learn? 6 Things That Will Make You better!

LewisC's An Expert's Guide to Oracle Technology I want to be a DBA, what should I learn? I want to be an Oracle developer, what should I learn? I want to get into IT, what should I learn? I want to get promoted, what should I learn? I get questions ...

Oracle Forms Look and Feel version 1.3.5

This version comes with the fun buttons feature, allowing the developper to draw non rectangular buttons. Get the new version.

Netezza Performance Server vs Oracle Database Machine (Podcast)

LewisC's An Expert's Guide to Oracle Technology Are you involved in data warehousing at all? I have been for a long time. One of the things that has always interested me is the Data Warehouse Appliance. I once had the chance to see a demo of an earl...

Programmatic Login From Faces with WLS

A while back I was having a lot of errm "fun", with trying to square the worlds of container managed security in OC4J with JSF based login screens. I won't bore you with the details, it was painful and never satisfactory as it either involved verbatim tags or fancy re-directs.
Anyway now that we've switched over to WebLogic for JDeveloper / ADF 11g it was time to look again and thankfully it's simple. Hurrah!
I'm working on a fuller sample for the forthcoming book but for now all you need this little snippet:

import weblogic.security.SimpleCallbackHandler;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import javax.security.auth.Subject;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.login.FailedLoginException;
import javax.security.auth.login.LoginException;

...

public String performLogin() {
  String un = getUsername();
  byte[] pw = getPassword().getBytes();
  FacesContext ctx = FacesContext.getCurrentInstance();
  HttpServletRequest request =
    (HttpServletRequest)ctx.getExternalContext().getRequest();
  CallbackHandler handler = new SimpleCallbackHandler(un, pw);
  try {
    Subject mySubject =
      weblogic.security.services.Authentication.login(handler);
    weblogic.servlet.security.ServletAuthentication.runAs(mySubject, request);
  }
  catch (FailedLoginException fle) {
    FacesMessage msg =
      new FacesMessage(FacesMessage.SEVERITY_ERROR, "Incorrect Username or Password",
          "An incorrect Username or Password was specified");
      ctx.addMessage(null, msg);
    }
  catch (LoginException le) {
    System.out.println("Some other problem on login " + le.toString());
  }
  return null;
}

This lives in a request scope managed bean with the usual username and password attributes bound to your UI fields in JSF.
This works nicely with both Java EE Container and ADF (JAAS based) security.

Handling JSF/ADF page lifecycle using annotations.

(author unknown) | Dec 13, 2008 15:00 -0700

One of the features of JavaServer Faces 1.2 is possibility to handle page lifecycle using annotations. In the previous version of ADF Faces most of programmers used to use Steve's Muench example Triggering OnPageLoad-Style Code in a JSF Backing Bean Using ADF PagePhaseListener or PageController. Using annotations, the same solution is much more simple. This is a managed bean method invoked when the page is loading:



Working with annotations in ADF Rich Client, I noticed some differences between lifecycle of standard JSF page and ADF RC page. In both cases, I created in managed bean methods with annotations @PostConstruct and @PreDestroy.
In ADF page constructor and postConstruct() method were invoked twice:

   Constructor has been invoked
   postConstructMethod() has been invoked
   Constructor has been invoked
   postConstructMethod() has been invoked

preDestroy() method wasn't invoked.

For standard page everythig worked according to JSF 1.2 specification:

   Constructor has been invoked
   postConstructMethod() has been invoked
   preDestroyMethod() has been invoked


Download JDeveloper 11G Workspace. After downloading change extension to ".zip" and unpack.

View the Cloud Computing Webinar

If you are interested in the webinar that I mentioned a few days ago, Cloud Computing with Oracle and Amazon, you can view and/or download the briefing and the slide deck here. LewisC

Pete Finnigan’s presentation slides available from UKOUG conference

Wow; it has been a while since my last blog post. I do seem to start blog posts in the same way recently but it has been a very busy time for me recently. I was down at UKOUG last....[Read More]

Posted by Pete On 12/12/08 At 02:33 PM

Making String Attributes Use the ‘StartsWith’ Operator in QuickQuery

(author unknown) | Dec 12, 2008 01:26 -0700

I've added example #139 illustrating how to make the quick query search form work more like end users would expect it to for String attributes and default to using the 'StartsWith' operator.

Uncertain Times

(author unknown) | Dec 11, 2008 13:26 -0700

This time of the year always gets me thinking about those who walked the lands where I live hundreds of years ago. Thanksgiving is usually the catalyst for these musings and quickly leads into amazement at the natural elements the early settlers had to endure. They were used to the more temperate climates of northern Europe that are strongly influenced by the more moderate temperatures of the Atlantic Gulf Stream. We complain about the early cold snap, yet we can always retreat to the warmth of a well-insulated home, protected from winter’s wind.

When the Pilgrims arrived, there was no shelter, no stockpiled firewood, very little food, and below-average winter temperatures. One has to admire the fortitude of these men, women and children to have survived even one year past their first encounter with the New World on the shores of Cape Cod.

Note that I am not at all unsympathetic or unappreciative of the Native Americans who lived in this area. The Indians were, however pretty well acclimated to the environment and were masters at growing and hunting food. Early accounts tell of the Indians walking about with nothing more than loincloths, even in late fall when the temperatures dip regularly into the thirties and forties Fahrenheit. Tragically, however, the Indians were not immune to the European illnesses introduced to North America by the Pilgrims and explorers who came before them. In the couple years before the Pilgrims arrived, a severe epidemic devastated the Native American population throughout New England. Literally thousands of Indians died –- upwards of 90% of the population in some places. Entire villages were completely wiped out. It is thought that this was the bubonic plague introduced by European fishermen into Maine then rapidly spread southward.

In an earlier blog post, I referenced the book, In the Heart of the Sea: The Tragedy of the Whaleship Essex by Nathaniel Philbrick. This story was reportedly the inspiration for Herman Melville’s “Moby Dick.” I recently learned of another book by this same terrific author, Mayflower, a Story of Courage, Community, and War. This story, as you might guess is the history of the early settlement of New England in the first half of the 1600’s. Philbrick provides the historical context for the Pilgrims leaving England and gradually making their way to Plymouth. Below are excerpts from the opening passage of this wonderfully entertaining and educational book:

For sixty-five days, the Mayflower had blundered her way through storms and headwinds, her bottom a shaggy pelt of seaweed and barnacles, her leaky decks spewing salt water onto her passengers’ devoted heads. There were 102 of them – 104 if you counted the two dogs: a spaniel and a giant slobbering mastiff. … The passengers were in the between, or ‘tween, decks – a dank airless space about seventy-five feet long and not even five feet high that separated the hold from the upper deck. … A series of thin-walled cabins had been built, creating a crowded warren of rooms that overflowed with people and their possessions: chests of clothing, casks of food, chairs, pillows, rugs, and omni-present chamber pots.

Simply put, the Pilgrims were motivated by religious principals. They aspired to a purer, more literal interpretation of the New Testament and these beliefs were at odds with King James and the Church of England. Given that the Pilgrims held themselves separate from the Church of England, they were referred to as ‘Separatists.’ King James made it a priority to harass the Pilgrims out of existence.

An interesting fact is that of the passenger composition of the first passage of the Mayflower to the New World. Contrary to popular assumption that the ship’s passengers were exclusively pilgrim Separatists, in fact they were only fifty percent of the list. The other half being ‘Strangers,’ added to the passenger list in order to protect the interests of the investors who backed the voyage. However, since the Pilgrims could be counted on to vote as a single block, there could be no doubt that the governing of the early colony would be firmly in the hands of the Pilgrims.

You see, the Separatists were eager to found a colony where they could practice their religious beliefs without fear of persecution. But, they had no means to pay for the passage to the New World. They also needed provisions to feed them until locally grown crops could sustain them, and the hard stuffs (building tools and armaments) necessary to establish the colony. So, they signed an agreement with a group of English investors called the ‘Adventurers’ who provided the funds in return for the wealth of goods that the New World would produce.

In the end, it was a bad deal for both parties, the Separatists were compelled to agree to providing the Adventurers with one hundred percent of their output versus a more equitable 60/40% split as was first negotiated. As for the Adventurers, the group was dissolved some years later without having recovered its investment. Unexpected hardships, poor crops in the early years, lack of hunting skills to provide pelts, and shipments home stolen by England’s enemies all contributed to an extremely prolonged repayment of the original debt.

A fascinating subplot of the Pilgrims’ own story is the relationship that they built with Massasoit, Sachem (Chief) of the Pokanokets. This tribe was one of several powerful –- and sometimes warring -– Native American Nations in early New England. Because many of the others, like the Narragansetts, Nipmucks, Mohegans, Wampanoags, and Nausets had been decimated by the plague mentioned above, there was a significant power vacuum in the region. One could speculate that Massasoit saw a perfect opportunity to befriend the new arrivals -– foreign though they were -– in order to have an ally armed with guns to keep rival Indian tribes in check.

Very early on, in the Spring following their November arrival the Pilgrims and the Pokanoket Tribe, lead by Massasoit negotiated a treaty, paraphrased below, which is remarkable in its comprehensiveness yet brevity.


1. The Pokanokets would not harm the Pilgrims.
2. If a Pokanoket did injure a Pilgrim, the offender would be handed over for punishment.
3. Neither the Pilgrims nor Pokanokets would harm or steal from the other.
4. If anyone warred against the Pokanokets or Pilgrims, they would come to each other’s assistance.
5. Massasoit was to spread the word to the other tribes to assure them of the Pilgrims’ peaceful intentions.
6. Both the Pokanokets and Pilgrims should be unarmed in each other’s presence.

Would that our current global treaties were as straightforward!

As an interesting aside, the Pilgrims broke the agreement on at least two occasions, yet the Pokanokets showed remarkable tolerance, patience and a seemingly bottomless ability to tolerate the behavior of these new comers.

Relations between the neighboring tribes and the Pilgrims flourished after this treaty was agreed upon –- at least for a time. In fact, relations became quite easy-going, with local Indians visiting the Pilgrims on a regular basis. Of course, the Pilgrims were obliged to be hospitable and entertain these guests whenever they dropped by. Given that the Pilgrims were struggling to feed themselves, the situation was quickly getting out of hand and would cause significant hardships in the coming winter when every morsel of food would be essential for survival.

To solve the problem, the Pilgrims devised a way of verifying that Massasoit sanctioned the visitors. They presented Massasoit with a copper necklace and told him that, if anyone came bearing this necklace, they would be welcomed and entertained by the Pilgrims as an ally of Massasoit himself. But if a visitor came without the necklace, they would be turned away.

As I read Philbrick’s account of these early years, I was struck by the simplicity and sophistication of the interactions among the significant parties. All the while that the Pilgrims were struggling to stay alive in this barren land with nothing more than their own muscles to provide the labor (oxen and horses had not yet been brought from England), they were grappling with carefully negotiated trading and treaty agreements. One can’t help but admire their resilience and determination.

In the same way that the Pilgrims didn’t know what the next day would bring to their situation, so are we today no more able to discern what tomorrow will bring in the world economy. Each day we seem to hang on any bit of news to see the effect that it will have on world economies as well as on our personal lives. How will this affect our own ability to survive in the coming years?

Over the past weeks, we have already heard the calls for increased regulation in order to ensure that the current economic situation doesn’t happen again. We are collectively outraged by the apparent lack of awareness of senior executives at failed companies as to the financial instability of the firms that they managed. We can expect the U.S. Congress to enact legislation that will require much more stringent oversight and accountability within public as well as private companies. My personal prediction is that the coming regulations will make the compliance requirements of Sarbanes Oxley pale by comparison.

Central to these looming requirements is the ability to answer: “WHO had access to WHAT information and WHEN did they access it?” The full compliment of identity management functionality is required to answer this. Companies need to deploy Identity and Access Management solutions to govern the access to applications and business data. Companies also need to deploy Compliance solutions to be able to report on the activities of the persons with these access privileges in order to unequivocally determine who had knowledge and when did they have it.

Think of the first set of functionality as “Identity 1.0” technologies. These are the foundational products that must be in place in order to control the basic access, directory, and provisioning needs. Compliance and reporting provide the “Identity 2.0” functions for the more sophisticated regulatory reporting that will be required. Unless companies have already established their Identity 1.0 strategy and deployed the requisite solutions, they will be severely challenged to implement Identity 2.0 solutions required to answer the “Who, What, and When” questions that compliance auditors will be asking in the not-too-distant future.

We are all Pilgrims in these new economic circumstances and landscape. How we prepare for the journey will determine whether we are able to weather the uncertain times that lie ahead.


Sweet Italy

My partner has been recently hired in Parma (Italy). So that I spent the last week-end with her, in her new apartment downtown. It is not the first time I spend time in Italy, and I continue to be attracted by this nice country. In Parma, People are kind, [...]

Auto-Enabling Commit / Rollback Buttons in a 10.1.3 Editable Table

(author unknown) | Dec 10, 2008 13:55 -0700

I've posted example #138 that shows how to make and end-user's value change in an editable table in a 10.1.3 ADF Faces page cause the Commit / Rollback buttons to enable.

Free TUSC Webinar: Cloud Computing with Oracle and Amazon AWS

LewisC's An Expert's Guide to Oracle Technology Did you know that your favorite online book and electronic retailer (Amazon.com) is also one of the biggest players in the cloud infrastructure market? Did you know that Oracle has released virtual ima...

Implementing Custom View Row Hint Behavior

(author unknown) | Dec 9, 2008 06:30 -0700

I've posted example# 137 that illustrates how to customize the view row hints mechanism in order to override the default handling of a default attribute hint like "label" or to add custom view row attribute specific hints (like a mindate and maxdate hint, in the example) which return dates three days before and three days after the value of the Hiredate in the current row.

Investing During Tough Times

(author unknown) | Dec 8, 2008 10:33 -0700

Hey Everybody,

I am sorry that it has been some time since my last posting, but I have been busy traveling and working together with you in the field. Over the past couple of weeks, I have had the pleasure of meeting with partners in Japan, India, and just recently spoke to a group of partners in my home country at a New York City partner forum. The interesting tie that seemingly binds partners from around the world is the desire to make the right investments during these troubled times. To quote Benjamin Franklin, "An investment in knowledge always pays the best interest." This fits well with another common interest across the partners with whom I met -- enablement. Simply put, there is no better time to invest in sharpening your skills, and Oracle's Enablement 2.0 strategy is designed to deliver low-to-no cost training across the breadth of our portfolio. We have already launched over a dozen bootcamps and trained over 200 partners with this new strategy. The feedback from around the world is that the bootcamps are just what partners need to improve their bench strength in real time. I would urge you all to take advantage of this and visit the OPN Competency Center to get started at http://CompetencyCenter.oracle.com.

Lastly, I would like to sincerely thank the folks at Everything Channel for selecting me as one of the "Top 25 Executives of 2008". While it was certainly a personal honor for me and for the Oracle partner community, I am most thankful to all of you for making this a reality. We have a great challenge in front of us and there is tremendous opportunity to jointly deliver great solutions to customers in a prosperous fashion.

Good Selling,

Judson

PL/SQL String Helper Package

LewisC's An Expert's Guide to Oracle Technology I needed to update some files and that meant updating some utility functions that I haven't looked at in a long time. I decided to share a few of them today. One of the most important aspects of PL/SQL...