The Source for Java Technology Collaboration
User: Password:



Editor's Daily Blog

April 2007 Archives


Get the Balance Right

Posted by invalidname on April 30, 2007 at 06:30 AM | Permalink | Comments (2)

An accord on closures?

The "closures debate" in the Java community -- recently summarized in a DeveloperWorks article by Brian Goetz -- is really a tangle of several debates. We might well be discussing three very different things:

  1. Whether to add closures to the Java language
  2. What specifically a closures proposal should address
  3. The specific syntax of a closures proposal

Today's news is that at least one of these has been fundamentally addressed. Artima reports that consensus has been reached among the competing JDK 7 closures proposals. They cite a blog entry from Neal Gafter, A Consensus Closures JSR Proposal, which he says "comes as close to achieving consensus as I believe possible. All but one of the authors of the three widely-discussed closures proposals have agreed to support it." The proposal defines the problem to be solved but does not mandate a specific solution, though it does offer Closures for Java as an example solution.

So, according to Gafter, an agreement has been reached on what the problem is and what a closures JSR will try to address. That's number 2 on the list above. The next question for the group to consider will be the specific form of their proposal, which is debate #3. Assuming that is resolved and then brought to the community in the form of a draft JSR, it will be up to the JCP Executive Committee (and, really, to the community as a whole) to answer the first question: do we really even want this at all?

2-3-1 might seem a strange way to go about it, but it's possible the closure proponents are addressing the problems in order of difficulty. Rather than get consensus from everyone on the need for closures, they'll get the closure proponents to at least agree on a common agenda, see if they can develop a concrete proposal amongst themselves, and then see if, armed with specifics, they can sway some/most/all of the closure skeptics.


Also in Java Today,

the Direct Web Remoting project has released the long-awaited version 2.0. DWR 2.0's marquee feature is "Reverse Ajax" (explained in a java.net feature article), and also features a JavaScript Proxy API to dynamically generate JavaScript from a Java API. Security improvements help guard against cross-site request forgery and cross-site scripting attacks. Other new features include a much expanded WAR file, support for Spring namespaces and Guice, Jetty continuations, servlet session timeout support, new annotations, and more.

Is EE the right hammer for every nail? Dan Creswell's blog Victims of J2EE Success criticizes some EE developers for assuming an incorrect set of beliefs, namely that "there is nothing beyond the database, POJOs focused purely on business logic, this is distributed programming, Ops is someone elses problem, [and you just] deploy more or bigger boxes to scale." He goes on to say "once you're beyond a certain level of challenge the J2EE way of thought and patterns of design don't work," and lists a series of language/framework-agnostic traits that developers need to handle new and challenging enterprise work.


David Van Couvering looks at an underappreciated hazard of JPA in today's Weblogs. In JPA and Rollbacks - Not Pretty, he writes, "we all want our interactions with the database to be successful. And most demos and code samples have everything going hunky dory. But what happens if they're not? What if you or the database needs to roll back the transaction? With JPA, if you're not careful, things can get pretty ugly."

Kirill Grouchnikov presents more GUI ideas in Borrowing from Vista - part II. "This is the first part in a series about borrowing UI ideas from Vista. This time i'm borrowing the smart scroll on trees."

Finally, Kohsuke Kawaguchi has an update on a JAX-WS RI extension for JSON. "Jitu and I have been working on the JAX-WS JSON extension, which is a JAX-WS RI extension that lets you write one code and have it handle both SOAP and JSON requests. I just posted version 1.1 release of this extension."


This week's Spotlight is on Web Services Interoperability Technology (WSIT) and Project Tango, two efforts focused on delivering interoperability between Java EE and .Net? Wondering how to use them? The next Ask the Experts session spotlights these topics, allowing you to post your questions and get answers from Sun experts Arun Gupta, Harold Carr, and Marek Potociar. This session runs from April 30 through May 4.


Today's Forums kick off with a pretty broad question from ryujin: Java Cluster, whats the best way? "I am in the process of setting up a cluster of Linux computers at Southern Utah University and wanted Java support, what are some of the currently used ways to invoke a Java cluster for Java programs. I was hoping to set it up to use the now native java concurrency rather than javampi. What is the best way to do it?"

oleg_sukhodolsky has been working through the cause of a tricky bug in Re: Major Issue with AWT & JNI? "I've debugging the code a little and found that in the first case (selecting internal frame), JDesktopPane changes z-order of this internal frame (Container.setComponentZOrder() is called). And for now this method always remove lightweight container which contains heavyweights and do not try to re-stack them (see Container.isRemoveNotifyNeeded()). So, the problem is (theoretically) fixable, but someone needs to change Container and test this change."

