Log on:
Powered by Elgg

Matthew Weaver :: Feeds

January 13, 2010

From Inday: Happy New Year from the Philippines!

We had a nice Undas party, even if I couldn't be in province to visit my grandmother in the semetario.

read more


From Inday: Happy New Year from the Philippines!

We had a nice Undas party, even if I couldn't be in province to visit my grandmother in the semetario.

read more


Only Two in Five Americans Read a Newspaper

Newspapers around the country are struggling. 2009 saw a few newspapers change their business model to an online focus or shut down completely. 2010 will most likely see the same struggle and, perhaps, new business models emerge for these media entities. One thing is clear, the era of Americans reading a daily newspaper each and every day is coming to an end. Just two in five U.S. adults (43%) say they read a daily newspaper, either online or in print almost every day. Just over seven in ten Americans (72%) say they read one at least once a week while 81% read a daily newspaper at least once a month. One in ten adults (10%) say they never read a daily newspaper.

read more


ADF Fail Whale: Handling the Database Is Down Gracefully

(JDev 11g 11.1.1.2.0)

Like most Oracle applications, when an ADF application loses its connection to the database, the games up. There's really not much you can do. ADF does detect this situation, presenting the following popup to the user:


But to most users a JDBC error would mean nothing, particularly if your application is delivered to the general public on the internet. In turn the user is left in the application without the ability to do much, resulting actions showing the same popup JDBC error again.

Ideally what we'd like to do is redirect to a web page that gives more useful information, maybe something like the famous Twitter Fail Whale:


The following blog post shows you a solution to do just this. This solution is based on Steve Muench's Dynamic JDBC Credentials example #129. In addition I must give my thanks to Oracle Support for pointing me to Steve's solution.

As usual, please note this solution has yet to be proven in a production environment. Seriously, I've run some arbitrary tests to see if the technique works, but no idea if it'll cover all situations where the database goes down. It's important if you take this example that you test it to ensure it meets your own needs. I'd appreciate it if anybody who does find any issues and resulting solutions, if you could please post them on this post as a comment to assist other readers.

With the following solution I'm not going to bother to explain all the moving parts, just give you the code and where it goes. I'll leave the reader to follow up with their own research on the mechanics of this solution.

All the following work is undertaken in the ViewController project:

1) New class: JdbcDCErrorHandlerImpl.java

package view;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

import java.sql.SQLException;

import oracle.adf.model.binding.DCBindingContainer;
import oracle.adf.model.binding.DCErrorHandlerImpl;

import oracle.jbo.DMLException;
import oracle.jbo.common.JBOClass;

/*
* Example sourced from Steve Muench example #129
*/
public class JdbcDCErrorHandlerImpl extends DCErrorHandlerImpl {
public JdbcDCErrorHandlerImpl() {
super(true);
}

public JdbcDCErrorHandlerImpl(boolean b) {
super(b);
}

private static final int INVALID_USERNAME_PASSWORD_ORACLE_ERROR = 1017;
private static final int ACCOUNT_LOCKED_ORACLE_ERROR = 28000;
private static final int NO_SUITABLE_DRIVER = 0;
private static final int NETWORK_CONNECTION_ERROR = 17002;
private static final int NETWORK_ADAPTOR_ERROR = 20;

public static boolean isFailedDBConnectErrorCode(SQLException s) {
int errorCode = s.getErrorCode();
return (errorCode == INVALID_USERNAME_PASSWORD_ORACLE_ERROR || errorCode == ACCOUNT_LOCKED_ORACLE_ERROR ||
errorCode == NO_SUITABLE_DRIVER || errorCode == NETWORK_CONNECTION_ERROR ||
errorCode == NETWORK_ADAPTOR_ERROR);
}

@Override
public void reportException(DCBindingContainer formBnd, Exception e) {
super.reportException(formBnd, e);
if (e instanceof DMLException) {
Object[] details = ((DMLException)e).getDetails();
if (details != null && details.length > 0) {
if (details[0] instanceof SQLException) {
SQLException s = (SQLException)details[0];
int errorCode = s.getErrorCode();
if (isFailedDBConnectErrorCode(s)) {
markResponseCompleteIfUsingJSF();
throw (DMLException)e;
}
}
}
}
}

/*
* If we are running in a Faces environment, invoke the FacesContext.responseComplete() method after
* the session invalidate. We use Java reflection so that our code can still work in a Non-Faces environment, too.
*/
private void markResponseCompleteIfUsingJSF() {
try {
Class c = JBOClass.forName("javax.faces.context.FacesContext");
Method m = c.getMethod("getCurrentInstance", null);
Object obj = m.invoke(null, null);
if (obj != null) {
m = c.getMethod("responseComplete", null);
m.invoke(obj, null);
}
} catch (InvocationTargetException ex) {
throw new RuntimeException(ex);
} catch (IllegalAccessException ex) {
throw new RuntimeException(ex);
} catch (NoSuchMethodException ex) {
throw new RuntimeException(ex);
} catch (ClassNotFoundException ex) {
// Ignore, we're not running in a faces context.
}
}
}
2) New class: JdbcPagePhaseListener.java
package view;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import oracle.adf.controller.v2.lifecycle.Lifecycle;
import oracle.adf.controller.v2.lifecycle.PagePhaseEvent;
import oracle.adf.controller.v2.lifecycle.PagePhaseListener;
import oracle.adf.model.bc4j.DCJboDataControl;
import oracle.adf.model.binding.DCBindingContainer;
import oracle.adf.model.binding.DCDataControl;
import oracle.adf.model.binding.DCExecutableBinding;
import oracle.adf.model.binding.DCIteratorBinding;

