Skip navigation
ANNOUNCEMENT: community.oracle.com is currently Read only due to planned upgrade until 28-Sep-2020 9:30 AM Pacific Time. Any changes made during Read only mode will be lost and will need to be re-entered when the application is back read/write.
kfarnham

Violently Happy Blog

Posted by kfarnham Jul 31, 2006

Don't you love when really hard code finally starts working?

So, I had some coding time this weekend for a client, and I finally got one of the major nightmares of my coding life to start coming together. Don't you love when you rethink some really haggard code-base, make sense of it, and finally get it bullet-proofed?

If you happened to hear a mini-talk I did from JavaOne, in my guise not as editor but as owner of the Lloyd project, you'll know that I've been struggling for months with getting an AWT component to preview video capture with QuickTime for Java, which eliminated its own video capture preview component in a major re-org of their code a few years ago. In the mini-talk, I was careful to end the demo after 20 seconds, because I knew it would crash after 30. And that's only because I was on a PowerPC Mac laptop - on an Intel Mac, the same code crashed instantly. And I didn't have a Windows box to even try it on XP.

Anyways, working on similar stuff for a client, I realized that a lot of my problems came from interacting with the AWT thread, and that similar code, even samples from Apple, tended to crash if called from AWT or if the AWT event-dispatch thread was even present when the capture stuff started up (this is the kind of weirdness that pops up when you take demos that launch frommain() and put them in a GUI, where the code will typically be called in response to a GUI event like a button-click or menu item, and thus be on the AWT-Event-Dispatchthread). So, I figured, I'm going to just bring all my stuff upbefore the AWT, and lazy-instantiate any AWT pieces I need, like the preview component. In other words, I moved from on-demand creation of the capture stuff to more of a service model, which required a whole lot of rethinking.

Suffice to say that it finally, finally works, and is fairly resistant to various forms of abuse I throw at it: changing the camera's settings, switching input devices, switching the output file or not saving to a file at all, etc. This is a huge relief, given the crash-tacular history of my work with QTJ capture. It reminds me of something Mason Glaves said in the description of his blog A tale of two GUIs, in which he described web and desktop development as, respectively: "On the one side a happy village, with crops of green test lights in neat little rows, on the other a dark jungle where code roamed free and wild, and any step you took could be your last." The idea that a crash is always lurking around the next breakpoint is disturbingly typical of what I've found over the years in desktop development, although I suppose it's not truly exclusive to the desktop: surely I'm not the only one to see someone else's web app barf up a stack trace to the browser?

Anyways, there's more work to do. My stuff deadlocks on Windows XP due to what seems to be a remarkable difference in Java threading on the two platforms (the callbacks I get when the camera has new data come from completely different threads on Mac versus Windows). Hopefully, I'll be able to take this experience and finally write a nice new video preview service class for Lloyd sometime soon, then maybe a blog or an article on the specific hazards of this particular pursuit and how to avoid them.


In Java Today, the eighty-eighth issue of the JavaTools Community Newsletter is online, featuring tool news from around the web, links to all the projects that joined the tools community in the last week, and a "tool tip" on how to display PDF documents in Java.

The Swilet projecthas graduated fom the incubator to a Java Enterprise project. Swilet is a Java EE web presentation layer framework. Swilet can help programmers easily create a web application that has Ajax features, without knowledge of Ajax and JavaScript. Swilet can transform a java swing application to a web application. This allows desktop programmers to write swing programs using tools that they are expert in, and with the swilet framework, use the swing application as a web application.

Eclipse's Business Intelligence and Reporting Tools (BIRT) project offers remarkable tools for creating and deploying report designs. It's the deployment step that trips a lot of people up, according to author Jason Weathersby: "Some of the most common questions in the BIRT News Group are about deploying BIRT. The reason for this is not the complexity of deploying, but the many deployment options." In the article Deploying BIRT, he looks at how to share your reports with BIRT's own viewer servlet, incorporating it into your own servlet, and using it in a Rich Client Platform (RCP) desktop application.


David Herron wonders about the practicalities of open-sourcing Java, specifically what Useful quality metrics to publish?, in today's Weblogs. "'We' are having planning and discussion about how to handle Sun's Java implementation as open source. I've seen several articles and blog postings from the folk directly involved in the discussions, and it's all very interesting. What I'm most puzzling over is, what should the quality team do or publish etc in this environment?"

John O'Conner finds the scripting API changed in Writing about work in progress sometimes hurts: "The JSR 223 spec changes...and suddenly my code is broken."

In Embed Scripts in a desktop application, Rémi Forax offers "yet another blog entry on scripting and Java desktop application, in which the reader sees how it's easy to embed scripts in a desktop application with mustang."


This week's Spotlightis on the Ajax4jsfproject, which leverages Java Server Faces and adds the Ajax functionality for you. "The framework is implemented using a component library that adds Ajax capability to your existing pages without needing to write any JavaScript code or needing to replace existing components with new Ajax widgets. Ajax4jsf enables page-wide Ajax support instead of the traditional component-wide support." You can use it to add Ajax to existing JSF applications, write components with Ajax support, and more.


In today's Forums,rasto1968 discovers an unpleasant surprise: swingx and webstart requires swingx jar to be signed "I've just created a webstart app using swingx and have found that I get a security exception. The reason appears to be the find key discovery code in JXTable (initActionsAndBindings), it looks like it uses some sort of reflection that requires security priviledges. Commenting out the find key code allows me to create an unsigned webstart app. Any thoughts on this?"

Don Casteel is looking for some help moving to SunGrid in SunGrid Cool Apps contest - 3D Fractal Raytracer - Help WantedFirst of all the SunGrid Cool Apps contest is offering a $15,000 grand prize. ($50,000 total prize money) Some of you may be aware of the work I've been doing on trying to develop a method of generating and raytracing volumetric Apophysis-like 3D fractals. Parallel to developing the raytracer, I've also been trying to utilize the computing power of Sun's N1 grid engine to create higher resolution and quality images and someday animations. The N1 grid engine is very constrained and complex and I have not made much progress getting it to work. My application is written in 100% pure Java3D, and I'd like to keep it that way. I've been using the NetBeans computeserver plugin for the grid side of things If you're interested in becoming a part of this project, (and a part of any prize money), please send me a private email with how you think you can help.


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Don't you love when really hard code finally starts working?  
kfarnham

Show Me Blog

Posted by kfarnham Jul 27, 2006

In tonight's performance, the role of Windows Vista will be played by Looking Glass 3D

Hopefully this video won't get taken down before you get a chance to see it, but someone has posted a JavaOne demo (from 2004 or 2005, I think?) of Looking Glass 3D to YouTube. That should help get the word out about what LG3D is all about, since it's one of those things you really need to see to appreciate.

Problem is, the YouTube submission is titled Internal Review Of Microsoft Windows 3D Vista @ 2007. And the comments include "That is freaking awesome!" and the cluelessly all-caps "AWESOME! MICROSOFT RULES!"

Glass-half-empty response: the unwashed masses, probably the same trolls who write "Java is slow and ugly" in Slashdot threads (assuming those aren't just written by bots at this point), will get psyched about LG3D only if they're misled as to its true nature.

Glass-half-full response: take away anti-Java biases and people can get really psyched over flashy Java demos. Maybe we should go pass off the OSX-y Aerith as a pre-release demo of iPhoto 7.

We found this, by the way, in a forum post called Someone is passing your work off as Microsoft's, which says "I doubt that this was posted by a Microsoft employee, but I'm sure there's something against misrepresenting products. He's locked comments and ratings, so the community can't flag it as fake." Forum poster longcat adds "the developers may want to see http://www.youtube.com/t/dmca_policyand email copyright@youtube.com to have it taken down."

Maybe so, but it'd be nice if it stayed up long enough for a few more Java developers to have a good laugh at Microsoft's expense. After all, Looking Glass is open-source, works today, and has a number of subprojects that tie into the technology. Meanwhile, the much-delayed Vista has long since become a debacle, and it's anybody's guess whether it'll ship before vaporware poster-child Duke Nukem Forever.

Also in today's Forums,joshuak wonders Why does RuntimeWSDLParser exist? "I'm using wsimport to leverage a web service in one of my projects. I noticed, however, that the code it generates re-requests the WSDL file at runtime from whatever original location the code was generated from. This makes portability a problem since sometimes the WSDL is retrieved from, say, http://localhost:8080, but the finished product is run on a different machine than the webservice and http://localhost:8080 on that machine points nowhere, resulting in an error. So: Can I disable the runtime WSDL parser? If not, can I override the location it tries to download the WSDL from at runtime? For example, could I put the WSDL in my WAR file so that it is always accessible?"


In Java Today, the NetBeans IDE BlueJ Edition is targeted at teachers and students familiar with the popular BlueJ tool. You can import existing BlueJ projects and view them much as you would in BlueJ, while also taking advantage of NetBeans IDE editing features. This tool offers a seamless migration path for students that supports the switch from educational tools into a full-featured, professional IDE.

Want to tell application "Finder" to open the trashin a Java app? The Java-AppleScript Connector(jasconn) project is a JSR-223-compliant mechanism for using AppleScript code within Java. jasconn is not an implementation of AppleScript; it is a bridge between Java and the native Mac OS X AppleScript libraries. To use it, you need to be running the developer preview of Java SE 6 for Mac OS X, available from the Apple Developer Connection.

Cédric Beust has released version 5.0 of TestNG, the popular unit-testing tool. TestNG uses annotations rather than naming conventions to mark test methods, and supports JDK 1.4 (which doesn't have JSR-175 annotations) through the use of Javadoc annotations. An article on TheServerSide describes TestNG's approach and the changes in this version.


The latest java.net Poll asks "Have you tried out Google Web Toolkit yet?" Cast your vote on the front page, then visit the results page for results and discussion.


Chris Campbell has "the second installment in a series of Java 2D tips-and-tricks demonstrating an approach to adding light (and shadow) to your shapes" in today's Weblogs. In Java 2D Trickery: Light and Shadow, he writes: "in the first installment of my "Trickery" series, I demonstrated a technique for achieving a soft clipping effect. Now let's put it to good use. In this installment I'll show how to add a lighting effect to give your otherwise flat shapes a 3D-ish appearance."

In Swing and Roundabouts 4: Grid Bag Grease, Evan Summers writes: "Cay Horstmann introduced 'GBC.java - a convenience class to tame the GridBagLayout' in Core Java (2002). Here is another installment along those lines."

Finally, Michael Nascimento discusses The language barrier: "Have you imagined how hard it would be to learn and to program in Java if all language keywords, all docs, all things related to Java were written in Klingon? Well, for those who cannot read in English, this is called daily life (those who understand Klingon are not my target audience here)..."


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



In tonight's performance, the role of Windows Vista will be played by Looking Glass 3D  
kfarnham

Don't Get Me Wrong Blog

Posted by kfarnham Jul 27, 2006

A thin line between == and equals()

Most Java developers have learned the difference between == and.equals(), that the former means that two objects share the same memory address, while the latter is whatever you choose to make it, and usually means that some or all of the fields of two objects are equal. And with this knowledge fully grasped, you go off confident in the ability to determine identity, the ability to distinguish objects from one another.

Not so fast, dude.

Peter Becker brings up some suprising issues with common-sense ideas in today's Feature Article. At risk of giving away the big suprise of the article, You Are What You Is: Defining Object Identity, consider theSet collection, which allows at most one instance of an object to exist in the set. The test for this is performed withequals(). Now throw mutability into the mix. What happens when you add two objects to a set, then useset methods on one to make it, in effect,equal() to the other. I'll give you a hint: it's not pretty.

Read on for what this means for real-life Java programming and what you should consider doing about it.


In Java Today, Version 1.3.5 of the Hudson build-monitoring system has been released. You could consult the changelog, or just check out Kohsuke Kawaguchi's blog Hudson 1.35 posted. "One of many improvements that came out of this is to speed up CVS changelog computation. When you are doing a continuous build, every build usually contains only a small number of changes. In Hudson 1.35, Hudson first runs "cvs update", then use its output to determine what files are changed. Hudson then uses this to significantly reduce the amount of traffic for the "cvs log" command, which is used to compute the changelog."

ONJava blogger Paul Browne has met up with a group of local Java developers to figure out What Dublin Java Developers think you should be learning... You can read the entire virtual Java meetup, or just scan Paul's summary of the top to-do's, which include web services and SOA's (with some reservations), and a fresh look at EJB3 and NetBeans.

With the rise of Ajax comes the need to dispel the myths of this hot property and pointedly deal with the issues that arise during its use. In Ease the integration of Ajax and Java EE, Patrick Gan examines the potential impacts throughout the full development life cycle of introducing Ajax technology into Java EE Web applications. In several cases, he notes the strengths of Direct Web Remoting (DWR) as a Ajax framework that does a particularly good job of dealing with Ajax problems.


In today's Forums,ljnelson digs into authentication challenges in JAAS and Glassfish: progress: "What's been so tantalizing about Glassfish is that it's almost there. The packaged application client ships with a Configuration, and clearly something somewhere calls the equivalent of LoginContext.login(), but it isn't that call exactly, because the Subject is never actually created. Instead, the buck seems to stop at the LoginModule. Anyhow, I'd be curious to know from any Glassfish committers why, as long as you accomplish authentication via LoginModules, you don't allow an application client to accomplish authentication via the next rung up the ladder--the LoginContext. Or, I'd be curious to know what wrong path I've headed down that's led me to this conclusion, and would love to hear that actually, this is entirely possible."

Fabrizio Giudici joins the crowd discussing a new photographic application in Re: [JAI] Photoshop In Java: "I'm working on a thing that, using similar words, is a 100% Java mini version of Lightroom, I mean, at the moment there's the cataloging, browsing tools etc. (look at bluemarine.tidalwave.it). There's no editing part at all. Sounds like it's pretty complementary to your work. I've planned to add the editing part, but before start working on it I'm searching for existing opensource applications and developers that would like to work together in some way. I've also published a image i/o plugin for reading camera-raw files - the next step is working on an opensource 100% Java version of the camera raw plugin by Adobe. Being able to base it on existing filtering code would be great."


Rémi Forax explains his role in a change to SwingWorker's process signature in today's Weblogs. "Why the signature of the SwingWorker's process method changed ? Perhaps not only to bother developers that already play with JDK betas."

Calvin Austin discusses What PHP needs to learn from Java, detailing "Why PHP finds it hard to dislodge Java from the Enterprise"

On the topic of Pluralization, Tom White writes: "tool builders can now easily add pluralization to their applications using Inflector, a new Java library hosted on java.net."


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



A thin line between == and equals()  
kfarnham

Time the Avenger Blog

Posted by kfarnham Jul 26, 2006

How long will users wait for Java?

One hot topic that has emerged again in the Javasphere is the idea of the "modular JRE", one which splits rt.jar into smaller pieces that can be downloaded independently. The idea here is that for users who don't need all of the JRE, the time required to download and install (or update) Java can be reduced by not sending pieces that are not needed now. To wit: headless servers will probably never need Swing or the AWT, while desktops can probably go without JMX, and could probably skip JDBC, XML parsing, and crypto until it's needed by specific apps.

Evan Summers takes this up in his blog Firing up the Browser Plugin, a response of sorts both to David Van Couvering's Working from home, OSCON, AJAX, Groovy and global warming and Ethan Nicholas' Java 2 Browser Edition. He responds to Ethan's concerns about Java in the browser, specifically that the JRE is unrealistically big to download at 7 MB, it doesn't start as fast as other plug-ins. He notes that 90% of computers already ship with Java installed, but admits that the download and install is perceived as a problem, and moves onto the startup time challenge.

OpenOffice addressed its huge startup time in part by pre-loading itself (as a background process). Maybe the Java Plugin could do the same, and feature an optimised ClassLoader that does some preloading of the most commonly used classes from standard libraries.

[...]

So I want a Java Plugin with (a) the option to get loaded when the browser starts, and (b) with a class cache for preloading standard libraries. There could be different cache size settings, eg. a "cold" one for startup eg. 0 to 16Mb, a "warmer" one to kick in when the first applet tag is seen in a web page, and a "hot" one for after an applet has been launched, eg. 0 to 32Mb. Considering that the Java5 rt.jar is 32Mb uncompressed, and 7Mb compressed. In practice, i guess you would have "cache size" and then "performance" settings of "low", "medium" and "high.

Now here's something that Even doesn't wonder about, but I will, since it's been on my mind lately. Think about this idea of preloading standard libraries, so they'll be ready when you hit an applet. Evan's presumably thinking of loading from disk, but what if they were loaded from the network and just locally cached instead? Wouldn't this also solve some of the installation complaints? Ship a barebones JRE that primarily knows how to get more classes (one of the great things about Jini is its remote classloading; repurpose it!), load those jars over the net as necessary, and cache them locally. That way, the end-user never downloads or installs more than they need, and as Evan suggests, the most-used classes can be pre-loaded, from network or cache, and will be ready to go when needed. Maybe that can figure into the re-thinking of JAR's, versioning, and dependencies that was promised back at JavaOne 2005...


Also in today's Weblogs, John O'Conner sees some value in Scripting on the Java Desktop: "Forget about web applications for a moment. I've discovered that desktop applications can use scripting too."

Meanwhile, David Van Couvering has been on a Portland walkabout, which he says is about "getting some quiet time before the OSCON melee starts tomorrow."


In Java Today, java.net blogger Roger Kitain again delves into JBoss Seam in Seam (FCS) On GlassFish: "So far we've seen how we can get Seam running on GlassFish with Hibernate Persistence and Java Persistence. Modifications were needed to the Seam core classes as well as the application classes. Fortunately, JBoss has made the modifications to their core classes in time for their Seam FCS release. In this entry we'll outline the steps to get the Seam FCS release up and running on GlassFish with Java Persistence."

Want to get started with Sun Grid but don't know how? The article Sun Grid Visual Quickstart offers a sort of "hello world" for the grid: "This is a guide to help you understand how to run your applications on the Sun Grid. We'll start with an absolutely simple one-class Java application. From there we'll write the necessary scripts to run it on the Sun Grid. Once the application is built and packaged, we'll go through a very visual walk through of uploading and executing the application on Sun Grid."

Kunal Jaggi takes a look at what distinguishes Apache's open source Java EE platform in What Is Geronimo. "Geronimo fills a need that other application servers do not. With Geronimo, components can be easily integrated. Its key aim is to support custom builds, geared to the needs of specific applications. Geronimo offers choices." In the article, Kunal talks about what makes Geronimo unique, and helps you get started coding, deploying, and testing your first app on Geronimo.


One file format that has defied easy handling by Java is PDF, as discussed in the thread Re: Open source Java2D PDF viewer component?, which we feature as part of today's Forums.rbair writes: "I wish there were an "A+" solution too. Every option that has been mentioned so far has drawbacks. The Adobe component is _really_ old. The UI shows it (ugly!). The best I've found so far is to use the Adobe plugin + embedded browser. There are three problems with this approach that come to mind. First, embedding a browser and opening the Acrobat plugin isn't going to be lite on memory. Second, if the Acrobat plugin crashes, say goodbye (and this has happened to me in simple test apps I've written more than once). Third, it's like raising the white flag. I know this is a huge issue for some people (myself included), but I'm afraid that at the moment it is outside SwingLabs control. If an external contributor wanted to pick this up and run with it, please let me know! Anybody in need of a Master's thesis?"

tneward is trying to build Mustang and finds himself asking What is SLASH_JAVA, anyway? "Trying to build on a Windows XP box, and I can't quite figure out what to set ALT_SLASH_JAVA to in order to get away from the "make sanity" warnings about it. While we're at it, what should ALT_JDK_IMPORT_PATH point to, anyway? I know it's supposed to point to a good JDK instance, but where, exactly? The root of the JDK itself, the root of the JRE, someplace inside those paths, ....?"


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



How long will users wait for Java?  
kfarnham

Middle of the Code Blog

Posted by kfarnham Jul 25, 2006

Internationalization as a cross-cutting concern

I initially had some questions about the premise of today's feature article, which advocates using Aspect-Oriented Programming to provide Internationalization features. After all, the Java language already has good support for I18N through its use of Unicode, the Locale-oriented scheme for finding and loading ResourceBundles, and the various text formatting classes ofjava.text. Why not just use those in the first place and not have to engage the inherent craziness of AOP?

Of course, I could have answered my own question. The reason we don't use those from day one is that we just don't. We throw down code for early spike solutions without worrying about niceties like internationalization, burn through another round of VC, and before you know it, there's 50,000 lines of source with hard-coded Strings for everything. On two occasions, with two different employers, I headed up efforts to I18N an existing code base that was already large and getting larger -- both times, we forked the code and put a couple weeks' work identifying all the places that needed I18N and changing them, usually using a "pig latin" localization to test that the I18N worked and was complete (I don't know who came up with that approach, but it's awesome). And when we were done, the trunk had evolved so much that in both cases, management thanked us for doing the I18N work and proceeded to throw it away.

The problem was that we decided we had to fork to put together a working I18N version, and this effort was less valuable than the ongoing non-I18N work on the trunk and the time it would take to merge the two. Yes, you can see a lot of bad development and management pracices in these scenarios. All I can say is that it was the 90's, with all the attendant boom-era pathologies of those times. But in any case, the only way this could have worked under these conditions would be to lay in the I18N without in any way disturbing the feature-fest that was the trunk development.

This speaks to a concept that Stephen B. Morris addresses in today's article, an idea he calls "low-touch programming" (LTP):

With LTP, which is just good design practice, you add or modify code in a manner that's as non-invasive as possible. Ideally, LTP should allow you to drop working classes into an operational product. The dropped-in classes then provide any required extra capabilities and help fulfill at least the first two requirements listed earlier ["low cost" and "flexible solutions"]. AOP is an unusual technology that can facilitate such class insertion and other LTP needs.

In the Feature Article, Aspect Oriented Programming and Internationalization, Stephen takes an AOP approach to providing I18N to an existing codebase, showing how to add in support for variant currency and date/time displays, without touching the existing code. Take a look at it, and think about whether this approach would work for you on large-scale, un-I18N'ed code-bases.


In Java Today, the revised jini.org is back online, featuring a round-up of information related to Jini, including links to the specifications, downloads, and the starter kit API. The site no longer hosts projects, many of which have moved to a new home on java.net. A complete explanation of what's where can be found in the note What happened to Jini.org?

Elliotte Rusty Harold, author of Java Network Programming and Java I/O, as well as the AmateurJava media player/editor, takes a look at performance challenges inHow to write network backup software: a lesson in practical optimization. "Pulling operations outside of loops or reducing the number of operations in a method rarely has any noticeable effect on performance. Most real performance problems come from doing too many fundamentally slow operations; for instance, writing to the disk or reading from the network."

JavaServer Faces technology is great for encapsulating a component's artifacts, which hides complexity from the end user. In the quest to create reusable components, the developer has to make trade-offs between complexity and reusability. When designing components, developers find that most development projects require the repetition of common tasks. One function that is commonly required is accessing static and dynamic resources. In the articleAccessing Resources From JavaServer Faces Custom Components, Mark Basler looks at how to handle requests for static and dynamic resources.


David Van Couvering casts his net wide in today's Weblogs with a blog on Working from home, OSCON, AJAX, Groovy and global warming: "How's that for a single blog going all over the map? I'm here at OSCON and use about the glory of working from home, and talk about what I've been learning and thinking about from the tutorials I've taken so far."

java.net intern Sonya Barry reports that she's still Slogging away: "It is 10:30 pm and still over 90 degrees in my apartment. I make no guarantees about the quality of this post."

Got some time to watch Simon Morris do a little Swing Magic? "There's nothing up my sleeve. At no time do my hands leave my wrists. We've never met before, have we? -- It's time for some minor Swing magic!"


In today's Forums,dmouse is looking for programmatic options for Cancelling Drag and Drop: "I noticed that when I enabled D&D on a JTable and drag and drop something outside of the table my dragDropEnd() method is called but I don't seem to have a way to stop the drag operation. If I drop on the table, which is registered as a drop target, I can indicate that the drag was successful or not in the drop() method. Assuming I don't want to cancel the D&D operation in dragExit what is the correct way to cancel drag and drop if my DropTargetListener drop() method is never called?"

Boldly going where thousands of Java developers have seemingly already gone, sajalmalhotra could use a lot of help getting started with the Development of an IDE with GUI Designer: "We want to develop an IDE in java, which will provide a GUI Designer also. GUI designer will allow to Design some screens by providing some minimum controls( developed in Java Beans). The output files fed to compiler would be XML files. Could anyone tell me how to start of a development of your own IDE like this. Any books or material available, which tells how to develop such IDEs or GUI Designers. Actually i have experience in VC++ but not java. So i am sort of beginer in JAVA. I would be greatfull if someone can extend some help."


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Internationalization as a cross-cutting concern  
kfarnham

Back on the Chain Gang Blog

Posted by kfarnham Jul 23, 2006

Three tech-heavy blogs to start your week

There are a lot of different things you can do with a weblog. For example, you can do commentary, on the craft of coding, on the business of software development, on the direction of the platform, etc. Or you can be a sort of "reporter at large", providing news from trade shows, projects (yours or others'), industry and professional groups, etc. Another option is to write a sort of mini-article, offering tutorials or perspectives on coding, perhaps with ample examples of the techniques you're discussing.

The latter is what our blogging community has been up to over the weekend, and today we've picked out three techincal blogs on completely unrelated topics: a code-heavy discussion of Generics, a series of JMX benchmarks, and a command-line walkthrough of a GlassFish configuration challenge.

Yeah, it's a bit heavy for a Monday. Consider a vigorous mental wake-up for the rest of the week. After all, we've got AOP on tap for tomorrow's feature article...


Tim Boudreau kicks off this "Morning of Code" in today's Weblogs with The Joy of Generics: "Okay, Generics are old news. But since NetBeans was still targetting JDK 1.4 until a few months ago, and most of my coding is NetBeans plug-ins, I'm just starting to really appreciate them. In particular, I'm finding they have a very nice effect on the things I choose to write and how I write them."

Next, Eamonn McManus puts JMX performance to the test in How much does it cost to monitor an app with jconsole?"Recently I've seen several people ask what the cost of enabling JMX monitoring on an application is. If I run with-Dcom.sun.management.jmxremote and connect jconsole, how much will that affect the performance of my app? Here are the results of some highly unscientific experiments."

Finally, Jean-Francois Arcand shows how you can get started Running AsyncWeb in GlassFish: "AsyncWeb, the high-throughput non blocking Java HTTP engine who support asynchronous request processing from POJO objects, can now run on top of Grizzly, the http engine used by GlassFish."


This week's Spotlightis on the SwingX Web Services project, which collects JavaBeans for interacting with web services and was prominently used by the Aerith demo at JavaOne 2006. "Initial beans include support for several Yahoo and Google webservices such as searching news, video, images, and financial data, as well as a generic tile based mapping component." This way, you can use a JavaBean-aware graphical editor, such as NetBeans, to develop your client apps that use web services. The project is putting out a call for developers with knowledge of specific topic areas: "the SwingX-WS project is actively seeking new developers to enhance the existing beans and build new ones. We would especially like to see beans for accessing Google's search services, Flickr photos, Microsoft Live, MusicBrainz metadata, and enhancements to the JXMapViewer for connecting to NASA map servers. "


In Java Today, the eighty-seventh issue of the JavaTools Community Newsletter is online, featuring news from community projects, announcements of five graduations from the incubator, tool-related news from around the web, and a "tool tip" on creating a FAQ for your project using Maven 2.

Chris Campbell's blog Five More Easy Pieces details five fixes recently made to the OpenGL-based Java2D rendering pipeline. "At the risk of sounding like the boy who cried wolf, as of Mustang b92, the OGL pipeline is now "better than better", one might even say it's superfantastic. In the spirit of my recent "Five Easy Pieces" entry, here are five more reasons why the OGL pipeline is better than ever..."

You can fix your own bugs, but you can only report and workaround someone else's. The Rabbit Hole blog shows how to bring order to this process in Bugs in the Library: "With a simple source code base or a single application, it's relatively simple to take library updates to get bug fixes, or even to apply patches to a local copy of a library. There are many situations where this isn't possible and you need to determine for a given section of client code whether a bug is present. One codebase may need to support several VM releases and what's a workaround in one may introduce a bug in another." The blog introduces a Bugs class that can track whether library bugs are present and whether workarounds need to be applied.


In today's Forums,paulpanks answers his own question in Re: Java 5 webservices on Tomcat: "Since nobody has given an answer to me, I answer myself... Yes! It's possible! I have just to use JAX-WS 2.0 Standard Implementation with a proprietary deployment descriptor "sun-jaxws.xml" and servlet com.sun.xml.ws.transport.http.servlet.WSServlet. In this way I can run JAX-WS RI applications in any servlet container that has been enabled with the JAX-WS RI (for tomcat this means installing the JAX-WS jars into same classpath conteiner directory ex. CATALINA_HOME/shared/lib). In this way we can generate 100% portable war artifacts (plain standard web application <= 2.4)"

rturnbull wants SwingX to resolve a dangling issue in Re: [VOTE] DataSet Project: Keep the name? "I suggest the committers (whoever they are) select a name from the many suggested in this thread, or make up a new one if they prefer. We are never going to get everyone to agree. It's all very well letting everyone have their say, but sometimes someone has to make a decision, or nothing gets done. It's time to move on, for goodness sake, or this will be another project that just fades away."


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Three tech-heavy blogs to start your week  
kfarnham

Tempted Blog

Posted by kfarnham Jul 20, 2006

Hey kid, want to join an open-source project?

I was on a conference call yesterday, and someone asked "are people going to have a problem with our project initially having all members from one company?"

Thinking more about it, this seems very much like one of those things where the community says one thing and does another. Let's start with the knocks against these kinds of arrangements: in short, it can seem like a company trying to recruit open-source developers to do their work for them, for free. After all, if there's already a "community" of developers from the company working on the project, that could make it all that more difficult for an outsider to make inroads, have some say, etc. It also means that the the corporate developers may make decisions that are best for their company (and their jobs) rather than what's best for the project.

So there's the case against. Let's consider the case for open-source projects dominated by a single company. For one thing, when a company does a free-as-in-beer release, don't a lot of us complain that they should just open-source it? Well, isn't that exactly this scenario in a nutshell? The dominated-by-one-company project has the developers who wrote it and will presumably be maintaining it. Another point in favor of this arrangement is that the paid developers will keep the project going, so outsiders might be able to participate at whatever level of involvement suits them, without fear that they'll be saddled with the project's make-or-break tasks, since the hired help can take those. And this arrangement pretty much guarantees the project won't perish for lack of attention, which happens a lot in open source.

So there's some pros and cons. What do developers think, and what do they do? Sun's control of Mustang or IBM's dominance of Eclipse hasn't prevented outsiders from joining and contributing to those projects. On the other hand, JBoss' frankness about their policy of "corporate open source" continues to generate flak from some segments of the open-source community. And Daniel Steinberg reminds me that Apache won't graduate a project from the incubator until it has committers from multiple companies.

So, single-company-dominated projects... are you interested in joining? We pose this as today's java.net Poll, which asks "Would you contribute to an open-source project dominated by employees of a single company?" Cast your vote on the front page, then check out the results page for results and discussion.


kwalsh contributes a key example to JAX-WS in today's Forums, according to the message HTTPS example posted in CVS repository: "Many users have asked about JAX-WS using HTTPS. A self-signed HTTPS JAX-WS sample has been commited to the jax-ws CVS repository under the samples/fromwsdl_secure directory. This example will run with both the client and server on local machine. The Readme.txt file has minimal directions for configuration and generation of keystore/truststore files. The information in the Readme file will be added to as questions come into the forum."

sbusch argues for a better out-of-box experience for SwingX developers in Re: JXDatePicker w/DefaultDateSelectionModel: "I hope what's not to missed amongst all this angst is that lowly application developers like myself, not smart enough to write the controls themselves, but have the neurons necessary to use them. The Joe/Steve six-pack developer sees JXDatePicker as a single control and says "cool" and writes a handful of lines to control the range of dates allowed and things he's done. n weeks go by, and someone finds a bug because users in fact were able to enter dates out of range. My bad. If you guys/gals honestly expect Joe/Steve to use your stuff, it's going to have to work out-of-the-box easily, and that means a default behavior of correctness, even if it's at the expense of some flexibility."


The release announcement NetBeans IDE 5.5 Beta 2 Released tops our collection of blurbs in Java Today. "NetBeans.org is proud to announce the availability of NetBeans IDE 5.5 Beta 2, Mobility Pack 5.5 Beta 2, and Profiler 5.5 Beta 2, all available from the NetBeans 5.5 Beta 2 Downloads page. Updated versions of Enterprise Pack 5.5 and C/C++ Pack 5.5 will be coming soon. The focus of NetBeans 5.5 is Java EE 5. This release supports the Java Enterprise Edition 5 platform, Java Persistence, EJB 3 and JAX-WS 2.0 specifications. The NetBeans 5.5 Beta 2 release provides improved quality with more than 500 bugs fixed.The final NetBeans IDE 5.5 release is planned for October, 2006. As always, we welcome and encourage your feedback and the sharing of your experience on our mailing lists."

java.net blogger Eitan Suez unveils his NakedObjects-inspired application framework, jMatter, in the ClientJava.com article Extreme Agility with jMatter: "jMatter is a modern framework for constructing two-tier business applications in Java. It was recently open-sourced, and it is my privilege to introduce you to this framework. jMatter was built on a simple premise: that many of the services that business applications depend on are generic, and can be implemented generically."

Eugene Ciurana has benchmarked a variety of Mac models for TheServerSide and presents his findings in the article The Mac as a Java Development and Execution Platform: "Nobody can deny that Apple manufactures very handsome machines but there are endless debates about whether they perform better than equivalent machines running Linux or Windows. The introduction of Intel-based systems exacerbated the debates. This, coupled with a work-related project in which I get to test the performance of various servers running Java, moved me to try some of my benchmarks on several Mac models, and to compare them against other Intel- and AMD-based systems. Are you ready to find out if Macs are really the best machines running Java when it comes to performance? Read on!"


AWT engineer Andrei Dmitriev considers 77 unrequited votes in today's Weblogs. "I was surprised by the fact that there are only 14 CRs require one or another change in the GridBagLayout class behavior. Believe, we have more defects in this class than are reflected in our defect database."

Malcolm Davis explains that The Java DB, or better yet, the JRE DB, is just a RFP item. "Many people are missing the point about the embedded Java database. The database is not about being a technically good thing, but answering a checking box on the RFP list."

In the tutorial blog entry Trip and Tick 2: JooJ up your project page with a Web Start demo, Evan Summers writes: "You got screenshots, you got screencasts, but have you got an launchable demo? Neither did I..."


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Hey kid, want to join an open-source project?  
kfarnham

Up the Junction Blog

Posted by kfarnham Jul 19, 2006

Mapping your way to SwingX-WS

After a month or so of widespread grousing about the unavailability of source from JavaOne's Aerith demo, we're seeing more activity from this effort than I think a lot of us expected. Not only has the Aerith source been available for a while now, but the webservices part of the photo-mapping demo is now the cornerstone of a major new project.

Josh Marinacci sent word yesterday of the debut of SwingX-WS, an LGPL-licensed project which "contains a set of JavaBeans for interacting with web services":

Initial beans include support for several Yahoo and Google webservices such as searching news, video, images, and financial data, as well as a generic tile based mapping component (as seen in the Aerith demo at JavaOne 2006), The SwingX-WS beans have been designed with graphical configuration in mind and work very well inside of a JavaBeans aware editor such as NetBeans.

The SwingX-WS project is actively seeking new developer to enhance the existing beans and build new ones. We would especially like to see beans for accessing Google's search services, Flickr photos, Microsoft Live, MusicBrainz metadata, and enhancements to the JXMapViewer for connecting to NASA map servers.

Currently the SwingX-WS project has the following beans:

  • BackgroundWorker: a configurable wrapper around SwingWorker for performing long running tasks.
  • JXMapViewer: a generic viewer for tile based map servers
  • Yahoo Search: a non-visual bean for calling Yahoo's various search services, including images and video.


The SwingX-WS project was talked up on Tuesday's Java Posse podcast, which took particular interest in the World of Warcraft mapping component described by Joshua Marinacci in his blog Getting started with the Aerith Mapping Component.

I blogged Tuesday about all the heavy lifting that SwingX is doing in a code re-org, and this is obviously further evidence of a real upswing in activity in the Swing group's activity. Desktop developers look to be getting some pretty nice stuff to be working with in the near future, and being in the form of open-source projects on java.net, you can get in early or even help out.


Also in Java Today, TheServerSide is hosting a free downloadable PDF of the book Mastering Enterprise JavaBeans 3.0 by Rima Patel Sriganesh, Gerald Brose, and Micah Silverman. "Published in July 2006, the best selling bookMastering EJB is now in its fourth edition and has been updated for EJB 3.0. This edition features chapters on session beans and message-driven beans, EJB-Java EE integration and advanced persistence concepts."

Handlers are interceptors that can be easily plugged into the Java API for XML-Based Web Services (JAX-WS) 2.0 runtime environment to do additional processing of inbound and outbound messages. The first part of the latest SDN Enterprise Java Technology Tech Tip, Writing a Handler in JAX-WS and Inheritance and the Java Persistence API, shows you how to write a SOAP protocol handler and a logical handler for use with JAX-WS.


In today's Feature Article, S. W. Eran Chinthaka offers an Introduction to StAX: "JSR 173 defines a pull streaming model, StAX (short for 'Streaming API for XML'), for processing XML documents. In this model, unlike in SAX, the client can start, proceed, pause, and resume the parsing process. The client has complete control."


Simon Morris says Okay, I was wrong! in today's Weblogs, but he's not entirely backing away from questioning why Java DB was dropped into the Mustang JDK and whether it's of genuine value to desktop developers. "I still have serious doubts about many of the arguments supporting the whole Java DB thing, but some of the feedback has made me think again."

In Java 2D Trickery: Soft Clipping, Chris Campbell offers "The first installment in a series of Java 2D tips-and-tricks: wouldn't it be nice if you could antialias those hard edges to remove the jaggies caused by clipping?"

And in Scale Up vs. Scale Out, Malcolm Davis says "For years I've had the discussion with developers, database administrators, and system admins on big-box vs. the multi-box solutions. The question is 'How is scalability achieved'?" 

In today's Forums,rickcarson makes a redundant declaration and wonders about how it works in Stupid question: Webservice->Session bean... why bother? "I have in Netbeans 5.5 beta slapped together a container managed Session bean, and then pointed a Webservice at it. Interestingly, the Webservice is *also* a Stateless session bean, which strikes me as odd, redundant or both. Clean and build is fine. Deploy is fine. However the lookup function which was autogenerated for me fails to find the original Session bean. Probably because it is not actually getting deployed (at least, that is the stack traces story and it si sticking to it). But I cannot find how to tell Netbeans 'Yo, Netbeans, deploy this stateless Session bean'."

David Grace has a gift for all you Java audiophiles in RE: Java 3D Sound (spatialized audio): "I have uploaded code into the 'org.jdesktop.j3d.audioengines.joal' branch of the j3d-incubator project that successfully implements rendering of sound using joal. There are also test classes in 'org.jdesktop.j3d.apps.sound' which test each type of sound using the new joal renderer This code seems to work well for all sound types (BackgroundSound, PointSound and ConeSound). It has only been tested on Windows so far. Instruction on how to use this class is included in the top of the java class file and also the javadocs."


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Mapping your way to SwingX-WS  
kfarnham

Hourglass Blog

Posted by kfarnham Jul 19, 2006

Time to request language changes?

With Mustang rolling towards release and ideas coalescing for Dolphin, a number of people are starting to talk about changes they'd like to see not just in the platform but in the language itself... hopefully in time for Dolphin-era development. We feature two of these on the front page today: one is about code clarity and compactness, the other is about performance.

David Walend blogged a few months ago about cleaning up Generics syntax by allowing dot access to type parameters' type parameters. He recently got it into the bug parade as RFE 6448707, and he blogs about it in What Giants? - Vote For My Generics RFE:

The RFE will also need some good rational discussion. I held back my irrelevant knee-jerk reaction -- "Didn't we all out-grow one-letter-variables when we traded our PETs for C-64s?" I could send a link to an old blog, but even that might distract from the cause. Please keep in mind that we want these folks to do us a favor. I'm working on a response that frames the RFE as "encapsulation vs. exposure," to dispel the "inference vs. explicitness" suggestion.

Meanwhile, lots of people saw the Slashdot article that talked up the InformIT article Debunking the Myth of High-level Languages. While the article points out some advantages of runtime compilation and optimization (like HotSpot) that make Java potentially faster than statically-compiled C, it also dings Java for performance-killing bounds-checking of arrays, and the non-existence of a Java class or type that could map cleanly to the vector processing units of modern processors (MMX, SSE, AltiVec, etc.).

The article prompted user dog to kick off a forum thread on SIMD/Parallel processing support for Java:

"Just read this article: Debunking the Myth of High-level Languages. It was talking about high vs low level. It pointed out a flaw in Java regarding lack of SIMD support for modern architectures. If there were some sort of new 'array' construct in Java that would allow you to operate on it as a single object, then different VMs could take advantage of SIMD instructions on the CPUs to make set opertations very fast and take better advantage of the CPUs."

What do you think? Do we need another primitive or class that's built for vector processing? Do we have one already, or one that could be repurposed for this? Does it matter? Surely, there's lots to talk about on both of these proposed language changes.


Also in today's Forums,guyo could use some help with a XCODE documentation link: "I'm new in the mac world. Have a lot of experience on PC platform but it's time to change for lots of reasons not to discuss here. I started with some written java code imported in xcode. I downloaded the latest java 5 bundle. If I try to select a java keyword let say PrintWriter and click on the search in documentation or reference it can't found the keyword. I tried to extend manually the links but without result. I can see all the documentation indexes on my disk in the java directory. What can I do to have this link set up properly in the help?"


Speaking of the Mac, the Java/QTJ-based replacement for Apple's QuickTime Player Pro is continuing to improve, as noted in Java Today, which notes thesixth development release of the Amateur media player is now available. This release integrates much better with the Mac Finder. For instance, it is now possible to make Amateur the default player for QuickTime and other movies. The Movie Info dialog has also been much improved. Amateur is now an essentially complete media player. Much work remains to be done to fully support editing and recording features though...

Cay Horstmann's Blog has step-by-step instructions, with pictures for Installing GlassFish and PostgreSQL on Ubuntu Server Edition. He writes "First off, apt-get is great. This was far and away the easiest JDK installation I have ever done. I didn't have to fuss with the PATH. I'll get alerted when new versions appear and can update them easily. There is some behind-the-scenes work that makes Sun's Java the preferred one (rather than GCJ). I'd love to be able to run apt-get install glassfish. I never installed much software on a headless server before and I was pleasantly surprised how easy it was. But if that isn't your cup of tea, you can use the admin web interface to do most steps."

The 0.4 early access release of Compute Servertechnology is principally a maintenance release, and includes numerous small enhancements and bug fixes that aim to simplify and improve pre-existing functionality. Among these, enhancements to the Output Processor interface (and corresponding changes to the class template) make results more easily accessible to developers, support for the detection and resolution of missing native libraries has been added, and on-grid VM options can now be specified by the developer. Minor UI updates have been made to the project Run Properties dialog to improve clarity. The release also features a new example that illustrates how to implement the Map/Reduce design pattern.


Rajiv Mordani takes a look at projects for AJAX enabling Java Web applications in today's Weblogs. "Sun recently announced two initiiatives at JavaOne 2006 to AJAX enable JSPs and JSF components - jMaki and JSF-Extensions. When we announced the efforts, there was confusion about the two and it was viewed as the two technologies were competing. This document helps resolve the confusion and show that the two technologies are complimentary."

Meanwhile, David Herron spells out the need for Java DB in the JDK, and SQL in desktop applications There was a little 'discussion' about the inclusion of Java DB into the JDK. I was on vacation and didn't read it too deeply. At least a) it's only in the JDK, and it's the JRE download size that's more of an issue than is the JDK download size ... b) it's not in rt.jar but instead a separate directory in the JDK ... What struck me, though, is the idea that a database is only suitable for server side applications.


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Time to request language changes?  
kfarnham

Pulling Muscles Blog

Posted by kfarnham Jul 18, 2006

SwingX prepares for some heavy CVS lifting

Oh, I soooooooo don't miss CVS. Actually, day-by-day CVS is just fine -- be sure to cvs update often, check in your code often (as long as everything builds), and life should be good. Even merges aren't as scary as some make them out to be. No, the scary part with CVS is when you have to move files around in the repository, something CVS wasn't really meant to do. It's something you have to do directly on the server, and it's not pretty.

This scenario was surely one of the top things that Subversion set out to do right, and having used both systems, it really is nice to know that I can svn move my way out of bad repository decisions (like not having trunk, tags, and branches directories from the start), or to be able to repackage my java classes into new hierarchies with impunity, from the client-side command-line or with a GUI.

By the way, everyone's clear that you can use Subversion for new java.net projects, right? That hasn't always been the case, and it was rolled out slowly, so a lot of people might not know it's an option. But yes, for new projects, you can choose CVS or Subversion for your repository. That said, there's no service to magically transmogrify the CVS history of existing projects into a Subversion repository -- the workaround, if you really want to move to Subversion, is to start a new project, choose Subversion as your source-control option, and once approved, to add all your existing source to the trunk, leaving the previous project as an archive of the old code.

I've got CVS moves on the mind, because it sounds like the SwingX project has a pretty nasty re-org looming, one that they'll need server-side admin access to pull off. If you recall Joshua Marinacci talking about SwingX in a pre-JavaOne podcast, he said that SwingX was getting ready to determine which components would be ready for a 1.0 release and which would need to be set aside for further work. Well, now the reorg seems to be taking shape, according to Richard Bair's forum message Re: SwingX roadmap?, in which he says:

I was planning on bringing this topic up next week, but since you asked it, here it is. One of the issues we've had with SwingX is to define which components are finished (where finished means 1.0 quality), which are a work in progress, and which are experimental. Arguably we should have done this when we split JDNC up and created SwingX. Also, as much as we'd liek to continue adding new features forever it's time to get a 1.0 release out the door (timeframe not yet determined) so that developers have a stable base to work on. To that end, Romain and Josh and I have drafted a plan we want to discuss which will give us a beta release quickly, but will require some CVS changes.

He goes on to list the many SwingX components, with an initial assessment of whether its going onto a "release candidate" or "development" branch, and with notes of the to-do's.

There's a lot of functionality in SwingX to look forward to, but I can tell you from experience, the CVS work is going to be a bear.


Also in today's Forums,ejb3newuser has some Questions regarding Persistence Context and Detached Entities: "I am a new user of EJB 3.0. I have some doubts regarding the persistence context and the detached entities, as listed below: In case of an extended persistence context, if an entity is persisted within a transaction, will the entity remain managed after the transaction commits? If yes, how does the persistence provider make sure that the same entity is not persisted again when the next transaction commits (assuming that the same entity is never used in the next transaction)? If the persistent provider keeps checking the states of all the managed entities in the extended persistence context at transaction commit time, it could be a huge performance overhead because the number of such entities would keep growing with every new transaction."


In the latest Feature Article, Johannes Brodwall introduces a handy data-management technique inLazy Loading is Easy: Implementing a Rich Domain Model. Lazy loading -- not fetching data until it's needed -- is an approach that gets a lot of developers nodding their heads in agreement, even if they don't actually try implementing it themselves. But as this article shows, it's not hard to do, and conveys some genuine benefits.


In Java Today, NetBeans has announced the release of the first milestone build for NetBeans IDE 6.0 and NetBeans Profiler 6.0. Milestone builds will replace the present Q-Build system and are designed to provide a fuller set of features, more stabilization time for new features introduced in the trunk, and more time for feedback from the community. You can get the Milestone 1 builds NetBeans 6.0 and NetBeans Profiler 6.0, see a full description of the Milestone build process, and view the New and Noteworthy Features of the Milestone 1 build.

A Computer World special report on Hot Skills, Cold Skills argues that "the most sought-after corporate IT workers in 2010 may be those with no deep-seated technical skills at all. The nuts-and-bolts programming and easy-to-document support jobs will have all gone to third-party providers in the U.S. or abroad. Instead, IT departments will be populated with 'versatilists' -- those with a technology background who also know the business sector inside and out, can architect and carry out IT plans that will add business value, and can cultivate relationships both inside and outside the company."

The Mac Java Community recently noted Ninjar, a free-as-in-beer Spotlight importer that allows OS X to index the content of .jar (Java Archive) files. Its author says: "As a Java developer myself I found it infuriating that there was no simple way to find which .jar a certain class or package could be found in. This importer aims to help by leveraging the power of Spotlight and enabling you to enter package or class names into the search bar."


Continuing the spate of blogs about desktop development and the appropriateness of bundling Java DB with the Mustang JDK, Joshua Marinacci asks Do We Need Databases on the Desktop? in today's Weblogs. "Do desktop apps need a database? Rather than say yes and describe why this is so, I thought I'd simply go through the applications installed on my computer and speculate about which ones have or could have a real database inside."

Greg Murray introduces The XmlHttpProxy Client for Java: "One drawback of working with AJAX is that an AJAX-based client cannot make calls to URLs outside of its domain, which means that it cannot access services located on another server. A Java based proxy can be created to allow a client to access content from other domains and gives you the ability to transfrom and have better control of the data you allow your clients to see."

Finally, in JXTransformer: The power of a real Swing !, Alexander Potochkin introduces some broadly-useful rendering hacks: "A long time ago I wanted to have a component which could paint rotated text for my application I definitely could create my own component, override paintComponent(), implement correct resizing etc... Yes, it was clear how to implement your own rotatable JLabel, but what if I want to have a rotatable JButton and I want to have it for each Look and Feels, how many classes I would have to sublclass in this case? "


Sun Microsystems, Inc. invites you to take this one-page survey for developers. Name and email are not required, unless you want to participate in the random drawing to WIN a six-month subscription to the java.net Safari Bookshelf.


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



SwingX prepares for some heavy CVS lifting  
kfarnham

No Place Like Home Blog

Posted by kfarnham Jul 17, 2006

Returning to our normal schedule

OK, I'm back home. Again. You probably didn't notice (because I pre-loaded the page Thursday night and pushed it Friday at 6AM), but I was AFK most of Friday because we did a one-day road trip to Nashville, becasue that's where they were holding auditions for "Who Wants to Be a Millionaire," which my four-year-old loves to mimic, and which my wife passed the test for. So that was fun, but yet another day in which I had to pick off all my work to-do's in little chunks of time here and there... probably not the smartest thing to do one day after returning from a week-and-a-half long trip, but it was a rare opportunity, and not that bad a drive from Atlanta.

Anyways, now that all this travelling is behind me, we should be back to our usual updating of content on the site. There's a new spotlight item today, and new feature articles are lined up for Tuesday and Thursday (one should have run last Thursday, but was held up at the last second).

A couple of items on the front page pick up on the recent discussions here and elsewhere about desktop Java, particularly the message sent by Sun arbitrarily adding Java DB to the Mustang JDK. Keeping this ball rolling is Java rock star, Aerith co-author, and former (future?) Sun intern Romain Guy, who asks Is Java SE becoming too much like Java EE? Despite the title, he argues the recent addition of Java DB to the Mustang JDK is a good thing for desktop developers. "Don't think of the DB as the core element of your application, think of it as an asset. Your application does not have to be a CRUD oriented piece of software to make use of a DB. It just has to be, well, an application."


Also in Java Today, the Mac Java Community home page notes "the java-dev mailing list message ANN: Now Available Java SE 6.0 Release 1 Developer Preview 4, [which] brings word of the latest build of Mustang for Mac OS X, for both Intel and PowerPC systems. This latest developer preview is available from the Apple Developer Connection to all ADC members, including those at the free 'online' level. Note that ADC pre-release terms and conditions still apply, meaning the build can only be discussed on Apple's feedback channels. Also note that this preview release is not removable."

The recently released Google Web Toolkit (GWT) is a comprehensive set of APIs and tools that lets you create dynamic Web applications almost entirely in Java code. Philip McCarthy's Exploring the Google Web Toolkit shows you what GWT can do and help you decide whether it's right for you.


Dru Devore asks Where is development with Java going in today's Weblogs. "Technologies have come and gone over time. Is the latest round of technologies getting the hype worth integrating into a Java system? I am interested in hearing the feedback of the Java community about the latest and greatest technologies."

In World Wide sWing, Evan Summers writes: "In a comment in Simon Morris' blog 'In Defence of the Desktop' he suggests 'Perhaps this just highlights how the desktop and web worlds are so very very different?' I suggest that this just highlights how the desktop world is so very very diverse :) " 

Arun Gupta works through an interop problem in RESOLVED: WSIT and WCF Jun CTP Interop Bug: "Seems like this CTP completely ignores a standard W3C extension element to indicate WS-Addressing on a binding/port. It generated the proxy correctly but of course the client did not send expected WS-Addressing headers and thus the endpoint faulted appropriately."


This week's Spotlightis on the jMaki project, which "is all about enabling Java developers to use JavaScript in their Java based applications as either a JSP tag library or a JSF component," by allowing mixing and matching JavaScript widgets from different Ajax frameworks. Out of the box, it provides bootstrap widgets for components from Dojo, Script.aculo.us, Yahoo UI Widgets, Spry, DHTML Goodies, and Google. A buzz page collects articles and blogs about jMaki, as well as guides and tutorials to using it.


In today's Forums,kirillcool addresses the practicality of LAF RFE's inRe: BasicTabbedPaneUI.TabbedPaneScrollLayout: "The (harsh) reality of LAFs is that most of them target 1.4.2. Some (like Substance) dare to venture and be so bold as to require 5.0 to run (and then i have to face the e-mail requests to backport it to 1.4.2). With Mustang missing this fix and proposed Dolphin timeframe - what does it give me really? I mean, for this specific case we are talking about making some stuff protected instead of private. So, even if it's done in Dolphin, i can't just start using it under Tiger, right (reflection and various precompiling techniques aside). We are not talking about a code bugfix, we are talking about the API change."

bcscomputers seems to have hit a wall in bringing EE approaches to SE in Re: Using EntityManager: "I have done as much as I can with the method of getting an EntityManager in an SE environment ... and have been unable to make it work. At a later time I want to see what will be required to make my application run Standalone, using the EJB3.0 facilities. At that time I will double back to try to make the SE approach work. But in the meantime ... Given that all methods of getting an EntityManager that use dependency injection work only in "managed objects", and my application is designed to use a non-mamaged class in which the application executes all database access, I cannot use any of the approaches which use dependency injection. I am down to being able to use only one approach: obtaining an EntityManager by direct JNDI lookup. Having sorted this out, I will now try to make that approach work okay in my application."


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Returning to our normal schedule  
kfarnham

The Kids Are All Right Blog

Posted by kfarnham Jul 13, 2006

Are we really tool-dependent?

Let's face it: one of the most popular knocks against Java complexity, particularly EE's complexity, is the question of tools. Namely: is it wrong for something to be complex, if that complexity can be hidden or managed with tools?

After all, once again we have EE complexity being bandied around as a fatal flaw in the article Analysts see Java EE dying in an SOA world. But for a lot of people, this complexity is managed by tools, specifically IDE's, that manage relationships, generate code, etc. Is that a bad thing? Well, what's the standard of value? Is it programmer productivity? If programmers can be more productive with tools than without, is that a bad thing? Do we need our libraries to always be hand-codable, at least in theory? Do we think someone is going to come in and take Eclipse and NetBeans away from us? And aren't there other programming frameworks that are popular because of their tooling? Where's the complexity argument against Microsoft's Visual tools or Apple's XCode?

Maybe there's more to the EE complexity story, but time and again, I hear the same argument thrown at EE: it's so complex that you have to use tools, and that's a bad thing. Do you buy either of those premises? Is there an argument without either or both of them?

While this topic is a fresh thought, let me put it out there as the topic of the latest java.net Poll, which asks "How dependent are you on your IDE?" Cast your vote on the front page, then visit the results page for results and discussion.


In Java Today, the eighty-sixth issue of the JavaTools Community Newsletter is online, featuring news from community projects, and announcements of six projects that have joined the community. It also has a tool tip on how to use Maven 2 to create a project web site.

What does the future hold for Java SE? Is it to be anything more than the basis on which to build EE (and its enterprise counterparts/rivals, like Spring)? Where is Desktop Java going? Daniel Steinberg has taken a look at the history and prospects for Desktop Java and he sees the best hope not in open-sourcing it, but in letting someone else develop it, someone who better understands end-user desktop applications. Take a look at his opinion piece, Outsourcing Java SE, and see who he thinks should take the reins of Java on the desktop.

The Java Web Services and XML community home page points out the XML.com blog entry Kernow 1.4, A Graphical Front End for Saxon, Written in Java 1.5 Now Available, noting that "it's intended for anyone who currently uses Saxon to process directories of XML and would benefit from caching, or who uses Saxon from the command line and gets fed up typing in paths each day."


Cay Horstmann digs into Web Start and finds Certified Insecurity in today's Weblogs. "I used Java Web Start as a 'poor man's installer' for a Java client app that allows students to check their homework assignments. The app needs 'all permissions', so I simply signed it with a worthless self-signed certificate. The Web Start security dialog is complete gibberish to 99% of end users, which works in my favor. Something is wrong here. Should the JNLP API be less convoluted, so that it is easier to live in the sandbox. Should it be less of a hassle for an individual to get a real certificate?"

Contininuing his desktop series, Evan Summers offers another installment, Swing and Roundabouts 3: Framewarez: "We might use the spreadsheet paradigm for our Swing application, where our 'screens' are worksheets, and we switch between worksheets using a tabbed pane. We want a menu bar and tool bar for opening new worksheets, ie. a 'menu system' in legacy-speak. So let's get us some framewarez, like a JFrame with a JMenuBar and JTabbedPane, to plug our JPanel worksheets into."

In Greenbox: Consuming Metamodel as XML, Edgar Silva digs deeper into Greenbox: "As Alexandre Gomes told on JavaOne2006 'Greenbox is a lot of ideas'. Besides ideas, it have a lot of very easy instruments to generate source really easy." 

bobsledbob announces a very interesting Swing Labs component in today's Forums. In JXPicker - first crack and discussion, he writes: "So Hi, I've uploaded some code into the incubator. It's this concept I've been kicking the tires on called JXPicker. The idea is to create a generic combobox like widget which can accommodate picker components which aren't easy or favorable to create by extending JComboBox. My example use case is a JTree embedded in the popup. Or, for another example, the JXDatePicker which uses a trigger button to display a monthly calendar. It's my thought that there are tons of these one off picker components out there. JXPicker is meant to provide a base class for all those components to use and work with. With luck, we can get the plaf issues hammered out nicely and as such, extensions of the JXPicker can then easily get look and feel changes for free."

twalljava seems to be pushing the limits of headless AWT in w32 "service" mode, or what's my Robot been drinking? "I ssh into my w32 laptop using cygwin sshd. I run java. Java thinks it's got a display, and while I can instantiate java.awt.Robot, it thinks the entire display is black, and proves ineffective at generating any events. Where am I? Is this untested limbo-land? Does windows have a special 'service' mode that makes it look like you have a display when you don't? Is this scenario explicitly accounted for anywhere in Java, or does it just happen to mostly work because w32 is faking out a display?" 

In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Are we really tool-dependent?  
kfarnham

You Better You Bet Blog

Posted by kfarnham Jul 13, 2006

More on desktop direction

Thanks again to Daniel Steinberg for handling yesterday's daily blog while I got the family from Traverse City back to Atlanta (drive drive drive, fly fly fly, drive drive drive). The combination of voices on this blog has worked surprisingly well for getting a rolling discussion going... maybe just a little at the party line's expense while Sun was on vacation last week (remind me to point to this series of blogs next time some troll asserts that java.net lacks editorial independence).

To catch everyone up, in swapping blogs, Daniel and I have had quite a bit to say about Desktop Java. It started back in Substitute, when Daniel noted the curious-at-best (my characterization) decision to put Java DB in JDK 6 (just the SDK, not the JRE), and not some homegrown libraries that could seemingly do the desktop developer a lot more good, like Jini and JXTA. In Anyway, Anyhow, Anywhere and Let's See Action, I started talking up USB support, and in Friday's Eminence Front, I combined all these threads with the idea of a direction for desktop java: "focus on stuff that webapps and Ajax can't/don't do well", such as device support, spontaneous networking, multimedia, etc. And even if you don't care about the desktop, I argued that "enterprise Java is not well served by having a neglected, underpowered desktop cousin."

This thread has gotten a little traction, getting noted on the latest JavaPosse podcast, among other places. It also spurred an extensive new blog from Simon Morris, In Defence of the Desktop.

In his blog, Simon takes the old saw (ha ha) that "when the only tool you have is a hammer, every problem looks like a nail" and applies it to the current direction of desktop Java:

Reading through some of the recent comments on blogs and forums of late I've begun to wonder if there isn't a sizeable section of the Java developer audience who have forgotten the true nature of desktop software? I read comments attacking Swing as being too complex, and suggesting perhaps it should be more like those APIs used to build web application interfaces. At the same time I see a database being included as a standard part of the development kit for SE, the version of Java supposedly aimed at the desktop.

After explaining the profound differences between desktop and webapp development for those who might not have had a taste of both, he brings the discussion around to what's wrong with what we've been getting lately:

If SE is truly the edition of Java aimed at the desktop, and most real desktop applications (browsers, players, word processors, video editors) are not database heavy, why is Java DB being included in the SE JDK? Is it, perhaps, because those who influenced the decision spend too much time banging in nails, and now think the key to making SE more popular is to turn it into a hammer?

There are also some very good talkbacks already, with some calling for a modularization of SE, so that we can get (and deliver) just the pieces that are appropriate for a given application. This would be ideal for those of us who need to deliver audio/video libraries (not included by default) but have no use for a database.


Also in today's Weblogs Evan Summers looks atThe sharp end of the stick: "I like that Java is entering its conservative age. Innovation is overrated for the innovator, and underrated for the follower."

Finally, Aditya Dada has a blog about attending the Better Software conference, in which he talks about "my recent presentation on 'Smoke Tests to Signal Test Readiness' at the Better Software Conference, and a review of a few talks that stood out."


In Java Today, the Phobos project, a lightweight, scripting-friendly, web application environment, has released a new version and has finally posted its source code. As Roberto Chinnici blogs in New Phobos Build, Plus All The Source Code!, "there is a new Phobos build in the documents and files section of our project site. The build is dated July 10, 2006 and is available in binary form for the Solarix/x86, Windows, Linux and Mac OS X platforms." New features include support for JavaScript's E4X extension, the ability to drop new scripting languages into glassfish/lib, and the ability to package Phobos applications as WAR files.

"Java Platform, Enterprise Edition (Java EE) is not going to survive as a major standard programming model in the next five years, predicts Richard Monson-Haefel, senior analyst with the Burton Group, and SOA is part of the reason," according to the controversial (and much-linked) article Analysts see Java EE dying in an SOA world. Monson-Haefel claims "JEE5's failure to address complexity is a harbinger of the Java EE platforms' fall from dominance in the enterprise development platform arena," and that "the Java EE platform will go the way of other once promising standards, such as CORBA (Common Object Request Broker Architecture), which eventually fell out of favor and usage."

In an oldie-but-goodie from ACM Queue, Alex E. Bell writes in Death by UML Fever that "a potentially deadly illness, clinically referred to as UML (Unified Modeling Language) fever, is plaguing many software-engineering efforts today. This fever has many different strains that vary in levels of lethality and contagion. A number of these strains are symptomatically related, however. Rigorous laboratory analysis has revealed that each is unique in origin and makeup. A particularly insidious characteristic of UML fever, common to most of its assorted strains, is the difficulty individuals and organizations have in self-diagnosing the affliction. A consequence is that many cases of the fever go untreated and often evolve into more complex and lethal strains."


kbr has an interesting gotcha about library management in today's Forums. Re: Strange webstart launch problem points out "If you've installed Java 3D in jre/lib/ext (which is what the installers do) then Java Web Start will be unable to override the installed version of Java 3D. In the case of JOGL, this is why we recommend against installing in jre/lib/ext. In general this is a pretty big problem for standard extensions and their evolution and I'm not sure there is a good solution."

demiant tries to figure out a bit of EE/GlassFish confusion in Entity with collections are not changing: "I have an object(X) which is a loaded entity with several collections of other entities(Y/Z), If new entities are inserted/deleted/modified to the DB (of type Y/Z), then as it seems, even if I re-load entity (X) from the DB through the EntityManager, the collections are still not get refreshed. Do I have to call entityManager.resfresh by myself? re-loading the entity is not enough? If so, as I understand, refreshing the entity is only possible if the entity is flagged as managed?"


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



More on desktop direction  
kfarnham

Babble @ O'Reilly Blog

Posted by kfarnham Jul 11, 2006

A rolling EE/Spring discussion over on ONJava

Some topics are bound to kick up controversy, and one of the easiest arguments to get started is Spring vs. Java EE. Or is it "complexity" versus "standards"? It's hard to tell sometimes if we're really having the same discussion. The EE side clobbers Spring for supposedly not being part of an open standard (whether or not it's a de facto standard unto itself is quietly ignored), while the Spring-o-philes bash EE's "complexity" and bloat (setting aside the issue that most developers will ignore the parts of EE that don't relate to them).

An InfoQ article rounds up several links on the topic of Is Java EE 5 Lightweight Enough?. Starting with the internetnews.com article Is Java EE's Complexity Its Worst Enemy?, it then links to ONJava blogger Steve Anglin's follow-up Is the new lightweight Java EE 5 light enough?, which steers the question to standards and whether or not those are part of developers' and their clients' requirements. And here's where people are saying some interesting things. For example, user "Mick" says:

I think the complaints about J2EE's complexity are exaggerated by a vocal minority with an agenda to promote. The JDBC/JSP/Servlet levels of J2EE are pretty easy for java/web newcomers to pick up and have been sufficient for a lot application & integration projects I've worked on over the years. EJBs admittedly come with a lot of interface/xml baggage that introduces a learning curve, but this is largely simplified when EJB development is undertaken with the appropriate tools. The EJB sections of J2EE were designed for the enterprise sector with particular scalability & long-term maintenance requirements that benefit from an open specification & framework.

But the "what good are standards anyways" contingent can give as good as they get, as in this message from user "Terry":

From a lot of the experience that I've seen, JEE standards don't fulfil on that mission to keep things from going obsolete. I've seen multi-million dollar projects emerge time and again for upgrading to each new version of Websphere. And a big portion of that is always reworking based on how the product had to change in response to the standards. I know that in theory if you stick to the letter of the standard in your implementation that you should fare well, but it never seems to work that way in practice.

This argument isn't getting settled today, but Steve's blog has kicked off a better discussion than usual, and for the objective reader, it gives you a good view of the real-world experiences of a lot of enterprise developers.


Also in Java Today, Sun Microsystems has made its new Java CAPS RFID Developer's Kit available on java.net in the JCAPS RFID project The JCAPS RFID Developer's Kit extends Sun's Java Composite Application Platform Suite to integrate the Sun RFID software. JCAPS greatly simplifies implementing RFID in sophisticated enterprise application integration environments. It delivers powerful data transformation and integration capabilities for RFID solutions. The JCAPS RFID project makes the toolkit available for JCAPS developers starting with V. 5.1.0. A retail vendor demo is included to provide a working B2B example.

The blogs.sun.com entry JCheckBoxMenuItem & JRadioButtonMenuItem (Part 2) discusses radio button behavior when applied to menu items. "The thing to use is a ButtonGroup, which is simple to implement in Matisse -- just drag and drop one onto your form. But what about when we're not designing graphically, but doing everything in the code? And, secondly, we'd need two or more menu items, all subclassing CallableSystemAction. How are the JRadioButtonMenuItems in these separate classes going to share the same ButtonGroup?" It turns out only a few lines of code are required to achieve this functionality.


Richard Bair has A (Barely) Better Looking Yahoo! News Demo in today's Weblogs. "I was greeted this afternoon by a retching Hans Muller who begged me to upload a better looking demo for the Yahoo! News web service I posted about last time. He likened last week's entry to a fat man in a speedo. Yikes. Here's a barely better demo (pun intended)."

Gregg Sporar wants to Get To the Point: "Get to what point? A profiling point. What is a profiling point? Read on for more."

In Java EE Service Engine: Bridging Java EE and JBI, Binod writes: "For some time now, I have been thinking about writing about some use cases of Java EE service engine, explaining how it bridges Java EE and JBI. This blog explains a composite application, whose main entry point is an MDB. Towards the end of the blog, some details of the implementation is also provided."


In today's Forums,jada clears up some Java3D implementation details inRe: Bounding Volume Hierarchy in Java3D? "Looks like a clarification here might be helpful. A scene graph isn't a geometric tree; it is a parent-children relationship tree. Java 3D scene graph is no difference. To speedup geometric query such as rendering and picking, Java 3D maintains an internal binary hull tree (aka. BHTree). This tree is created solely for Java 3D internal usage. No subtree of the BHTree is accessible via Java 3D APIs."

ramapulavarthi points out changes in the JAX-WS spec in Re: jax-ws handler init parameters injection: "As per JSR-109, 'the element init-params in the deployment descriptors is no longer used for JAX-WS based container. If needed, the developer should use the environment entry elements (<env-entry> declared in the application component's deployment descriptor for this purpose. These can be injected into the handler using the @Resource annotation or looked up using JNDI.'"


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



A rolling EE/Spring discussion over on ONJava  
kfarnham

Another Tricky Day Blog

Posted by kfarnham Jul 10, 2006

Finding bandwidth to push the page

So I'm travelling in Northern Michigan and staying with my parents, who live about 10 miles from any chance of having DSL (don't even start with cable modems... their system is vintage 1993 technology, with no chance of ever being upgraded). This means that to push the page, I either have to read all the blogs, forums, and potential Java Today and news items at 24 Kbps dialup, or hit the road and find some wi-fi.

I left the house at 6AM and drove 25 miles to Horizon Books in Traverse City, where I usually pushed the page last year. They weren't open at 6:30 and didn't open until 7, and I didn't see their SSID from the street, so I drove to Meijer for a Coke Zero and some breakfast, then back to the bookstore and its wi-fi cafe. Now that it was open, I could see that the router up on the wall was turned off. Not working maybe? Broken? Piece of junk? Reminds me of a discussion I had with some of my parents' neighbors, 50 yards (~meters) out into the lake, as I'm catching Keagan jumping off the dock: "My router's defective," the neighbor says. "Why, is the word 'Linksys' printed on it?" I ask. "Yep," he replies. "Well," I say, "there's your defect."

OK, plan B: my dad says the airport has wi-fi. And it does. For $7 a day.

Plan C: I drive over to Computer Haus, Traverse City's Mac store. They're not open yet, but I can see from the parking lot that they have wi-fi. And it's password protected.

 

Plan D: lots of McDonalds' have wi-fi... but not the one on South Airport and Cass streets.

Plan E: I finally decide to go to Border's by the mall and burn off one of my T-Mobile pre-paid wi-fi cards. This finally works - I can just barely see the T-Mobile SSID from my car. Only problem is, it's 8:15 now, and they don't open until 9. So I set up shop at a table outside the store and start building the page. Oh, by the way, I'm wearing t-shirt and shorts, and it's 55°F (13°C).

The things we go through to bring you a fresh site every day, I'm telling you... See you tomorrow from the McDonald's in East Jordan or Kalkaska. Anyways, thanks for indulging my complaining. The technical content begins after the <hr>


In Java Today, Sun and Spec Lead Hans Muller have submitted JSR-296: Swing Application Framework to the JCP. The spec will define "the basic structure of a Swing application. It will define a small set of extensible classes or 'framework' that define infrastructure that's common to most desktop applications: The essential application lifecyle, startup and shutdown, with well defined milestones so that applications can insert startup or shutdown work when the application has reached a well known state." It also provides support for persistent session state and for loading localized resources.

GELC executive director Bobbi Kurshan is evaluating the community's needs, and thinks the next big task is Creating Tools for Open Source Curricula: "After exploring what is needed and what is available in the open souruce curricula arena, I have decided that we need many things, but probably we first need some tools to help developers, designers, and programmers." In a sense, this collaborative environment is like a wiki, though she wonders "What do you think the features of a textbook wiki would look like and how is it different from some of the book wikis that already exist?"

Bruce Eckel relates a story from author Robert L. Glass about When Reuse Goes Bad. "Years ago I was called in to consult on a project that had gone bad. The customer had engaged a contractor to develop the software, which was supposed to take a year and was at the time I was called in, a year late. The main design and technical problem (ignoring for the moment Weinberg's maxim that 'No matter what they tell you, it's always a people problem') was that the contractor had decided that this was an opportunity to develop a reusable software system, and that they could develop this system on the customer's dime. This resulted in classic framework-itis."


Tips, trips, and tricks dominate today's Weblogs. Evan Summers kicks off the novelties with Trip and Tick 1: Checking out a java.net project using Netbeans: "I got an email asking for a document on how to run a java.net project in Netbeans, so here are a bunch screenshots..."

Next, Jean-Francois Arcand offers Tricks and Tips with NIO part III: To Thread or Not to Thread: "This time I give some recommendations about why and when to use Threads when handling OP_ACCEPT, OP_READ and OP_WRITE."

Finally, Edgar Silva expresses his hopes for JSR 198 and IDE collaboration in Javax.Ide ???: "There is a JSR which describes how plugins, extensions, modules, wizards, menus and so on should work: JSR 198. Unfortunally I can't say if NetBeans, JBuilder, Eclipse, IDEA, JDeveloper (big players) are at least really tryng to finish and use this JSR..."


Do you scale? In today's Forums,zambizzi says EJB3 (Hibernate) Doesn't scale well under 'siege' test: "I'm *very* informally stress-testing a simple blogger application I wrote that previously ran on JBoss 4.0.4.GA on Gentoo Linux, using a tool called 'siege' (you *nix users might be familiar.) I've configured Hibernate to work w/ Glassfish b48 as my persistence framework and it appears that something goes wrong w/ Hibernate specifically. My results were not good - frankly I expected better and I hope someone can educate me as to what I might be doing wrong or if there is some way to improve performance/scalability using Glassfish + Hibernate."

marcojacob wonders about the prospects for a JAI version for mobile devices "I need to load/convert/scale images on mobile devices. Will there be a Java ME version of JAI? What other lib should i use? Thanks in advance..."


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Finding bandwidth to push the page  
kfarnham

Eminence Front Blog

Posted by kfarnham Jul 7, 2006

Why not rule the server and the client?

OK, tying together some threads from this week...

On Tuesday, Daniel Steinberg guest-blogged in this space and in a brief aside, he wondered aloud why Java DB was tossed into the JDK and not, say, Jini or JXTA. On Wednesday and Thursday, I suggested an implementation of JSR-80, the USB API, be added to the core, arguing this would improve device support in Java by reducing the need for JNI code to be written for multiple platforms to support these devices. And if you listen to the Java Posse podcast long enough, you'll surely hear Dick Wall talking about the struggles of working with multimedia in Java SE.

So what does this grab-bag of proposed feature adds have to do with one another? Simple: these are all things that desktop applications are far better suited to than are web apps. Ajax may be the everybody's favorite toy right now, but that doesn't mean it's well-suited to every kind of user-facing application. Here are a few tasks that Ajax probably isn't meant to do:

  • Working with external devices
  • Audio/video editing and production
  • Shared-document editors (like SubEthaEdit)

So, how would you write such apps? Well, let's see... with a USB API, we can write a desktop app to use our external devices. With a multimedia API, we could put together A/V apps like podcast editors, and Jini and JXTA can connect the users of our shared-document app, either on the LAN or across the internet.

Daniel asked for a vision on Tuesday. Here's one that desktop Java could adopt: focus desktop Java on technologies and applications for which webapps and Ajax are poorly-suited. In other words, identify these areas in which desktop Java can make a difference in a unique and valuable way, and then do what's necessary to support it.

It's understandable that so many people, inside and outside of Sun, are so focused on enterprise Java because of its consistent success. Challenged by both .NET on the bloat side and the scripting languages on the lightweight side, it might be tempting to adopt a siege mindset and focus just on protecting EE, to the exclusion of desktop Java, but that's probably a mistake. Enterprise Java is not well served by having a neglected, underpowered desktop cousin. A stronger desktop presence would raise Java's esteem among the next generation of programmers, and would be a valuable recruitment tool: hobbyist kids are more likely to code games and media managers than enterprise messaging systems and financial applications.

Would Microsoft even be relevant in servers if they didn't already own the desktop? Well, maybe Java should run the table in the opposite direction: build on its server-side success and move back to the desktop. Maybe by focusing on the apps that need to be on the desktop, and giving desktop developers the tools they need to deliver uniquely-valuable apps, we can do just that.


Speaking of Jini, the starter kit has a new home on java.net. The starterkit project hosts downloads of Sun's implementation of the Jini technology infrastructure services, including helper classes and services such as JavaSpaces. The starter kit will help get you started developing with Jini technology, as well as assist your advanced development and deployment of Jini technology-enabled solutions.

Also in Java Today, JBoss' Manik Surtani tears down popular misconceptions in The Myth of Transparent Clustering, which argues that rather than expect clustering to be enabled and tuned behind the scenes, application developers should instead plan for and develop with clustering in mind. "Keep clustering in mind when designing it, even if there is no immediate requirement for clustering. It will save you the headache, cost and effort of refactoring your code at a later date when you find that your application does not scale as well as you thought it would."

Planning on applying for a Java job soon? Java Developer Journal enterprise editor Yakov Fain has collected common questions you're likely to face in Secrets Of The Masters: Core Java Interview Questions: "If you are planning to hit the job market, you may need to refresh some of the Java basic terms and techniques to prepare yourself for a technical interview. Let me offer you some of the core Java questions that you might expect during the interviews."


Jonathan Bruce takes on what he calls the Ridiculousness of JavaOne reviews ratings in today's Weblogs. "Has the JavaOne rating system been infiltrated with Katherine Harris-like vote counting procedures?"

In The Grizzly Comet or why space shuttle Discovery launch was delayed, Jean-Francois Arcand writes: "Space shuttle Discovery was delayed recently, and the real reason was kept secret. Something strange was observed by the Hubble Space Telescope. The Hubble Ultra Deep Field(HUDF) image was showing a new star coming extremely fast to earth. Even after washing the main mirror with AJAX, the HUDF was clear: the Grizzly Comet is entering our atmosphere..."

Eamonn McManus blogs about Creating type-safe MBean proxies: "MBean proxies allow you to access an MBean through a Java interface, writing proxy.getFoo() instead of mbeanServer.getAttribute(name, "Foo"). But when you create a proxy, there is no check that the MBean actually matches the interface you specify, or even that the MBean exists. Why is that, and what can you do about it?"


The latest java.net Poll asks "What new feature do you most want to see in Dolphin (Java SE 7)?" Cast your vote on the front page, then visit the results page for results and discussion.



 

In today's Forums,toreba continues working a Fast Infoset problem in Re: how can i generate and use a FI external vocabulary: "I put together the snippets of code and was able to print out an external vocabulary. Is there going to be a way of persisting an external vocabulary to a file and using that to initialise a parser for either deserializing/serializing? Because i want to save the fi XML to a database i would need to persist the external vocabulary as well. Or would that be too risky? Perhaps it doesn't make sense to use an external vocabulary in this case? The improved compression is what i am after.

robilad asserts that the JavaDoc license is bogus: "Since Peter Ahe sent me to the Mustang collaboration site to get a peek at the Java Compiler API's spec under a saner license than the JSR draft one, I've looked at the licensing conditions for the API specs. It turns out that they have the same problem as the JSR draft license: anyone using the Mustang JavaDoc needs to stop developing and distributing whatever they are doing as soon as the final spec ships. That's a rather unfortunate licensing restriction to put into a specification, if one may assume that Sun's interested in feedback from implementors and users.


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Why not rule the server and the client?  
kfarnham

Let's See Action Blog

Posted by kfarnham Jul 6, 2006

Seriously, why not implement JSR-80 in core?

Yesterday, I talked about trying to file a feature request to put an implementation of JSR-80, the Java USB API, in core Java, and how that would be a big step towards using Java to knock down barriers, such as device interoperability.

Part of my thinking here comes from my reaction to a forum thread quoted by Jeff Friesen in today's feature article on USB in Java. He wraps up his article by asking whether we should even have a USB API in Java. One line of thinking, in the thread USB support (especially for Windows) argues that this is "similar to having direct access to the physical layer on network cards or directly accessing the SCSI bus," and is thus the responsibility of the operating system.

Maybe that's the nice, clean, separation-of-concerns answer, but for Java-as-a-platform, it leads to a pretty non-functional dead-end. First off, let's stop thinking of USB only in terms of storage devices: of course, those are already abstracted away by the OS as filesystems. Fine. Now let's think about webcams, game controllers, card stripe readers, copy-protection dongles, etc., that use USB. Each of these is profoundly different, and in most cases, they aren't abstracted away by the OS: there's no core Java class that corresponds to the game controller as an input device, and the web cam, card stripe reader, and the dongle really don't have any corresponding representations.

Generally, the assumption has been that we need to use a JNI approach: create a Java representation, then back that up with a native representation for each platform we care about. But the problem with this approach is the spottiness of the platform coverage: for each set of devices we're interested in, we need developers who are proficient in Java and native ([Obj-]C[++|#]) code, and have an interest in these devices... and somehow with all those skills, don't have something better to do. Is it any wonder that important projects go wanting for a lack of qualified developers, especially when native code for multiple platforms is needed?

Now what if we had a broadly-capable Java USB library that was always part of the JDK or JRE distribution? Well, for all of these cases, we could eliminate the need to use native code: write a Java representation of some class of devices, then deliver implementations in Java, by making Java calls to the USB library. This would radically increase the number of developers capable of writing code to work with these devices, as developers who only know Java would be able to produce driver code... and would be able to do it for multiple platforms. In fact, this would even be good news for device manufacturers -- being in the hardware business, they don't necessarily care that much about software, and with a Java version, they could deliver end-user software for all platforms with one code drop.

Write once, plug anywhere. Why is this not already happening?


Returning our attention to today's realities, Jeff Friesen takes a clear-eyed view of the state of USB support in Java in today's Feature Article. In Java and USB, he takes a look at JSR-80 and the state of its reference implementations. He also looks at a rival API, jUSB. Finally, he shows how to roll your own USB library, with a native Windows 95/98/Me/2000 implementation of his own JavaUSB. He also looks at the broad question of whether USB is something that should be exposed to Java application developers, and proposes a novel idea: a high-level serial IO API that would cover USB, FireWire, and Bluetooth.


In today's Forums,nickminutello seeks some guidance for Mixing custom/manual marshalling with JAXB: "Basically, what I need to know is if/how I can use a mix of jaxb marshalling and my own custom marshalling to to marshal/unmarshal an object graph. Stated another way: I want to use jaxb to marshal and unmarshal my object graph but there are objects within this graph that I need to marshal/unmarshal manually (I have to use data that is only available at runtime to do it). I think I can work out the unmarshalling bit - by using an XMLFilter. But at the moment, its not clear to me how I can hook into the marshalling. Is there not some standard mechanism for plugging in custom/manual marshalling for some object types?"

Kleopatra reveals some SwingX internals (and their consequences) in [FYI] JXTreeTable - family secrets discovered: "...probably nothing new to the experts but I had to dig in core code to come up with a shattering fact: JXTreeTable actually _is_ a tree disguised as a table, it's not much more than an empty hull regarding its "tableness", the rendering tree rules near to everything: the content is driven by a TreeModel, the selection is driven by a TreeSelectionModel, and sorting/filtering is not supported because the tree doesn't support it."


In Java Today, Martin Odersky argues In Defense of Pattern Matching in a recent Artima blog: "When I propose pattern matching [to object-oriented programming advocates], I get violent outbursts of rejection. The arguments against are usually a permutation of: 1. Pattern matching is unnecessary, just use the visitor design pattern, 2. Pattern matching is not extensible, 3. Pattern matching breaks encapsulation. I disagree, obviously."

The Semantic Annotations for Web Services Description Language (SAWSDL) Working Group has released the First Public Working Draft of Semantic Annotations for WSDL. The attributes defined in this draft are references from elements within Web Services Description Language (WSDL) or XML Schema documents to concepts in ontologies outside the documents.

Tom Baeyens writes About BPM miracles and what you can expect in real life: "BPM vendors suggest the miracle that drawing a graphical process in their BPM tool will unify analysis, requirements and implementation. I guess it makes sense when you put it like this. But regrettably, many BPM vendors have a poor story on the bigger picture. This post will address the two main problems i have with current thinking around BPM and workflow: BPM vendors often overpromise by hinting that BPM tools can unify analysis with implementation, [and the] lack of integration between processes and plain general purpose programming language"


Jacob Hookom is concerned about the direction of webapp action frameworks in SAF2 and Shale: Missing the Buck, featured in today's Weblogs. "InfoQ.com just announced that Struts and Shale (JSF) are finally parting ways. Integration is one thing, collaboration is something wholly different."

Cay Horstmann wonders about Railroad diagrams: "Does anyone still use railroad diagrams (AKA syntax diagrams)? If so, how do you produce them?"

In Using relationships in the Java Persistence Query Language, Michael Bouschen writes: "The Java Persistence Query Language supports using relationships as defined in the object model in the query. The syntax of a relationship access expression is the same as in Java: a navigational expression using a dot as in o.customer."


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Seriously, why not implement JSR-80 in core?  

Compatibility when convenient?

Despite Java's mission to knock down unneccessary borders, doesn't the official effort seem a little unambitious sometimes?

Case in point: the Java Bug Parade. Right now, I've got USB on the brain because I'm editing an upcoming article on the topic (it may appear tomorrow - it depends how the morning goes). I decided to go refresh my bug/RFE votes for the first time in a few years and cast them for getting a real JSR-80 implementation added to the JRE spec.

Thing is, an RFE like this is something the bug parade is remarkably ill-suited to handle. First, after getting lectured for a page or two that the bug reporting system is not a support tool (no duh), you can start filing an RFE or bug report. Problem is, it makes you pick a category/subcategory combination that puts you in a fairly small box. For example, if you choose "JDK/JRE" as your category, all the subcategories are existing JRE technologies, ill-suited to adding a new one. One wonders how you would file a JRE like "please include Java DB with JDK", but I digress. The focus on existing technologies may bias the RFE's away from valuable new capabilities and steer users into refining existing libraries, which might explain why the top RFE is to implement Ogg codecs for JMF, which would have the pracical effect of taking JMF's collection of outdated, little-used codecs and adding a modern, little-used codec (deal with it, Slashdot types, you know the iPod/DVD/PlayStation mass market doesn't know or care what Ogg is). And that's setting aside the issue of whether JMF is even alive at this point. But I'm off-topic. My goal is really to show how the bug reporting tool biases the kinds of reports that get filed. Add to this that you can't even file a bug or RFE unless you're on Windows, Linux, or Solaris, or at least claim to be, even if your issue has to do with documentation or API design.java.io.File has sucked for 10 years, regardless of what platform you're on -- why shouldn't I, as a Mac user, be able to tell Sun as much?

I have a phone that runs Java ME. I would like to write apps for this phone. Sun curiously decided to put native dependencies in the ME dev kit (why?!) and then not do a Mac version, but that's OK, I can use MPower Player. No, the killer is that I can't get the midlet over the cable from my Mac to my phone, because Motorola's dev tools are Windows only too.

Surely, this irony is not getting lost on the audience here... to work with a language and a VM whose raison d'êtreis device independence, I have to use native tools that are not available for my platform. What is the developer supposed to think of Java's viability when even Sun won't use it for simple tasks like data transfer or ME development (remember, SE'sjavac is written in Java, and surely simple handheld devices could be easily emulated in pure Java on modern desktops).

Part of the problem is the matrix of API's and platforms. Every time you add some new feature that requires native support, you multiply the amount of new code that must be written and maintained, and decrease the chances of it being ubiquitous or successful. The device transfer problem could be solved by moving JSR-80 to the core, but I'll have more on that when Jeff's USB article appears.


Special thanks to Daniel Steinberg for handling daily blog duties yesterday while I was traveling...


In Java Today, the eighty-fifth issue of the Java Tools Community Newsletter features the new projects that joined the community, a tip on writing articles for java.net to draw attention to your project, and the latest graduation from the community incubator, NBPlayer, an MP3 player for NetBeans.

The NetBeans C/C++ Pack brings C/C++ support to the NetBeans Platform. C/C++ developers can now use the NetBeans IDE, in conjunction with their specified set of compilers and tools, to build native applications for supported platforms, including Microsoft Windows, Linux, and Solaris Operating Systems. A sophisticated language-aware editor, project templates, dynamic class browser, and makefile support are some of the features included to provide a complete edit-compile-debug integrated development environment.

Just seeing a sprawling code block from a distance gives some developers the willies -- and it should! Loquacious code is often the hallmark of complexity, which results in code that is hard to test and maintain. In Tame the Chatterbox, quality expert Andrew Glover starts out with tips for eyeballing code excess, then shows you how to use tools like PMD and JavaNCSS for more precision when you need it.


Jayson Falkner shows off Blarg #25: A JSP that shows Request Headers in today's Weblogs. "This code as been shown many times before, including in my book. This is exactly what the title says: a JSP that will display the request headers sent by your browser. It is also a good example of how to use the JSP EL and the JSTL core tags to make an incredibly simple JSP.

Mobile Media author and expert Vikram Goyal checks in with the update MMAPI 1.2 released: "JCP has quietly released the 1.2 API specification for MMAPI (JSR 135). This is only a maintenance release and contains mainly documentation changes in the API."

Richard Bair shows off more networked Swing goodness by whippping up a Simple Yahoo! News Reader: "My last few blogs have been on using web services in Swing. This time I've created a simple Yahoo! News RSS reader JavaBean you can use in your own apps. And yes, this time I went all the way and wrote a JNLP."


In today's Forums,i30817 seems to be doing something like a page layout ap in Trying to make text in a jtextcomponent flow to another. Hi. I've already subclassed stylededitorkit to return a viewfactory, that i'm using in conjunction with a observer and a custom paragraphview to know the length of painted text (and offsets). Now i'm wondering if someone knows a way for the text to flow from a component to another ie : where the text of one ends, get the other textcomponent to draw the text from there. I'd like this to be resistent to resize, and efficient. Since the two components are going to be always the same size, i think i might reuse the view tree of the first one. Any thoughts?

zambizzi talks about JBoss' incomplete Java EE 5 support in Re: why are tags necessary in web.xml? Yes, I was using JNDI lookups w/ JBoss because they don't yet support the @EJB annotation at all - they're still not up to spec. [...] I would *love* to use the @EJB annot. to get access to my beans but as I understand it - it's only really supported in Servlets right now, is that correct?


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Compatibility when convenient?  
kfarnham

Going Mobile Blog

Posted by kfarnham Jul 3, 2006

Anyone travelling this summer?

OK, apologies to everyone for whom this isn't summer, but in the Northern Hemisphere, it's the height of summer, and a lot of us are travelling. Especially in the U.S., where a national holiday on Tuesday gives a lot of people a four-day weekend... or just a whole week off, in some cases. Like in the case of Sun, which shuts down for the whole week, since so few people would be there anyways.

I'll be doing the same thing this week, flying up north tomorrow to visit family. So you'll get a guest daily blog tomorrow, and I'll be posting the rest of the pages for the week from... um... wherever I can find wi-fi in Northern Michigan. I think it's going to involve driving really, really far.

I'm also planning on getting some coding work done on the road... yes, for me, vacation sometimes means getting intocode, not out of it. The difference is, it's the stuff that really interests me. For those of you who listened to the podcast of a mini-talk I did at JavaOne and are wondering where the video capture preview component stuff I talked about in Lloyd is, I keep finding all sorts of truly scary crashing bugs, and I don't want to put anything out there until it's at least halfway solid. My latest fun has been a crasher on Intel Macs, where even Apple's sample code crashes the JVM if you start up the capture object, theSequenceGrabber from the AWT thread instead of your main thread. In fact, even launching from a separate thread dies if AWT event-dispatch is already up. So I need to see if things can be made happy if bringing up the capture stuff before touching AWT, maybe with some lazy-loading of expensive stuff (like the preview component, which repeatedly copies blocks of ARGB data between QuickTime and Java2D wrappers).

Oh, and I forgot that on Windows, the video capture will try to pre-allocate all available space on your current drive unless you tell it not to. And there's a fabulously obscure bug inolving out-of-spec behavior when you get callbacks with audio data instead of video. Isn't caputre fun?

Anyways, if I get a nice evening by the lake with the laptop, the iSight, and nobody bugging me, maybe I'll get some of this fixed and checked in...


In Java Today, According to the JavaWorld article Java generates jingles in Sun's pockets, "Jonathan Schwartz, Sun Microsystems' new CEO, has promised to soon reveal the mystery of how much money his company gets from Java--a number that Wall Street is keen to learn because Java offers Sun its most distinctive technology advantage over competitors." The article says Sun has three key areas of Java-based revenue: license fees from device makers, developer training, and sales of Java tools to end-users.

The article Using Sun Java Studio Creator 2 on Mac OS Xexplains the benefits of developing professional Web applications using Mac OS X and Sun Java Studio Creator 2. In addition, a short tutorial is provided to demonstrate how to extend one of Java Studio Creator's sample applications.

Head First Java author Kathy Sierra advocates idea-sharing and open-source in her blog Mosh Pit as Innovation Model. "'Professionals' in any field come in two flavors: Knowledge Sharers and Knowledge Hoarders. The hoarders believe in the value of their 'Intellectual Property' (IP). The products of their mind must be carefully guarded lest anyone steal their precious ideas. But let's face it--if our only 'strategic advantage' is our ideas, we're probably screwed."


Mason Glaves writes about The Impending "Implementation Independent" Interface in today'sWeblogs. "A week or so ago, I wrote on some of the difficulties of testing Swing-based applications and promised a look ahead at an emerging trend in UI design that might offer a solution at a more fundamental level than the workarounds we use at present. Today I am going to look into the concept of something called the 'implementation independent' UI and discuss why it may be something we should spend our time looking into."

REQ: alt.web-browser.die.die.die, subtitled (or... Where Swing Really Shouldn't Venture), is a blog in which Simon Morris says "GMail and its like are a dead end. Let's re-group and throw our weight behind a real solution."

Kirill Grouchnikov shows off a Tetris Easter egg for Swing applications: "Here is how you can launch Tetris-inspired line of games right from your favourite Swing app. You can also plant it as an Easter egg in that application you're shipping tomorrow."


In today's Forums,jplemieux addresses a much-sought Swing feature in Re: AutoCompleteDecorator w/JComboBox: "Glazed Lists has had a solution for autocompletion for a little while now. It includes filtering the ComboBoxModel as you type into the ComboBoxEditor, so it might be worthwhile checking out if you have 5000+ items in your model. The behaviour is meant to mimic that of the Firefox URL address picker which narrows your URL history as you enter text. It supports a strict-mode that should behave correctly with your numeric model data."

Richard Bair brings animation to JTables in RE: Flashing cells: "Lemme clarify. The renderer is going to be reused for multiple cells, so you can't have logic in the renderer that actually flashes. What I mean by use the renderer is, let the renderer decide whether to show the text or not. For example, you should have some other timer, separate from the table, highlighters, or renderers that alternates whether a cell is painted or not (causing the flashing). Have it call repaint on the table, passing the exact cell that needs to be repainted so that performance is decent. Let the renderer figure out whether the text should be shown or not (when the renderer is created, point it to some object that knows whether the text should be painted or not."

In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Anyone travelling this summer?  

Filter Blog

By date: