password
username
Sponsored by CakeMail, an email marketing software.
Newsletter preview

Javalobby logo image
Tuesday, October 23, 2007 

IntelliJ IDEA 7.0:
The Magnificent Seven is Out

The new generation of JetBrains' award-winning Java IDE delivers full-blown Spring and Hibernate support, Web services, Maven and ClearCase integration, Ruby & Groovy support, impressive performance improvements, a host of productivity-boosting features, and much more .

 Perspective


Be sure and
check out a
No Fluff Just Stuff
Java conference
coming your way!

10/26-10/28 Dallas
11/02-11/04 Reston
11/9-11/11 Denver



Spring in Action
2nd Edition
Newly updated for Spring 2.0

Manning Special
Save 37% on the Paper Book
Enter JLSP37 at Checkout

 
 A Developer's Perspective
 Next section
Matthew Schmidt is the man behind the scenes at Javalobby. If you have questions or concerns, feel free to email him at matt@javalobby.org

Matt SchmidtYes Virginia, your database is working too hard

Over the last few days, I've been noticing that the MySQL instance for DZone had been working ever harder.  Many of you have followed the adventures of Rick and Matt through the dark art that is SQL and databases, and this latest problem had all the earmarks of some bad queries. 

As I began to dig into the problem a bit more, I began to suspect that something wasn't using the caching subsystem that I've written about in the past.  The whole reason I reworked much of the database system to implement caching at DZone was that many of the queries we had initially written were bloated and inefficient, doing unnecessary joins, and just selecting entirely too many columns in general.  As I looked through the connections that were operating at DZone at any given time, I began to see a pattern.

With the excellent tool, Navicat, I began to see that there were quite a lot of queries creating temporary tables and which appeared to be using pieces of the queries I thought I had replaced throughout most of this part of the system.  As it turned out, it was a query that did entirely too much work to return such a simple result AND it wasn't taking advantage of the new caching system.  With a simple switch of the queries and a quick deploy, the long-term load on the machine was cut in half.  Not a bad improvement for about 30 minutes of work.   

Over the past year of DZone, we've always been of the mind to build now, optimize later.  The problem with that mode of operation is that you have to be just a little insane about knowing how your system normally performs and about keeping stats on how your system runs.  We constantly keep an eye on how the system is performing. I almost feel like I have a connection with the server and I know when it's not feeling well.  You have to know that you can eek out that extra performance without taking the sledgehammer to your code.  We know our code isn't perfect and we have made it so we can make quick changes, see how things perform, and then make some more changes.  It's a mode that works for us and has helped us do more with less.

Making Java just a bit more dynamic
Over the weekend, Rick and I starting to hatch a nefarious plan to take over the Internet.  Wait, no that was last weekend!  This weekend, we began to gather our initial thoughts on a super flexible way to manage custom objects here at DZone.  The main problem we ran into was the fact that Java isn't dynamic.  It really made me appreciate the fact that you can do things like add methods to existing classes on the fly in Ruby, but I digress.  As I soon found out, Java doesn't have to be quite so strict. 

After digging through Google for a while, I began to find out that we weren't the only ones who wanted things to be a bit more flexible.  Groovy, while not necessarily Java, lets you override a class and add methods or properties to it.  That would have been awesome, except I needed to return a real Java class instead of something in Groovy. 

With a little more digging, I found an interesting article on developerWorks about using proxies and reflection to route calls to getter and setter methods to a dynamically populated HashMap.  Now I was getting somewhere.  I could use something like this to handle calls to methods that didn't exist and route them to fields that might have been loaded from the database.  Encouraged by my finds, I dug even deeper into this mysterious world of dynamic decorators and dynamic proxies.  Reflection and Introspection are some powerful features of Java, and I was determined to leverage them to my advantage here. 

Finally, I found something that looked to be a potential Holy Grail, Janino.  From what I can tell, with Janino I can build up a String of my dynamic extension to a base class and have it compiled on the fly and inserted into the ClassLoader.  For my purposes, I only need the class generated at the end of certain actions, not constantly, so Janino might just work.  The main issue I can see right now, is how I am going to deal with server restarts. I guess when the server starts I'll need to determine what extensions I need and compile those into the classloader.  The documentation seems to say that things are compiled right into the classloader you specify, so I can build up a String in memory that defines a Bar that adds some completely new properties to a Foo and then use the Bar in whatever I want.  Very cool!

The few hours I spent investigating this on Sunday evening really started to push the limits of what I understood about Java - reaching out to the gray areas of what I thought should be possible.  I was happy to see that fortunately other people had already walked some of these roads before.  Have any of you worked with dynamic proxies to support a type of dynamic java bean?  Maybe something to implement a call to properties bag when you call a method that doesn't exist?  Let me know and be sure to let me know about any experience you might have with Janino! 

Until Next Time,
Matthew Schmidt
matt@javalobby.org
Yahoo IM: mattschmidtjl

 

AboutObjectsGet Up to Speed Fast on JSF, Struts, Spring, Hibernate, AJAX

AboutObjects "I learned more than I expected." - A. R., Campbell & Co. Hit the ground running on your next project with courses uniquely designed to get you proficient - fast. "Excellent, hands - on course!!" - S. P., Mobil Corp.

Sign up now -- there's still time to register for Nov. and Dec. classes!

 DZ Top Links
 
 DZone Top Links
 Next section
 Back to top
most clicked this week from dzone.com

dzone

Most-clicked links this week

 
 Popular at JL
 
 Popular at Javalobby
 Next section
 Back to top
A recap of some of the most popular and active Javalobby.org discussions this week.
UpdateN will include a rewritten Java-Plugin

According to Ken Russell announcement jdk6uN will include a rewritten browser plugin, running the VM in a seperate process.

Full Discussion Posted By: Clemens Eisserer - (13 Replies)

Multi-Language VM: Everything and the kitchen sink

With the success of languages such as Groovy and JRuby written on the JVM, some on the OpenJDK project are looking at ways to make the addition of new languages easier.

Full Discussion Posted By: Matthew Schmidt - (13 Replies)

Interview with Sun's Jeff Kesselman on Project Darkstar

Sun's Jeff Kesselman, claims that their open source infrastructure software, Darkstar, will change the nature of multiplayer game development by solving scaling, load balancing, data consistency, etc.

Full Discussion Posted By: Jack Newsom - (11 Replies)

Oracle Offers 6.66 Billion Dollar Buyout of BEA.

Oracle has made a 6.66 billion dollar buyout offer to BEA. BEA rejected the offer as being too low, But BEA stock rallied on Friday after news of the buyout offer. Is a buyout inevitable for BEA?

Full Discussion Posted By: Michael Urban - (10 Replies)

Real World Guide to Open Sourcing a Saturday Project

What has your experience been with open sourcing that Saturday project? Here, Geertjan Wielenga discusses some of his experiences, and considerations. What is are your experiences?

Full Discussion Posted By: Michael Urban - (10 Replies)

 White Papers & Announcements
 
 Whitepapers
 Next section
 Back to top
Enterprise Ajax - Transcend the Hype

Ajax is all the rage these days. The pioneers of Ajax have taken tremendous strides toward proving Ajax techniques that can deliver true benefits to web application users through a richer interaction model than standard web applications can provide. It seems that Ajax will be ubiquitous on the Web in no time flat. This paper examines various levels of Ajax development that the enterprise developer might entertain, and explores some of the pitfalls that will be encountered along the way. It goes on to describe key concepts around server-side Ajax solutions, and shows how the ICEfaces technology can easily be used to deliver rich enterprise applications in Java.

Download Full White Paper Posted by: Icesoft

 Product Announcements
 Next section
 Back to top
Product and service announcements for Java developers.
KonaKart v2.2.0.7 Free Java Shopping Cart

KonaKart v 2.2.0.7 is a new release of the free java shopping cart software which now includes support for Role Based Security, Auditing and Digital Downloads.

Full Announcement & Discussion Posted By: Paolo Sidoli - (0 Replies)

Java2Script 1.0.0: Java to JavaScript Compiler & AJAX SWT

Java2Script 1.0.0 final release came in Oct, 2007. Java2Script provides Java to JavaScript compiler and java.lang.*, java.util.*, Eclipse SWT and other AJAX libraries.

Full Announcement & Discussion Posted By: Zhou Renjian - (0 Replies)

NetBeans IDE 6.0 Beta 2 Released

More bug fixes/features. Better code completion, great Ruby support, simplified installation experience, even better Swing UI development, integrated profiling, Web/EE, mobility, C++, SOA, UML.

Full Announcement & Discussion Posted By: Abraham Tehrani - (0 Replies)

DbFit 0.91 released: Update scripting and type cleaners

New release of DBFit toolkit for test-driven database development brings support for Update fixtures and type cleaners.

Full Announcement & Discussion Posted By: Gojko Adzic - (1 Replies)

The Swing Timetable Platform 0.0.7 - Now with automatic scheduling

The Swing Timetable Platform provides help with manual and computer controlled scheduling for high schools, universities and companies.

Full Announcement & Discussion Posted By: Peter Karich - (0 Replies)

Find Java Heap Leaks with HeapAnalyzer

HeapAnalyzer is a graphical tool that can find possible Java heap leak areas through its heuristic search engine and analysis of the Java heap dump.

Full Announcement & Discussion Posted By: Ida Momtaheni - (0 Replies)

Luntbuild 1.5.3 is available for download

Luntbuild development team released Luntbuild 1.5.3 available: http://www.javaforge.com/proj/doc.do?doc_id=36971 http://sourceforge.net/project/showfiles.php?group_id=113344&package_id=122604

Full Announcement & Discussion Posted By: Lubos Pochman - (0 Replies)

WebSQL - web based database administrator tool

This is a web based application that can be installed on a web server in your environment to manage your database over a browser.

Full Announcement & Discussion Posted By: WebSQL - (2 Replies)

BREDEX GmbH announces release for GUIdancer 2.0 as winter 2007

Version 2.0 of GUI test-tool offers "unique advantage" in agile processes. Test creation begins before application under test is available and continues alongside development.

Full Announcement & Discussion Posted By: Alexandra Imrie - (0 Replies)

Structure101 V3 Released - Team Based Architectural Control

Structure101 v3 introduces architecture block diagrams to define code-base layering, IDE plug-ins to communicate these to the team & warn when code changes are made.

Full Announcement & Discussion Posted By: Paul Hickey - (0 Replies)

JavaFX Script book now available

Tutorial-style JavaFX Script book is now available. JavaFX Script is a new, evolving, language that excels in creating UIs with simple, declarative code that leverages the power of Java/Swing.

Full Announcement & Discussion Posted By: Jim Weaver - (2 Replies)

BlogBridge 6.0 - Free Cross-Platform Aggregator

New version features What's Hot topics finder, Stats and Trends reports, Articles pagination, SmartFeeds improvements, Post To Blog support upgrade and many-many more.

Full Announcement & Discussion Posted By: Aleksey Gureiev - (3 Replies)

jstags 1.0: jsp tags library including effects, ajax, ...

jstags is a JSP tags library providing Effects and Ajax functionalities among others in an extensible way in order to avoid the need to include lots of JavaScript code yourself.

Full Announcement & Discussion Posted By: Soraya Sánchez - (0 Replies)

Easy to install software stacks for Roller and Liferay

With just a few clicks, users can have Roller and Liferay, and all of the other software required (Apache, MySQL and JRE.) ready to run across multiple platforms.

Full Announcement & Discussion Posted By: bitnami.org - (0 Replies)

wingS 3.1 - AJAX based Webapplication Framework

wingS 3.1 has been released. This is basically a maintainance release with noticable performance improvements, official WebKit support (Safari) and lots of other valuable enhancements.

Full Announcement & Discussion Posted By: Holger Engels - (1 Replies)

Nuxeo releases version 5.1 of its open source ECM platform

Nuxeo has just released version 5.1 of its Java EE based open source ECM (Enterprise Content Management) platform. This new version features a number of technical improvements over Nuxeo EP 5.0

Full Announcement & Discussion Posted By: Stefane Fermigier - (1 Replies)

Irish Java Technology Conference 2007

The inaugural Irish Java Technology Conference, promoted by the Dublin JUG will be held this November 7th to 9th.

Full Announcement & Discussion Posted By: Luan O'Carroll - (2 Replies)

Readable tests with FEST-Assert 0.6

FEST-Assert 0.6 is a "flexible assertions" library that aims at making test code more readable. It uses fluent interfaces to deliver a DSL-like API.

Full Announcement & Discussion Posted By: Alex Ruiz - (0 Replies)

JEP 3.1

The 3.1 version of this expression parser was recently released. This update includes minor bug fixes and feature enhancements.

Full Announcement & Discussion Posted By: Nathan Funk - (4 Replies)

Super CSV v1.15 is out

We are very excited to present yet another release of Super CSV, version 1.15. Super CSV is a free CSV reader writer with a wealth of features. This release is a "maturity release"

Full Announcement & Discussion Posted By: Kasper Graversen - (0 Replies)

 Your Account
 
 Your Account
 Next section
 Back to top
Manage your account info for this and other Javalobby publications.
Manage your Javalobby membership details

Click on the following links to:


 Contact Info
 Next section
 Back to top
Here's how to reach us, we love to hear from you.
Email us
Send news items to editor@javalobby.org
Send questions, complaints, or suggestions to feedback@javalobby.org
Send advertising inquiries to advertise@javalobby.org
 
Call us
Our number is (919) 678-0300. We'd love to hear from you!

 Legal
 Back to top
The fine print we'd rather avoid completely.
Feel free to redistribute this newsletter in part or in full to your friends.

Javalobby News is a service mark of DZone, Inc.
Copyright ©2001-2007 DZone, Inc.

Thank you for your continued support of Javalobby. If you prefer not to receive the Javalobby weekly newsletter, send an e-mail to ***-jlnews@javalobby.org and please ensure the actual email address to be removed is present.
Javalobby.org, 113 Legault Drive, Cary NC 27513 USA