import oracle.binding.DataControl;

import oracle.jbo.uicli.binding.JUControlBinding;
import oracle.jbo.uicli.binding.JUCtrlActionBinding;

/*
* Example sourced from Steve Muench example #129
*/
public class JdbcPagePhaseListener implements PagePhaseListener {
public JdbcPagePhaseListener() {
}

public void afterPhase(PagePhaseEvent event) {
}

private HttpSession getHttpSession(PagePhaseEvent event) {
return ((HttpServletRequest)event.getLifecycleContext().getEnvironment().getRequest()).getSession(true);
}

public void beforePhase(PagePhaseEvent event) {
if (event.getPhaseId() == Lifecycle.PREPARE_MODEL_ID) {
DCBindingContainer bc = (DCBindingContainer)event.getLifecycleContext().getBindingContainer();
// Force the Data Control to be referenced before the prepareModel phase to cause the possible JDBC connection
// failure to be signalled now instead of during the page rendering.
List dcList = getADFBCDataControlsList(bc);
}
}

/*
* Return a list of ADFBC data controls used by this page. See how this is used in the beforePhase method above.
*/
private List getADFBCDataControlsList(DCBindingContainer bc) {
List dcList = null;
// if bc == null, means non data bound page, as such no data controls to exercise
if (bc != null) {
dcList = new ArrayList();
List ctrlBindings = (List)bc.getControlBindings();
if (ctrlBindings != null) {
for (JUControlBinding ctrlBinding : ctrlBindings) {
DCIteratorBinding iter = ctrlBinding.getIteratorBinding();
DCDataControl dc = null;
if (iter != null) {
dc = iter.getDataControl();
} else if (ctrlBinding instanceof JUCtrlActionBinding) {
dc = ((JUCtrlActionBinding)ctrlBinding).getDataControl();
}
if (dc != null && dc instanceof DCJboDataControl && !dcList.contains(dc)) {
DCJboDataControl bcdc = (DCJboDataControl)dc;
dcList.add(bcdc);
}
}
}
List exeBindings = (List)bc.getIterBindingList();
if (exeBindings != null) {
for (DCExecutableBinding exeBinding : exeBindings) {
DataControl dc = null;
if (exeBinding instanceof DCIteratorBinding) {
dc = ((DCIteratorBinding)exeBinding).getDataControl();
}
if (dc != null && dc instanceof DCJboDataControl && !dcList.contains(dc)) {
DCJboDataControl bcdc = (DCJboDataControl)dc;
dcList.add(bcdc);
}
}
}
}
return dcList;
}
}
3) New file: ViewController/adfmsrc/META-INF/adf-settings.xml
 



JdbcPagePhaseListener
view.JdbcPagePhaseListener



4) Modify the DataBinding.cpx file ErrorHandlerClass property
             SeparateXMLFiles="false" Package="view" ClientType="Generic" ErrorHandlerClass="view.JdbcDCErrorHandlerImpl">
5) Add an error-page entry in the web.xml

oracle.jbo.DMLException
/ServiceUnavailable.html
6) Add the corresponding html page from the last entry, displaying whatever friendly error message you want to show.

read more


Ensuring Website Performance

In order to ensure that end user response times are acceptable at all times it is necessary to measure the time in the way the end user perceives performance. Measuring and monitoring your live system is important to identify problems early on before it affects too many end users. In order to make sure that web pages are fast from the start it is very important to constantly and continuously measure web page performance throughout the development phase and in testing. There are two questions that need to be answered * What is the time the user actually perceives as web response time? * How to measure it accurately and in an automated way?

read more


January 11, 2010

Progress Software to Acquire Savvion

Progress Software announced today the acquisition of Savvion, a privately held business enterprise software company based in Santa Clara, California, for approximately $49 million, net of cash acquired. Savvion is a provider of Business Process Management (BPM) technology with 15 years of market experience. The company offers a comprehensive, standards-based BPM suite that helps more than 300 of the world’s top-performing companies – including 24 of the ‘Fortune 100’ – automate and continuously improve critical business processes.

read more


The Importance of Threat Protection for RESTful Web Services

Although certain RESTful web services are of a ‘public’ nature and do not have specific security requirements such as authentication and authorization, any service that has an entry point from an untrusted network is subject to attack and proper threat protection measures are always an essential consideration. RESTful web services are closely aligned to the web [...]

read more


Interest in Cloud Computing Up 3,233% Since 2007

Lately it seems that no matter where I go someone is telling me they've heard about cloud computing, from Newspapers to TV, it seems to be everywhere. I'm not talking about techies or the clouderati. I'm talking about your mother, your sister or brother, I'm talking about regular people you meet at dinner parties -- the everyday Joe.

If you are a frequent reader of my blog, you'll know I enjoy looking at trends. A particularly good analytics tool is found at Google's Insights for Search Tool. The site analyzes a portion of worldwide Google web searches from all Google domains to compute how many searches have been done for the terms you've entered, relative to the total number of searches done on Google over time. The site also allows the underlying characteristics of the data sets to be compared, for example against a broader industry. In our case, I compared Cloud Computing and a few other related terms against the broader "Computers & Electronics" industry to how much interest there was for cloud computing. (See Graph Below or original link)

A Few of the more interesting points.
1. The overall interest in Computers & Electronics is down about 46%
2. Interest in Cloud Computing peaked in November up an astounding 3,233% from 0 in October 2007
3. Interest in SaaS and Virtualization also remains very strong.

read more


Will Apple Be Transforming Mobile Computing?

I have been totally excited since the booking of the Moscone West by Apple for January 27 and believe, like most of the industry followers, that Apple will be announcing their tablet/slate device. Whilst digging around I came across this great video that shows how fantastic such a device could be used in the areas of education and show some innovations that such a device could bring to students in the new decade. Could we now be on the edge of a totally e-classroom, that not only allows the student to carry e-books etc (such as in the video) but allows electronic submission of work & central management of timetables & attendance etc?

read more


Will Apple Be Transforming Mobile Computing?

I have been totally excited since the booking of the Moscone West by Apple for January 27 and believe, like most of the industry followers, that Apple will be announcing their tablet/slate device. Whilst digging around I came across this great video that shows how fantastic such a device could be used in the areas of education and show some innovations that such a device could bring to students in the new decade. Could we now be on the edge of a totally e-classroom, that not only allows the student to carry e-books etc (such as in the video) but allows electronic submission of work & central management of timetables & attendance etc?

read more


January 10, 2010

One Million US Dollars Reward For 4G Innovators

At the press announcement was Datuk Badlisham Ghazali, Chief Executive Officer of Multimedia Development Corporation (MDeC), a Malaysian Government Development Agency, driver of MSC Malaysia’s National ICT initiative. “MSC Malaysia is excited to be witnessing this announcement of mYprize at a global landmark event at CES, as it truly shows the high level of commitment from YTL Communications in establishing a regional Center of Excellence for 4G Mobile Internet Innovation, thus also promoting and stimulating an innovative culture amongst Malaysians,” said Badlisham. He also expressed his enthusiasm that the competition will generate worldwide interest from anyone with a great idea, as this will also be a platform for Malaysia to produce entrepreneurs and to attract innovators globally. MSC Malaysia’s presence at the event exemplified collaboration between the public and private sector (MDeC and YTL) in leapfrogging Malaysia into an innovation-led economy as envisioned by the Prime Minister.

read more


Winners of Last Gadget Standing Showdown

Boxee Box by D-Link, an open-source media player that plays entertainment from the Internet or a computer on a TV, was selected as the winner of the Last Gadget Standing through the live CES audience applause-o-meter. The Boxee Box by D-Link supports a wide array of audio and video formats and is integrated with Twitter, Facebook and other social networking sites. Microvision's SHOWWX, the world's first laser pico projector, was selected as the winner of the Last Gadget Standing online vote. The SHOWWX projects big, bright and colorful photos, movies, and presentations that are always in focus, yet it is small enough to fit in your pocket.

read more


Phoenix Technologies Sued Over Patent Infringement

DeviceVM, a privately held software company offering Splashtop, announced on Saturday that it has filed a claim for patent infringement against Phoenix Technologies Ltd. (Nasdaq:PTEC) in the United States District Court for the Northern District of California. The patent claim is based on DeviceVM’s determination that Phoenix’s HyperSpace product infringes a patent owned by DeviceVM for a “Mechanism for Intuitively Invoking One or More Auxiliary Programs During a Computer Booting Process.” DeviceVM seeks, among other relief, damages for Phoenix’s infringement and an injunction barring Phoenix from making, using, offering to sell, licensing, and/or selling HyperSpace products.

read more


Poker News Site Launched on Ulitzer Offering More Than 5,000 Original Articles

Poker News on Ulitzer "new-media" site launched today in Las Vegas offering more than 5,000 original news stories, blogs and articles. "Poker News on Ulitzer" offers breaking news and up-to-date information on Poker related acivities from around the world. Ulitzer is the first "new-media" platform in the world that revolutionizes how we will create, deliver, and consume content on the Web. Ulitzer authors can get started with their first article in a few minutes and may start a new "topic" on any subject or write a story and post it both to their Ulitzer author page and to any existing Ulitzer topic.

read more


TomTom App for iPhone Awarded at CES

TomTom, the world’s leading provider of navigation solutions and digital maps, announced at CES 2010 that it has been named an International CES Innovations 2010 Design and Engineering Awards Honoree for its TomTom app for iPhone. Products entered in this prestigious program are judged by a preeminent panel of independent industrial designers, engineers and members of the media to honor outstanding design and engineering in cutting edge consumer electronics products across 36 product categories.

read more


January 09, 2010

How to Secure REST and JSON

Here at Layer 7 we get asked a lot about our support for REST. We actually have a lot to offer to secure, monitor and manage REST-style transactions. The truth is, although we really like SOAP and XML here at Layer 7, we also really like REST and alternative data encapsulations like JSON. We use both REST and JSON all the time in our own development. Suppose you have a REST-based service that you would like to publish to the world, but you are concerned about access control, confidentiality, integrity, and the risk from incoming threats. We have an answer for this: SecureSpan Gateway clusters, deployed in the DMZ, give you the ability to implement run time governance across all of your services:

read more


Oracle’s Next Sun Hurdle

The next hurdle that Oracle’s unconditional acquisition of Sun and MySQL faces is clearing the formal meeting of the European Commission’s so-called advisory committee, the 27 national regulators in the European Union, which is reportedly set for Monday afternoon January 11 in Brussels. The European Commission supposedly drafted a blocking decision right after it issued its statement of objections to the acquisition so it's got the paperwork in hand in case its apparent deal with Oracle, memorialized in Oracle's 10 promises concerning MySQL, runs into heavy weather.

read more


iPhone Apps New-Media Topic Launched on Ulitzer

Ulitzer.com, the first revolutionary "new-media" platform in the world, announced today that a new iPhone Apps (http://iphoneapps.ulitzer.com) topic site was launched today to provide the most comprehensive breaking news and blog coverage of iPhone Apps. Ulitzer is the first "new-media" platform in the world that revolutionizes how we will create, deliver, and consume content on the Web. Ulitzer authors can get started with their first article in a few minutes and may start a new "topic" on any subject or write a story and post it both to their Ulitzer author page and to any existing Ulitzer topic. The network effect of people using Ulitzer to communicate and collaboratively produce and categorize content is disruptive, bypassing traditional media and middlemen.

read more


January 08, 2010

Authors Capture Inspiration When It Strikes With FastPencil iPhone App

FastPencil on Friday announced the availability of its free mobile authoring application allowing iPhone and iPod touch users to capture inspiration anywhere. The FastPencil (www.fastpencil.com) mobile app enables authors to read, write and work on books hosted at the free FastPencil publishing platform whenever and wherever they want. Mobile authoring, an emerging confluence of mobile technology and creative content generation, mobilizes authors like never before. FastPencil's mobile app lets on-the-go authors use their iPhone to easily capture and organize inspiration within their FastPencil book projects and edit their books anytime.

read more


icyou iPhone Application Offers Health Videos on the Go

icyou on Friday announced the launch of its iPhone app. Available for free on Apple's iPhone App Store, the application gives users convenient access to important health information when and where they choose. icyou Health Video for iPhone is available as a free download from Apple's App Store on iPhone and iPod touch or at www.itunes.com/appstore/. icyou is the source for health videos online. On the Web site, users can find and watch health videos, upload their own, and participate in the growing community. icyou’s videos make the many facets of healthcare not only understandable but personal.

read more


January 05, 2010

Whatever the Apple Tablet Is, It Apparently Leaks Like a Sieve

There may be little left for Apple to announce about its purported tablet or iSlate come January 27, a date change since January 26 was noised about. The rumor mill is slowly teasing out all its secrets. The great unveiling, according to the Financial Times, is still supposed to be at the Yerba Buena Center for the Arts in San Francisco but now it’s supposedly on the last Wednesday of the month rather than the last Tuesday.

read more


January 04, 2010

‘Save MySQL from Oracle’ Petition Collects 13,600+ Signatures So Far

MySQL creator Monty Widenius’ petition to stop Oracle from getting the MySQL open source database along with Sun Microsystems had collected more than 13,600 signatures on Sunday, the day before Widenius has promised to start circulating the results to “regulators, governmental bodies, parliaments and journalists.” Within the EU, the petition is supposed to be sent to the 27 national antitrust authorities of the bloc’s member countries, who are scheduled to meet in Brussels in mid-January to discuss the Oracle-Sun case.

read more


December 31, 2009

Google Catches Hardware Bug

Larry Ellison’s not the only software maven bitten by the hardware bug badly enough to risk losing focus. Besides that Google-designed HTC-manufactured Android Phone reportedly dubbed the Nexus One that Google itself is getting ready to sell directly through its web site come January, Tech Crunch says to look out for a Google-branded Google-peddled Chrome netbook next year too.

read more


December 30, 2009

NaviSite Named “Gold Sponsor” of Cloud Computing Conference & Expo

SYS-CON Events announced today that NaviSite, a leading provider of cloud-enabled enterprise-hosting and application-management services, has been named “Gold Sponsor” of SYS-CON’s 5th International Cloud Expo (www.CloudComputingExpo.com), which will take place on April 19-21, 2010, at the Jacob Javits Convention Center in New York City.

read more


The Keys to Disaster Recovery and Business Continuity

Once a company has identified the business value of systems and data, they typically assign a risk value to losing those. This typically sets the wheels in motion to get a backup system in place. Backup, the very first step in Disaster Recovery and Business Continuity planning, is the base upon which you will build your strategy. Without the backup, there is nothing to archive nor restore later. Backing up typically entails duplicating data onto a secondary medium which acts as a safeguard against primary storage failure. This can be something as simple as a disk to disk (D2D) replication to a second storage system, or as complex as an NDMP stream across a fabric infrastructure to tape libraries waiting to write the data to magnetic tape media.

read more


<< Back Next >>