Posts tagged as:
AOP
Daily del.icio.us for April 28th through May 2nd
- Use XQuery from a Java environment - XML data format can be hard to search, but with the fairly recent introduction of the XQuery API, XML searches are now flexible and easy to perform. For Java programmers who work with XML documents using SAX, DOM, JDOM, JAXP, and more, the XQuery API for
- Pragmatic Caching - a simple Cache Configuration Model for Spring « brain driven development - We’ve come up with a very pragmatic solution with a declarative style for cache configuration and a more programmatic style for handling caching behaviour. As always, the usefulness of such a solution depends on the given problem space and the surroundi
- Will open source save Sun? | The Open Road - The Business and Politics of Open Source by Matt Asay - CNET Blogs - Another question for Sun will revolve around how much open-source software will be required to move the hardware and services needle. MySQL, with more than 70 million downloads, is a good candidate to jump-start movement in hardware and services. Will it
- InfoQ: SpringSource Launches New Application Server without Java EE - The SpringSource Application Platform has been designed from the ground up to instead focus directly on supporting the widely used Spring Portfolio of open source projects. Specifically, the application server builds on the Spring Portfolio programming mo
- SpringSource - SpringSource Application Platform - SpringSource Application Platform is a completely module-based Java application server that is designed to run enterprise Java applications and Spring-powered applications based on Spring, Apache Tomcat and OSGi-based technologies
- Adobe opens up Flash, but leaves out Google and Apple | Ed Burnette’s Dev Connection | ZDNet.com - In a well timed move today Adobe announced the Open Screen Project and lifted restrictions on the use of Flash related specifications. The initiative is supported by several industry leaders including ARM, Intel, LG, Motorola, Nokia, NTT DoCoMo, Qualcomm,
- Twitter Said To Be Abandoning Ruby on Rails - We’re hearing this from multiple sources: After nearly two years of high profile scaling problems, Twitter is planning to abandon Ruby on Rails as their web framework and start from scratch with PHP or Java
- Google's Eric Schmidt - Exclusive Interview - All * Technology * News * Story - CNBC.com - CNBC's Maria Bartiromo sat down with Google CEO, Dr. Eric Schmidt Tuesday at the Milken Conference in Los Angeles to discuss Google's growth and U.S. slowdown, the possibility of a Microsoft acquisition of Yahoo!, online advertising growth rates, Google's
- Ext JS - Ext GWT v1.0 Beta 2 Released - Ext JS is pleased to announce the Ext GWT 1.0 beta2 release. This release includes numerous enhancements and bug fixes since the beta1 release and is a recommended upgrade for those using beta 1.
- Automation for the people: Hands-off load testing - Load testing is often relegated to late-cycle activities, but it doesn't need to be that way. In this installment of Automation for the people , automation expert Paul Duvall describes how you can discover and fix problems throughout the development cycle
Related posts
{ 0 comments }
Daily del.icio.us for April 17th through April 19th
- Canada Likely to Label Plastic Ingredient ‘Toxic’ - New York Times - The Canadian government is said to be ready to declare bisphenol-a, or B.P.A. as a toxic chemical. It is widely used in plastics for baby bottles, beverage and food containers as well as linings in food cans.
- Jodd Library -Proxetta - Proxetta is all about dynamic proxies. Using just Java. In the same way you would code it by yourself. And the only dependency is Jodd & Asm library.
- Census for open-source apps kicks off - CNET News.com - Open-source management company OpenLogic, IDC and Unisys launched the Open Source Census. The project is based around a tool, OSS Discovery, that scans systems for known open-source projects and anonymously submits the data to an OpenLogic database.
- Process Monitor - Process Monitor is an advanced monitoring tool for Windows that shows real-time file system, Registry and process/thread activity. It combines the features of two legacy Sysinternals utilities, Filemon and Regmon
- MySQL adoption: Deep and wide | The Open Road - The Business and Politics of Open Source by Matt Asay - CNET Blogs - I love this anecdote from Jonathan Schwartz's blog. As is demonstrated again and again, enterprises have no idea just how awash in open-source software they are…until they ask.
- Java Community News - Rod Johnson's Predictions for Enterprise Java - In a series of predictions for the future of Java EE, Rod Johnson, founder of the Spring project, shares his opinions on de facto versus de jure standards, the role of the JCP, and on why Java EE 6 will usher in renewed app server competition.
- Amazon Web Services gets serious about enterprise | Software as Services | ZDNet.com - It now seems that Amazon is moving aggressively to make its cloud computing services palatable for enterprise users — not surprising, given that enterprises including The New York Times and Nasdaq are now customers
- Google delivers; Maybe paid clicks weren’t such a big deal | Between the Lines | ZDNet.com - Google on Thursday allayed concerns about its paid click growth rate with first quarter earnings that topped Wall Street’s expectations. Google reported first quarter net income of $1.31 billion, or $4.12 a share, on revenue of $5.19 billion.
- Red Hat News | What’s Going On With Red Hat Desktop Systems? An Update - Red Hat team notes that they will not be working on a consumer version of their Linux product in the foreseeable future, instead focusing on enterprise software.
- Hiring the Rowing-Forward 30% - His anecdotal "70% Rowing Backwards" sounds roughly right to me, and it bothers me a lot. Studies show that programmers derive their primary satisfaction by being productive, so such an environment sounds downright depressing. But managers obviously don't
Related posts
{ 0 comments }
Daily del.icio.us for May 28, 2007 through May 29, 2007
- InfoQ: Presentation: Using Google GWT - At JavaZone, GWT lead Bruce Johnson intro'd GWT including high-performance AJAX, internationalization, and integration with existing web apps. The presentor Bruce Johnson is works at Google as Tech Lead of the Google Web Toolkit (GWT).
- LINA - open source everywhere - With LINA, a single executable written and compiled for Linux can be run with native look and feel on Windows, Mac OS X, and UNIX operating systems.
- JSF Central - Your JavaServer Faces Community - JBoss: The JavaServer Faces Powerhouse? - JBoss has proven itself a force in the J2EE application server market. Now, with Seam and the acquisition of some exciting new products, JBoss is jockeying for control of the JavaServer Faces market.
- Slashdot | 8 Reasons Not To Use MySQL (And 5 To Adopt It) - CIO.com asked two open-source experts to enumerate the reasons to choose MySQL and to pick something else. Tina Gasperson takes the 5 reasons to use MySQL side, and Brent Toderash discusses 8 reasons not to.
- dev2dev: Effective Java Exceptions - Although the Java exception model has generated spirited discussion during its lifetime, it provides excellent value when it is applied correctly. Using the Java exception model properly will keep your application simple, maintainable, and correct.
- Neal Gafter's blog: Removing Language Features? - I believe Java could be simplified by treating all exception types as unchecked without breaking existing code. This could also result in a simplification of future language extensions and APIs. But would the language be better off w/o checked exceptions?
Related posts
Daily del.icio.us for May 26, 2007 through May 28, 2007
- JSF Central - Your JavaServer Faces Community - JBoss: The JavaServer Faces Powerhouse? - JBoss has proven itself a force in the J2EE application server market. Now, with Seam and the acquisition of some exciting new products, JBoss is jockeying for control of the JavaServer Faces market.
- Slashdot | 8 Reasons Not To Use MySQL (And 5 To Adopt It) - CIO.com asked two open-source experts to enumerate the reasons to choose MySQL and to pick something else. Tina Gasperson takes the 5 reasons to use MySQL side, and Brent Toderash discusses 8 reasons not to.
- dev2dev: Effective Java Exceptions - Although the Java exception model has generated spirited discussion during its lifetime, it provides excellent value when it is applied correctly. Using the Java exception model properly will keep your application simple, maintainable, and correct.
- Neal Gafter's blog: Removing Language Features? - I believe Java could be simplified by treating all exception types as unchecked without breaking existing code. This could also result in a simplification of future language extensions and APIs. But would the language be better off w/o checked exceptions?
- Linux Foundation Fires Back at Microsoft - If you earned $34 million a day from Windows and Office, you too would try to spook the market with patent threats
- Really easy field validation * Dexagogo - Here's a form validation script that is very easy to use based on Prototype
- fValidator - An open source (free) unobtrusive javascript tool for easy handling form validation - fValidator is an open source (free) unobtrusive javascript tool for easy handling form validation
Related posts
Daily del.icio.us for Mar 28, 2007 through Mar 29, 2007
- Amazon Web Services Developer Connection : Mounting Amazon S3 as a File System in Amazon EC2 - This tutorial discusses how to mount Amazon Simple Storage Service (Amazon S3) as a file system in an Amazon EC2 instance
- TFO eServices Java Programming - JXPath Tutorial - JXPath is an Apache Commons library to query Java object trees using the well known XPath XML query language. Extremely useful stuff but not yet very well known, hence this tutorial.
- Techworld.com - VMware enters the Linux kernel - The next revision of the Linux kernel is to include a virtualisation feature developed by VMware, called VMI.
- Java object queries using JXPath - Java World - JXPath is such an object-query tool. It is an Apache Commons component that enables you to query complex object trees using the well-known XPath expression language.
- Spring-Loaded - Guice vs. Spring JavaConfig: A comparison of DI styles - With all of the excitement surrounding Guice lately, I thought it might be worthwhile to compare Guice with Spring JavaConfig. Both represent different approaches to annotation-based dependency-injection
Related posts
Daily del.icio.us for Jan 13, 2007
-
This article advocates a way of thinking about the nature of exceptional conditions and describes design patterns that will help your design. Finally, it discusses exception handling as a crosscutting concern in the Aspect Oriented Programming model
Related posts
Declarative Caching Services for Spring
Declarative Caching Services for Spring by Alex Ruiz — Caching is an essential practice that improves the performance of enterprise applications. In this article, Alex Ruiz demonstrates a declarative caching framework for Spring 2.0, which supports pluggable cache implementations.
Related posts
BEA looks to open-source part of WebLogic Workshop
Just saw this article on eWeek. The article states that BEA is slated to announce plans to open-source portions of its WebLogic Workshop tool at the upcoming eWorld conference. BEA has a pretty good record of supporting open-source software and the XMLBeans project is a good example of that. I think the support of AspectWerkz is another example.
If BEA does open-source some of the features of Workshop, this could really help the Eclipse Webtools platform project. I am not a Workshop power user by any stretch of the imagination, but it still does have some pretty cool features. It would be nice to incorporate things like page flow and some of the other cool features into the Eclipse webtools product - Give IntelliJ's Fabrique a run for the money.
Tags: AOP, eclipse, intellij_idea, java, WebLogic, xmlbeansRelated posts
Servlet Filters: Part II
Earlier in the month, I blogged about Servlet Filters and how I see them as Aspects in the AOP world. Based on the blog entry, I've gotten tons of email from people that wanted to know more about Servlet Filters, how to use them and how to use the simple Authentication filter I used as an example. I also got quite a few emails from people that wanted to know what other filters I used and so I am including some resources that I find very helpful along with a few servlet filters that I use every day.
Servlet Filter Tutorials
Servlet Filter Apps
If you know of any other Servlet Filters that are useful, drop me an email or send me trackback.
Tags: AOP, aspectj, authentication, development, filters, J2EE, java, servlet, webRelated posts
Servlet Filters as poor man's AOP
I was just discussing this idea of Servlet Filters with a friend and I was trying to explain to him how Filters work and how they are really aspects in the AOP world. I think filters are really incredibly helpful and yet very few developers know about them and even fewer developers implement them. So my thought was that if we started using buzzwords like AOP around filters, suddenly Filters become sexy and everyone's jumping over to implement Filters. ![]()
The filter API was introduced in the Servlet 2.3 specification and is defined by the Filter, FilterChain, and FilterConfig interfaces in the javax.servlet package. You define a filter by implementing the Filter interface. A filter chain, passed to a filter by the container, provides a mechanism for invoking a series of filters. A filter config contains initialization data. The most important method in the Filter interface is the doFilter() method, which is the heart of the filter. Filters intercept request to your web application based on the url-pattern specified in the web.xml, where the filters are defined.
I have used Filters extensively and have a few Filters ready to go when I am called into debug applications in production that are misbehaving or just broken. One of the filters I use quite often is a simple authentication filter that makes is easy to ensure consumers of the web application is authenticated. Here's a simple snippet:
[code lang="java"]
/**
* The doFilter() method performs the actual filtering work. In its doFilter() method, each filter
* receives the current request and response, as well as a FilterChain containing the filters that still must be
* processed.
*
* This filter is just used to capture and log information about the user being passed in to the login servlet
* for tracking purposes.
*
* @param request Servlet request object
* @param response Servlet response object
* @param chain Filter chain
* @exception IOException
* @exception ServletException
*/
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
throws IOException, ServletException {
if (req != null) {
HttpServletRequest request = (HttpServletRequest) req;
//could pass in false in the getSession() to return null for new session.
HttpSession mySession = request.getSession();
String loginStatus = (String) mySession.getAttribute("LOGIN");
if ((loginStatus != null) && (loginStatus.equals(Boolean.TRUE.toString()))) {
log.debug("FOUND A LOGGED IN USER - PASSING THRU");
//Logged in - Let's pass thru the user
chain.doFilter(req, res);
} else {
log.debug("FOUND A NEW USER - CHECKING STATUS");
if ((request.getRequestURI().indexOf("login") != -1) ||
(request.getRequestURI().indexOf("index.jsp") != -1) ||
(request.getRequestURI().indexOf("images") != -1) ||
(request.getRequestURI().indexOf("ipo.css") != -1)) {
//User is going to or being redirected to login page or loading images - Let's pass thru the user
log.debug("NEW USER -> LOADING CSS, IMAEGS or BEING REDIRECTED TO THE INDEX OR LOGIN PAGE");
log.debug("request.getRequestURI() = " + request.getRequestURI());
chain.doFilter(req, res);
} else {
log.debug("NEW USER - LET's FORWARD TO THE INDEX JSP AGE");
log.debug("request.getRequestURI() = " + request.getRequestURI());
RequestDispatcher ds = ctx.getRequestDispatcher("/index.jsp?timeout=true");
ds.forward(request, res);
}
}
}
}
[/code]
Here's a copy of the original documented Filter java class.
Tags: AOP, development, filters, J2EE, java, servlet, web, WebLogic, xmlRelated posts