Posting to an inappropriate forum (the "Big Answer" discussion of the GPL'ing of Java), shanezz apparently needs someone to do his or her homework and develop a Java Calculator (Basic) "Hi can anyone help me on this i have to do a basic calculator with Java that contain two integer fields and an array,results. It should be capable of adding 2 numbers, subtracting 2 numbers, dividing 2 numbers, and multiplying 2 numbers, and giving the remainder after division of the two integer numbers, any help would be greatly appreciated, thank you."


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.



Continue Reading...



Crashing By Design

Posted by invalidname on April 27, 2007 at 04:54 AM | Permalink | Comments (2)

How realistic is small-party ME development?

One of the books I've long thought someone should publish -- we occasionally kick it around among the O'Reilly editors, but have never found a suitable author -- is Java Deployment. The idea behind this book would be all about how to get your code up and running for your users. Probably the simplest case is all the EE spec-compliant webapp containers, where a common system of deploying WAR files to WEB-INF directories is pretty well understood. Things get trickier for Java SE, particularly on the desktop, as nobody in their right mind is going to suggest end users be expected to type java on the command line (heck, the Classic Mac OS didn't even have a command line!), and the double-clickable JAR has proven only modestly useful, still unable to support obvious needs like custom application icons. No wonder there are "double-clickable makers" like Launch4J, JSmooth, JarBundler, etc., installers like the Java-savvy versions of InstallShield and InstallAnywhere, and technologies like JDIC which provide desktop deployment necessities like document-application association.

And then we have ME. How hard is real-world ME deployment? Well, my idea for this hypothetical Java Deployment book actually evolved from the idea for a "real-world Java ME" book, one which was written not to the fantasy world of the API and specs where it's easy to just write code and run it on an emulator, but to the real world where you have to get your application onto real devices, none of which work the same way and most of which run on mobile telephony networks that are openly hostile (at least in the U.S.) to third party software. Perhaps part of the reason that ME books don't sell terribly well is that developers realize a significant gulf exists between what the existing books and Javadocs say you can do with ME, and what you can actually accomplish on real devices.

Aside: if you think you're the person who's going to write either of these books, and you want to pitch it to O'Reilly, read So You Want To Write A Book and then send the proposal to .

The hazards of working with ME, particularly at the hobbyist or beginner level, are highlighted in today's Forums, which continue a discussion from earlier in the week about good handsets for ME development. Joe Bowbeer surveys some of the problems in Re: It depends on the carrier mostly,,, "I agree that Sprint is developer-friendly. A developer who registers at developer.sprint.com can activate up to 200 handsets for development purposes. However, a VeriSign certificate is required in order to develop a full-featured MIDlet: To access the restricted API's (such as MMAPI, WMA, File I/O, PIM, Location API, etc.), a Java Class 3 signed certificate from VeriSign is required, at a cost of $499.00 per year. This puts it out of reach for most students and hobbyists. (Is a Class 3 certificate even available to individuals?)"

Later, in the same thread, C. Enrique Ortiz says that some of this suffering is probably good for new developers to be exposed to. In Re: Best handset for MIDP hobbyist, he writes: "At the same time, you do want to have the students understand and experience the real details when it comes to deploying apps, this including the good, the bad, and the ugly, including signing and prompts. So the solution goes back to making the process cheaper, even f these special kind of certificates are (more) short-lived; this option would be nice especially for developers that are students or just plain aficionados, etc."


Also in the forums, tvmohan is looking for SwingX to provide a Outlook style popup that fades slowly. "How can we build a outlook style window that has fading effects? Every time a new email arrives, it pops up and slowly fades away. I need build something similar. Can we really make a JWindow translusent by setting the alpha somehow? I looked at the SwingX components, I could not find any that works this way. SwingX lets me set the alpha on a JXPanel but not on a window. So, I was wondering if anybody is working on this kind of window."


The latest java.net Poll asks "How often do you download and read sample code from online articles?" Cast your vote on the front page, then visit the results page for current tallies and discussion.


Stressing the "today" in the Java Today section, today (Friday, April 27) is the last day to submit entries for the Java Mobile Application Video Contest. This contest seeks example of great Java ME applications or services. To enter, create a video of up to three minutes that references Java ME or the open-source phoneME technology used, and post it to YouTube. Prizes include a Ericsson K800 phone, Panasonic Blu-Ray DVD Player, an Amazon.com gift certificate, and PlayStation 3 consoles. Check the official rules for more information and specifics of submitting your video.

Issue 119 of the JavaTools Community Newsletter is now available, featuring tool news from around the web. It's a slow week with only one new project in the community and no graduations, perhaps in advance of JavaOne, and on that topic, the newsletter has a call for community members to send in photos for use in the java.net Community Corner slide show. Finally, the newsletter offers a Tool Tip on executing your application using Maven.

In January, the NetBeans community announced the 11 charter members of the NetBeans Dream Team, a community-oriented group of highly skilled NetBeans users devoted to promoting NetBeans and working on the NetBeans Project. The first installment of a new Meet the Dream Team Members series introduces Joerg Plewe, who discusses the strategies of NetBeans evangelism and his 3D flight simulator Flying Guns.


Kohsuke Kawaguchi is Introducing Mock JavaMail project in today's Weblogs. He writes: "Testing JavaMail applications is more difficult than necessary, because it involves in a lot of set up outside the test program. So I wrote a library to improve this."

Arun Gupta offers web service interoperability tips in his blog, How to invoke a WSIT endpoint from a WCF client "Once the Web service is deployed, you'd like to invoke this Web service by writing a client using Visual Studio. It's not straight forward to do so today and this entry highlights the steps required to do that."

Finally, Carla Mott points out some Big changes in jMaki, saying "jMaki v .9 release was pushed out last week. We are feature complete!"


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.



Continue Reading...



Keep On Working

Posted by invalidname on April 26, 2007 at 07:33 AM | Permalink | Comments (1)

A big JavaOne crunch, or 50 little crunches?

Those of you with big announcements to drop at JavaOne have it easy, I'm telling you. No, just kidding, of course -- I know people are crunching pretty hard to have their stuff ready for next week's show. But outside of the single-minded developer focus, for a lot of us involved with the show, the weeks leading up to JavaOne have been a series of mini-crunches.

So far, we've been lining up bloggers for our usual front-page blog-centric coverage, setting up a podcasting infrastructure for new java.net content and the Community Corner mini-talks from JavaOne, arranging the Community Leaders weekend, etc. On the O'Reilly plate, I've been working with marketing on the message for the O'Reilly booth, the crossword puzzle for the daily JavaOne Today newspaper, tracking down e-mail addresses of some FOO's who may or may not be at the show, etc. And I should rehearse my BoF presentation. And write my mini-talk. And hack some more functionality into Keaton so there's something non-trivial to show.

See, it's not one big scary project to work on, just lots of little things piling up. So, if you're waiting on something from me, nagging me about it in my current mood would be a really bad idea.

Having mentioned the new podcast infrastructure, I don't want to spoil anything, but you'll be seeing more java.net podcast content in the near future. As with last year, we'll be podcasting all the mini-talks from the java.net booth's "Community Corner". However, this year, instead of trying to blast everything out in near real-time (an idea predicated on the idea of trying to capture the excitement of the show), we're going to dole them out over the course of several weeks, maybe even months. This approach should be a lot more feed-friendly: instead of mini-talks getting blown away on your computer by new ones after just a few hours, you'll have time to find the talks that interest you.


There are going to be other feeds too, and a "super feed" of all java.net content... but let's not get ahead of ourselves. Let's take a moment to highlight a new podcast feed that's up and running, the Mobile & Embedded Podcast. This series, produced by former java.net Editor Daniel Steinberg, will focus on the people and projects in the small device space. With a podcatcher like Juice or iTunes, you can subscribe to the podcast feed, and iTunes users can also find the podcast in the iTunes store. We're spotlighting the first episode as our Feature Article today. In Mobile and Embedded Podcast 1: Introduction to the Community Community Leader Roger Brinkley and Technical Evangelist Terrence Barr describe the resources available for Mobile and Embedded developers.


Speaking of ME development, in today's Weblogs, Mauricio Leal answers the rhetorical question Ok, I've developed my Java ME application. Now what? "You spend hours developing a very cool JavaME application and then, you manage to install into your device and you start play with it. Is that all ? Is your JavaME application ready for prime time ? Maybe you're missing some very important during the development process: TEST !!!"

David Herron takes on the idea of providing an automated way of forcing developers to put Swing calls on the event-dispatch thread, in his blog Re: Swing versus SWT Thread Confinement. 'I think, some of the frustration over Swing applications might stem from those who call Swing methods from outside the event dispatch thread, which then will have undeterminable behavior."

Finally, Michael Bouschen looks at Java Persistence Query Return Types. "The Java Persistence API (JPA) defines a query language that allows to define queries over entities and their persistent state. In this weblog I would like to point out what determines the type of the query result, such as the method to execute the query and the structure of the query SELECT clause."


The Java Today section starts off with a long-awaited JSR, as JSR 203, More New I/O APIs for the Java Platform (aka "NIO.2") is in its Early Draft Review. This draft, available for download, finally revises the filesystem API with a java.nio.filesystems package to add metadata awareness and a metadata-preserving copy method. The spec also adds asynchronous channels, the completion of the socket-channel functionality, multicast support, and buffer classes capable of containing more than Integer.MAX_VALUE elements. The review closes on May 27.

Among the many events at JavaOne this year (see the Java ME Guide to JavaOne 2007) the "Meet & Greet/Un-BOF and Bloggers Social" on May 9 at the Thirsty Bear restaurant is a chance for the diverse Mobile & Embedded Community to get together, socialize, exchange ideas, and give feedback. Terrence Barr's blog offers an information and a link to a wiki page to add yourself to the attendee list.

InfoQ takes a look at the new JRuby release in JRuby: Almost Ready for Primetime? "JRuby 0.9.9 is now out in the wild and has been declared 'ready for prime time'. The focus on this release has been compatibility with Ruby 1.8.4. However, despite compatibility being the overall priority, performance hasn't been ignored; JRuby 0.9.9 is 40% faster than the 0.9.8 release. One of the compatibility benchmarks the JRuby team uses is the ability to run Rails applications without errors, and this is something that they've finally achieved."


In today's Forums, Hans Muller discusses the idea of a Swing timer service in Re: JSR296 - Scheduled background tasks ? "It's easy enough to create a Task that does some work periodically. The example below does some work on the EDT periodically. Creating a more elaborate API that allows one to schedule Tasks to run at absolute/relative times as well as supporting Tasks that are created and run periodically, is certainly possible. It's not part of the plan for the first Application Framework release."

Tim Quinn discusses a challenging deployment in Re: relationship between two applications. "Jan's comments about nested JAR class loading hit close to home for me. We have had a similar issue with app client support. To help support persistence units in app clients - and also as a way to resolve some other things - we had to alter the format of the generated app client JAR file so that it contains nested JARs. The app client must have the nested JARs in its class path, so the app client container must expand the app client JAR into a temporary directory (which is marked for delete-on-exit). The JARs in that resulting temp directory are no longer nested so they can be added to a class loader's class path routinely."

Joe Bowbeer would like to find the Best handset for MIDP hobbyist. "My full question is: Can MIDP hobbyists develop full-featured MIDlets and run them on their own handsets? By "full-featured" I mean having the ability to capture snapshots, play audio clips, and access the memory card and the network. (Without, that is, being prompted for approval every time; ask-once is enough.) By "hobbyist" I mean someone who either cannot afford a signing certificate, or cannot get one -- because after all they're only a hobbyist. Is there any handset, compatible with any carrier anywhere in the world, that satisfies these conditions?"


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.



Continue Reading...



Save It For Later

Posted by invalidname on April 25, 2007 at 09:36 AM | Permalink | Comments (4)

There are other conferences, of course...

One of the items on yesterday's front page that might have gotten overlooked is an announcement about the O'Reilly Open Source Convention 2007, and, in particular, its Java track. I think it's a huge improvement over last year's track, which was something of a debacle because of the conference organizers' failure to indicate that Java was one of the topics being sought out for talks. There was a real effort to improve the track this year, particularly in light of Sun's GPL'ing of its ME and SE implementations. As a member of this year's program committee, I sought out proposals from people who I knew were working on interesting stuff, particularly things that might cross over into the consciousness of non-Java OSCON attendees.

Not everything I would have wanted got in, of course, but still, this year's track has a number of java.net-related sessions, in particular two that directly relate to the GPL'ed ME and SE platforms. Mark Reinhold is offering a talk on OpenJDK: The First Eight Months and Hinkmond Wong will explain How to Build, Run, and Develop Code with the phoneME Open Source Project. There's also Peter von der Ahé's talk on the Kitchen Sink Language project, and Joshua Marinacci talking JSR's 295 and 296 in Better Desktop Java Development using the Beans Binding and Swing Application frameworks.

Lest this sound too centered on java.net or Sun speakers, there are at least as many independent speakers. Geir Magnusson is doing a talk on Harmony, there are talks on Spring, Seam, Velocity, Grails, and a comparison of Java web frameworks. Kirill Grouchnikov is doing a session on Advanced Effects in Java Desktop Applications . Moving beyond the Java track, a look at the web applications track turns up talks on Tapestry 5 and the Apachified Open for Business project.

So, it's not all about JavaOne right now.


In Java Today, OpenJDK Program Manager Ray Gans and Mobile and Embedded Community Leader Roger Brinkley discuss Sun's Java open-source efforts in a seven-minute video discussion recently posted to the JavaOne site. The video can be watched in-line with a Flash player, or downloaded as an MP4 video or MP3 audio file. They discuss the ongoing effort to get the full JDK released as open-source, the advantages of an open-source ME, the prospects for community development of the platforms, and more.

Are you plagued by slow-running Java applications? You could have a memory leak. The latest issue of Software Test & Performance Magazine features an article, Baffled By Brain Drain in Your Java Apps? (PDF, 6 MB, p. 22) by NetBeans Evangelist Gregg Sporar and A. Sundararajan on how to plug memory leaks in Java applications.

The HREF Considered Harmful blog makes an interesting comment about the relative performance of Java and scripting languages in Turtles Need Speed: "To me, one thing that's wonderful about both Smalltalk and Java is that all of their libraries, including basic data structures like lists and hashtables, are implemented in, respectively, Smalltalk and Java. That's possible because the underlying execution machinery is fast enough that, although it would certainly still be faster to have highly tuned Collection implementations in C, the pure Smalltalk and pure Java libraries are "fast enough". That's a crucial threshold, and it's one that many languages, including Ruby, have not passed."


Chet Haase looks at JavaOnederful Desktop Sessions in today's Weblogs. "Here's my arguably subjective take on hot topics in the Desktop track. But heck, it's all good."

David Herron explains the importance of the recent inclusion of Java by the Debian and Ubuntu Linux distros in Re: Java with apt-get, what's the scoop?. "Fabrizio Giudici asks Java with apt-get, what's the scoop? The big deal is we're taking steps towards a world where Java is a default part of more operating systems."

Carla Mott offers up a handy reference in jMaki widget data model explained. "In jMaki, each type of widget (tree, table, menu) has the same data model regardless of the toolkit which provides the widget. The data models are described in this blog."


User stylertim starts off today's Forums section with advice for doing a "heads up display" for Java3D, in Re: Canvas3D on Canvas3D. "There are several approaches to this problem, mostly discussed in terms of HUD creation. The ViewPlatform approach, where you add geometry to the ViewPlatform transform is one way to create such a vision. Another way is to drawing your images containing the information to the finally rendered output by overrinding the postRender() or postSwap() method of Canvas3D() in your application. The third approach, the one mentioned by you, will surely evolve once JCanvas3D works correctly with the JLayeredPane under Swing. This way you could add your JCanvas3D to a JFrame's ContentPane and draw images above it using the JLayeredPane, which would be a quite convenient way."

laonda is still working an apparent classloader problem in Re: Spring support in JAX-WS: "Thanks for the advice. It was indeed a class loader problem. I changed the classloader to parent last and the server started up. The problem is that if the classloader with the below settings it cant find the servlet. I tried several settings but none seems to work. I found a similar problem that advise to set the server-specific application setting to single. This will cause the admin consol to crash in my case. So thats not realy a solution. I will continue my search on this problem."

Finally, mgv is looking for a simple way to do collision detection in Java 2D, asking "How to implement collision detection in Java 2D? Is there any dynamic engine API for Java 2D as OdeJava API for Java 3D?"


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.



Continue Reading...



Face the Face

Posted by invalidname on April 24, 2007 at 08:03 AM | Permalink | Comments (0)

Interviewing cajo's founder

One of the things we're trying to do on the content side is to further focus on the projects on java.net, the people behind them, and the communities they create. Some of the ways to get there involve our feature articles, which we're focusing on the core Java platforms themselves (ME, SE, and EE), since open-source reference implementations of each are now hosted on the site (as phoneME, OpenJDK, and GlassFish, respectively), and on the many active and interesting projects hosted here.

Community Manager Marla Parker has taken an intersting approach to helping us with this effort. She's taken a recent list of the top 50 most active projects and started contacting founders and leaders of those projects. In a series of interviews with these personalities, we hope to deliver a sense of the people in the java.net community, and the possibilities and opportunities that come with working on a successful open-source project.

Today's Feature Article kicks off the series, with Top 50: Interview with John Catherino of the Cajo Project. In it, Marla talks to the founder of the cajo project, which enhances RMI to allow an application to be distributed across multiple JVM's. In the interview, John discusses the project's successes, the makeup of the cajo community, and challenges and surprises along the way.


This week's Spotlight is on the CommunityOne event. What's that you ask? Well, combine NetBeans Day with a GlassFish Day, add some OpenJDK and Mobile & Embedded, and you've got Community One, a free and open event sponsored by Sun, taking place in San Francisco on Monday, May 7, on the eve of JavaOne. Along with formal session tracks, the event features a co-located unconference, a startup camp, a lunchtime session of the Java Posse podcast, and an opening general session by Tim O'Reilly.


As noted in the Java Today section, this week we launch the new Mobile and Embedded Community podcast series with an Introduction to the Community. Leader Roger Brinkley and Technical Evangelist Terrence Barr describe the resources available for Mobile and Embedded developers. They also explain how to get started hosting a project on java.net, how to get your questions answered in the forums, and how to stay up to date with the world of Mobile and Embedded development. Hosted by Daniel Steinberg.

Apache's Open Letter to Sun Microsystems about licensing terms for a Java SE TCK has touched off a number of reactions. Dave Gilbert gives Five Reasons Why Apache Will Regret That Open Letter, while Ian Skerrett has posted his concerns about The Silence from an Open Sun, a post that drew A Response from Sun (namely, from Simon Phipps, Sun's Chief Open Source Officer). Geir Magnusson, who wrote the initial open letter, discusses the issue further on Episode 28 of the Feathercast podcast, while former Harmony member Mark J. Wielaard shares his thoughts in the blog OpenJCK.

O'Reilly's Open Source Convention 2007 offers a much improved Java track, featuring a number of speakers familiar to the java.net community, such as Mark Reinhold talking about the first eight months of OpenJDK, Hinkmond Wong on phoneME, Kirill Grouchnikov on advanced Java desktop effects, and Joshua Marinacci on Beans Binding and the Swing Application Framework. Furthermore, there's a talk on the Kitchen Sink Language. Also look for Java-related stuff on the Web Services track, such as talks on Tapestry and OFBiz.


James Gosling's closing JavaOne keynote is turning into The Toy Show, as he describes in today's Weblogs. "Once again, I'm doing the closing keynote at JavaOne. Through some piece of odd mystery math, this year I'ved ended up with two hours of time, which had me paniced: what would I do to fill all that time?"

In Mapping Entities to REST - Learning from History, David Van Couvering writes "I'm working with a team that is working on providing tooling in NetBeans that lets you map database entities to REST resources. It turns out that although at first blush it looks like a very nice, simple mapping, care must be taken not to repeat past mistakes."

Finally, Mauricio Leal looks into How to make money with Mobile. "Although I don't have the official numbers, I'm sure most of developers are looking a way to make money with their mobile applications. Some may find really hard to develop a business model, so you can offer Java mobile applications to millions of hunger consumers out there."


In today's Forums, jacketyjack asks for some Help with Java sound pleez... "1. Why, in your expert opinion, was the tempBuffer given a size of 10000 and not something else. Can this be changed and if so how will it affect the sound wave coming out? 2. What is the format of the bits/bytes with relation to the final frequency that will come out. OK, rephrasal: how can I generate a sound wave that will be of a frequency X? What is the formula? What is the way? For example, how can I generate a sound of a frequency of exactly 216Hz? Or how would I generate a sound that goes from a low frequency and builds up to a high frequency?"

richard_m reports hassles with a JGoodies custom header renderer. "I am using JGoodies for the first time (WindowsLookandFeel) and have a problem where the table headers have a different appearance when I use a custom table header renderer. For example, the mouse over effects are missing and the cells are larger. The custom header renderer extends JList and implements javax.swing.table.TableCellRenderer. Can someone tell me if this is the correct way to implement a table header renderer in order to get the default WindowsLookandFeel for JGoodies."

Finally, dma02 would like to do event dispatching without awt/swing: "OK, i've done event dispatching using javax.swing.event.* classes and it's all fine. Thing is, how do you dispatch events from 1 class to another class where there exists no GUI ? A simple example is a server (no gui) where it reads from a queue. Suppose Object A holds the queue and Thread 1 writes to it, Thread 2 writes to it, and Thread 3 reads from it. Instead of having Thread 3 polling the queue with a time out value (think of LinkedBlockingQueue or ConcurrentLinkedQueue) I only want it to read from the queue when items have been inserted into it. If I could somehow make it so that when Thread1 and 2 invoke the write method, it'll dispatch an event to Thread 3 saying "hey someone wrote to the queue, start reading untill the queue is empty"."


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.



Continue Reading...



I Am Secure

Posted by invalidname on April 23, 2007 at 06:43 AM | Permalink | Comments (1)

...well I thought I was

I grant that I have a pretty cavalier attitude about security, but frankly, I feel entitled to: I develop Java applications on Macs, and both Java and Mac OS X have well-thought-out, highly-regarded security schemes, particularly in comparison to the never-ending fiasco that is security on Windows.

So imagine my surprise when security researchers finally found a security exploit to hit a Mac through a hostile web page, and to do it by means of Java!

Truthfully, we don't know all the details yet, and more than a little speculation is involved, but the salient facts are these: Dino Dai Zovi and Shane Macaulay have won a security challenge (and a $10,000 prize) at the CanSecWest conference by gaining shell-level access to an up-to-date MacBook through use of a malicious web page. According to the Matasano Chargen blog page tracking the story, the current work-around to the security hole is to turn off Java in the browser, implying that the exploit uses Java in some way. Matasano also reports the attack affects Firefox as well. Specifics about the exploit are being publicly withheld, perhaps to give Apple a chance to fix them.

A MacCentral write has a few more details, such as nobody cracking the MacBook with no apps running in the contest's first few days, which led organizers to change the rules and allow "attackers" to send URL's to the target machine by e-mail.

This isn't the first time that a Mac OS X security issue has had a Java angle to it. A late 2006 security update addressed a combination of Quartz Composer and QuickTime for Java that could allow a malicious web page to gain access to the user's webcam without their permission (here's a full explanation, with code). The trick there was very orthoganal to Java -- QTJ ordinarily disallowed webcam access to unsigned applets, but approved Quartz Composer code without security checks, and while QC's access to the webcam usually consisted of rendering the image only, running it in QTJ allowed an untrusted applet to get to the rendered pixels and do whatever it wanted.

So it will be interesting to see what the Java angle ends up being in this case: whether it's an issue of applet security or some weird unanticipated side-effect that creates the security hole.


Also in Java Today, Issue 118 of the JavaTools Community Newsletter is out, with news from around the web, including the release of version 1.1 of HDIV (the HTTP data integrity validator), announcements of new projects in the community and a graduation from the incubator (Rmic-Eclipse-plugin), and a Tool Tip on enabling GZIP compression on Tomcat.

Extending OpenSSO (Sun's open Web access management project based on Sun Java System Access Manager) with Windows CardSpace delivers a more secure authentication model than the traditional user name-password model. The SDN article Securing Site Access With CardSpace and OpenSSO: An Overview describes the benefits, basic architecture, and process flow of a lightweight implementation developed by ICSynergy International, by making use of the java.net-based OpenSSO.


Roberto Chinnici kicks off today's Weblogs by recapping his presentation on Phobos at the Web 2.0 Expo. "On Wednesday I presented a session on Scripting and the Java Platform at the Web 2.0 Expo in San Francisco. In my talk, I went over three key components: Phobos (the server-side framework and development environment), jMaki (the client side über-framework) and GlassFish v3 (the server platform). "

In Java on Fiesty Ubuntu - will anyone notice?, Calvin Austin writes: "Java is now part of the Ubuntu Feisty Fawn repositories but will the average user or developer even notice?"

Finally, Roger Brinkley says e-DEPLOY Rocks. "I spent yesterday visiting e-DEPLOY, a small JavaME developer in Brazil. What I discovered was a vibrant new company with some innovative approaches to management. There software wasn't bad either."


In today's Forums, dpatriarche is concerned about the state of TrayIcon support for alpha channel on Windows "I have observed that the new Java 6 TrayIcon class does not seem to properly support the 8-bit alpha channel on Windows images. It seems that if the pixel's alpha value is > 0 then it treats the pixel as opaque. On Linux and Mac the alpha channel seems to be treated properly. After much Googling the only real discussion I found about the problem was this open bug report from a year ago, complete with suggested fix."

The thread Re: [JDIC] [dev] How to get a HICON from an awt image? discussed a means of tying into native code to get an HICON, but Markus KARG finds that lacking. "I cannot believe that I really have to copy all the bits from my AWT image into a HBITMAP on my own... That's not very nice. I have seen that a VolatileImage is a subclass to AWT Image. VolatileImage lives inside of the graphics device itself (not in normal RAM), and that means, the OS must know about that image already. So maybe there is a means to get a HBITMAP from a VolatileImage easier than doing a complete copy?"

areplogle thinks the docs are out of date, quoting them in Re: how to obtain a TransactionManager in a servlet? "If java:appserver/TransactionManager is not the correct interface for developers to use to get the transaction manager, the documentation should probably be updated to reflect that. From the SJAS 9.1 Developer Guide linked off the Glassfish documentation page: [...] 'You can access the Application Server transaction manager, a javax.transaction.TransactionManager implementation, using the JNDI subcontext java:comp/TransactionManager or java:appserver/TransactionManager.'"


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.



Continue Reading...



Numbers

Posted by invalidname on April 20, 2007 at 08:31 AM | Permalink | Comments (0)

What kind of transparency do you want from JSR expert groups?

Yesterday's blog kicked off some discussion about what the right form a JSR expert group's work should take, whether it be completely private, or exposed to the public in some form as it develops. User robilad, better known to fans as Dalibor Topic, suggested this would make for a good poll, and that's a great idea. Putting it up as a poll will continue the discussion while also getting a broad but quantifiable sense of what the community as a whole wants to see from JSR expert groups.

Specifically, the new java.net Poll asks "How should JSR expert groups typically conduct their work?" You can cast your vote on the front page, and then visit the results page for current tallies and discussion.


In today's Weblogs, David Van Couvering shares big news in Java, Glassfish, NetBeans and Java DB available with Ubuntu. "I just got the news that, as of today, Java SE 6, Glassfish v1, NetBeans 5.5 and Java DB 10.2 are all available in the Multiverse component of Ubuntu 7.04 (Feisty Fawn)."

Chet Haase says Don't Use getScaledInstance() (But Do Read Chris's Article on Why Not). "Chris has finally penned an article that I've had in mind for several years. Go read it."

Finally, Fabrizio Giudici explores Otium cum dignitate (or the joy of being disconnected): "I've just read David's blog about the pleasure of staying in a low-tech contest. He contrasted Mexico with "no TV, no movies, no cell phones, no computers" versus the "getting connected" paradigm of San Francisco and the Web 2.0 Expo. By chance, I've just had three days of vacation too."


In today's Forums, prashanthjoshi is trying to figure out Problems while testing application on different phone "I have developed one news providing software based on MIDP 1.0 and CLDC1.0. I have tested it on Nokia 6630 , Nokia 5300 phone it is working well and when i am using same buid (.jar) for SonyEricsson and other nokia phones it gives problems like canot open the application etc. Why it is so? Is there any other procedure to port aplication for other series and other makes"

enorvelle has a JDIC question about Installation on OS X. "I've been trying to use JDIC on OS X ... I've got the jdic.jar file on my classpath and all the classes load correctly up to the point where the native code gets called. I seem to need some native library files to be installed. However, the README only refers to installation on Windows, Solaris and Linux, all of which have different native library formats and installation locations. Which native files need to be installed on OS X, where do I find them in the binary distribution, and where do I have to put them on the filesystem?"

Finally, Java3D developer petroslj wants to know Is there a method to convert terrain elevation map into contour lines. "I not been able to find a method in the Java3D libraries to convert a terrain elevation map into a set of contour lines. In my case the terrain is specified by an irregular set of Point3f for which I have a tesselation as a triangle array. From the point elevations and tessalation I would like to generate a set as coutour lines for specified elevations. The point elevations are arranged in parallel linear rows, but each row has a different number of elevation samples. It may be possible to construct the data as a regular grid if necessary, but would prefer not to since the data set is quite large (~100K points) and this operation must be done frequently."


In Java Today, the SDN is publishing a series of articles in advance of JavaOne, listing top technical sessions and BoF's in a number of areas of interest. For Top 10 Desktop Destinations at the 2007 JavaOne Conference, John O'Conner recommends a "state of the union" presentation, updates on JSR's 295 and 296, filthy-rich clients, makeovers, and more. For new Java developers, Dana Nourie's Top 10 Destinations for New Java Technology Developers at the 2007 JavaOne Conference recommends talks on concurrency, architecting Swing apps, Ajax, deployment, and six others.

Got a Java-powered mobile phone, and the ability to read? The jkOnTheRun blog points out a mobile e-book service, in Free eBooks on your cell: Manybooks is mobile!, which points out that "Manybooks.net (a public domain / free eBook site) provides a mobile version of their offerings for Java-based cellphones! Point your browser to http://mnybks.net and you can download an eBook in .jar format for reading on the go. If you use Mobipocket reader on a handheld, you can also use the mobile site for Mobipocket format books."

Larry O'Brien's Knowing.NET blog actually has praise for Java's less-than-pure object orientation, as he explains in Map, Everything's An Object, and Inline. In it, he discusses the pitfalls of thinking that a map of functions can be easily farmed out to different cores or CPU's. "This is a familiar theme in programming languages: a theoretical capability runs afoul of implementation realities. The best design decision in Java was "(Almost) Everything's an object": numbers and strings -- the most commonly used data types -- have different semantics (what the .NET world calls "value semantics") because they aren't pure objects. And they aren't pure objects for performance reasons (immutable strings are also good for a couple other reasons)."


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.



Continue Reading...



The Model

Posted by invalidname on April 19, 2007 at 07:39 AM | Permalink | Comments (5)

Is "open from the start" the right way to develop a JSR?

So how should a JSR work anyways? More and more, this is becoming a hot topic for everyday Java developers, who want their concerns and desires incorporated early in the process, not late in the game when the final draft is being routinely approved, or after the fact. As the ideas for JDK 7 come together, we've already seen vigorous debate about proposed concepts like closures, properties, a module system, type inference (which we'll get back to in a minute), and more. For some, it may be "buyer's remorse" over generics, a feature still somewhat controversial two versions after its release, and the better part of a decade after its initial proposal. Whatever the reason, more and more developers are learning to get involved early.

And maybe that's part of the reason we're also seeing a questioning of how a JSR expert group carries out its work. We ran a blog several months back -- sorry, I can't find the link right now -- that decried the model of an expert group doing both its original research into a problem domain, in private, and then proposing a Java standard for it, all in the scope of one JSR. Would bad JSR's have been headed off sooner if there had been more public visibility into the expert groups' work earlier, while they were working the problem and before the early draft review? Should the experimentation in a field precede even the filing of a JSR and the assembly of an expert group?

One of the goals of JSR 306 is to "further improve the transparency of the process". Its original request has this to say on the topic:

Since the introduction of JCP 2.5 in October 2002 which regulated the right to build independent implementations, the Java community at large has grown accustomed not only to open source software methodologies and business models but on average expects that specification development happens in a similar spirit. The JSR plans to explore what steps can be taken, both mandatory through the process document, as well as voluntary or desired behavior through the Spec Lead Guide and facilities provided by the JCP.org web site.

Some JSR's are already being developed in this spirit, and some of them are doing their pre-spec experimentation and implementation work here on java.net. Two examples are the Beans Binding project (JSR 295) and the Swing Application Framework (JSR 296). Patrick Wright praises both in asking the JavaLobby audience Should JSRs be developed in the open?

In my experience, many JSRs are developed in secret, by which I mean the expert group does not allow outsiders to follow either the work in progress (code or APIs, if there are any), active discussions or records of discussions. The JCP, to my knowledge, does not require opening up the process, but seeing the high-quality feedback on JSR 296 (and how well Hans fields and incorporates it), I'm tempted to say that the default should be to require open access to mailing lists and code, even if read-only.

He also notes the downside of the traditional, closed approach:

I think one of the biggest downsides of having a closed, opaque and private process is that those of us who end up as users of the specification lose sight of the reasons why it ended up the way it did. There are reasons why generics were implemented using erasure; IMO, those reasons are something any educated user of Java generics needs to understand before entering into debate about them. Making the discussion behind those decisions public enables us to understand, or as necessary research, the reasons why we have what we have. It informs and deepens the debate.

But is this really a good idea? If you're an expert in some topic area, do you really want that many eyes on your work, that many people offering opinions (of varying levels of competence), when you need to focus on delivering a solid JSR draft? There are two sides to this story; will the kind of open process being used by JSR 295 and 296 groups work for everyone?


Also in Java Today, Author Elliotte Rusty Harold makes his case against another proposed JDK 7 language feature in Type Inference: Another Bad Idea for Java 7, and goes on to say that too many changes in the Java language have made it practically un-teachable. "It's time to call a halt to new features in the Java language. I am not saying that the features are wrong, just that they don't fit into the language any more. It's already too bloated. I am not saying that generics, type inference, closures, compiler created factory methods, and other kitchen sink proposals are bad. They're not. I am saying that they simply don't fit into or with the current core language, and every one we add makes the language worse, not better."

JavaChecker is a static analyzer of Java source code, allowing you to detect code defects, such as inaccurate exception handling, style defects, violations of standard usage contracts (such as overriding equals() without also overriding hashCode()), and inaccurate resource usage. The project's goals are to discuss approaches detecting common java code defects and to build an open framework for applying rewriting rules to source code analysis.


In our Feature Article, XQuery For Java, An Enabler For SOA , Sowmya Hubert and Binildas C. A. take a look at the abilities of XQuery to simplify working with XML documents. "In this article we are going to talk about XQuery and its derivatives including the XQJ (XQuery API for Java) specification, which is under development as part of JSR-225: XQuery API for Java. The first section of this article will introduce both XQuery and XQJ and equip the reader with some code and tools to get their hands dirty. Then we will revisit the questions raised above, taking a particular context as example. We proceed by first understanding the real pain points experienced by developers in data transformations and then we take the reader through a simple case study, again with some working code."


In today's Weblogs, Elie Levy looks at the idea of the Multithreaded Hash Table. "If your application needs a "Hash Table" type of structure you have several options. This blog present some of them, and discusses the pros and cons of each."

Are JSPs dead? Zarar Siddiqi's wondering about their viability: "Seriously, anybody still use them?"

Finally, Qusay H. Mahmoud has some guidance for Networking MIDlets and blocking operations. "Pay special attention to blocking operations (e.g. methods that establish a connection to the network) which can lock up the mobile device' screen, leaving the user frustrated with the application. To prevent this, all blocking operations should be performed in a separate thread."


In today's Forums, firefight wants to Write to stdin. "How can I write to stdin? I execute a 3rd party library and it prompts for password on the console. There's not going to be anyone around to type in the password so I need to do it from code. What's the standard way of doing this? Do I have to spawn a new process and use a pipe?"

arckjmaster is trying to do HTTP file upload in GlassFish, writing in pls help, file upload to a local directory: "Here is the problem that I am having, I don't know why it keeps on saying "access is denied" when I can see that the file is uploaded to the directory. I am developing a JSP page file upload using Jakarta Fileupload v1.2. However, every time when I try to upload a file to a local path (e:\temp) on the server I keep getting this problem. I even try looking into the server.policy file on glassfish but no luck, your help is appreciated thanks"

Why factories and parameter blocks?, asks eviatar_yemini "I was just wondering if anyone knows why the JAI uses factories and parameter blocks rather than just straight forward classes. It would seem this choice destroys any compile-time type checking as well as many optimizations that could have been accomplished by JIT. I'm running a tight loop that requires real-time image analysis and processing on 30 fps video. My thoughts have been to move my required analysis and processing out of the JAI and into my own 2-dimensional bitmap arrays. Am I missing something?"


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.



Continue Reading...



Computer World

Posted by invalidname on April 18, 2007 at 07:45 AM | Permalink | Comments (0)

Are all these devices good or bad for us?

Two of our bloggers today have very different perspectives on the benefits and effects of the kinds of electronic devices that we generally take for granted. Let's start with Qusay H. Mahmoud, whose blog Java ME and BlackBerry wireless devices in the classroom relates personal stories about projects for college programming courses, one of which was based on a significant real-world problem: linking doctors and pharmacists, since the latter often can't read the handwriting of the former. He relates the payoff for students in getting out of the desktop development model:

In summary, teaching computer programming in the context of simple mobile applications using Java ME provides a motivating and inspiring framework for students, and raises the level of excitement and satisfaction. I encourage everyone to integrate Java ME into their courses to introduce students to a programming model different than the desktop. In the desktop market, the application is deployed on a platform similar to the one on which it was developed, but in the Java ME space, the application is developed on a desktop platform and deployed on a totally different platform.

On the other hand, David Van Couvering relates the culture shock of returning from a disconnected vacation in Mexico to the ultra-wired environment of the Web 2.0 Expo, in his blog Call me a Luddite...

The whole world is "getting connected." And those of us at the Expo are generally very excited, and see lots of opportunities to make money and and to build things that lots and lots of people will use. But I feel a sadness when I find myself in this environment. I feel like I am losing something. I watch myself "plug in," and I feel like I am actually losing connection. I crave the open sky, the deep stillness and power of the ocean, of the smiles of people who said "Hi" to my son.

Does technology open doors for people or close them off? Or is that not the right way to see things at all? What do you think?


Also in today's Weblogs, Mark Lam asks Why choose Java? "Those of us who have worked with the Java platform tends to take its benefits for granted. However, to a developer who is new to the Java platform, the reasons to choose it may not be so obvious. This article will try to capture once again why the Java platform makes sense both from a technical and business perspective."


In Java Today, the Java EE 6 was proposed to the JCP as JSR 313 on April 3, then withdrawn on Monday. A story on TheServerSide speculates on the issues behind the retraction: "The retraction was apparently caused by TCK licensing; the EC wanted it clarified. The JSR will be resubmitted when the TCK licensing terms are clarified. Chances are good that everyone is more sensitive to licensing issues thanks to Apache's open letter to Sun on the subject."

Iowa developer Brian Harry, also known as "leouser" on java.net, is renowned for the bug fixes he contributed to Java SE 6, which number well into the hundreds and won him a Duke's Choice award for outstanding platform contributions in 2006. His method was simple: He scanned Sun's openly available bug database for intriguing bugs, primarily in the Swing user interface (UI) code, printed them out, and put the bug reports on a stack beside his computer. Then, he fixed them one by one, submitting them through the standard JDK Community contribution process. In the interview Getting the Bugs Out: A Conversation With Bug Fixer Brian Harry, he discusses his bug fixing strategies and shares anecdotes of what he's discovered in the JDK along the way.

In the latest SDNtv episode, Coolest Beans Yet, Sun's Tim Boudreau and Tor Norbye discuss what's new in NetBeans 6.0, including a revamped editor that's faster than ever and includes semantic highlighting. A new integrated profiler targets specific code, saving time and generally making a developer's job easier. You can see 6.0 firsthand on May 7 at NetBeans Day the day before JavaOne.


In today's Forums, wierob wonders How to enforce ReferenceProperty on WS-Addressing Header? "My web service requires that the SOAP request contains a WS-Addressing Header with a certain reference property. I know that I can use @Addressing to force jax-ws to check that the SOAP contains a WS-Addressing Header. But how can I specify that this header must contain a certain ReferencProperty and how can I get the value of this ReferenceProperty?"

Vladimir Sizikov discusses an ME test strategy that he hopes NetBeans will support, in the thread Re: Please review: issue #74 (NetBeans support for exported tests). "I'd like to have this feature. More often then not, when running some tests, I wanted to quickly modify sources to investigate some particular functionality, and even just to add print statements, or breakpoints, in order to figure out what's going on. Having a generated netbeans files, would allow me and others to quickly modify sources and run/debug them from within the IDE, with all its nicities, like code completion, debugging support, highliting, etc."

paulby points out some helpful code in Re: Implementing Collision Detection in Java 3D? How is it done? "lg3d-wonderland includes a new collision system which you might find useful. We use it to do collision between the avatars and the world. The collision system uses world geometry for collision tests, but is optimised to extract the triangles only when they are within a certain bounds of the avatar. The collision system is in a separate package, but currently there are no standalone examples. Hopefully after JavaOne we will have some time to write a simple example."


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.



Continue Reading...



The Telephone Call

Posted by invalidname on April 17, 2007 at 07:00 AM | Permalink | Comments (1)

Catching up with phoneME

I discovered the other day that the RSS based system I use to get updates from the various communities doesn't pick up everything from the mobile & embedded community page. I see a lot of that from other channels, notably the weblogs, but some things have been slipping through the cracks, so let's try to catch up with today's daily blog.

Most significantly, Sun has posted an Early Access release of version 2.5.1 of the Sun Java Wireless Toolkit . As noted by Richard Gregor in his blog, the big news in this release is support for Linux. Of course, 2.5.1 also fixes a number of bugs, and contains Nokia's Scalable Network Application Package (SNAP) Mobile API and the SNAP Mobile Sample Application for development of networked, community-enabled multiplayer games.

And if you want to develop for more-capable phones, have a look at the phoneME Advanced project, which just released phoneME Advanced MR2 b14 last week, with implementations of CDC, Foundation Profile, and Personal Basis Profile. Given Sun's acquisition of the SavaJe intellectual property, it's worth wondering whether we'll see a new focus on more powerful mobile devices, leaving behind the "L" (for "limited") in CLDC in favor of CDC.

Anyone care to shake off their iPhone envy with a kick-ass Java phone? This could get interesting.


Also in Java Today, the open-jbi-components project has graduated fom the incubator to a Java Enterprise project. The overall goal of Project Open JBI Components is to foster community-based development of JBI components that conform to the Java Business Integration specification (JSR-208). You can join this project as a JBI component developer or as part of an existing JBI component development team.

Sun has posted an initial response to last week's open letter from Apache, in which Harmony project VP Geir Magnusson Jr complained about difficulties obtaining from Sun an acceptable TCK license for Harmony's open-source JDK. Sun's response indicates the company will need time to consider the issues raised by the letter, says that its GPLv2 Open Source Java efforts include TCK's, that Sun's current priority is making the Java platform accessible to the Linux community as soon as possible, and that with Java's many stakeholders, it will not be possible to please or accommodate everyone.


Back to the topic of phoneME, today's Forums, has a clarification of supported platforms for phoneME Advanced, in the thread Re: Current development release of phoneME Advnaced MR2 b14 now available. cjplummer writes: "Official MR2 releases only include Linux/ARM a Linux/x86, since these are the only platforms we are testing. However, other ports are usually kept working and can be found on the phoneme subversion trunk, which is where MR2 is derived from. Last I checked, both the win32/x86 and Linux/PowerPC ports were working, but keep in mind that neither of these curently support the JSR Optional Packages, JUMP, or MIDP on CDC."

kschaefe announces a new SwingX component in JXSlideoutBar. "I have created a JXSlideoutBar. This is designed to be a toolbar that creates popup panels when you rollover labels. This type of feature is often seen in docking frameworks, is used in Google Desktop, etc. I could not find any such component, so I built one. This is an early raw stage (please be ginger with it). Currently, placing it in the WEST of a BorderLayout is the only sure way to make it work. I thought this might be of interest to others and was hoping for some feedback, so please let me know what you think."

Finally, jada describes the Java 3D strategy for Windows in Re: DirectX. "The driving force for Java 3D 1.5.1, currently in development, is to address Windows Vista support. Java 3D will fall back to D3D on Windows if OpenGL 1.2 or better is unavailable. We understand there is still a gap between D3D and OGL pipes, we have tentative plan to close this gap going forward. We will talk more in the coming Java 3D BOF at JavaOne."


In today's Weblogs, James Gosling talks about the keynote competition and on-site amusements in Contests@JavaOne. "Just in case you think you're going to be bored at JavaOne, we seem to be awash in contests."

Cay Horstmann asks What's so Taxing about Return? "Some responses to my blog on Neil Gafter's closures talk showed concern with the handling of the return statement in BGGA closures. Since I am done with my tax return, I am blogging about the intricacies of the return statement inside closures."

Finally, in Brazil's FISL day 2 and 3: When IBM isn't showing up, unleashes the Grizzly Comet!, Jean-Francois Arcand continues his conference coverage with a few surprises. "My Brazilian adventures continue... On Friday, IBM didn't show up for their Web 2.0 talk and guess who was asked to replace them?"


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.



Continue Reading...



Trans Europe Express

Posted by invalidname on April 16, 2007 at 07:27 AM | Permalink | Comments (0)

Touring the JUG's (and other points of interest)

java.net's official in-person gatherings, like our booth at JavaOne and the community leaders weekend before it, tend to have a bit of a North American bias just because of the distances involved getting to the U.S. west coast. There's usually a strong Brazilian contingent (cue obligatory cheer) and an occasional European participant, but not fully representative of our community. So it's good to have reminders of how international the java.net community, and the wider Java user base, really is.

A taste of that can be found in today's listing for a JavaOne birds-of-a-feather (BOF) session bringing together the leaders of a number of Java User Groups. The list JUG's participating in JUG Leaders BOF with Sun Technology Outreach sounds like a trans-European tour: Cologne (Germany), Belgium, the Netherlands, Greece, and others. Throw in a stop in Brazil (cue obligatory cheer) for a meeting with SouJava, and it's a grand tour. The group will conduct a panel discsussion about open source initiatives, how to get a Java Champion or Sun engineer or evangelist to talk at your JUG, and more.

But we're still missing a few continents... Asia, Australia, Africa... care to join us?


Also in Java Today, Direct Web Remoting (DWR) creator Joe Walker has announced the release of DWR 2.0 RC4, with several new features. "The biggy is Guice support. If it wasn't for the fact that we could add this in without touching the core of DWR, I'd say this was too big a change at this point in the release cycle, however Tim Peierls (who you might know from this project) has done a stack of work to make DWR and Guice play really well together." Security and Reverse Ajax have also been improved.

Issue 117 of the JavaTools Community Newsletter is available, with announcements of five new community projects, one graduation from the incubator (JFeature), tool-related news from around the web, and a Tool Tip on editing your java.net project web site through a Web user interface, via Content Editor


David Herron returns to the topic of JDK testing in today's Weblogs. In Test suites and harnesses, continued, he writes: "Last week I wrote a bit about the OpenJDK quality team we plan to launch, and about one of our primary concerns. We are pretty sure there are many people who would like to contribute to Open JDK quality, because there are many people who see the vision of Java and want to see it live."

Kirill Grouchnikov uses his blog to announce the Substance LAF 3.3 official release, consisting of a "bundle release for two projects, Substance (Japan) and Laf-Widget (Daffodil). Read inside for new features and links to the documentation."

Finally, Jean-Francois Arcand reports from Brazil's FISL day 1: "This week I'm in Porto Alegre, having fun at the 8th International Free Software Forum."


This week's Spotlight is on the soon-to-end Java Mobile Application Video Contest, the deadline for which is April 27th. This contest seeks example of great Java ME applications or services. To enter, create a video of up to three minutes that references Java ME or the open-source phoneME technology used, and post it to YouTube. Prizes include a Ericsson K800 phone, Panasonic Blu-Ray DVD Player, an Amazon.com gift certificate, and PlayStation 3 consoles. Check the official rules for more information and specifics of submitting your video.


In today's Forums, Jacek Laskowski explains Java Persistence API details in Re: JPA missing hibernate's "delete-orhpan" cascading type: "Unless I've misunderstood the delete-orphan cascade type, where it is to delete (child) entities that have been dereferenced from their parent entity, it's possible to mimic the behavior and remove the child entity when it's dereferenced. I can't imagine a situation where the delete-orphan would apply, but it's most likely that I have never used it or even more importanly have never played with Hibernate as much as I should've been. Could you describe a scenario where delete-orphan applies and JPA can't handle?"

Need to call from JNI back into Java? meek explains how in Re: getting handle from a compiled java program: "Well, in every JNI call ... you have an object parameter received in JNI function ... you can use this object to receive and function from the JAVA CODE any Field from Java code and execute java methods from jni. I have done a project in which i sent call to jni code .. then in jni .. i used the methods to set/get java class properties and then fire an event (from the jni) using the java code."

krisdover wants to tour the classpath, according to Re: classpath browser: "I am working on a similar problem but within Tomcat where i want to be able to retrieve a list of classes in the classpath to facilitate dynamic application extension. System.getProperty("java.class.path", "") does not return the correct class path. I have however had better luck with Thread.currentThread().getContextClassLoader().getResources("") however it does not seem to return the jars. I have also found that servletConfig.getServletContext().getResourcePaths("/WEB-INF/lib") gives me jars but I want a system independent way of doing this since the code won't always be in the context of a servlet. What I am hoping to achieve is a callback mechanism where I can retrieve a list of classes in the classpath which implement a particular interface, on demand. So far I have this working within the context of the servlet but i also need it to work for code running as part of the container."


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.



Continue Reading...



In A Different Light

Posted by invalidname on April 13, 2007 at 07:48 AM | Permalink | Comments (3)

Tuning in to these developer videos?

So, do you watch the developer interview videos? I figure someone must, because they're popping up all over the place (including, among many others, SDN Channel, InfoQ [click the "interviews" tab on the right], BeJUG/JavaPolis/Parleys.com, and TheServerSide). And I'm intrested to know, is this driven by demand, or supply? Are developers particularly intersted in seeing and hearing top developers in an interview format, or are these sites putting it out there because technology has made it easy to do?

[If you're going to vote in the poll, you may want to do so now before I bias your vote with the next paragraph.]

In one of my other blogs, this for O'Reilly's Digital Media site, I recently decried the underlying assumptions (or lack of genuine thought and understanding) and formats of these videos, in We Need an Aesthetic for Technical Interview Video (hurry, my eyes are bleeding). What I'd like to see is a deep re-think of the value of putting video in front of developers and demanding their entire attention; is seeing someone speaking on a single static shot for 20 minutes really valuable? Would you be better off just listening to the interview on an iPod while commuting to work? Or quickly reading a transcript over lunch? There's value in seeing real people, but does this approach really keep the video channel full? I'm interested to hear from people who like these videos and see value in them that I apparently don't.

One thing that I don't really get into in the blog is the idea of whether the interview, or straight exposition, is the only valid form for online videos about Java development. One of the "steps" of content/art that I discuss is the idea of idiom, meaning how you address your audience. Nearly all these videos are largely expository: either one person talking, or someone talking for long stretches in response to an interviewer's quetsions. But that's not the only option. Consider narrative: can we talk about Java in the form of a story? Of course! Matt Quail did just that a few years ago in the brilliant Totally GridBag, a humorous reminder of the drudgery of developing GUI's with the only really powerful layout manager of the time, the GridBagLayout. And there are surely other approaches that might work, maybe better than what everyone's currently doing.

Apropos of all this thinking about technical-content videos, I decided to have the latest java.net Poll ask the question "How often do you watch online developer interview videos?" Cast your vote on the front page, then visit the results page for current tallies and discussion.


In today's Weblogs, Fabrizio Giudici wants an update on Java for the Mac, in light of the delay of the next release of the OS. In Mac OS X 10.5 delayed to October: what about Java 6?, he writes: "Apple has just posted bad news: the release of Mac OS 10.5 (Leopard) has been delayed to October. With the usual arrogance, Apple has never disclosed to Java developers its official plans about Java 6, but since the latest pre-release dates several months back we have understood that the final release is bound to Leopard."

In Sun acquires SavaJe intellectual property, John O'Conner reports "Sun announced Thursday that it will purchase the intellectual property of SavaJe. I'm thinking Sun should get the assets for about $2.99...the cost of a CD and postage."

Cay Horstmann checks in with a closures-related talk, as Dr. Gafter comes to SJSU: "I got an email from Neal Gafter: "Hey, it's really cool to see your reference to BGGA in a SJSU lab assignment!" I asked if he could give a talk at the department seminar, to which he graciously agreed. We had a packed room today."


In Java Today, Project Mango has graduated from the incubator to a Java Enterprise project. Mango is the open source alternative for Machine-to-Machine (M2M) software (also known as SCADA, HMI, or domotics). Mango is browser-based, Ajax-enabled M2M software that enables users to access and control electronic sensors, devices, and machines over multiple protocols simultaneously. It provides an interface with which diverse data sources can be created and configured along with an intuitive rules engine for setting up access, monitoring, alerts, data logging, control, transformation, and communication.

"There is a raging debate about OSGi and Jini, yet again. Which isn't necessary or helpful." In Jini and OSGi, yet again, Jim Waldo writes, "I had been ignoring the discussion within the Jini community, hoping it might be simply local or just go away. But seeing someone be reasonable gave me hope that it might be time to think about these things in a clear way for a change."

The methods people commonly think of for controlling threads were deprecated long ago, and are not safe to use. In the ONJava article Controlling Threads by Example, Viraj Shetty shows the appropriate techniques for starting, pausing, resuming, and stopping activities taking place in a multithreaded application.


In today's Forums, Alexander Alexeev discusses cqME framework process in Re: [Issue 93] New - Ability to declaratively specify Interview class is needed. "It is good practice to support legacy code while creating new API. But we are currently in more comfortable situation then other libraries: we have small number of clients and these clients' life cycle is rather short. I propose to create something like migration plan for test suites. If test suite's developers want to switch to new framework during maintenance release they should consult this plan. So we can avoid situations when deprecated API will be used with updated test suite. And even more we can remove legacy code from framework after all products those use it will be EOL'ed. This allows us to save time while creating new features. What do you think?"

Patrick Wright makes the case for non-hardcore use of SwingX Painters in Re: Painters: default 'cacheable' value. "Just some comments from a potential users of Painters. I think we have to consider two different kinds of users, those who write or extend Painters in serious ways, and those who just want to plug-and-play. I'm in the latter group and what I'd like, 90% of the time, is to add one or more painters and have the performance be pretty good out of the box. This is especially true if I have a bunch of painters used by different components in a panel and don't know where to start addressing performance problems."

Bill Batchelor needs help adding a Find in page feature: "I'd like to implement a "Find in page" function in JavaHelp, which brings up a dialog where a user can enter a text string and then it will find that text string in the currently loaded HTML page. Can you advise how easy this is to implement and how to go about it? I have a lot of expereince in Java so I just need to know where to start. This is really needed as the search feature provided in JavaHelp is no good for finding a text string as it just says there are, eg 4 matches and highlights them, but does not take you to them in the HTML page. It the HTML page is 20 pages long, say, it's hard to find the matches!"


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.



Continue Reading...



Be With You

Posted by invalidname on April 12, 2007 at 09:12 AM | Permalink | Comments (0)

Just a few JavaOne reminders

I'm getting a really late start on the blog, so I thought I would just use this space for a few reminders of JavaOne topics that aren't on the front page:

  • Early bird registration has closed, but you can still save $100 by registering now, instead of at the show.

  • If you're interested in presenting a mini-talk in the java.net Community Corner, you may want to hurry up: Tuesday and Wednesday are mostly full and Thursday talks are now getting set up. Of course, be sure to read the instructions for proposing a mini-talk, so your talk doesn't get removed (for not having an abstract, not having contact info, etc.)

  • Similarly, if you'd like to volunteer to talk about your community at one of the pods, please do. You'll get a java.net shirt. If you aren't already going to JavaOne and need a pavilion-only pass, we have several to give out to those who sign up to work the booth.

  • We'll be running a continuous slide-show in the booth of our communities, projects, and members, so if you have a photo of your project's team, a community get-together, a screenshot of your application, whatever, and you'd like to share it with the rest of the community, please submit it for inclusion in the show.

  • Are you a java.net member presenting a session or BoF? Please add yourself to the lists on our JavaOne wiki page.

  • Community Leaders who'll be in town on Saturday, May 5 are also invited to the Community Leaders weekend, and we hope you'll sign up on its wiki page.


Test first means, well, test first. But with web applications, there's a great deal of installation and configuration you have to do before you can even test. Couldn't that be slimmed down a bit, so developers can get testing sooner? In our Feature Article, Embedded Integration Testing of Web Applications, Johannes Brodwall shows how to combine some popular pieces to create a simpler container for testing your web apps sooner.


In Java Today, the recently-graduated bean properties project reinvents the concept of JavaBeans while maintaining backwards compatibility with Java SE 5. Bean properties allow a whole new type-safe syntax for using JavaBeans. Support is included for UI binding/factories/validation, JDBC binding (ORM, proof of concept), XML integration etc. "The code within this project aims to simplify the development of current JavaBeans with binding annotation [...] while leading the way to a whole new way of thinking about bean properties."

The ROME Propono subproject is a Java class library that supports publishing protocols, specifically the Atom Publishing Protocol and the legacy MetaWeblog API. Propono includes an Atom client library, an Atom server framework and a Blog client that supports both Atom protocol and the MetaWeblog API. A blog post at Artima notes its release and has a brief discussion of its API.

Issue 286 of the NetBeans Weekly Newsletter offers "Another Reason to Attend NetBeans Day" (hint: it involves prizes), and has features on NetBeans IDE 5.5.1 RC, the UML modeling module, securing communications in web services, a mobile MSN project, a new NetBeans book, building a Ruby sample for NetBeans, Rails & database migrations, and a new screencast.


Jiangli Zhou tops today's Weblogs, with an explanation of CVM Bootstrap and Initialization Process. "You probably already know that CVM is written in C. So what happens from the VM's launched (invoking the C main() function) all the way till the first line of Java code in your main() method is executed? There is a lot going on during that, and we usually refer that as the VM bootstrap."

Graphics fans can join Simon Morris for a March of the Ants: "Ever looked at an API and thought "well that's an interesting feature, but why would I ever need it?" However, really useful effects can sometimes be had from even the most arcane bits of functionality."

Finally, Kohsuke Kawaguchi checks in with Recent developments about Hudson: "Hudson development continues. 1.100 is just released today, there's a new plugin, and also a NetBeans support!"


commanderkeith may be barking up the wrong tree in today's Forums, seeking a means of opening URL wih JFileChooser: "When I try to open a file on the web by typing its URL into a JFileChooser, the JFileChooser gives me the current directory with the URL pinned onto the end which is useless. How can you open a URL using the JFileChooser? My users want to be able to do this since they can open a file on the web in MS Notepad by just typing in its URL in the 'file open' dialog."

Jonathan Kaplan has some questions about the Animation APIs: "I've started looking at the animation APIs, with the hope of having scripted animations that react to world events, for example when users walk up to them. In principal, it looks pretty easy. I see that animated cell has (or should have) an RtgAnimationController associated with it. From that, it looks like I can play animations based on a loop index. My questions are about the loop index. Is there any more information available about the index, such as a text description of what that loop corresponds to? Do the animations we currently have contain more than one loop? Is there any way to query how many loops are available?"

Finally, kschaefe talks about GUI data models in Re: JSR295 v.0.5 and JXTreeTable: "JXTreeTable's TreeTableModel works with whatever objects you'd like it to work with. Akin to the JTree/JXTree, you can use TreeNodes to create tree-based models for non-tree-based data. However, I would avoid such adaptations for objects that are already part of a hierarchical/tree-like structure. File systems, HTML documents, Swing hierarchies are all inerently tree-based and should be modeled directly. My incubator has a version of the FileSystemModel that does exactly that. Such hierarchies seem to be the best way to get to understand the TreeTableModel. Using the DefaultTreeTableModel, which is designed for TreeNodes, is more difficult, since you have to make decisions regarding how the tree should be structured from non-tree-based data. So start with an inherently tree-based object scheme and you should get the hang of it."


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.



Continue Reading...



Return Post

Posted by invalidname on April 11, 2007 at 07:41 AM | Permalink | Comments (4)

Awaiting an answer to Apache's open letter

Yesterday, the Apache Foundation sent an open letter to Sun, written and signed by Harmony project VP Geir Magnusson Jr. It calls for Sun to license the Java Compatibility Kit (JCK) on terms acceptable to Apache, so that Apache can verify that Harmony, its implementation of Java SE, can pass compatibility tests and therefore call itself "Java-compatible":

The JCK license Sun is offering imposes IP rights restrictions through limits on the "field of use" available to users of our software.

These restrictions are totally unacceptable to us.

The letter then goes on to say that the restrictions are themselves inconsistent with the JCP, which prohibits specs from imposing contractual conditions that prevent licensees from creating or distributing implementations. But what are these restrictions? A companion FAQ is somewhat opaque on the specifics, but has one concrete example:

To give a concrete example from the Sun / Apache dispute, if Apache accepted Sun's terms, then users of a standard, tested build of Apache Harmony for Linux on a standard general purpose x86-based computer (for example, a Dell desktop) would be prevented from freely using that software and that hardware in any application where the computer was placed in an enclosed cabinet, like an information kiosk at a shopping mall, or an X-ray machine at an airport.

So, that's one side of the dispute, which Apache says has been going on since August of last year. Do they have a legitimate grievance? Tom Ball isn't impressed, and in the blog "Open Letter" or Extortion?, he decries Apache's decision to go public, and to do so now:

I just looked at my calendar and noticed that thirty days from today is smack in the middle of JavaOne, two days after Jonathan Schwartz's keynote. Mystery solved! This isn't about the Apache Harmony team's ability to work effectively -- it's instead a classic JavaOne slimy marketing ploy Java engineers have to endure each year. With the JavaOne schedule moved up I guess the mud had to start being thrown sooner.

Tom also thinks that Apache is asking for the wrong thing:

If I were in their position, I would instead ask that the JCK's current read-only license be rescinded so that the Harmony engineers can compile and run the tests specific to whatever they are individually working on to see what issues remain. IMHO, the JCK shouldn't be modifiable (it helps define the Java platform), but anyone should be able to compile and run it without legal hindrance. But that isn't what Mr. Magnusson seems to be asking for.

There are already lots of comments on Tom's blog, as well as Geir's (including an intersting perspective from Kaffe's Dalibor Topic). So this is an important situation that we'll be keeping an eye on for the next 30 days.


Also in today's Weblogs. Vikram Goyal asks Is outsourcing to India still financially relevant? "I had an interesting phone chat with a friend based in Bangalore, India using Skype (I am based in Australia). While not going into specifics, he outlined his take home pay and as he was saying it, it hit me like a thunderbolt."

Finally, Airlan San Juan takes on the esoteric topic of Blu-Ray Java in Postcards from the edge of Javaland: "I could hear the crickets chirping, or at least the hum of the air conditioner fans as they strove to cool the bodies of several hundred enthusiastic and jumpy Java developers crammed into an auditorium of Google.com's New York City office. They were all here to listen to Rod Johnson talk about the Spring Framework, and I had just asked whether anyone knew about BD-Java."


In Java Today, the next version of Java EE is kicking off with the JSR review ballot for JSR 313. The stated goals for the release are extensibility (specifically the addition of more extensibility points throughout the platform) and profiles (standard definitions of subsets of EE, possibly folding in other JCP-approved API'S). Also on the agenda is a little pruning: the JSR suggests marking some EE API's for removal in future versions of the spec, such as EJB CMP and JAX-RPC, which effectively been replaced by Java Persistence and JAX-WS, respectively.

The incubated jnxd project is a Java persistence framework for XML DataSources. Specifically, it's "a Java Framework to persist objects in XML DataSources without any OO-XML-like mapping. For this purpose, Native XML Databases and others supporting the concept of XML DataSource are the integration layer considered here. This simplifies the insertion, searchig, updating and deletion of XML documents and Nodes using a simple API called XML:DB API, and XQuery API for Java(XQJ)".

Mobile handsets such as cellphones typically have an address book to keep track of people we like to stay in touch with, a calendar to keep track of important events, and a to-do list to keep track of items we don't want to forget. This type of personal information is one of the most important functions found in a handset, just second to voice. You can use the PIM API for Java ME to enable your mobile Java applications to read and write to/from the locally stored personal information databases. You can even write synchronizers to keep your handset PIM data in-sync with remote PIM data stores. C. Enrique Ortiz's Managing Personal Information - An Introduction to the PIM API for Java ME, Part 1, the first part in a series of articles on using the PIM API for Java ME, provides a comprehensive introduction to the PIM API.


In today's Forums, attodorov would like to know Why is wsit DOM-based? "Looking at the code of wsit , I have noticed that it uses the xmlsec libraray, which is DOM based. Therefore, one goes back to the stone age of using DOM, and not some StAX way to manipulate the xml. So even if the core of JAX-WS is Stax-based, and is advertised a lot to be very fast , etc, etc, if one wants to use a simple security operation on the SOAP envelope, one gets in trouble. Are there any plans to get rid of this DOM dependence?"

chrisab has some questions about Tuning Java App on an 8-core Sun Fire T2000 Server: "I am deploying a java app on an 8-core (32 simultaneous threads) Sun Fire T2000 Server running Solaris 10 and have some questions about tuning the app and the JVM for this platform. One thing that I have noticed is that the JVM starts up with 43 threads right out of the box. Is it normal for the JVM to do this (our JVM is build 1.5.0_09-b03)?"

Finally, larswestergren has some suggestions for the JavaOne organizers, in the thread Re: Cool Stuff. "From the conference scheduling application, I've seen that there is one real time car racing competition (like last year I presume), and also a "virtual duke" 3D t-shirt catching contest. Are there any other programming contests? Perhaps you should advertise the upcoming contests a bit more prominently on the Java One home page, a few pointers to what people should look into in order to maximise their chances of winning and so on? (Can you tell I'm really eager to compete this year? =)"


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.



Continue Reading...



Let It Go

Posted by invalidname on April 10, 2007 at 07:45 AM | Permalink | Comments (0)

So long, Class.forName()

There's ugly code, and then there's the otherworldly bizarreness that is JDBC driver loading. You don't have to explicitly load a class, per se, you just have to expose its name to the class-loader with Class.forName() and a fully-qualified driver name. So you still have the hassle of getting a classname into this call (which you should provide dynamically through something like a property, but it probably gets hard-coded more often than we'd all like to admit), yet the call doesn't even have the decency to be self-explanatory and clear about why it's there. Frankly, I'd rather just do something like loadJDBCDriver(), so the purpose of this line would be more clear.

Fortunately, for those who've moved to Java SE 6, this isn't a problem anymore. JDBC 4.0, provided as part of SE 6, banishes the crazy Class.forName() driver-loading pseudo-call to netherworld of crummy API's. As Sharad Acharya writes:

Did you think this process should have been improved, or ever would be? They did exactly that in this version of JDBC. You don't have to explicitly load the driver by calling Class.forName anymore. When your application attempts to connect the database for the first time, DriverManager automatically loads the driver found in the application CLASSPATH. This is one of the great additions in this version of JDBC.

In his Feature Article, Sharad answers the rhetorical question What's New in JDBC 4.0?. "JDBC 4.0, specified as JSR-221 under the Java Community Process, provides better code manageability and flexibility, and more complex data type support. In this article I will explore some new features and enhancements available in JDBC 4.0 from the perspective of programming ease and flexibility."

Most drivers don't fully support the 4.0 API yet, but reading this article will give you a good idea of what's coming.


In today's Weblogs, Kirill Grouchnikov asks Who doesn't want the transition effects in Swing applications?, in which he offers "some minor thoughts about transition effects in Swing applications and the general lack of interest in them."

In the blog On the testing of UI web applications, John Ferguson Smart offers "musings on the problem of how to write unit tests for your web application user interfaces."

Finally, David Herron sets his focus on An annoying misfeature of AJAX web applications. "It's rather seductive, these javascript based apps. They offer the possibility of cross-platform application features. They offer the possibility of just logging into a web site and poof all your stuff is there. But I think they have a long way to go before they can truly replace traditional desktop applications."


In Java Today, a recent article by Shunmuga Raja looks at EJB 3.0 Timer Services: "Starting from EJB 2.1, Timer Services are available for building J2EE Applications that depends on time based services. Time based services are mostly used in scheduling applications. Technically, these scheduling applications are called workflows. A workflow defines a configurable sequence of activities or tasks that will take place at a particular point of time. Before EJB 2.1, one has to manually code for building and deploying time-based workflow systems. But, with the invent of EJB 3.0, thanks to Annotations and Dependency injections, life has become [...] easier for creating such applications."

The WestECC project aims to provide an open platform that supports applications in many kinds of environments, from the webapp to the mobile device. The concept supports three "specialities": ECC-UA (Universal Assembly Language), ECC-UE (Universal Extendable Language), and ECC-UP (Universal Page Language). The idea is that "on the ECC foundation, we will more conveniently make mathmatical graphics, figure algebra expression, [and] establish 3D scene(JOGL+SWING+AWT) to assist education."

A new article at the SDN previews The Open Possibilities of the 2007 JavaOne Conference: "On May 8, the 2007 JavaOne conference opens the doors to another first for the expanded community: the first JavaOne conference since Sun open sourced its implementation of the Java platform. Java technology will continue to be the centerpiece, but the broader software development environment -- an Open Network Environment with Java technology at the core, with scripting languages, open-source software, and other Web 2.0 languages and tools -- rounds out the technology banquet."


Newbies call for help in today's Forums. hendry is looking for the cause of low fps in my game engine: "hi, iam newbee in java programming and java 3d. i have a problem in my game engine, fps (frame per second) that result in my engine is very low (12 fps), why is that so low? there's not many objects in the scene ... i implement background overlays to display hud (fps and watermark logo), may be background overlays cause that problem ?"

raaga seems in need of some fundamental guidance in Converting XML to Java Objects...possible? "Hi, Am a newbie to JAXB. As far as I read, JAXB has facility to convert "XSD" (not XML) to Java "classes" (not objects). This can be done using xjc compiler. Can XML files (i.e. ones with data) be converted to Java objects (retaining the data from XML files)? If yes, please throw some light on how it can be done. If no, then is there some java technology to do such a thing?"

Finally, Jason Lee isn't a newbie... his problem is that he's Maxing out Connection Pools: "We have an issue on our production server where we're maxing out a particular connection pool (which connects to SQL Server, fwiw). If I look at the DB server, I can see all 128* connections, some of them showing that they connected several hours earlier. I would think that the connection should idle out and be removed, but that does not appear to be happening. One of the frustrating things is that we have no way (that we know of) of killing the connections from the GlassFish side other than restart the server, nor do we know how to tell which applications have the connection."


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.



Continue Reading...



Manic Monday

Posted by invalidname on April 09, 2007 at 07:44 AM | Permalink | Comments (0)

Crunch-time, anyone?

For those of you working on projects that need to launch in a JavaOne timeframe, the show begins a month from yesterday, so this is probably crunch-time. If you took some time off for a Spring break, it's probably a mixed message of "welcome back" and "get moving". And for those taking Passover off, the crunch begins or resumes on Wednesday.

Today's probably going to be pretty dire here once I finish the blog, as I left everyone's Very Important Problems to pile up in e-mail for a couple afternoons last week during the upgrade, and indulged a little programming time doing a desklet for the AB5k widget environment. If you'll recall, about two years, ago, I complained in this space about the lack of a widget-type approach to doing a sort of "bang out a snippet of code and run it" tool that is provided by BlueJ, and that I'd found handy in the form of the classic Mac's "Java Diddler" application.

Thanks to JSR-199 exposing a programmatic interface to the Java compiler, it is actually a pretty simple matter to code up equivalent functionality. So I used NetBeans to put together NuDiddler, an AB5k desklet that lets you write some code and execute it immediately:

nu-diddler-primes.png

I thought I was close to done with it, and put source for a 1.0b1 up on the project's Google Group, but over the weekend, Josh and Cooper changed the API radically by changing Desklet from an interface to an abstract class (which will allow them to add new methods without requiring a new spec... Josh pointed to LayoutManager2 as an example of what he's trying to avoid). So now my desklet, like all others, is broken. Plus, NuDiddler has only worked in the AB5k container within NetBeans and not with the Web-Start'ed version, and the container's error message doesn't give me enough to go on. So, I'm not done yet. Which is too bad, because there's plenty of other work to crunch on.


I'm not the only one playing with AB5k. In today's Weblogs, James Gosling says he's been having Fun with widgets too. "I've been having a lot of fun with Rob Cooper and Joshua Marinacci's AB5k Widgets for the World system. It's vaguely like Mac OS X's Dashboard, Vista's Sidebar, and Yahoo's Widgets, except that it works everywhere..."

Chris Campbell checks in with Faster Java 2D Via Shaders, which describes "more performance improvements in Java 2D's OpenGL backend... Lots of pretty bar charts included..."

Finally, in Web Application Paradigm Specialization and JSF 2.0, Jacob Hookom writes, "many developers are making the partial migration to rich web applications with AJAX and giant JavaScript libraries while retaining traditional page-oriented paradigms. Sitting in the gray area of web application paradigms often leaves you with less than ideal results."


Speaking of the JSR-199 Java compiler API, one of its architects tops the Java Today section. In the latest SDN interview article, Meet Peter von der Ahé, Tech Lead for Javac at Sun Microsystems, the well-known spec lead and compiler engineer discusses the Kitchen Sink Language project, JSR-199 , generics, and his wish-list for Java SE 7.

The goal of the Blu-ray BD-J Application Development using Java ME site is "to serve as an introduction to the development of Java ME (formerly J2ME) applications on Blu-ray systems using the BD-J specification, and to provide up-to-date news and analysis on the technology and its commercial applications." Among its initial content is a conceptual guide to Java ME and reviews of the first titles to make use of BD-J, such as the game Dragon's Lair and the highly-interactive Blu-ray version of Disney's Chicken Little.

NetBeans.org is proud to announce the availability of NetBeans IDE 5.5.1 Release Candidate. This release supports the "v2" release of the open source GlassFish server, which is the basis for Sun Java System Application Server 9.1. In addition, 5.5.1 also contains many bug-fixes to NetBeans 5.5. NetBeans IDE 5.5.1 RC is available in English and has been localized into simplified Chinese, Japanese, and Brazilian Portuguese. The final NetBeans IDE 5.5.1 release is planned for the end of May, 2007


My NuDiddler experience also allowed me to follow up to the first of today's Forums messages, about the JSR-199 Compiler API. In this thread, jeremygwa wants to Compile code into memory, *not disk*, then execute: "Is this possible? If so, how do I execute the class instances? and how would I be able to have the jvm prefer the in-memory class name over the old unmodifed class on disk? Can this be done without third-party libraries? "

Harri Kaimio has some JAI behavior questions in [JAI] Interpolation algorithms & renderable mode: "I have been wondering what is the expected behavior when using operations that need interpolation (e.g. affine transformation) with renderable mode - especially how the used interpolation alogrithm is determined. Based on documentation it seems that JAI should use the interpolation algorithm that has been specified in operation's parameter block. However, it seems that in practice JAI renderable chain optimizes the transformation chain by combining all transformation matrices into one and performs that as part of MultiresolutionRenderableImage#createScaledRendering(). And that operation uses interpolation algorithm set in JAI.KEY_INTERPOLATION rendering hint, disregarding all "interpolation" parameters set in other transformations."

Finally, Mark McKay brings up the topic of Rendering 2D shapes in OpenGL: "I'm writing an application in JOGL and need to draw some curved 2D shapes (with an orthographic view, so they will appear to overlay the rest of the scene). Effectively, I want to emulate the Graphics2D.draw(Shape) and Graphics2D.fill(Shape). Some of these shapes will be defined by connected Bezier curves (similar to a GeneralPath). What's the best way to render such a shape in OpenGL? I can subdivide each of the Bezier segments into smaller segments until the resolution is small enough to approximate it with straight line segments - but that would lead to an extremely tessellated shape. And how would I emulate a stroked outline?"


This week's Spotlight is on the Beans Binding project, which gives you an advance look at the work going into the early draft of JSR 295, which uses a modified version of the GlassFish JSP/JSF Expression Language (EL) to keep properties of two beans in sync, which can in turn be used to simplify rich GUI development. This project provides the reference implementation of Beans Binding, with an additional emphasis on the ability to bind to Swing components, and easy integration with IDEs such as NetBeans. "The intended audience for this snapshot is members of the community interested in binding, who want to see where we're headed and to provide early feedback. So that's exactly what we're looking for at this point; constructive feedback and bug reports are welcome."


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.



Continue Reading...



Oh Well

Posted by invalidname on April 06, 2007 at 07:02 AM | Permalink | Comments (0)

Upgrade complete, please move along...

OK, so, are we good? The project space was back up just about 24 hours after the upgrade began, with a note that the upgrade work was continuing. By last evening (US EDT), the notice on the project pages said "The upgrade of java.net's project area is complete. Happy java.netting!"

Are we out of the woods? Are we done? You tell us. Try out your projects and all their various features (mailing lists, wikis, source control, etc.) and if you see anything that doesn't look right, let us know. Contact information is available on the upgrade page.


In Java Today, the NetBeans 5.5 UML Modeling module is now available for download from the NetBeans Update Center. The module provides UML modeling features to the NetBeans IDE. It allows analysts and designers to design applications using a standard modeling language. Developers are then able to generate source code from the UML model and update the model from changes made in their source code. A Flash demo shows NetBeans' UML Modeling in action.

Most developers think of the Java compiler, javac, as an unobtrusive command-line tool to invoke when you want to turn Java source code into class files. The Java Compiler API, JSR 199, released in final form last December, opens up the Java compiler to programmatic interaction as well. In The Java Compiler API: A Conversation with Peter von der Ahé, Artima's Frank Sommers speaks with JSR 199 spec lead and Sun engineer Peter von der Ahé about what programmatic compiler access means for developers.


In today's Weblogs, Brian Leonard discusses Rails and Database Migrations: "Rails is so easy because the framework defines conventions, which if followed, allow rails to do its magic. This entry is a reprise of an earlier web blog example entry, now brought to you in a more Rails conventional way."

In Java desktop frameworks: Where are we headed?, Bill Snyder asks: "Is Java desktop development at a crossroad? With the arrival of various frameworks over the past few years - how will they renew our approach to application development?"

Finally, Eamonn McManus discusses Cloning Java objects using serialization: "Sometimes you need to clone objects, and sometimes you can't use their clone method, and sometimes serialization provides an alternative. Here's an explanation of when you might need this exotic and expensive technique, and how you can use it."


The latest java.net Poll asks "Do you blog?" Cast your vote on the front page, then visit the results page for current tallies and discussion.


In today's Forums, cknight19 asks Can Java use IE's internet connection? "I'm wondering if its possible for Java apps to use IE's internet connection to access the internet as apposed to writing its own connection code. The reason I ask is I've just finished writing an NTLM connection code ( used HttpClient) which was reasonably easy to do. However the app now requires my users to put in their proxy details, username, password, domain and proxy url and port. You'd be amazed how many users don't know this information or how to get it.....most of them have pre-built PC's and would need to phone the helpdesk for this (believe me they are a devolved breed)."

Jan Luehe explains when GlassFish does and doesn't use SSL, in the thread Re: what are differences between making a listener https or configuring web.xml and sun-web.xml? "Any and all requestes received by an HTTPS listener automatically participate in SSL, even if the resources to which they get mapped do not exlicitly require SSL. On the other hand, you can protect all (or a subset) of your webapp's resources with SSL, by declaring corresponding security constraints (that apply to one or more URL patterns) with a transport-guarantee of CONFIDENTIAL. If your webapp is accessible thru both HTTP and HTTPS listeners, and a request received thru the HTTP listener is mapped to a resource that is matched by a security constraint requiring CONFIDENTIAL transport, the container will redirect the request to the HTTPS listener."

Finally, in Re: Can Java execute batch file outside of current JVM in separate process, fred34 discusses practical concerns about spawning processes from Java. "I'm still convinced that Java does not actively try to kill processes when it terminates. They terminate of their own accord when any necessary streams are closed. I saw no evidence of Java trying to kill cmd.exe or calculator; I believe the explanation is still that as under my example, the streams may not be valid once Java terminates, any command in the batch file which requires them terminate thus terminating the batch file with any errors being dropped on the floor."


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.



Continue Reading...



Don't Stop

Posted by invalidname on April 04, 2007 at 05:11 AM | Permalink | Comments (1)

A day's pause to upgrade

In just a few hours, 10AM PDT, CollabNet will beging upgrading java.net to the new edition of CollabNet Community Edition. The upside, once any kinks are worked out, should be better performance and the latest versions of essential tools like Subversion. The downside is that much of the site will be unavailable for 24-48 hours during the upgrade. The front page will still be here, but projects will be unavailable, as will forums, blog authoring, and most "write" access to java.net systems. In our meeting yesterday, it was noted that some users may maintain some functionality as long as their authenitcation cookies stay valid, but we decided it's more consistent and useful to simply say we're going to be down for 1-2 days.

When we come back, we'll update the front page to announce the completion of the upgrade, and at that point, we'll be watching for any problems that crop up. We'll thank you in advance for any help you can provide in issues that you find.

See you on the other side...


We're sending our Java Today links offsite today, rather than link into projects that will be offline during the upgrade.

Yori Mihalakopoulos has posted a first preview release (.dmg, 8.5 MB) of MochaCode, "a new Java IDE designed specifically for developers who like to get their work done on a Mac." Aside from the typically-attractive Cocoa appearance, MochaCode offers context-sensitive code completion, background project building, quick access to project files, editor window/pane flexibility, and more. Yori has also kicked off a MochaCode blog.

Gavin King, project lead of Seam (and Hibernate before that) has posted his EE 6 Wishlist, Part 1. "I wanted to give a rundown on the things that are important to me, and why I think they're important. A lot of these items have come out of our experience with Seam, others have been things that have been missing from the platform for a long time. My wishlist is pretty long, so I'm going to spread it over several posts. First up, I'll talk about session beans." Discussion of Gavin's blog is underway at InfoQ and Artima. Will he get his wishes? The EE 6 Review Ballot just went up on Tuesday.


James Gosling finds himself inCrunch time for JavaOne in today's Weblogs. "JavaOne is just a few weeks away and the crunch is already far too intense. We're doing a review of proposed keynote demos tomorrow: it's easlly the longest "cool stuff" list we've ever had. I don't know how we're going to choose."

David Herron ponders the questions of Test suites and harnesses and tools. "I want to put out to the listeners a question which we've been pondering in the nascent Open JDK Quality Team. This team is still a work in progress, and we are due to become public as part of the "full launch" of the OpenJDK project."

In Beans Binding for Me? You Shouldn't Have, Dean Iverson writes: "Like any self-respecting evil genius, a new toy leads me to thoughts of world domination. What do you want do tonight?"


Speaking of Beans Binding, in today's Forums, Shai Almog has some thoughts about its applicability in Re: JSR295. "The 295 implementation requires bean properties to be observable in order to implement two way binding. It specifically requires add/removePropertyListener(String,listener) methods to be defined which also includes the requirement for managing the firing of state changes for every property... Most of the beans "in the wild" don't implement this due to the overhead so its misleading in that sense."

Hinkmond Wong explains optional packages jsr184: "You are correct that JSR 184 is not currently part of the current CDC (phoneME Advanced) supported optional packages (JSRs) or code base, yet. However, phoneME Advanced has a goal to include the MSA subset for our in-process MR2 release (currently in development in the trunk). For more info on the MSA subset, see The Mobile Service Architecture Specification [...] We expect full development of MR2 to complete within a year. Hope this helps."

Finally, jada points to a resource for 3D developers in Re: new to picking - can someone help me, thanks!: "The Fractal Land chapter in Killer Game Programming should answer your questions on how Java 3D picking can be use in your project. Here is an online version of Fractal Land. Remember to replace picking utility with the new pickfast utility for better performance."


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.



Continue Reading...



Never Going Back Again

Posted by invalidname on April 03, 2007 at 06:21 AM | Permalink | Comments (0)

Run, don't walk, away from Image.getScaledInstance()

The downside of Javadoc is that there are general techniques that can't be understood by just looking at all the available classes and methods. This was one of the blockers I found when trying to learn QuickTime for Java many years ago: you'll never use 95% of its method calls, and the important 5% aren't adequately documented.

What might be worse is the "false friend" situation, where what you seem to need exists as a straightforward method call, but isn't the best way to achieve what you want. This is the case explored by today's Feature Article, in which author Chris Campbell explains The Perils of Image.getScaledInstance().

On its face, getScaledInstance() seems to answer a perfectly straightforward need: scaling your images up or down. The problem is how you want your image manipulated, and it turns out that Java 2D has outgrown the simple solutions possible with this call, and you're better off mastering the options available with Graphics.drawImage():

Lots of developers have grown accustomed to the nice quality offered by SCALE_AREA_AVERAGING (or SCALE_SMOOTH) over the years, but the general complaint is about poor performance. Due to the overly complicated (in my opinion) design of the image handling APIs in JDK 1.0 and 1.1 (e.g., having to deal with asynchronous loading, animated GIFs, and the whole consumer/producer model), it is very difficult to optimize this code path, so performance of this case has improved little over the years.

Fast forward to JDK 1.2 and the introduction of the Java 2D API. The redesigned API offered shiny new classes like BufferedImage and Graphics2D, as well as more flexibility in the form of RenderingHints. Much like the old scaling "hints" in the Image class, the RenderingHints class provides a number of similar switches to help developers control the quality of image scaling in a number of situations, like when calling the scaling variant of Graphics.drawImage().

Read on to find out how to optimize your performance/quality choices with a better understanding of the Graphics API.


In Java Today, Java SE 6 Update 1 is now available for download. A release notes page details the bugs fixed in this release, including many relating to Swing, and others dealing with US Daylight Savings Time changes that had previously been addressed by a separate patch.

java.net will be down for 24-48 hours on Wednesday for an upgrade to the latest edition of CollabNet's Community Edition software, as described on an upgrade page The upgrade will offer better performance, online authoring of project pages, and updates such as Subversion 1.4.3. You can test the new site on the staging server by adding "stage." before the "dev." in your project URL; note that you'll be looking at a snapshot of your project from a few weeks ago. If you find a bug on the staging server, report it via the upgrade page and you could win one of two iPods. Thursday's WebEx discussion of the upgrade is available as the java-net project's Upgrade - Find-a-bug Win-an-iPod file.

Issue 285 of the NetBeans Newsletter is out. Contents include: NetBeans @ FISL, NetBeans Day St. Petersburg and Sao Paulo, new modules on Update Center, GWT Support Plug-in, Charlie Nutter on Ruby, JRuby, and JRuby on Rails, Tips and Tricks Contest, 6.0 keyboard shortcuts, using IRB in NetBeans,using a drop down list to display data, instant Rails with NetBeans and much more...


In today's Forums, shan_man has a long-awaited announcement in Re: JSR295. "Alright folks, this is it... drumroll please...! After learning *way* more than I wanted to about software licensing, I've made it through alive (and with many to thank along the way). The Beans Binding project is finally public on java.net with a 0.5 release! http://beansbinding.dev.java.net As I've spent most of my time on the project over the last few weeks dealing with licensing issues, I can't claim to be an expert on the code yet. In fact, what I've released is in the same state that Scott passed it along to me (which probably means it's excellent, knowing Scott). So this is where Scott finishes, and I begin. We'll learn the ins and outs together, and hopefully you can suggest ways to make it better."

linuxjava details an interesting EDT-management technique for Gettin' work done in Swing. "Quick check here on how I'm doing things: I have a Swing app that does a bunch of stuff to a database. We all know, don't do anything like that from the event dispatch thread (EDT). So here's what I have: I create Actions, like a SaveAction, which saves stuff to the database. The actionPerformed() method of that is a SwingWorker, which has a doInBackground() method which does the database access. It also has a done() method which updates the GUI to reflect the results of the operation (success, failure, etc). Usually before the SwingWorker.execute() is called, the button that was clicked is disabled, so the user can't click it again while the operation is in progress. The button is re-enabled in the done() method Is this the right programming model? It seems like almost everything I do would fit into a model like that..."

dhunter21 has a workaround for a Heap Space Issue in JAX-WS: "Our WSDL includes a byte array that is base64 encoded, and when a client sends us data ~50MB, we notice that it takes 950MB of heap space for JAXWS to read in this data. We also notice a large impact when the file size is just 3MB. Using a profiler, I tracked the problem down to some code in Stax that is using a StringBuilder to read in the byte array. It is constantly creating and copying byte arrays (as is the behavior of StringBuilderwhen not initialized to a good size). In order to fix this, we wrote a Servlet Filter that snarfs the byte array before it is sent to jaxws. Using this method we can ensure that a 50MB byte array only needs 50MB of heap space."


In today's Weblogs, Dean Iverson dives into a JSR-296 tutorial in Swing Application Framework Hacks Unleashed For Smarty Pantses, in which you can "learn the Swing Application Framework in 21 Days! Actually, it only takes 1 day."

Brian Repko has some thoughts about Caching for JDK 7. "The Hibernate group is redesigning their caching package and I (once again) lament the sad state of caching in Java."

Finally, Vivek Pandey has details of an Update to JAX-WS RI release. "Since I posted my last blog there have been questions and concerns by our users about what's next? When is the new release going to be available? I indicated to be back in couple of weeks and I apologize it took more than that to get back with the dates for the next JAX-WS RI release."


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.



Continue Reading...



Go Your Own Way

Posted by invalidname on April 02, 2007 at 07:10 AM | Permalink | Comments (0)

Giving credit where credit's due

I think it's very fair to say that this site wouldn't have succeeded without the efforts of its first editor, Daniel Steinberg. Being somewhat privvy to the launch -- I didn't work with O'Reilly at the time, but I was one of Daniel's IM buddies -- it was astonishing to see the amount of hours that went into the launch. Furthermore, the editorial side of the site had to work against what was initially not a particuarly warm reception from some elements of the Java community, who were suspicious of Sun's level of involvment and control, dubious about whether any of the bloggers on the site would have anything to say, and questioned whether such a site was even necessary. As the O'Reilly staff has been reminded by other recent launches, building an editorial pipeline, finding an audience, and contributing to the development of a community is a startlingly difficult task, one that does not always succeed. When it does, plaudits are certainly deserved, though not always granted.

Daniel is leaving O'Reilly today, heading out to further his work in writing, editing, and audio, following up on media opportunities that are rapidly developing elsewhere. I'm sure he'll be a big success... well, really, he already is (you did recognize his voice on those MacWorld podcasts, right?)... and that we'll be seeing and hearing his work all around the web. Plus, he's giving two sessions at JavaOne (did I mention he's an accomplished Java and Obj-C developer?). Far from seeing less of him as he leaves O'Reilly, you'll probably see a lot more of him.

GJ, dude.


In Java Today, java.net will be down for 24-48 hours on Wednesday for an upgrade to the latest edition of CollabNet's Community Edition software, as described on an upgrade page The upgrade will offer better performance, online authoring of project pages, and updates such as Subversion 1.4.3. You can test the new site on the staging server by adding "stage." before the "dev." in your project URL; note that you'll be looking at a snapshot of your project from a few weeks ago. If you find a bug on the staging server, report it via the upgrade page and you could win one of two iPods. Thursday's WebEx discussion of the upgrade is available as the java-net project's Upgrade - Find-a-bug Win-an-iPod file.

After more than a year of intensive development, the SIP Communicator project team is proud to announce a very first alpha1 release which is now available for download. The release offers support for instant messaging and presence for the Jabber, MSN and ICQ protocols, as well as support for 1 to 1 phone calls with SIP. The application is available in packages for Windows, Linux (Fedora, Debian and others), and Mac OS X.

The JavaServer Faces Spec project has released an early pre-JCP version of the JSF 2.0 draft specification. As noted by spec lead Ed Burns in a recent blog, the draft "has been through several rounds of Sun internal review and also was reviewed by the JSF 1.2 Expert Group"; Ed invites readers to post comments about the draft directly to his blog.


Leonid Popov looks at JFileChooser on Windows Vista in today's Weblogs. He writes: "Recently, Microsoft released Windows Vista, their new operating system, and almost simultaneously Sun released Java 6. Unfortunately, it turns out that some of the features in JFileChooser do not work properly on Vista. This article discusses these problems and proposes solutions."

Eamonn McManus discusses Getting rid of unchecked warnings for casts. "If you've ever made a serious effort to get rid of "unchecked" warnings from the Java compiler (the ones it gives you with -Xlint:unchecked) then you'll probably have found some cases where you know a cast is correct but you can't convince the compiler of it. Is there anything better than adding @SuppressWarnings("unchecked") around the whole method?"

Finally, in Collecting container-specific instruction about how to run Hudson, Kohsuke Kawaguchi writes: "Due to user demand, I started documenting how to install hudson.war on various containers. IMHO, that just shows the sorry state of the server-side Java portability."


In today's Forums, cknight19 wants to know Can Java execute batch file outside of current JVM in separate process tree: "Does anyone know how to run programs from Java as separate processes that will not die when the spawning java program exits (JVM exits). The problem I have with using Runtime.exec is it spawns only child processes under the current running JVM, thus when the origonal program that called Runtime.exec ends so does all child processes. Basically I want to start a DOS batch file from my Java application, my Java application will then immediately exit (calling System.exit(0) ). The batch program will continue to run, its does some file clean up, create's some new files and deletes the old jar (containing the main app), it then rebuilds the main app jar and and executes the main class and then exits itself."

gameldar kicks off a thread about Lg3d desktop integration: "I finally got a chance to play around with wonderland over the weekend (and after your animation integration post realised that I hadn't waited until the streamed data was download last time I tried) - it all looks great. Its nice to see what Sun puts into their stands as I've only seen the Sun stand at Gitex a couple of years ago. After a couple of restarts (I was changing the movement control - I hate the mouse look - I'm used to the mouse dragged events tied to button 3 to look - like what is used in some of the RPGs like World of Warcraft) I noticed the lg3d taskbar float in space at the start point - clicking on the items loaded the appropriate programs in X11. The question I had was - is there plans to get wonderland running in the equivalent of lg3d-app mode?"

wierob wants to know How to access MessageConetxt without a container: "I'm working on a web service application that uses ws-addressing features, hence I need to access the ws-addressing message addressing properties from the SOAPMessage and the entire MessageContext in general for other reasons. Since my application should generate other ws endpoints and enable scheduling on them I want my service to run as a plain Java 6 application rather than in a web container. I know the following techniques to access the SOAPMessage in a web service. Due to their disadvantages neither of them seems to be a good choice."


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.



Continue Reading...





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds