It’s apparently all over but the shouting at Oracle and Sun. The European Commission is reportedly supposed to wave Sun’s acquisition through on January 19. In the process it’ll have to explain how it came to change its mind after needlessly costing the company hundreds of millions of dollars and thousands of jobs – well, at least that’s the Oracle-Sun story.
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.
(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;2) New class: JdbcPagePhaseListener.java
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.
}
}
}
package view;3) New file: ViewController/adfmsrc/META-INF/adf-settings.xml
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.
ListdcList = getADFBCDataControlsList(bc);
}
}
/*
* Return a list of ADFBC data controls used by this page. See how this is used in the beforePhase method above.
*/
private ListgetADFBCDataControlsList(DCBindingContainer bc) {
ListdcList = null;
// if bc == null, means non data bound page, as such no data controls to exercise
if (bc != null) {
dcList = new ArrayList();
ListctrlBindings = (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);
}
}
}
ListexeBindings = (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;
}
}
4) Modify the DataBinding.cpx file ErrorHandlerClass property
JdbcPagePhaseListener
view.JdbcPagePhaseListener
5) Add an error-page entry in the web.xmlSeparateXMLFiles="false" Package="view" ClientType="Generic" ErrorHandlerClass="view.JdbcDCErrorHandlerImpl">
6) Add the corresponding html page from the last entry, displaying whatever friendly error message you want to show.
oracle.jbo.DMLException
/ServiceUnavailable.html
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?
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.
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 [...]
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.
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:
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.
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.
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.
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.
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.
SYS-CON Events announced today that Call for Papers for the 2nd International Cloud Expo Europe is now open, which will take place this summer in Prague, Czech Republic. Cloud Expo is the world's leading Cloud-focused event and is held five times a year, in New York City, Silicon Valley, Prague, Tokyo and Hong Kong. Over 200 corporate sponsors and 10,000 industry professionals became part of Cloud Expo since its inception, more than all other Cloud-related events put together worldwide.
Now we have a Eucalyptus’ Private Cloud installed and running on our premise, and it remained kinda of an artifact in our data-center for sometime. So I thought why has not someone written anything about how make to make Elasticfox work with Eucalyptus.
But there were quite a few pointers to what version will be ideally [...]
When we encounter a java.lang.OutOfMemoryError, we often find that Java heap dumps, along with other artifacts, are generated by the Java Virtual Machine. If you feel like jumping right into a Java heap dump when you get a java.lang.OutOfMemoryError, don’t worry, it’s a normal thought. You may be able to discover something serendipitously, but it’s not always the best idea to analyze Java heap dumps, depending on the situation you are facing. We first need to investigate the root cause of the java.lang.OutOfMemoryError.
IBM Rational Software Delivery Services for Cloud Computing include a set of ready-to-use application lifecycle management tools for developing and testing in the IBM Cloud, and use infrastructure management capabilities, to help organizations build software applications in the cloud. With these new services, clients can lower costs and respond quicker to organizational demands. For example, organizations can reduce the time it takes to provision a test environment from weeks to hours, and in some cases even minutes.
Modern inter-networked software architecture created for today’s “on-demand” business needs have fundamentally increased the susceptibility of applications and, more important, data to security-related attacks and compromises. The rapidly changing environment: increased data breach/loss incidents, increased number of regulations and compliance requirements, potential liability/litigation concerns and erosion of reputation and public confidence provides ample drivers for development teams to have a security mindset.
Sun Microsystems has unveiled what is being called the first fully functional cloud-based Desktop as a Service (DaaS) for grammar schools and community colleges. The new product is in line with Sun’s vision to build and deploy public and private clouds that are open and interoperable. In a venture with another tech firm, Ashbourne Technology Group, in Southampton, PA, Sun is offering a secure, cost-effective computing solution delivered anytime, anywhere via the cloud. It’s a virtual desktop, and it works with all leading OSs, including Microsoft Windows, Mac OS X, Linux and Solaris to just about any client device, including Sun Ray thin clients and other platforms with Java-based browsers.
In his blog entry "My New Focus at Canonical" posted on Thursday, December 17, 4:48 PM, Canonical CEO Mark Shuttleworth announced his resignation as CEO: "From March next year, I’ll focus my Canonical energy on product design, partnerships and customers. Those are the areas that I enjoy most and also the areas where I can best shape the impact we have on open source and the technology market."
"We've been fairly quiet," said Rex Wang, VP of Infrastructure and Management at Oracle, this morning as he gave the Morning Keynote at the third and last day of the 4th Cloud Computing International Conference Expo at the Santa Clara Convention Center in Santa Clara, CA. Wang was referring to Oracle's relative silence to date vis-a-vis Cloud Computing. His intention, he said, was to share with the assembled delegates Oracle's thoughts on the space...
In a recent blog post titled "The Limitations of TDD", Jolt Awards colleague Andrew Binstock shared some reservations Cédric Beust has about TDD. When a person of extensive experience like Cédric speaks about testing, you pay attention. And I did.Another important point is that unit tests are a convenience for *you*, the developer, while functional tests are important for your *users*. When I have limited time, I always give priority to writing functional tests. Your duty is to your users, not to your test coverage tools.
You also bring up another interesting point: overtesting can lead to paralysis. I can imagine reaching a point where you don't want to modify your code because you will have too many tests to update (especially in dynamically typed languages, where you can't use tools that will automate this refactoring for you). The lesson here is to do your best so that your tests don't overlap.
As you can see, the overlap exists because tests of the upper layer rely on mocks to simulate all the happy paths and most of the unhappy paths of the underlying layer. The overlap is not total because a layer tend to reduce the granularity of the unhappy paths it faces internally in order to expose the upper layer to a limited amount of bad situations to deal with. Hence the limited amount of mocked features in the overlap area.
Now the application container is also tested, plus we get an insane amount of overlap.
Hudson is an open source "continuous integration" (CI) server initially developed at Sun. This whitepaper describes the capabilities of Hudson, compares Hudson’s key features to those of competitive offerings, and summarizes why Hudson has quickly become the industry’s most widely adopted open source CI server.
Today's IT managers strive to deliver dynamic applications and interactive workflows to growing numbers of users with greater efficiency and at a lower cost. This whitepaper describes how the Sun GlassFish Portfolio can help organizations to create cost-effective services solutions.
Instead o only a static display-and-browse relation between flash video player and its users, Moyea JavaScript API(Application Programming Interface) provides a real-time, dynamic and interactive response to customers’ operation. Shenzhen P.R.C -Dec 15th , 2009 - Moyea Software Co., Ltd. (http://www.moyeamedia.com/): a rising developer of flash applications for the internet and multimedia software, today officially [...]