Skip navigation

Today's lead Java Today entry focusses on recent activities in the java.net Mobile and Embedded community, including Java Mobile Podcast 88: Robert Virkus of Enough Software and Terrence Barr's latest post, Don't Panic: Mobile Developers Guide to the Galaxy.

Terrence recently interviewed Robert Virkus of Enough Software, and this interview forms the bulk of Java Mobility Podcast 88. In the interview, Robert tells Terrence about J2MEPolish (that's "polish," as in "polishing" your JavaME app, not "Polish" as in "from Poland"). There is discussion of the relationship and differences between J2MEPolish and the LWUIT framework.

The podcast also includes discussion about Roger Brinkley's trip to South America for JUG meetings, and Terrence Barr's trip to Europe (the OSIM conference in Amsterdam is where the interview with Robert Virkus occurred).

Robert talked about a 40-page PDF he's been involved in, the production of Don't Panic: Mobile Developers Guide to the Galaxy. This colorful document is actually a quite handy introduction and basic reference for the mobile development world.

http://www.LyraTechnicalSystems.com/images/MobileGuideUniverse.jpg

Now, I'll admit that -- well, I myself could do without so many cartoon-like graphics -- but, still, when you go to page 3, you see a quite solid Table of Contents for mobile development. The main sections are:

  • Application Environments Overview
  • Programming J2ME / Java ME Apps
  • Bringing Your Mobile Content to the Mobile Web: "Keep it small, keep it simple"
  • Now what -- which Environment Should I Use?

Page 5 gives us the authors' bios. Robert Virkus is the founder and CEO of Enough Software. His purpose in launching the J2ME Polish open source project was to "overcome the device fragmentation barrier" -- certainly a laudable objective.

There's a lot of interesting information in the Guide, and it makes sense out of something that indeed does seem fragmented to those of us who are not intimately involved in the Mobile development universe (or Galaxy). And I guess the pictures demonstrate the type of simplicity you should aim for when you create graphics for your own mobile apps -- so I guess I'll forgive them on that score -- this time!


In Java Today, we've just published Java Mobile Podcast 88: Robert Virkus of Enough Software. Terrence Barr posted a related blog, Don't Panic: Mobile Developers Guide to the Galaxy:

Check out this nifty little handbook for budding mobile developers called "Don't Panic - Mobile Developers Guide to the Galaxy". It provides a high-level overview of mobile platforms and development and lists some of the common pitfalls and solutions. Great for developers who are just getting started in the mobile space. I'm told me the guide is also being made available soon as a wiki to encourage developers to enhance and grow it going forward...

Danny Coward has discovered a New JavaFX User Group:

Java User Groupshave a long history. As you can see, they have spread all over the world. Some of them have turned into whole conferences! And now there's a new (second, third?) JavaFX users group, just down the road from the Planetarium.

Some weeks ago, Silicon Valley JUG leader Michael Van Riper announced the Silicon Valley Code Camp. The camp happens this weekend:

...Please join me at the 4th annual Silicon Valley Code Camp at Foothill College in Los Altos on October 3-4, 2009. It is shaping up to be even bigger and better than last year's event. Attendance is FREE, but space is limited. So, you do need to register in advance. Sessions will range from informal chalk talks to presentations. There will be a mix of presenters, some experienced folks, for some it may be their first opportunity to speak in public. And we are expecting to see people from throughout the Northern California region and beyond...

In today's Weblogs, John Ferguson Smart provides instruction on Working with temporary files in JUnit 4.7:

Another handy feature in JUnit 4.7 is the TemporaryFolder @Rule. Using this rule, JUnit will create a temporary folder before your test, and delete it afterwards, whether the test passes or fails. This comes in very handy for tests involving file manipulation of any sort. Of course you can write this code yourself (and most of us have!), but any infrastructure coding in tests is tiresome at best, and at worst will discourage developers (present company excluded, of course ;-)) from doing the sort of thorough testing that any file-based functionality really requires. So any build-in help in this area is very welcome...

Bhavani Shankar invites us to Explore SailFin cluster, high availability features using Basic3pcc sample application:

The "Basic3pcc" sample demonstrates a simple Third Party Call Control (3pcc) application in SailFin. This blog describes how to explore out-of-box cluster and high availability features of SailFin using this sample...

Jim Driscoll sends us a JSF 2.0 Reminder: Project Stage:

Just a reminder that while you are developing a JSF 2.0 project, you really, really, really should enable the Development Project Stage. Doing this enables better error messages, including in the client side JavaScript, at the cost of some performance. Enabling this is as simple as putting the below into your web.xml...

In the Forums, maxedev asks Is this graphs are for normal performance or the app leaking the memory ?!!: "Hey there, I'm new to java profiling and testing and I faced some hang ups so i made some fixes to my code. It's medium sized application and i captured some shots of the Memory Heap, Memory GC, Threads/Loaded classes Graphs From..."

hman007 asks How does Java decide between Heap and Stack?: "I was coding in C a while ago and got a bug I couldn't figure out for a long time. I've just started in Java & want to avoid a similar error. It had something like: function X() { int bigArr[10,000]..."

And kurt2002 has a problem with gfv3 2009-09-28: cannot load admingui (called from localhost:4848): "The configuration (domain1.xml) to previous working version (2009-09-16) looks the same. I just unzipped the lastest_glassfish.zip (on WinXP with Java 1.6.0_16), started the domain via startserv.bat and tried to connect to the..."


Our current Spotlightis this week's Economist magazine feature on "The power of mobile money": "mobile phones have evolved in a few short years to become tools of economic empowerment for the world

kfarnham

Java Store Update Blog

Posted by kfarnham Sep 30, 2009

Danny Coward has posted Selling Applications, an update of the progress being made with the Java Store and the Java Warehouse. Danny says "the warehouse is really taking shape now," pointing us to the Java Warehouse video series. I included these in my August Java Store update, Revisiting the Java Warehouse and Java Store.

Noting that the Java store front "smells of new paint," Danny thanks the people who have contributed to the processing of improving the Java Store through participating in the Java Store survey.

While "the shelves are fast filling up with the kind of assortment of games, facebook and twittery map style apps you come to expect from an app store," the best news for developers who want to use the Java Store to earn income may be the "rumor" that a payment system for purchasing applications may soon be in place.

To me, being able to actually sell your applications is the game changer for professional developers.


In Java Today,peligri has an Updated List of Sessions at Oracle OpenWorld and Oracle Develop(GlassFish-related sessions):

I've updated the list of GlassFish-related sessions forOracle OpenWorldand Oracle Develop at our GlassFish Conferences Wiki. Some details still shimmering, but pretty nice list so far...

Adam Bien asks Does HTTPSession, Stateful Session Bean Replication / Clustering Actually Work in the Practice?

Stateful web/ejb components are convenient to use and maintain - they look and feel almost like real objects (see the perfect anti-facade). You don't have to synchronize the state between layers - after transaction everything is flushed transparently to the database. This happens without any expensive copying and data / DTO transformation between layers...

Danny Coward provides a Java Store update in Selling Applications:

Since the announcement of the Java Store at the last JavaOne, the team has been busy. The warehouse is really taking shape now, and the store front smells of new paint with its final redesign (thanks for the comments). There's a rumor that the cash registers may arrive real soon. And best of all, the shelves are fast filling up with the kind of assortment of games,facebook andtwittery map style apps you come to expect from an app store (whether people actually come or not)...

In today's Weblogs, Kohsuke Kawaguchi warns that Reading stdin may cause your JVM to hang:

Today I've digged deeper into one of the nastiest problems I ever encounted since I became a Java programmer. The problem was this - I have the Hudson slave agent program, which blocks on stdin for read almost all the time. This process uses other threads to perform other activities (what this thread does is actually driven by what it reads from stdin, but that's irrelevant to this bug.) On Windows, I've seen on several occasions that this process hangs...

Cay Horstmann talks about Alice 3, CS1, and Quaternions:

This semester, I am teaching the CS1 course again. If you just teach plain Java, it isn't easy to come up with interesting lab assignments. Some of the students have built exciting animations with Alice in the CS0 course. Somehow, they aren't as excited about printing prime numbers or digits of π in CS1. But the latest version of Alice, now in beta, can be programmed in Java. This is very cool. Students can write Java code that directs the Alice models. For example, one assignment asks students to make a Carclass whose drive method moves the car and reduces the gas in the tank. (I couldn't find a gas gauge, so I used the cat clock. The tail moves to the left as the tank gets emptier.) I provide the code for moving the car and rotating the tail, and the students compute the gas consumption...

Kirill Grouchnikov announces the Substance 5.3 official release:

I am extremely pleased today to announce the availability of the final release for version 5.3 of Substance look-and-feel(code-named Reykjavik). The release notes for version 5.3 contain the detailed information on the contents of this release which include the following:


In the Forums,Shinya Ogino posted Help wanted: v3 localization: "Hi, If you are interested in localized version of GF v3, and following is *not* the language you speak, please consider reading a bit about CTI below. German, Spanish, French, Japanese, Korean, Brazilian Portuguese..."

decitrig asks How can I set text formatting in JEditorPane on the fly? A custom view?: "I've been playing with the idea of implementing something like wikidpad[1]. The basic idea is that the user types in a text editor, and if the line they enter starts with, say, ++ it's renderd as a heading, if it starts with a * its an unordered list,..."

And matthixxy Can't create new Canvas3D in some cases; Error after program terminates: "I have a program where I show a large amount of vertexes (8*192k). On my computer everything works fine, but with an older laptop i have some problems. So I try to clear the Panel3D (subclass of Canvas3D) with..."


Our current Spotlightis this week's Economist magazine feature on "The power of mobile money": "mobile phones have evolved in a few short years to become tools of economic empowerment for the world

In my tenure as java.net editor, I've come to realize that NetBeans is much more than simply an IDE. Geertjan Wielenga has undertaken a research project to discover interesting applications that have been developed using the NetBeans platform. He's finding so many that he's invented the acronym YANPA (Yet Another NetBeans Platform Application). In today's Java Today I'm featuring the latest three YANPA apps Geertjan has discovered.

I have spent between 2/3 and 3/4 of my time as a professional developer in the scientific realm, as opposed to the business realm. It's interesting to me that so many scientific oriented research projects seem to find NetBeans the ideal platform on which to develop their applications. Geertjan's latest three YANPA projects involve:

OK, so maybe that last one isn't pure science, but it's certainly software engineering at a highly significant level.

It all reminds me of Adam Bien's recommendation Why Oracle should continue to push NetBeans. In that post, Adam says:

Oracle pushes JDeveloper and Sun NetBeans. Because Oracle is about to buy Sun, only one of the IDEs will be officially supported in long term. From strategic point of view, NetBeans would be the better choice ...

And Adam goes on to list eight rather convincing arguments to support his viewpoint.

I'd suggest that Geertjan's YANPA research provides another reason for Oracle to "push NetBeans." NetBeans isn't just a project, it's not just an IDE. It's not even "just" a community. It's a platform that has engendered some incredible apps! That doesn't happen in the absence of significant underlying capabilities, and the stability and reliability that makes development teams trust the platform.

Take a look at what Geertjan is discovering (there's more than just what I'm featuring today) to see what I mean.


In Java Today, I'm featuring Geetjan Wielenga's recent investigation into applications that have been developed using the NetBeans Platform. Geertjan's latest discovery is Spectroscopy Analysis on the NetBeans Platform :

Spectroscopy comprises any measurement of a quantity as a function of either wavelength or frequency. It is often used in physical and analytical chemistry for the identification of substances through the spectrum emitted from or absorbed by them. How do I know all this? Well, to be honest, Wikipedia. SpectraSuitefrom Ocean Optics is, yes, an advanced modular spectroscopy application created with the NetBeans Platform as its starting point...

Geertjan is trying to find a new, very interesting application built on the NetBeans platform every day, lately. The day before (Sunday), he discovered Quantitative Biology Modeling on the NetBeans Platform :

Quantitative Biology Tool is a SBML-compliant application on the NetBeans Platform. It supports both qualitative and quantitative modeling of biological systems. It is designed to support "the iterative nature of the scientific method, which alternates between experimentation and model refinement. Researchers may utilize either hypothesis-driven or data-driven approaches with QBT." QBT is developed by SemanticBits in collaboration with the National Heart, Lung, and Blood Institute (NHLBI) and is being adopted there...

On Saturday, Geertjan told us about Security Information and Events Management on the NetBeans Platform:

YANPA (Yet Another NetBeans Platform Application) is...NG-Screener, by NetGuardians in Switzerland. (Switzerland sure has a lot of stuff happening around the NetBeans Platform.) NG-Screener is a Security Information and Events Management (SIEM) appliance that enables medium-sized organizations to harness their log data resources. Really cool screenshots ...

In today's Weblogs, John Ferguson Smart is Testing Exceptions in JUnit 4.7:

JUnit 4.7 introduced a few features that make it a little easier to work with exceptions. JUnit 4 introduced theexpected parameter, which makes a test succeed if and only if a certain exception is thrown. For example, in the following code sample, we are testing a UserManager class. When thelogin() function is called, it should throw anUnknownUserException when no user is found. Our UserDao class will return null in this case, so we mock out the UserDao class (using Mockito here), and use theexpected parameter to ensure that the exception is thrown ...

Jim Driscoll provides instruction on Ajax tag events and listeners:

Today we're going to talk about two features of JSF 2.0's f:ajax tag: the event attribute and the listener attribute. The use of both of these is really, really simple - so I'll just briefly cover the basics, and then launch directly into the sample code. The "event" attribute of the ajax tag indicates which event to use to trigger the ajax request. There are any number of possible events allowed: You can use the standard browser DOM events (like click, change, keyup, etc. You can also use two special event values - action and valueChange. These two special values correspond to the same events that happen on the server side in JSF. On the client side, action is typically mapped to click, while valueChange is mapped to change or click, depending on the component...

And Ahmed Hashim found something interesting in Google Chrome: Reopen closed tabs, a cool feature:

I found a cool feature in Google Chrome browser and would like to thank who did it and share it with you :-) It is "Reopen Closes Tabs" it is available in FireFox using the same short cut but founding it in the right click menu is much easier and visiable to the user.

In the Forums,averyanov wants to know How can I lock panel without repaint all component: "Hello! If I use the standart glasspane than Swing will repaint entire frame. Is it possible to lock frame with transparent panel but without invoke repaint all component. I tried // the component to be..."

abailey has a problem with asadmin: --user and --passwordfile not working: "Hello. I'm writing an init.d script for my ubuntu server to run on boot that will start my glassfish domain, and I am trying to nail down the exact command to use. First, I have a password file (/home/alpha/glassfishv2/toilet/password.txt) ..."

And wetravel is trying to perform an lcdui to lwuit conversion: "I'm porting parts of my existing J2ME application to lwuit and ran into some problems: 1. I can't find a good way to switch back from lwuit forms to native lcdui canvas. Setting the canvas with setcurrent seems to work when there are no menu's on..."


Our current Spotlightis this week's Economist magazine feature on "The power of mobile money": "mobile phones have evolved in a few short years to become tools of economic empowerment for the world

When a farmer in Musita, Uganda has questions regarding a decision he must make, he's likely to go visit Michael Malime, the village mobile phone operator, and connect via text message to the Farmer's Friend service. Sending a text message like "rice aphids" or "tomato blight" will result in either a return text message with relevant information, or a phone call from a human (if the database does not contain a relevant response).


This news is reported in the article Beyond Voice, one of 8 articles in this week's Economist magazine special report, Mobile Marvels. The special report is subtitled: "Poor countries have already benefited hugely from mobile phones. Now get ready for a second round."

The subtitle of the Beyond Voice article is: "New uses for mobile phones could launch another wave of development." That indeed seems to be happening, as the price of mobile phones and mobile access drops. The article describes a wave of new mobile applications that are springing up to serve the needs of communities that are poor, and have none of the basic infrastructure that the developed world takes for granted (landline phones, for example, electricity in many places).

The conduit that makes these applications possible is the growing mobile networks in countries like Kenya and Uganda, and in many other developing places in the world. Today, 40% of Africans have a mobile phone. For many who do not have a phone, there is a village phone operator, like Michael Malime in Musita, Uganda, who sells the opportunity to use a mobile phone for a voice call or a text message. Often, the text message destination is a mobile application service like Farmer's Friend.

The Farmer's Friend service:

accepts text-message queries such as "rice aphids", "tomato blight" or "how to plant bananas" and dispenses relevant advice from a database compiled by local partners. More complicated questions ("my chicken's eyes are bulging") are relayed to human experts, who either call back within 15 minutes or, with particularly difficult problems, promise to provide an answer within four days. These answers are then used to improve the database.

Many organizations are getting involved in this effort in developing countries. These include, most notably, the Grameen Foundation, founded by Nobel Prize winner Muhammad Yunus (who also recently received the 2009 U.S. Presidential Medal of Freedom). An organization that readers of this blog will be more familiar with, that is also significantly involved in the effort to develop mobile apps to serve the needs of developing regions, is: Google.

Another aspect: mobile "banking"

You may recall our recent article by Biswajit Sarker, Using the Payment API for Microcredit and Other Applications. In that article, Biswajit showed how to develop an application that applies the Payment API (JSR 229) to enable the transfer of funds using a Java ME app for mobile devices. In his article, Biswajit talks of a user "purchasing a loan voucher" -- that is, a "voucher" is the means of transferring the money you as microcredit lender would like to provide to the person whose business idea you'd like to invest in.

Biswajit's description sounds exactly like what's happening with mobile money transfers in Kenya and other places today. The Economist's lead article for this issue, The power of mobile money (featured in this week's java.net Spotlight), talks about how:

With such phones now so commonplace, a new opportunity beckons: mobile money, which allows cash to travel as quickly as a text message. Across the developing world, corner shops are where people buy vouchers to top up their calling credit. Mobile-money services allow these small retailers to act rather like bank branches. They can take your cash, and (by sending a special kind of text message) credit it to your mobile-money account. You can then transfer money (again, via text message) to other registered users, who can withdraw it by visiting their own local corner shops. You can even send money to people who are not registered users; they receive a text message with a code that can be redeemed for cash.

And there's more...

It's easy, as one who lives in a developed country, to think about mobile applications only from the perspective of the life we live and the things we see in our own world every day. But, the biggest and most important change of all, with respect to mobile applications, may actually be happening in the most underdeveloped regions of the globe.

There's so much in this Economist series -- I've barely scratched the surface of talking about the effect mobile phones and apps are starting to have in the developing world in this post. Take a look at the Economist Special Report (before they make it available only to subscribers) if you'd like to read more.


In Java Today, David Dice recently wrote about The perils of negative scalability:

I've seen the following issue confound customers and colleagues of late, so thought it worth a blog entry. Lets say you have an application that exhibits negative scalability. That is, if you were to plot throughput on the Y-axis and concurrency on the X-axis the shape of the curve would be convex downward -- performance climbs up to an apex and then falls off. (How can this happen? A common reason is that the communication overheads start to dominate and the benefit of concurrency is overcome by communication and synchronization costs). Under such circumstances it's common to introduce some type of admission control -- say, simple back-off or more elaborate mechanisms -- to restrict concurrency. Ideally, this yields an asymptotic curve where performance remains constant after reaching the peak, avoiding any fall-off...

Java Champion Jim Weaver talks about "Pickin' and grinnin' with the JFXtras Picker control":

If you've been following this blog recently, you know that I've been developing an application in the SpeedReaderFX category that helps me quickly keep up on new happenings in world events, technology, gadgets, music, and social networks. SpeedReaderFX is located in the JFXtras open source project, and also serves as an example of using JFXtras classes with JavaFX. One of the newest enhancements made to the SpeedReaderFX program takes advantage of the Picker control that David Armitage created in the JFXtras project. Here's a screen shot of a program in the JFXtras project that he created to demonstrate and test the Picker control varieties ...

Josh Marinacci reminds developers about this month's JFXStudioChallenge: Time is almost over:

The deadline for submitting your entry for this months JFXStudio Challenge is almost here. Entries must be in by midnight, Pacific time, the evening of September 30th, which is this Wednesday. We’ve only gotten a few entries so your odds are good. For full rules see our challenge announcement and the secret theme. Just to give you some ideas, I wrote my own entry. Take a look...

In today's Weblogs, Kohsuke Kawaguchi provides information about the ongoing planning for Hudson at Oracle OpenWorld:

We'll be hosting a Hudson community meet up at the upcoming Oracle OpenWorld (October 12th Monday, 2-3pm). If you are coming to the conference, please come see us! ...

Gabriele Carcassi provides a Simple guide to checked exceptions:

While much have been written on checked vs unchecked exceptions, I found very little practical, down to earth, advice on how and why to use them. Here are my thoughts after years of rumination.

The common wisdom: What we are typically told is to use checked exceptions for recoverable conditions and unchecked exceptions for programming errors. For example here or in Effective Java. Don't get me wrong: I do not think this is particularly bad advice, but there are a couple of problems...

And Fabrizio Giudici announces the First subproject of blueMarine mavenized:

When I started the mavenization of my projects, in July, I really didn't figure out that it would have been such a painful and long process. It is literally consuming me - also because I'm longing to see the end of the conversion, so I can resume the development.

The first mavenized projects, BetterBeansBinding, jrawio and Mistral, were reasonably easy, also considering that I had to learn at the same time Maven under the surface. But they were plain JSE projects, with just a handful of modules. blueMarinehas got hundreds of modules partitioned in 7 projects and even though I wrote some scripts and tools to automatically generate the pom files, they are needing tons of manual fixing...


In the Forums,jerle is seeing Chained web service calls crashing Glassfish - any ideas?: "I'm fairly new to Metro and glassfish, and I'm hoping someone with more experience will know what's going on with this bug. I have a web application that makes a call to a metro web service. This webservice does some processing, then calls a..."

mohamedelshami has a question about Using non-http transport in GlassFish: "Hello, I'd appreciate it if anyone could give me any thought on this. I have a scenario where I have an enterprise server application which on one side is RESTful/HTTP and other side may interface with non-http tranport. I understand that an..."

And saturon wonders about Setting the domaindir globally for a user : "HI there, I'm in a process setting up Glassfish v3 Preview on a debian box. I installed glassfish under root, but created a domain under my glassfish server user. Now I need to specifiy the --domaindir for all..."


Our current Spotlightis this week's Economist magazine feature on "The power of mobile money": "mobile phones have evolved in a few short years to become tools of economic empowerment for the world

Many people who voted in this past week's java.net poll think the hype surrounding 'the cloud' may be a bit overblown. The poll was submitted by Geertjan Wielenga, and it was a good one, drawing 347 votes and four thoughtful comments.

The exact poll question and results were:

What's your opinion of 'the Cloud'?

  • 13% (45 votes) - It's the future: gradually all apps will move to the Cloud.
  • 6% (21 votes) - It's great. I'm using it already.
  • 26% (91 votes) - It's an interesting development. I'll wait and see what comes of it.
  • 19% (66 votes) - It's a passing phase, like so many other things we've seen.
  • 30% (105 votes) - It's the emperor's new clothes: the Cloud is just a server, what's so new about it?
  • 5% (19 votes) - I don't know; other

So, combining the "passing phase" and "emperor's new clothes" options, 49% of the voters don't consider the Cloud to be significant or new. Add in some of the "wait and see" votes, and you can say that a majority of poll takers think the hype the Cloud is receiving is or may be overblown.

Meanwhile, 19% of voters were enthusiastic about the cloud: they are either using it already, or believe they'll be using it in the future as applications migrate to the cloud.

Only 5% selected the "I don't know; other" option, which means that people have indeed thought about the Cloud, and also that the range of response options in the poll was pretty good.

My own view of the Cloud is... Well, when I was interviewing Adam Bien for aCommunity Corner podcast at the last JavaOne conference, at one point I realized that what's happening in the Java EE space with respect to clients (fat is now good -- think RIA) is somewhat akin to what was happening 8-10 years ago; then, fat clients were good, because they provided an excellent user experience. But suddenly, a year or two later, fat clients were a horrible thing, because the internet and middle tier couldn't easily support them, they bogged down the entire system, so now all clients had to be thin and, ideally, stateless. Fast forward to now: today, if your application doesn't support a rich client, you're so passe! It gave us a good laugh, as Adam said you just wait ten years, and the same technology returns, only under a different name.

Yes, the Cloud is new in certain aspects, but how different is it really? You're connecting to a remote server where an application and data reside. Maybe the physical distance between your desk and that server is thousands of miles, but how different is it, really, from the days in the early 1970's when I wrote my first programs (in APL) on a teletype terminal in my high school that was connected to an IBM 360 at a university on the other side of my state? I mean, yes, there have been advances (I no longer need to store and load my program from a scroll of yellow paper tape with holes punched into it -- see Figure 1) -- but, how different is the Cloud, really?


Figure 1: tool for connecting to 'the Cloud' circa 1970

As I said, there were four interesting comments posted to the poll. aleixmr said the cloud idea is good, programming tools are obsolete, andweanon concurred. ronaldtm noted that not all apps will move to the cloud, only certain types of apps, and new types of application will be enabled by the cloud.dwalend noted that connection problems can render the cloud useless at times: if you can't get your data to the remote app, you can't do your work.

New poll: new JVM languages

Our new java.net poll asks "What do you think about the accelerating emergence of new languages for the JVM?" Voting will be open for the coming week.


In Java Today, the java.net Java User Groupscommunity is highlighting this weekend's Houston Tech Fest (co-organized by the Houston JUG):

Dan Sline co-leader of the Houston JUG writes that the Houston TechFest is this weekend. Better Hurry, they have over 1300 people signed-up for the event and Pre-Registration end Wed Nite (Sep 23rd). There are great talks lined up on the Java and Scripting side: From 0 to Grails in 60 Seconds; Java FX (by Java Evangelist Sang Shin); Emerging Java Technologies (by Sang Shin); Groovy in Web Services; Data Mining in Java; Cost Effective Technical Solutions; Ruby; Scala, and many more. Pictures from the event will appear on the JUG Community Page. This event is a partnership between the local JUG, Ruby, and .NET communities who are organizing the event.

The java.net GMVC project has as its goal expediting "Swing Application development and best practices by using Generic Views, Models and Generic Controllers":

Making Swing's MVC pattern Generic and using annotations would speed up development of complex Swing FAT client . This new approach allows Controllers to receive and sometimes send POJO selection and/or model change messages, which greatly simplifies the design of Controllers. Today's implementation is to much row index based and uses only java.lang.Object to allow it to be speudo Generic. Using this new new gmvc package would also allow support of IDE to understand what Model, View and Controller components are using annotations so that they can also generate code to connect a Controller to certain selection model(s) and/or data model(s).

Yohan Liyanage described Breaking the Singleton:

One of my colleagues at work raised a question regarding 'breaking the singleton' using Java Reflection, and asked of a way to avoid such actions. It inspired me, and started to think about a way to avoid it, and following is the outcome of it...

In today's Weblogs, I'm featuring Arun Gupta's recent post Q&A Transcript from

Jevgeni Kabanov has reported the results of a survey on Java EE Containers, focusing specifically on redeploy and restart times. The survey results most prominently feature information about the following Java EE containers:

  • Jetty
  • Apache Tomcat
  • GlassFish
  • JBoss
  • Oracle Weblogic
  • IBM WebSphere

In fact, the containers line up in that order in terms of how much time is spent redeploying (in minutes per hour). That's Chart 6 in the report.

In fact, that ordering was applied in all of the charts that presented the results of container redeploy and restart times. Jetty was always clearly the fastest in terms of restart time. Tomcat and GlassFish were quite close, not much different overall. JBoss was slower, with Oracle WebLogic a bit slower than JBoss, and IBM WebSphere the slowest of all in redeploy times.

So, does this mean that everyone should switch to Jetty? Not exactly! Jevgeni considers the redeploy times to be an indicator of the complexity of the applications that developers are deploying on each container. His interpretation, after presenting his final chart (#9) is:

  • Jetty is only used in projects that redeploy quickly. This makes all kind of sense, considering that Jetty doesn't even support redeployment and instead has extremely fast container startup.
  • Apache Tomcat and GlassFish are used in same types of project. Both are posed as fully functional yet lightweight alternatives to the classic heavy application servers. Although Tomcat is much more popular today, GlassFish is growing in popularity in the same market share.
  • JBoss, Oracle Weblogic and IBM WebSphere compete for pretty much the same market segment. The majority of their projects are large and complex, and the redeploy times reflect that.

More than 1100 people participated in the survey. Though it wasn't a scientific survey, the results are still interesting, and worthy of a look, if you're interested in seeing what others who work with Java EE containers are experiencing.


In Java Today,robilad provides a JVM Language Summit roundup:

The JVM language summithappened last week, and as usual after a developer gathering these days, slowly the podcasts are starting to appear. First to get a summit-related recording out were the makers of the Grails Podcast, who in the issue 95 have led an interview with Jochen Theodorou, the Groovy Project Tech Lead, touching on "Groovy history and his current role, polyglot programming, JSR 292 (invokeDynamic) and the Da Vinci Machine Project"...

Joe Darcy talks about Java Posse #279: A View from an Eggshell-Colored Clock Tower:

Dick Wall and the rest of the Java Posse graciously offered to interview Alex Buckleyand me one evening at the JVM Language Summit last week. Our discussion about general evolution of the Java programming language, including Project Coin and reactionsto previous podcasts and Google group threads, is now available as episode #279 of the Java Posse podcast...

Jevgeni Kabanov announces The Java EE Container Redeploy & Restart Report:

The Java EE Container Redeploy & Restart Report comes from a survey conducted over the summer, with over 1100 Java EE developer respondents. It analyzes time spent on the Redeploy and Restart process, and compares the following containers: GlassFish, Jetty, Tomcat, WebSphere and WebLogic. Among other results, this report shows that Java EE developers are spending 3 to 7 work weeks a year on redeploys and restarts, depending on their container of choice.

http://www.zeroturnaround.com/blog/java-ee-container-redeploy-restart-turnaround-report/


In today's Weblogs, Fabrizio Giudici announces his Next speeches and conferences:

Quick recap of the next speeches I'll give and conferences I'll attend:

  • JavaDay in Verona, October 24, organized by JUG Padova and LUG Verona: "Stanco del solito database SQL? Passa ad uno store RDF!" (the conference is in italian, the title translated in english is "Tired of the old SQL? Move to a RDF store").
  • JAXItalia 2009, November 12-14, in Milan: "Tools for an effective software factory (I can't live without Hudson)".
  • Devoxx 2009, November 16-20, in Antwerp...

John Ferguson Smart announces a New Training Course in TDD and advanced Java testing techniques:

Wakaleo Consultingis pleased to announce a new training course focusing on "Agile Testing Practices for Java developers". Indeed, whether you are applying Agile methodologies or not, high quality unit and integration testing is an essential key to high-quality software...

And Ed Burns invites us to view a Video from Secrets of the Rockstar Programmers at Jazoon on Parleys:

Ed has developed a 50 minute audio-visual presentation recounting his experience in writing the book. This presentation includes audio clips from the programmers themselves, including subtitles for those for whom English is not their native language, together with insight to tie it all together...

In the Forums,priravi asks how to create a webservice wrapper around an existing java application: "Hi i need to create a webservice wrapper around an existing java application. could you please help me pointing out any online tutorial regarding this or some code samples..."

ramses_perez wonders about HTTP methods PUT, DELETE, TRACE: "Hi. I am faced with the problem that I can not figure out how to disable the HTTP methods PUT, DELETE, TRACE. What documentation exists that details the precedures on how to disabel the HTTP methods on the Application Server? Or if..."

And tahicks asks How to add missing namespace information?: "In response to the invocation of a web service I'm getting a return that has the namespace missing from the "payload" of the SOAP message. This detail throws the JAXB unmarshaller off when it tries to convert the XML to a JAXB bound class..."


Our current Spotlightis the new Janice Heiss interview with "Java Champion Kirk Pepperdine on Performance Tuning and Cloud Computing": "java.sun.com (JSC): In your talks, you always warn developers that they must carefully evaluate any generic advice that you provide to see if it applies to a particular situation. Why is this so important?Pepperdine: While I do give generic advice, I carefully explain that people have to evaluate it to see if it will work. I am giving advice in a vacuum, so what may work for many people most of the time may be very detrimental in other contexts. I don't know in advance what specific problem someone is working on..."


The current java.net Poll, which was submitted by Geertjan Wielenga, asks "What's your opinion of 'the Cloud'?" The poll will run through Thursday.


Our Feature Articles include Jeff Lowery's A Finite State Machine Supporting Concurrent States, which demonstrates how Java enums and EnumSets can be used as a basis to define and validate application states and state transitions. We're also featuring Jeff Friesen's article Introducing Custom Paints to JavaFX, which shows how you can leverage undocumented JavaFX capabilities to support custom paints in JavaFX Version 1.2.


The latest Java Mobility Podcast is Java Mobile Podcast 87: Tranqueira project used LWUIT: "Eloi Junior from Brazil has just opened the Tranqueira project and shares his experience in using LWUIT."


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.

-- Kevin Farnham
O'Reilly Media

A few days ago, the JRecordBind projectreleased Version 2.3 (see the Java Today entry below). JRecordBind, which is led by Federico Fissore, is a member of the Java Tools Community. The project is licensed under the GNU Lesser General Public License (LGPL). JRecordBind Version 2.3 adds support for xs:choice.

JRecordBind provides two services that are applicable to business applications, in particular to situations where an interface between two different systems is required. The library provides two simple capabilities:

  • map a fixed or variable length text file to bean instances, ready to be chewed by an import procedure (Unmarshaller)
  • export record beans into a fixed or variable length text file (Marshaller)

So, you can see that JRecordBind is useful in any situation where data must be transferred between a bean-based application and an application that can read and write text files. The latter application might be, for example, a legacy operational business platform, that can write out or read in data records in the form of fixed field text data dumps, or write data into formatted text reports.

About 8 years ago I was very much involved in developing software for document archival and retrieval. The company I worked for sold software to insurance companies and other businesses, along with goverment agencies, all of which needed to maintain historical records for periods of years to even decades. The documents were ingested into the archive, key elements were detected and catalogued, and the users could search for and retrieve documents based on the catalogued data elements. One of the most common types of document was a text report, with fixed fields and a fixed page or text record format. Clearly, JRecordBind is well-tailored for addressing this kind of task.

The JRecordBind home page refers to JRecordBind as "a tiny and super fast library." I downloaded Version 2.3 and took a look. The download unpacks into jrecordbind-2.3.jar and two subdirectories:apidocs and lib. While the byte size of a jar isn't the perfect way to measure size, for the record,jrecordbind-2.3.jar comes in at just over 36 KBytes.

The lib directory contains XML-schema API component jars, related to, for example, JAXB, RELAX NG, XSOM (the GlassFish/Metro XML Schema Object Model), and StAX (Streaming API for XML). Just for comparison, the combined size of the lib jars is 4.5 MBytes (with the JAXB jars occupying 4.1 MBytes of the total).

Looking at it this way, JRecordBind is indeed a small library. It performs its own specific task, applying some powerful standardized APIs to do some of the lower-level heavy lifting.

The apidocs subdirectory contains javadocs files. TheJRecordBind home page includes a lot of good discussion about the library's features, and points you to additional xsd examples and class examples that demonstrate the library's features.

Congratulations to Federico and the JRecordBind team on releasing stable Version 2.3!


In Java Today, java.net's JRecordBind project has announced the release of Version 2.3. JRecordBind is a tiny and super fast library that aims to: 1) map a fixed or variable length text file to bean instances, ready to be chewed by an import procedure (Unmarshaller); and 2) export record beans into a fixed or variable length text file (Marshaller). Version 2.3, which is now available for download, adds xs:choicesupport:

Since version 2.3, you can specify thejrb:setter attribute at thexs:choice level. JAXB allows you to have only one method in classes defined as "choice" in the xsd, but that's defined outsiBhavani Shankarde of the xsd, in a file called bindings.xjb (using the "choiceContentProperty" option). JRecordBind knows nothing about that file, so you need to duplicate that information into the xsd, in a way JRecordBind can understand. So, for instance, if you have the elements One and Two inside an xs:choice element ...

peligri talks about development activity as the team moves Towards GlassFish v3 fcs - FindBugs Push...:

As we get closer to GlassFish v3 FCS, the development is moving into cleanup stage - and with high volume, see the DEV alias. Part of the cleanup is the usual bug fixing, part is an Increased Testing via FishCAT and part is general code quality cleanup via tools like FindBugs...

Francois Orsini talks about some Videos to get acquainted with Apache Derby and Java DB:

Kristian Wagaan and Richard Hillegas, both Apache Derby committers who also work on Java DB, recently gave some great presentations about Apache Derby and Java DB.

Kristian Wagaan presented at the 2009 OpenSQLCamp, in conjunction with FrOSCon 2009 in Europe.

The presentation (slides) gives a brief overview of Apache Derby, its history and the community around it. Further, it goes into the details of features that have been added in the latest releases and show how they enable powerful ways to use a relational database.


In today's Weblogs, Greg Brown is Announcing Apache Pivot 1.3:

The Pivot development team is happy to announce the release of Apache Pivot 1.3. Apache Pivot is a platform for building rich internet applications in Java. It combines the enhanced productivity and usability features of a modern RIA toolkit with the robustness of the industry-standard Java platform. Pivot is currently undergoing incubation at the Apache Software Foundation. Notable updates in this release include:

  • New FileBrowser component - Pivot now includes out-of-the-box support for navigating the local filesystem. A screen shot is shown below...

Terrence Barr will be Over the Air, London, 9/25 & 9/26:

On Thursday I head up to London for the Over the Air event. I'll do two talks on Saturday on LWUIT and JavaFX Mobile. Check out the draft schedule. Plenty of interesting topics - I attended Over the Air last year and it was a fun, down-to-earth developer event. I'm looking forward to it. Maybe I'll see you there? ...

And Bhavani Shankar announces the New Basic3pcc sample application addition in SailFin:

The newly introduced "Basic3pcc" sample demonstrates a simple Third Party Call Control (3pcc) application in SailFin. Download latest SailFin to get this sample. This sample includes 2 applications as shown in the figure below ...

In the Forums,abith74 is Unable to sort out issues of JNDI JDBC Connectivity: "I want to create a stand-alone JDBC application with Java SE using Swing technologies and JNDI technology. The purpose of using JNDI technology is to avoid change of Java Source Code every time I move the database to different location. I use..."

renfrow asks about Using UndoManager: "I wanted to do 'undo/redo' for a small utility I'm writing, and using the NotePad.java demo code from the JDK 1.6.0_02 demo code, I was able to get it implemented easily enough. However, there's a small, 'glitch', shall we say: You get undo/redo points..."

And alberto101 has a problem involving WebService deployment in Glassfish cluster: cannot find wsdl file: "I have an EJB exposing business logic as a webService. I have deployed the webSercice successfully in Glassfish (cluster environment and local instance). The cluster is preceded by Apache acting as a proxy ..."


Our current Spotlightis the new Janice Heiss interview with "Java Champion Kirk Pepperdine on Performance Tuning and Cloud Computing": "java.sun.com (JSC): In your talks, you always warn developers that they must carefully evaluate any generic advice that you provide to see if it applies to a particular situation. Why is this so important?Pepperdine: While I do give generic advice, I carefully explain that people have to evaluate it to see if it will work. I am giving advice in a vacuum, so what may work for many people most of the time may be very detrimental in other contexts. I don't know in advance what specific problem someone is working on..."


The current java.net Poll, which was submitted by Geertjan Wielenga, asks "What's your opinion of 'the Cloud'?" The poll will run through Thursday.


Our Feature Articles include Jeff Lowery's A Finite State Machine Supporting Concurrent States, which demonstrates how Java enums and EnumSets can be used as a basis to define and validate application states and state transitions. We're also featuring Jeff Friesen's article Introducing Custom Paints to JavaFX, which shows how you can leverage undocumented JavaFX capabilities to support custom paints in JavaFX Version 1.2.


The latest Java Mobility Podcast is Java Mobile Podcast 87: Tranqueira project used LWUIT: "Eloi Junior from Brazil has just opened the Tranqueira project and shares his experience in using LWUIT."


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.

-- Kevin Farnham
O'Reilly Media

Kohsuke Kawaguchihas created an OpenID provider service for java.net users. Kohsuke talks about his creation in his featured blog post, Project of the day: OpenID for Java.net.

If you're unfamiliar with OpenID, the Wikipedia definitionprovides a good introduction:

OpenID is an open, decentralized standard for authenticating users which can be used for access control, allowing users to log on to different services with the same digital identity where these services trust the authentication body. OpenID replaces the common login process that uses a login-name and a password, by allowing a user to log in once and gain access to the resources of multiple software systems.

An OpenID is a URL that identifies you. Many large web sites offer members an OpenID, including AOL, FaceBook, MySpace, Yahoo!, Google, Flickr, and VeriSign. For these sites, your OpenID URL is typically a location on the site combined with your user name.

Why did Kohsuke take the time to do this? On the test site, he explains:

While this can be used to let you login to any web sites that support OpenID as an identity, the primary use case is to enable projects on java.net to host additional tools externally on their own, but still use java.net for authentication, for better integration. That is, such peripheral systems can follow the OpenID protocol and request the user to sign in by using their java.net OpenID (and if necessary, you can check their committer status against your project by using libraries like java.net tasks.

In his blog post, Kohsuke adds:

The real motivation of this service is to host "peripheral" systems and services on top of those that are provided by java.net. For example, if you want to run your own JIRA, JIVE forum, Trac, or Wiki for your project, it'll be more convenient if those services delegate authentication to java.net. In this way, you can correlate users on those peripheral systems to the users on java.net. This also allows you to perform authorization based on their project roles (for example, you can only allow certain operations to committers of your project.)

While his experimental OpenID service is not currently endorsed by java.net, Kohsuke's working on that.

For more information about OpenID, visit the OpenID Foundation web site.


JavaTools Community Newsletter #203 announces that the scalalab project has graduated (meaning that it reached its first release). Subtitled "Java in a scientific environment," the scalalab project:

aims to provide an efficient scientific programming environment for the Java Virtual Machine. The scripting language is based on the Scala programming language enhanced with high level scientific operators and with an integrated environment that provides Matlab-like working style. Also, all the numerous libraries of Java scientific code can be easily accessed. The potential of the scalalab is speed and flexibility.

Java Champion Yakov Fain has started a new podcast site, No BS IT, subtitled "Enterprise Software Development Without The BS." The announcement on the Java Champions site notes that

Yakov's podcasts are 10min in length; launched in August, 2009; has 5 podcasts completed with interesting titles like: "How I was developing a Web Site in India"; "Cultural Differences in outsourcing"; and, "IT Outsourcing Take 1".

Peligri announced GlassFish and Hudson at Oracle OpenWorld:

Oracle OpenWorld is October 11th to 15th, at San Francisco's Moscone Center (Bird's eye). We currently have scheduled two informal presentations during their Unconference:

• Creating Quick and Powerful Web applications with Oracle, GlassFish and NetBeans/Eclipse
  Mon, Oct 12, 11am PT - Overlook I
• Hudson community meet up
  Tue, Oct 13, 9am PT - Overlook I


In today's Weblogs, I'm featuring Java Champion Adam Bien's new post Abstract, If, Impl, Default, Bean Conventions - Just for Lazy Developers:

Using the prefix "abstract" to mark abstract classes is more a workaround or a shortcoming, than a best practice. Even worse is the introduction of naming conventions for interfaces with the only purpose: avoidance of interface naming collisions with their implementations. The convention "Default" is superfluous as well (what is "Default"?). Even the Remote and Local, Bean suffixes for EJBs are no more that interesting - the Beans are already annotated with the corresponding annotations...

Kohsuke Kawaguchi announced a new Project of the day: OpenID for Java.net:

I wrote and deployed an OpenID provider service for java.net users. For those who are new to OpenIDs, this service allows java.net users to log in to other sites by using the java.net ID as the identity (for example, try Stack Overflow.) This eliminates the need to maintain separate passwords for each site, among other things...

And Masoud Kalili talks about Using dynamically generated JFreeChart's charts and JasperReports:

If you are reading this blog it means you want to use JasperReport with dynamically programmatically generated images. An example of such use cases in generating complex charts using JFreeChart and then including these charts into reports. Each report in JasperReport uses a datasource to populate the fields, we need to use JRBeanCollectionDataSource which can be considered as a simple collection of JavaBeans. Each object in the JRBeanCollectionDataSource can be used to populate one row of the report or it can be used to prepare calculated values and so on...

In the Forums,Paulo Cesar Reis has a question regarding a Glassfish ejb project with ejb-client dependency: "Hi all, I have a doubt! I

In her lastest article, Janice Heiss interviewsJava Champion Kirk Pepperdine on Performance Tuning and Cloud Computing. I was in the java.net booth at this year's JavaOne when Kirk gave a presentation on Java performance tuning (you canlisten to the podcast). While "the cloud" was a significant topic at JavaOne, Kirk's java.net Community Corner presentation did not include that.

Early in the interview, Janice asked Kirk: "What misconceptions do you encounter among developers about performance tuning?"

Kirk's response wasn't what I would have expected. He answered:

Here's a major one: All developers believe they are good at performance tuning. They might be very good at writing performance code, and they might be very good at coding, but generally I find that most developers are not very good at performance tuning.

How can this be?

When developers are put in situations where they are asked to performance tune, they typically look at code and take some action. But they invariably forget the dynamics of the system. If you don't include the dynamics of the system when you performance tune or if you think you understand the dynamics of the system and guess wildly wrong - which is quite often the case - you end up doing the wrong thing, which frequently happens.

Kirk notes that software testers tend to be more successful when it comes to performance tuning than most developers, because they are more accustomed to working within a defined process.

Toward the end of the interview, Janice brings up the cloud:

As we move toward an era of cloud computing, what should Java developers understand about performance tuning? What scaling problems must developers address these days?

From his response, I think we know which choice Kirk would select in our current poll, which asks What's you opinion of 'the Cloud'? Kirk answered:

Cloud computing doesn't look that different from large data centers, which people have been trying to deal with for a long time.

While there are some problems that are peculiar to cloud computing today, I don't think they will be problems for a long time. Everyone knows that virtualization of the network is problematic. People are working hard to find ways to eliminate the problem.

There's a lot more interesting material in Janice's interview with Kirk. Read the complete interview, and you'll see what I mean.

-- Kevin Farnham


In his post Josh Bloch on the Semantic Gap, Bill Venners provides commentary on the Mind the Semantic Gap workshop that took place at last week's JVM Languages Summit:

At the JVM Languages Summit, Josh Bloch expressed his concern about what he called the "semantic gap" between the source code we write and its performance at runtime: As performance improves, our ability to predict the performance consequences of our source code degrades...

The Project Shoal teamannounced the final release of Shoal 1.1 FCS this past Thursday:

Download the shoal library bundle shoal-gms-1.1.zip and sources and javadocs. Shoal 1.1, the latest release of the Java based dynamic clustering framework, contains a number of features and bug fixes that significantly improve clustering reliability, and scalability for your applications. See below for a list of Enhancements and Bug Fixes...

Peligri announced a Free Webinar - Deploy Rails Applications to GlassFish that will take place on Wedndesday:

Arun will give a Webinar on deploying Rails Applications to GlassFish next Wednesday. Details at the Registration Page and at Arun's post...

In today's Weblogs, I'm featuring Geertjan Wielenga's recent post that shows How to Create a GUI Editor on the NetBeans Platform:

There's a lot of interest in creating GUI editors via the Visual Library. So I'm creating a small example that will show how to do that. The palette is filled with JavaBeans that are registered in the layer, meaning that the editor is extensible via the System FileSystem. When a palette item is dropped, a BeanNode wraps the JavaBean and displays its BeanInfo in the Property Sheet, where it can be edited and changes are applied immediately...

Fabrizio Giudici discusses why Repository cohesion is another plus of Mercurial:

During my last years before getting the master degree, I have been working at a free flight simulator. It run under DOS and was named FGFLY. It was written in C++, initially Borland C++ and later Watcom C++, in order to use a memory extender to bypass the infamous 640k limit. At the time I just was a student able to earn a few money with programming, and couldn't allow to spend a lot in hardware - so my computer was never at the leading edge; I remember that compiling the whole project took more than one hour...

John Smart announces the upcoming Java Coding Dojo in Sydney and Wellington in October:

While I am in Sydney for the next Sydney Java Power Tools Bootcamp, I will be running a Java Coding Dojo, to be held in the Atlassian offices between5:30 and 7:00pm on the 21st of October. This is a free event, open to anyone who want to do a little recreational coding. I will also be running the inaugural session of the  Wellington Java Coding Dojo on October 14, at a to-be-announced mysterious location (somewhere in Wellington, though)...

In the Forums,hatemalimam asks about Glassfish DNS Management ??: "Hi , I have to web applications (2 wars).... and I have one physical Server with on Public IP lets say for example : 11.11.11.11. How can I host those to web application on one public IP . I can host only..."

chaoslayer has a question regarding domain.xml - DTD/XSD: "Hi there, simple question: where is the correct DTD and/or XSD for the domain.xml of current glassfish v3 preview builds? The only ones I could find reside in lib/dtd and are completely outdated and doesn't match what is being..."

And Mark Streit has an issue with Exceptions/FaultBeans and generated classes - wsimport: "I have question re: *wsimport* behavior and the classes it generates as it relates to Exceptions. I am familiar w/ the article..."


Our current Spotlightis the new Janice Heiss interview with "Java Champion Kirk Pepperdine on Performance Tuning and Cloud Computing": "java.sun.com (JSC): In your talks, you always warn developers that they must carefully evaluate any generic advice that you provide to see if it applies to a particular situation. Why is this so important?Pepperdine: While I do give generic advice, I carefully explain that people have to evaluate it to see if it will work. I am giving advice in a vacuum, so what may work for many people most of the time may be very detrimental in other contexts. I don't know in advance what specific problem someone is working on..."


The current java.net Poll, which was submitted by Geertjan Wielenga, asks "What's your opinion of 'the Cloud'?" The poll will run through Thursday.


Our Feature Articles include Jeff Lowery's A Finite State Machine Supporting Concurrent States, which demonstrates how Java enums and EnumSets can be used as a basis to define and validate application states and state transitions. We're also featuring Jeff Friesen's article Introducing Custom Paints to JavaFX, which shows how you can leverage undocumented JavaFX capabilities to support custom paints in JavaFX Version 1.2.


The latest Java Mobility Podcast is Java Mobile Podcast 87: Tranqueira project used LWUIT: "Eloi Junior from Brazil has just opened the Tranqueira project and shares his experience in using LWUIT."


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.



Some voters in this past week's java.net poll questioned whether the question could be answered, but the result showed that a plurality of voters considered Europe to be region where Java has the greatest market share among competing technologies.

A total of 268 votes were cast. The exact question and response options and results were:

In which region does Java enjoy the greatest market share among competing technologies?

  • 4% (10 votes) - Africa
  • 11% (29 votes) - Asia: Indian Subcontinent
  • 9% (23 votes) - Asia: Japan, China, and other
  • 3% (8 votes) - Australia and New Zealand
  • 38% (101 votes) - Europe
  • 22% (60 votes) - North America
  • 14% (37 votes) - South America

The poll had barely been posted when ronaldtm asked "How could anyone know?":

I'm familiar with my country's market (my city's market to be more precise). How could I know how is the market in 'Asia: Indian Subcontinent'? How could an Australian guy know how is South America's market? Or does everybody here work for multi-national consulting companies, and keep traveling around the world?

I was certainly aware that this particular poll was more in the nature of asking people to take an educated guess than asking them to express a well-defined opinion. My assumption was that we all have a sense of Java's market share in our own country, and we all know Java is a global technology, and many of us have been to international conferences, and we read news about technology in other countries and on other continents... My hope was that people might just take their best guess.

Indeed, there were 268 votes cast, which is a fair amount. Butweeanon was also displeased by the poll question ("this is a bad poll question").

As for the results, while I wasn't surprised by a high value for Europe, I expected the number for South America to be higher than it was. It seems to me that Java is a very major technology South America, especially in Brazil. For example, see the Java Today item that features the "JEDI-Brasil" article from the java.net Java User Groupscommunity. Brazil seems to have some of the largest JUGs in the world.

New poll: 'the Cloud'

So, enough of "bad poll questions" created by your editor! Ournew poll was submitted by a member of the java.net community, Geertjan Wielenga. The poll question is: "What's your opinion of 'the Cloud'?" The poll will run through next Thursday.

If you have an idea for a poll, you can easily get it to me by using the java.net Submit Content form. Select "Poll Question" on the "Please choose where you think this item should go on the homepage" pull-down.


In Java Today, the java.net Java User Groupscommunity is featuring an article titled "JEDI-Brasil - A DFJUG Brasilia Initiative to expand Java training in Brazil":

The Java Users Group of the Federal District of Brazil in Brasilia - DFJUG (www.dfjug.org) was established in 1998 out of a need for qualified Java professionals. Today, with 46,983 members,DFJUG is considered one of the largest Java User groups in the world. It is DFJUG's educational focus which is the main driver that keeps this community together and growing --- Why?

Daniel deOliveira (currently working at the Brazilian Ministry of Planning) explains, that in Brazil, there is a shortage of IT professionals. There are currently 40,000 java-related jobs that are open and unfilled in Brazil. Furthermore, Brazil's formal educational sector (universities, colleges, technical and IT schools) has not been able to meet the demand. So, DFJUG began searching for answer(s) and asking questions like: Where does one find individuals that fit the IT developer profile? Where to find these "geniuses" that, without any formal or academical training, are capable of disassembling and reassembling a cell phone or even program these devices? ...

Arun Gupta posted information about FishCAT - GlassFish v3 Community Acceptance Testing:

Would you like to influence the quality of GlassFish v3? Do you have what it takes to provide feedback on stability and usability in GlassFish Beta Testing Cycle? GlassFish v3 Prelude Community Acceptance Testing boasts 36 FishCAT members from 18 different countries submitting 125 bugs.

And peligri announced the availability of New Hudson White Paper... and Recordings from JavaZone:

We have published a new WhitePaper on Hudson: Developing Software Collaboratively with Hudson, like the rest of the GlassFish Portfolio WPs it requires (free) SDN registration. The WP provides a good overview of Hudson and Sun's commercial distribution: Sun CI Server (summary), which is part of the GlassFish Portfolio. Check it out and let us know what you think.

And, on a separate but related topic, Kohsuke just came back from Presenting at JavaZone and it seems it went very well. The recordings are now available and they look very good - see the Full List ...


In today's Weblogs, Kohsuke Kawaguchi investigates a case Adding feeds to SpeedReaderFX that don't *quite* comply with the RSS/Atom formats:

Yesterday, a Hudson committer Alan Harder discovered anEOFException in Hudson, which only happens on 64bit JVM on Solaris. This was happening in the part of Hudson (or more precisely, in a separate library called Akuma) where we look at the memory space of the process to figure out the command line arguments of the current process (the /proc/ID/as file — an equivalent of /proc/ID/mem in Linux)

It turns out that the problem was because this sparse file is 264 bytes long on 64bit systems. So for Hudson to look at arbitrary positions in the process memory space, it needs be able to seek beyond Long.MAX_VALUE (263-1.) ...

Carol McDonald provides Some Java Concurrency Tips:

Here is a review of some concurrency tips from Joshua Bloch, Brian Goetz and others.

Prefer immutable objects/data

Immutable objects do not change after construction. Immutable objects are simpler, safer, require no locks, and are thread safe. To make an object immutable don't provide setters/mutator methods, make fields private final, and prevent subclassing. If immutability is not an option, limit mutable state, less mutable state means less coordination.  Declare fields final wherever practical, final fields are simpler than mutable fields...

Felipe Gaucho describes how URL patterns are more flexible in Jersey than in the web.xml:

Rule of thumb: Avoid to use {variables} as the first path of a Jersey's @Path

I am working on the Arena PUJ Project, a RESTful web-service to support PUJ competitions. We are in the early stages of the project but we already got some resources published on the web. Let me show you a few URL samples: ...


In the Forums,socalvin had a problem where Shifting failed. Permission denied?: "I am running some Ruby on Rails application with JRuby 1.3.1 + GlassFish (v3-b34-01_26_2009 build) and just found out the Ruby logger is unable to shift and the stack trace is below. I guess it has something to do with the GlassFish because..."

cdr09 has a question about Lwuit Virtual Keyboard access: "I'm currently developing a j2me application for a HTC Diamond using NetBeans with the micro edition SDK 3.0. Scenario is: User clicks into a text field and up pops the LWUIT virtual keyboard. Only thing I can get it to do is to go..."

And ttwdev has a Question on VideoFormatControl.DFC_ constants...: "Hi - Am I mistaken in thinking there's no difference between DFC_PROCESSING_FULL and DFC_PROCESSING_LB_16_9 when the input is 16:9 and the output is 4:3? Seems like they'd both result in 16x9 letterbox - black bars on top & bottom..."


Our current Spotlightis Media Streams Player Release 1.0.0: The Media Streams Player Project has announced the release of Version 1.0.0: "Aalhamdulillah! Most probably this is going to be the very first release of a complete cross-platform media player which is written in the Java Programming Language. Media Streams Player is entirely written in the Java Programming Language using the Java Media Framework (JMF) API. This cross-platform media player can play Video & Audio files of most of the popular media file formats on different popular Hardware & OS platforms. This application is currently under development. But this demo version which is ready to be released is a stable version of the application. End users of the application can use the Windows version of the media player just downloading & installing the Windows executable of Media Streams Player. They can find it at the Home Page of the project located at the given URL."


The current java.net Poll asks "What's your opinion of 'the Cloud'?" The poll will run through next Thursday.


Our Feature Articles include Jeff Lowery's A Finite State Machine Supporting Concurrent States, which demonstrates how Java enums and EnumSets can be used as a basis to define and validate application states and state transitions. We're also featuring Jeff Friesen's article Introducing Custom Paints to JavaFX, which shows how you can leverage undocumented JavaFX capabilities to support custom paints in JavaFX Version 1.2.


The latest Java Mobility Podcast is Java Mobile Podcast 87: Tranqueira project used LWUIT: "Eloi Junior from Brazil has just opened the Tranqueira project and shares his experience in using LWUIT."


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.



On the Artima Developer site, Andy Dent recently posted today's lead Java Today item, Why Learn New Languages? Being Outlived by C++. Andy is 46 years old, considers himself to have about 20-25 years of full-time work remaining in his career, plans to remain in software engineering, and says "I'm seriously contemplating giving up learning new languages."

Would this be a good plan in the case of C++? In the case of Java?

I'm a bit older than Andy, and though right now I'm doing more work in the journalistic realm than in direct software engineering, I do still keep my hand in software engineering on a part-time basis. And as recently as six months ago, my work was almost entirely software engineering.

At Andy's age, I was working close to full-time on Java development. I had learned Java in the preceding several years, applying it whenever I had the freedom to do so in my daily work. I certainly wasn't anything near being a Java guru, but I was able to get a lot done at the team/project lead level. In my part time, I was editing Java books (which were big sellers at the time). Obviously, today I think it was a very good decision for me to devote lots of time at that point to bring Java into the list of languages for which I could claim a fairly high level of proficiency.

Andy's conclusion implies that his mind is made up (he probably won't focus on learning new languages in the future):

I guess the only threat to this retirement plan as alegacy C++ guru is the hordes of bright young games programmers. But seriously, if you're looking to maintain somereally old code in 2020, won't you want to hire a consultant with an authentically grey beard?

Well, 2020 is only 11 years from now, not 20-25 years (Andy's estimated full-time work term). That's a long time, in my opinion, to rely on something that was at its peak importance (perhaps) in the 1990s. I mean, in my opinion, the creation of Java was in part a response to some of the problems and deficiencies inherent in C++.

So, let's ask this question: what languages were at their peak 30-35 years ago, in the mid/late 1970s? Is there any work in those languages today? What would those languages be? COBOL? FORTRAN? BASIC? Would you want to be at the end of a long software engineering career today, trying to pay off remaining debt and bolster your retirement savings, as a COBOL, FORTRAN, or BASIC guru? I wouldn't!

Now, it so happens that I do a fair amount of work involving Fortran. But, I don't do much work on the Fortran itself. I'm working with legacy mathematical modeling and simulation libraries, and bringing those libraries into modern applications that interact with an Oracle database and load the results into web pages. If I didn't know Perl and something about HTML, CSS, and web services, along with multithreaded development (so I can make the old Fortran code utilize modern multi-processor / multi-core systems), even "guru" status with respect to Fortran wouldn't make me sufficiently valuable to work on that project (IMO).

I guess my conclusion is that even "gurus" need to keep up with the times. A real lot is happening in the Java world, today. As I write this, the JVM Language Summit is under way at Sun's Santa Clara, California campus. The agendaincludes everything from the JDK7 to Scala to JRuby to Invokedynamic to Ioke to Clojure to Groovy to Jython to Hotswap... I think you get the idea.

I don't think the threat to a successful career in trying to be a "guru" in a given language for the last decades of a software engineering career comes from much younger developers. Rather, I'd say the real threat would be competing gurus in your language who have also taken the time to stay up to date at a fairly advanced level of proficiency with some of the critical new languages that complement the legacy language.

So -- is there any point in a software engineering career when it makes sense professionally to stop learning new languages -- aside from like months or a few years before you retire? I don't think so. What do you think?


In Java Today, Andy Dent asks Why Learn New Languages? Being Outlived by C++. The question seems relevant for Java developers as well, and there have been lots of interesting comments posted in response to Andy's question. Here's Andy's introduction:

Can a focus on C++ get me through the next twenty-odd years? Is it time to stop chasing bright, shiny new languages and consolidate as a guru? A few thoughts on "legacy languages" and the later stages of a coding career...

The JVM Language Summit is under way in , and will continue through Friday:

The 2009 JVM Language Summit is an open technical collaboration among language designers, compiler writers, tool builders, runtime engineers, and VM architects.

We are sharing our experiences as creators of programming languages for the JVM, and of the JVM itself. We also welcome non-JVM developers on similar technologies to attend or speak on their runtime, VM, or language of choice.

See the JVM Language Summit Agenda for details on the presentations.

Kirill Grouchnikov announced the Release candidate for Substance 5.3:

I am extremely pleased today to announce the availability of release candidate for version 5.3 of Substance look-and-feel(code-named Reykjavik). The release notes for version 5.3 contain the detailed information on the contents of this release which include the following:


In today's Weblogs, in my feeds I found Java Champion Jim Weaver's interesting post Adding feeds to SpeedReaderFX that don't *quite* comply with the RSS/Atom formats:

When adding more feeds to the SpeedReaderFX application's Criteria dialog, I found that some of them don't *quite* comply with RSS/Atom formats. For example, I thought it'd be cool to have RSS feeds from Engadget and Gizmodo (what self-respecting geek wouldn't want those feeds?) I also wanted to have a daily dose of Dilbert delivered, but in these three cases the JavaFX RSS API reported that the dates for the feed items were just prior to the OS epoch.

John Ferguson Smart announces EasyB/JDave talk available as a podcast:

Last week I had the pleasure of being invited to talk at the Canberra Java Users Group about BDD using Easyb and JDave, using the talk that Lasse Koskela and I gave at Agile2009...

Santiago Pericas-Geertsen describes Android Support in Mobility Platform:

As Ryan described in his recent blog, we now have support for Java SE clients in the Mobility Platform. Mahesh Sharma, a student and Sun ambassador in India, has been working on a port of this library to the Android platform. As part of his work, Mahesh also re-wrote the UI of our MusicDb demo and proved that Android is a great plaform to run SGMP applications...

In the Forums,thamoskuk9 posted Re: Mobicents Diameter v1.0.1.GA Released!: "When you download the Mobicents JAIN SLEE Server binary distribution, you can also choose to verify the integrity of the zip file you download, which is both preferred and safer. If you are setting up Mobicents in a production environment (as opposed to,..."

david_hall responds Re: JXTable Sort ,how to exclude the null value in the cell????: "Looks like the best choice is to provide a ModelWrapper that ensures that the values compared are never null. Maybe a wrapper that associates a default value with each column for sorting purposes. This looks like the last place you can intercept the..."

And ghady_rayess contributed to a conversation Re: I dont know, Should I continue on series40 with LWUIT?: "Hello Ashish, Try to subgroup related forms (i.e. diff menus) into different classes so that their memory allocation is released when browsing into different menus... This is my approach. I have a LWUIT app which works fine on Nokia..."


Our current Spotlightis Media Streams Player Release 1.0.0: The Media Streams Player Project has announced the release of Version 1.0.0: "Aalhamdulillah! Most probably this is going to be the very first release of a complete cross-platform media player which is written in the Java Programming Language. Media Streams Player is entirely written in the Java Programming Language using the Java Media Framework (JMF) API. This cross-platform media player can play Video & Audio files of most of the popular media file formats on different popular Hardware & OS platforms. This application is currently under development. But this demo version which is ready to be released is a stable version of the application. End users of the application can use the Windows version of the media player just downloading & installing the Windows executable of Media Streams Player. They can find it at the Home Page of the project located at the given URL."


The current java.net Poll asks "In which region does Java enjoy the greatest market share among competing technologies?" This Thursday will be the last full day of voting.


Our Feature Articles include Jeff Lowery's new article A Finite State Machine Supporting Concurrent States, which demonstrates how Java enums and EnumSets can be used as a basis to define and validate application states and state transitions. We're also featuring Jeff Friesen's article Introducing Custom Paints to JavaFX, which shows how you can leverage undocumented JavaFX capabilities to support custom paints in JavaFX Version 1.2.


The latest Java Mobility Podcast is Java Mobility Podcast 86: Mobile Service Architecture 2: Introducing New Features in Mobile Devices: "Kay Glahn from Vodafone Group R&D and Erkki Rysa from Nokia share the new features in MSA2 in this abbreviated feature from JavaOne."


Current and upcoming Java Events:

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


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



In my blog feeds today, I found Java Champion Jim Weaver's interesting post Adding feeds to SpeedReaderFX that don't *quite* comply with the RSS/Atom formats:

When adding more feeds to the SpeedReaderFX application's Criteria dialog, I found that some of them don't *quite* comply with RSS/Atom formats.  For example, I thought it'd be cool to have RSS feeds from Engadget and Gizmodo (what self-respecting geek wouldn't want those feeds?)  I also wanted to have a daily dose of Dilbert delivered, but in these three cases the JavaFX RSS API reported that the dates for the feed items were just prior to the OS epoch.

The Project Grizzlyteam has released Version 1.9.18. Jean-Francois Arcand summarizes the new release in his blog post, which is featured below in Java Today.

The version number of the latest release implies a couple things: 1) the Grizzly team is working on a Version 2.0.0; and 2) the current release consists primarily of stability enhancements (bugs are fixed and performance is improved). Both of these are correct. Jean-Francois explains:

This version doesn't contains any new features as we have focused on performance and fixing bugs. The change logs can be found here. Note that we are more and more to work on the Grizzly Servlet Container and make it pass the Servlet 2.5 TCKs. Hopefully before the end of the year we will have it working on both Grizzly 1.9.x and 2.0.0! On The Grizzly 2.0.0 side, we have been swamped by the upcoming GlassFish v3 release all summer (hopefully Oracle allow us more resources :-))....but 1.9.18 should be the last one integrated in v3, hence we will resume our full time work on completing Grizzly 2.0.0.

If you're not familiar with Project Grizzly, the project summary states:

Writing scalable server applications in the Java programming language has always been difficult. Before the advent of the Java New I/O API (NIO), thread management issues made it impossible for a server to scale to thousands of users. The Grizzly NIO and Web framework has been designed to help developers to take advantage of the Java NIO API. Grizzly goals is to help developers to build scalable and robust servers using NIO and we are also offering extended framework components: Web Framework (HTTP/S), Bayeux Protocol, Servlet, HttpService OSGi and Comet.

When you visit the Project Grizzly home page, you see that Grizzly is portrayed as a subproject of GlassFish. Indeed, Jean-Francois notes:

GlassFish v3 is a heavy user of the Grizzly HTTP Framework: ALL Scripting language support: JRuby, Python and Groovy, the Admin CLI, Monitoring/Management REST API (with the help of Jersey's GrizzlyAdapter), EJB WebServices, Java WebStart, etc....

So, if you're using GlassFish Version 3, you are probably also using Project Grizzly (though you may not explicitly be aware of that fact).

You can follow Project Grizzly on Twitter. The project also has several mailing lists, including a fairly active users mailing list (number of monthly posts typically in the low hundreds).


In Java Today, Joe Darcy continues a JDK discussion in Java Posse #277 Feedback: Still not a view from an ivory tower:

A follow-up entry to Dick Wall's Google Group post to my earlier reaction to Java language evolution and management concerns raised in the first twenty minutes of episode #277 of the Java Posse podcast.

Anyone can have an opinion. Having an informed opinion takes some effort. Implementing the conclusions of an informed opinion can take considerably more effort.

The naming conventions for abstract classes are as superfluous as for interfaces

Kirk Pepperdine's latest post is Mixing long and short lived objects:

I'll be speaking on Wednesday night (Sept 30) in the Sun offices in NY and am looking forward to meeting up a number of people. If you're around please do join in. After that I'll be off to JAOO Aarhus Denmark where I'll be offering my performance seminar on the 4th of Oct (late addition to the schedule). The all day tutorial includes a meety problem to sink your proiler into. Afterwards I'm happy to have people to join in for a beer!

Danny Coward provides a roundup of JDK news in JDK Watch: Back to school:

What with zipping all over the place to talk to folks about using JavaFX, and the quarterly JCP EC meeting, the Janitor has so much news saved up !

Things are never dull around the JDK, and in the back to school rush, there's been plenty going on. Sadly, the Swing Application Framework hasn't reached a point where its ready to be included in JDK 7, but most all of the other features are on track since milestone 4 was released. As you can see in the latest builds, the team continues to tweak the new garbage collectorhttp://download.java.net/jdk7/changes/jdk7-b71.html andProject Coin announced its additions to the Java language

Tomorrow, its the start of the annual JVM language summit ...


In today's Weblogs, I'm featuring Java Champion Adam Bien's recent post where he asks "Are Naming Conventions Still Needed for Abstract Classes?":

In case you have trouble to find a unique name for anabstract class, you probably don't need it. Some reasons, why 'Abstract' doesn't have to appear as prefix in the name of an abstract class:

 
  1. Abstract classes are already distinguishable by the keywordabstract. There is no need to further emphasize it.
  2. A prefix 'Abstract' doesn't provide any additional value to the user - in contrary it blurs the actual intension.
  3. Modern IDEs don't let you instantiate an abstract class, even before saving / compiling...

Ryan Shoemaker announces MCBO Now Available For Java SE:

The GlassFish Mobility Platform team has been working on many new features since the 1.1 release back in February 2009, one of which is adding support for MCBO on the Java SE platform. This will allow the development of desktop synchronization clients that are much more powerful than their mobile Java ME siblings...

And Sebastien Dionne continues his series with GWS Deployer 1.9.17 : Reloaded : New Features Part 3 : PHP Support:

In a previous post : PART2 I describe how to run JSP over Grizzly. Now I'll show you how to run PHP over Grizzly. here a sample web.xml file for PHP support. (I'm using Quercus, but you could use native PHP too)...

In the Forums,mymegabyte notes that Those pesky mtgame IOOBEs are still around: "It has been awhile since I brought this up because I know you guys are working hard to fix as many bugs as possible. However, I am a bit nervous that the preview is out without a fix. This weekend I was able to rather quickly reproduce the crashes on..."

azig asks How to separately build a jsr from phoneme?: "Could anybody help How to separately build a jsr from phoneme? for example build out jsr75 to a jar package like jsr75.jar? Many thanks!"

And skalabic reports an Issue: SamsungE250 - screen is black after returning from native dev dialog: "Hello, on Samsung E250, after user responds to the security question regarding allowing application to open data connection (http get request), when control is back to the Java app. in 50% cases screen is just black. Application is still running,..."


Our current Spotlightis Media Streams Player Release 1.0.0: The Media Streams Player Project has announced the release of Version 1.0.0: "Aalhamdulillah! Most probably this is going to be the very first release of a complete cross-platform media player which is written in the Java Programming Language. Media Streams Player is entirely written in the Java Programming Language using the Java Media Framework (JMF) API. This cross-platform media player can play Video & Audio files of most of the popular media file formats on different popular Hardware & OS platforms. This application is currently under development. But this demo version which is ready to be released is a stable version of the application. End users of the application can use the Windows version of the media player just downloading & installing the Windows executable of Media Streams Player. They can find it at the Home Page of the project located at the given URL."


The current java.net Poll asks "In which region does Java enjoy the greatest market share among competing technologies?" This Thursday will be the last full day of voting.


Our Feature Articles include Jeff Lowery's new article A Finite State Machine Supporting Concurrent States, which demonstrates how Java enums and EnumSets can be used as a basis to define and validate application states and state transitions. We're also featuring Jeff Friesen's article Introducing Custom Paints to JavaFX, which shows how you can leverage undocumented JavaFX capabilities to support custom paints in JavaFX Version 1.2.


The latest Java Mobility Podcast is Java Mobility Podcast 86: Mobile Service Architecture 2: Introducing New Features in Mobile Devices: "Kay Glahn from Vodafone Group R&D and Erkki Rysa from Nokia share the new features in MSA2 in this abbreviated feature from JavaOne."


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.



Java Champion Adam Bien recently asked "Are Naming Conventions Still Needed for Abstract Classes?":

In case you have trouble to find a unique name for anabstract class, you probably don't need it. Some reasons, why 'Abstract' doesn't have to appear as prefix in the name of an abstract class:

 
  1. Abstract classes are already distinguishable by the keywordabstract. There is no need to further emphasize it.
  2. A prefix 'Abstract' doesn't provide any additional value to the user - in contrary it blurs the actual intension.
  3. Modern IDEs don't let you instantiate an abstract class, even before saving / compiling...

In her lastest Enterprise Tech Tip, Carol McDonald writes about Locking and Concurrency in Java Persistence 2.0. I'm pointing out Carol's article in Java Today, but I'd also like to talk a bit more about what she covers here.

If you haven't done a lot of work with databases, in particular what I'd call "low-level" work on tuning the performance of databases in an enterprise environment, then it's possible that you've never really given much thought to the problems of locking and concurrency. Yet, these are fundamental to the reliablility of database transactions. As Carol says:

Locking is a technique for handling database transaction concurrency. When two or more database transactions concurrently access the same data, locking is used to ensure that only one transaction at a time can change the data.

Sounds simple enough, right? But, it's not quite that simple, because a single method for performing locking may work well under some conditions, and poorly under others. Carol explains:

There are generally two locking approaches: optimistic and pessimistic. Optimistic locking assumes that there will be infrequent conflicts between concurrent transactions, that is, they won't often try to read and change the same data at the same time. In optimistic locking, the objective is to give concurrent transactions a lot of freedom to process simultaneously, but to detect and prevent collisions. Two transactions can access the same data simultaneously. However, to prevent collisions, a check is made to detect any changes made to the data since the data was last read.

Pessimistic locking assumes that transactions will frequently collide. In pessimistic locking, a transaction that reads the data locks it. Another transaction cannot change the data until the first transaction commits the read.

It's all about the likelihood that someone (or some application) that accesses a data element will update the element, and the frequency with which those updates occur with respect to the access times and the total number of updates. If at a given time, 100 people may request access to a data element, but only one of them will seek to update it any time soon, then pessimistic locking is more efficient. Few requests to update the data element are expected, so it is very likely that when that one person chooses to update the element, it won't have changed from what it was before.

Why do we care? Well, locking and unlocking data elements consumes time and processing power. The database application will be able to support fewer concurrent users if the most efficient method for locking and enabling concurrency is not applied.

Carol summarizes locking support in JPA 1.0, and identifies the additional locking support that is implemented in JPA 2.0. For example, JPA 2.0 adds five new lock modes (including the first support for pessimistic locking). The new lock modes are:

  • OPTIMISITIC
  • OPTIMISTIC_FORCE_INCREMENT
  • PESSIMISTIC_READ
  • PESSIMISTIC_WRITE
  • PESSIMISTIC_FORCE_INCREMENT

This post would be too long if I went into the details that differentiate these lock modes, and covered additional details of what's in JPA 2.0. But, of course, I don't have to do that, since you can find it all in Carol's article!

Formally (at least going by its URL address), Carol's Enterprise Tech Tipssite is a blog. But, in just about every case, I'd call her entries more full-fledged technology articles than blog posts. They're insightful, well-structured, detailed tutorials on currently relevant topics in enterprise Java software engineering. Always a great read, and an excellent reference on the topic at hand.

Thanks, Carol!


In Java Today,Carol McDonald has published a new Enterprise Tech Tip, Locking and Concurrency in Java Persistence 2.0:

The Java Persistence API (informally referred to as JPA) provides a plain old Java object (POJO)-based persistence model for Java EE and Java SE applications. It handles the details of how relational data is mapped to Java objects, and it standardizes Object/Relational (O/R) mapping. The latest update to JPA, Java Persistence 2.0, adds a number of new features such as additional O/R mapping functionality and new query language capabilities. Another area that has been enhanced in JPA 2.0 is locking and concurrency...

Mario Fusco, who talked about the Lambdaj Project in a java.net Community Corner podcast at JavaOne 2009, has an interesting question for us: "Is it Time for Functional Programming in Java?":

Fuctional programming has existed for decades, but only in the last few years has it gained the attention it deserves, for a lot of very good reasons like:

  • it reduces code duplicarion
  • it improves readability
  • it allows better reuse
  • it facilitates multi-threading programming
  • it eliminates ugly programming by side-effects ...

peligri writes about Choosing The Right GlassFish v3 Bundle For You:

GlassFish v3 is available in a number of download bundles. The bundles are available at different locations: the Community Download Page and the JavaEE Preview SDK, with different installer technologies: ZIP file or an installer and with different feature sets: Web or Full Profile...

In today's Weblogs, John Ferguson Smart announces that A new Java Power Tools Newsletter is out!:

A new Java Power Tools Newsletter is out! In this issue, we study the theory and practice of Mock Objects, including the subtle differences between mocks and stubs, and a simple case study usingMockito, the new kid on the block of Mock Objects frameworks for Java...

Ryan Shoemaker announces MCBO Now Available For Java SE:

The GlassFish Mobility Platform team has been working on many new features since the 1.1 release back in February 2009, one of which is adding support for MCBO on the Java SE platform. This will allow the development of desktop synchronization clients that are much more powerful than their mobile Java ME siblings...

And Sebastien Dionne continues his series with GWS Deployer 1.9.17 : Reloaded : New Features Part 3 : PHP Support:

In a previous post : PART2 I describe how to run JSP over Grizzly. Now I'll show you how to run PHP over Grizzly. here a sample web.xml file for PHP support. (I'm using Quercus, but you could use native PHP too)...

In the Forums,skalabic asks Can you make playDialogSound() public?: "Hello, can you make playDialogSound() from display class public? I don't see why it should be private only and would like to use it from my application, not when displaying dialog only..."

mbazs has issues with Glassfish and JMX: "Hi, I'm new to JMX, but I didn't manage to understand how it is going in J2EE/GF. I would like to deploy my EAR, that contains an EJB, servlets and so on. My question is how could I make this manageable? For example, I'd count..."

And bennyk asks about A "Soft" Human Interface Device over Bluetooth?: "I am exploring the feasibility of building a simple application that can run on a PDA/phone and emulate a HID (Human Interface Device) over its bluetooth interface (or, USB). In this way, a nearby PC could recognize it as a keyboard or mouse instantly..."


Our current Spotlightis Media Streams Player Release 1.0.0: The Media Streams Player Project has announced the release of Version 1.0.0: "Aalhamdulillah! Most probably this is going to be the very first release of a complete cross-platform media player which is written in the Java Programming Language. Media Streams Player is entirely written in the Java Programming Language using the Java Media Framework (JMF) API. This cross-platform media player can play Video & Audio files of most of the popular media file formats on different popular Hardware & OS platforms. This application is currently under development. But this demo version which is ready to be released is a stable version of the application. End users of the application can use the Windows version of the media player just downloading & installing the Windows executable of Media Streams Player. They can find it at the Home Page of the project located at the given URL."


The current java.net Poll asks "In which region does Java enjoy the greatest market share among competing technologies?" This Thursday will be the last full day of voting.


Our Feature Articles include Jeff Lowery's new article A Finite State Machine Supporting Concurrent States, which demonstrates how Java enums and EnumSets can be used as a basis to define and validate application states and state transitions. We're also featuring Jeff Friesen's article Introducing Custom Paints to JavaFX, which shows how you can leverage undocumented JavaFX capabilities to support custom paints in JavaFX Version 1.2.


The latest Java Mobility Podcast is Java Mobility Podcast 86: Mobile Service Architecture 2: Introducing New Features in Mobile Devices: "Kay Glahn from Vodafone Group R&D and Erkki Rysa from Nokia share the new features in MSA2 in this abbreviated feature from JavaOne."


Current and upcoming Java Events:

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


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



In a recent note to JUG leaders, CEJUG leader Hildeberto Mendonca announced the upcoming CEJUG 7th Anniversary celebration, which will take place on September 19 (see the Java Today entry below).

http://download.java.net/general/jn_images/blogs/cejug-logo.png

CEJUG stands for Ceara Java User's Group. It is one of, if notthe, largest Java User Group in Brazil. Hildeberto (known as "Berto" to his friends) was a co-founder of the JUG.

http://download.java.net/general/jn_images/blogs/CEJUG_Berto.jpg

The CEJUG was also co-founded by Felipe Gaucho (who I met in person at this year's JavaOne).

http://download.java.net/general/jn_images/blogs/CEJUG_Felipe_med.jpg

The CEJUG has a significant presence on java.net. Felipe blogs regularly and has also published articles on java.net. At JavaOne 2009, he recorded a java.net Community Corner podcast about PUJ, a JUG Contest, with Jim Wright moderating and doing the recording.

As you can see from Felipe's slide above, the CEJUG is involved in at least two java.net projects. The cejug-classifieds project is a 100% pure Java classified advertising system. While the project doesn't yet have a stable release, a snapshot release and an online demo are available. The project code is integrated with GlassFish and Apache In a recent note to JUG leaders, CEJUG leader Hildeberto Mendonca announced the upcoming CEJUG 7th Anniversary celebrationANT.

Felipe is also the owner of the java.net footprint project. This project has as its objective the development of "a set of tools for distributing signed digital documents." The latest release is a beta version, which generates signed PDF documents from a jdbc data source and dispatches the documents through an SMP server.

There is probably more involvement by the CEJUG on java.net, but that's what I'm aware of right now. Consider leaving a comment below, if you're a member of the CEJUG and would like to point us to additional connections between java.net and the JUG.

Anyway, happy Seventh Anniversary, CEJUG! I wish you all a fun celebration on September 19!


In Java Today, James Gosling has a new blog post titled OMG - Alan Turing gets an apology!:

It's decades late, but a lovely gesture none-the-less: Gordon Brown, the Prime Minister of Britain has formally apologized for the treatment of Alan Turing. It's hard to overstate his impact on the latter half of the 20th century, and the discipline of computer science in particular. Think of what your life would have been like without him: a longer and more devastating second world war; and the development of computers delayed by many years. How much better could the world have been if his life had not been cut short by thoughtless intolerance? ...

CEJUG Leader Hildeberto Mendonca recently announced the CEJUG's upcoming 7th anniversary celebration:

We are very glad to announce here CEJUG's 7th Anniversary. It is supposed to be one of the biggest JUG's conference in Brazil thanks to the entrepreneurship of CEJUG's leaders and collaborators. In a very short period of time, we are doing a great job to make everything happen on September 19th, at FA7, a local university that provides great support for many of CEJUG's initiatives.

Unfortunately, all information are in Portuguese, but still interesting to share...

rout_debasish sent me a note about some java.net projects he owns. His MySQLExplorer andMyExplorer projects are building tools to make creating, using, and managing MySQL databases more convenient. Here's a summary of the projects from the owner:

MyExplorer is developed in two formats. 
  1. MySQL Explorer: GUI Based Swing Application
  2. MyExplorer: GUI Based Web Application MySQL Explorer and MyExplorer have almost same functionalities. Those functionalities are listed as follows: 
    1. MyExplorer is a GUI based Web Application for enabling the users to design the database for MySQL graphically..
    2. By the help of this application the user can easily create/delete/modify/insert/display the table content.
    3. The User can also use SQL Query Window to directly interact with the database tables.
    4. Another features are::- a. Query Generation i. For Every User Operation On The Database the Internal SQL Operation is generated in form of Query and displayed to the user.. b. Export/Import i. Exporting or Importing database structure and data in form of queries is performed graphically.. c. Generating Data Dictionary i. Data Dictionary of a database can be generated on selection of a particular database

Participants in this past week's poll expressed a variety of views over the feature list in the upcoming JDK 7. The overall tenor was a mix of indifference and disappointment, with a small group expressing enthusiasm.

A total of 485 votes were cast. The exact question and results were:

What's your reaction to the JDK 7 feature list?
  • 20% (99 votes) - I love it and can hardly wait
  • 29% (143 votes) - Some handy but insignificant features
  • 27% (133 votes) - Disappointed; when do we get JDK 8?
  • 13% (62 votes) - I don't care
  • 10% (48 votes) - Other

If you consider "Some handy but insignificant features" to represent a kind of indifference (i.e., "this won't significantly change my life"), then summing the three middle responses gives us an "indifference and disappointment" index of 69%. That's quite large. And it's possibly even larger, given that 10% of voters did not see an option that fits their reaction (so they selected "Other").

Soon after the poll was published, it received its first comment, from fabriziogiudici, who wished there was an option that was less positive than "I love it and can hardly wait" but more positive than "Some handy but insignificant features":

I understand that we can't have dozens of options for every poll, but please give us some more choice. I'm going to vote "I love it and can hardly wait", but it's far from my point of view. I'd have answered "it's a reasonable choice", but it won't change my way of working; still I can't vote "handy but insignificant" since it sounds pretty negative (while my feedback is positive).

That's a valid point, another option between those two would have been good.

mrmorris, who submitted the poll, responded to Fabrizio's comment, noting that "providing options with a sufficiently wide span is hard." I agree with that, too. In fact, I often think of response options that probably would have been good in a poll -- right after the poll is published! But there's no way to go back once the first vote has been cast.

Most of the other comments were expressions of disappointment over specific features that are not going to be in JDK 7.

As I mentioned, mrmorris (Casper Bang) submitted this poll. This is the first poll that was submitted by a member of the java.net community since I've been editor, and it clearly was a good one, drawing a lot of interest from the community (almost 500 votes is a lot of participation for a java.net poll). So, again, I thank Casper / mrmorris for submitting it.

I'd really like to see more polls created by the community. Surely you don't think I have unlimited creative powers for inventing interesting polls, do you? So, if you'd like to submit an idea for a java.net poll, please go to our Submit Content page, enter your idea, and select "Poll Question" on the "Please choose where you think this item should go on the homepage" pull-down. That will come directly to me.

New poll: where is Java most dominant?

This week's new poll asks "In which region does Java enjoy the greatest market share among competing technologies?" It seems to me that Java technology is more predominate in some regions of the world than it is in other regions. Now, none of us have personal experience with software engineering on every continent and subcontinent; but I think we may have a sense about which regions embrace Java solutions the most, compared with competing technologies. I do think there are global difference here, so in this poll I'm trying to see what the consensus view is.


In Java Today, Eloi Jr. writes about the Tranqueira project in his first java.net blog post, "Loans, loans and loans...":

It was a Sunday morning when finally I decided to organize some books that had been scattered in cartons for a long time. I wanted to put them on the bookshelf, when I saw three books that were not mine. I was surprised! Those books brought back memories when I was a boy in high school. I was remembering that I had borrowed those books a long time ago and never returned to their owner. Sure, the owner of the books forgot about loaning them to me. Can you imagine a book loaned for over 10 years? ...

Jan Haderka writes about the first ever Magnolia Conference:

So it has began ... the first Magnolia Conference ever. And as a good omen, the conference planned for up to 80 participants is completely sold out. Considering the credit crunch and everybody trying to save a money, this seems as a very good sign of the attention the product commands.

Bruce Hopkins has a new article on the Sun Developer Network, "Digital Signatures With the Java ME SATSA API":

Let's say that you were building a mobile application for a financial institution, but in order to secure the application, you had to choose between one of these options:

  • Guaranteed data confidentiality, with no way for a third party to read the contents of the messages

    or

  • Guaranteed user identity, with 99.999% assurance that the person that you're dealing with is who he says that he is

Which would you choose?


In today's Weblogs, Jean-Francois Arcand talks about Writing Comet Applications Using JRuby and the Atmosphere Framework

Writing Atmosphere's Comet based applications is simple. Imagine using JRuby instead of Java...it becomes really simple!. As with Scala, it is also possible to write Comet application with Atmosphere Framework using JRuby. http://n2.nabble.com/Iframe-streaming-with-Jruby-and-Atmosphere-tp3525131p3572901.html

Fabrizio Giudici advances his jrawio project with a New blog:

No, I'm not going to move - my blog stays here at Java.Net! But as the jrawio project evolves, getting for the first time some sustained feedback from users and developers (as well as code contributions, hurray!), it has got its own blog. Expect to find there stuff specific to Java image codecs, or functional testing with images and such.

Santiago Pericas-Geertsen talks about Mobility Platform Connectors in Glassfish ESB:

The Mobility Platform team has been working on a number of new features and enhancements since the release of GlassFish Mobility Platform v1.1 in February 2009. One of those features is the ability to run the Mobility Platform software on top of Glassfish ESB. There is a clear synergy between the Mobility Platform and Glassfish ESB. The former is about mobilizing the enterprise, while the latter is about integration of enterprise and legacy information systems. By running the Mobility Platform on top of Glassfish ESB, as opposed to just Glassfish, it is possible to write enterprise connectors that sit on the enterprise bus and can mobilize all sorts of information systems.

In the Forums,pouncilt is seeing a maven-jaxb2-plugin NullPointerException in ClasspathCatalogResolver: "Hello, I am getting a NullPointerException when I use the maven-jaxb2-plugin for version 0.6.1, 0.6.2, and 0.7.1. Based on the error message below does any one now why I am getting this error ..."

jezz asks about User Authentication in 0.5: "Does the 0.5 version support authentication using LDAP as it was in 0.4 ? In WonderlandMain.cfg , what does the following line indicate ??com.sun.sgs.app.authenticators=org.jdesktop.wonderland.server.auth.WebServiceAuthenticator..."

And tanww888 Can't start glassfish: "Hi, I tried to import a SSL certificate, but later found out the password was mismatch, so I deleted the keystore.jks and created a new one. Now, my glassfish is refused to start. Here are the error message ..."


Our current Spotlightis Terrence Barr's annoucement of 4 New Screencasts: LWUIT, JDTF, JSR 290, and JavaCard: "Our documentation team has put together four brand-new screencasts on current subjects. They are 5 minutes each in length and a great way to get introduced quickly to the highlights of each topic. I encourage you to have a look..."


The current java.net Poll asks "What's your reaction to the JDK 7 feature list?" Today (Thursday) is the last full day of voting.


Our Feature Articles include Jeff Lowery's new article A Finite State Machine Supporting Concurrent States, which demonstrates how Java enums and EnumSets can be used as a basis to define and validate application states and state transitions. We're also featuring Jeff Friesen's article Introducing Custom Paints to JavaFX, which shows how you can leverage undocumented JavaFX capabilities to support custom paints in JavaFX Version 1.2.


The latest Java Mobility Podcast is Java Mobility Podcast 86: Mobile Service Architecture 2: Introducing New Features in Mobile Devices: "Kay Glahn from Vodafone Group R&D and Erkki Rysa from Nokia share the new features in MSA2 in this abbreviated feature from JavaOne."


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.



We've just published Jeff Lowery's new article on developing finite state machines in Java. Jeff's article demonstrates how Java enums and EnumSets can be applied to define and validate states and state transitions.

Finite state machines (FSMs) are finding increasing application today. This type of modeling reminds me of my education in physics and chemistry, where a set of distinct potential states exist, and the physical universe toggles among those possibilities. The notion of "in between" doesn't really exist in such a universe. Yet, when you think of electrons jumping between energy states, or quantum mechanics -- you realize that the basis of much of our understanding of the physical universe relies on conceiving the micro-universe as being a kind of finite state machine.

Hence, the growing recognition of the validity of applying states and state transitions to a wide variety of practical problems does indeed make a lot of sense. The macro-scale universe reflects the finite state machine nature that appears to model the micro-scale universe well.

Jeff's article starts out with describing how a typical application can be understood as consisting of a set of states and transitions between those states:

A typical application will go through multiple states during a runtime session, e.g., RUNNING -> PAUSED -> RESTARTED, or (in the case of a data entry form) ENTER -> VALIDATE -> SAVE. The state transitions are initiated by runtime events, such as when a user presses an PAUSE button or hits the ENTER key after entering data in a field. The FSM determines what actions occur when an event is received, and the resulting state. The transition to a new state will invoke a change in the immediate or subsequent behavior of an application.

http://download.java.net/general/jn_images/01/EventFlow.jpg

Jeff goes on to further illustrate and demonstrate the principals of finite state machines and their applicability within applications through a "Bouncing Bomb" application. After describing how the code works for an initial application, Jeff goes on to describe how the application can be transformed to permit concurrent states:

Here's a question: When the application is still running, why not allow the user to set a configuration for the next run? The new configuration would then be ready for the next run when the current run ended. To enable that behavior, two states would have to be allowed to be active at once: RUNNING and CONFIGURING.

How might such concurrent states be handled? The first thing to change is the type of the currentState instance in theStateMachine. One approach is to use an EnumSet to hold both the primary and concurrent state enum values, and change the stateMap key to anEnumSet<State> and its values to an array of EnumSets.

Jeff Lowery's A Finite State Machine Supporting Concurrent States is an article I found interesting both from the point of view of the coding itself and the broader theoretical realm that the demonstration application addresses. Take a look and see what you think!


In Java Today, Stephen Colebourne provides some JDK 7 - Method suggestions:

There is lots of prior art in the field of general utility method libraries for Java. Perhaps the best known is Apache Commons Lang. Lets choose some methods (other than string utilities) that might be appropriate for the JDK from ObjectUtils.

1) Null-safe equals check...

Java Champion Dr. Heinz M. Kabutz talks about Creating Objects Without Calling Constructors:

A few months before disappearing amongst the sand dunes of Chania's beaches on my extended summer vacation, I was explaining to the students on my advanced Java course how deserialization worked. If the object is serializable, then it is created magicallywithout having the constructor called. If its parent class is not serializable, then the super class no-args constructor is invoked. For example, let's begin with a superclass that does not implement Serializable ...

Adam Bien (also a Java Champion, BTW) is taking Rethinking Java EE Best Practices - On the Road this week:

I'm already looking forward to the "Real World Java EE Patterns - Rethinking Best Practices" workshop in Zurich (organized by ch-open and JUGS) (already > 50 registrations). At September 10th (Thursday) I will introduce Xtreme Lightweight Architectures (XLAs) with Java EE 6 at JUG Dresden. So see you there - and please prepare some hard, disruptive and heretical questions to ask :-).

In today's Weblogs, Osvaldo Pinali Doederlein notes that JavaFX 1.2.1 is out, fixes binding leaks and performance

Sun just released the first maintenance update for JavaFX 1.2. This release brings mostly a batch of important javafxc fixes, that I dissect in this blog...

Java programmers are used to the fact that compilation of Java source code is a relatively straightforward process, because the Java language has a simple mapping to the Java bytecode. Sojavac is a trivial compiler, at least in the code generation phase...

Roger Kitain continues his series with Context And Dependency Injection (JSR 299) And Servlets:

I've had questions about how to inject Web Beans into servlets and whether that is supported. In this entry I'll outline a method of accomplishing just that.

This is a simple login application that communicates to a servlet using Ajax calls from a JSP view. I'm not going to focus on the view or the protocol (Ajax) that is used to communicate with the servlet. If you are interested in that, you can check out the source (instructions at the end of this post). I'm going to focus on the servlet code and the supporting classes for the application...

Felipe Gaucho asks Long or int to declare JPA numeric primary keys?:

I have just two arguments to avoid using long as type of the primary keys of JPA Entities:

  1. Integers IDs allow tables with ~2 billion records. Yes, you read well: max(Integer) = 2,147,483,647
  2. the JPA pagination methods only accepts Integers Query setFirstResult(int startPosition) an  Query setMaxResults(int maxResult)

In the Forums,robinthapa asks How to Use keyPressed events on MeenuScreen icons and navigate throug it?: "Dear All, I am using a GridLayout(3,3) and i have icons(images) on the meenuscreen. i also have two commands, exit and select. I want to use the keycode such as UP, DOWN, LEFT RIGHT and navigate through the images and make it..."

danthedixonman has a question about General frame rates in 0.5?: "Hi all. Just wondering what sort of frame rates people are getting when there are multiple avatars? We just tried our first meeting with 6 people and frame rates were dropping down to less than 10fps when they're normally around 16fps on my..."

And demonduck finds that Java 1.6.0.16 does not run on Vista 64 / IE 8: "When I first bought my Vista 64 machine, I thought that Java 1.6.0.16 was supporting IE8. I thought I saw it run Java applets in IE8. Now IE8 does not run Java applets. Does anyone have a clue about if and when SUN or..."


Our current Spotlightis Terrence Barr's annoucement of 4 New Screencasts: LWUIT, JDTF, JSR 290, and JavaCard: "Our documentation team has put together four brand-new screencasts on current subjects. They are 5 minutes each in length and a great way to get introduced quickly to the highlights of each topic. I encourage you to have a look..."


The current java.net Poll asks "What's your reaction to the JDK 7 feature list?" Today (Thursday) is the last full day of voting.


Our Feature Articles include Jeff Lowery's new article A Finite State Machine Supporting Concurrent States, which demonstrates how Java enums and EnumSets can be used as a basis to define and validate application states and state transitions. We're also featuring Jeff Friesen's article Introducing Custom Paints to JavaFX, which shows how you can leverage undocumented JavaFX capabilities to support custom paints in JavaFX Version 1.2.


The latest Java Mobility Podcast is Java Mobility Podcast 86: Mobile Service Architecture 2: Introducing New Features in Mobile Devices: "Kay Glahn from Vodafone Group R&D and Erkki Rysa from Nokia share the new features in MSA2 in this abbreviated feature from JavaOne."


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.



JavaZone 2009 gets underway today in Oslo, Norway. JavaZone is "Scandinavia's biggest meeting place for software developers, and one of Europe's most important." More than 2000 attendees are expected at this year's two-day conference.

peligri posted an introduction and overview to the conference yesterday. The GlassFish and Hudson communities will be represented on the presentation side of things:

like last year, Alexis will be there presenting on GlassFish v3 and this year Kohsuke will also attend to present on Hudson.

In all, the conference will include more than 100 presentations, on topics including Core Java; Java Frameworks; Embedded, Mobile and Gaming; Enterprise Architecture and Integration; Agile and Software Engineering; Alternative Languages; and Green IT.

In addition to the regular sessions, the conference will include about 35 lightning talks, each with a time limit of 10 minutes.

You can see the full agenda on the JavaZone 2009 agenda page. Hopefully Kohsuke and Alexis, and members of the java.net community who are attending the conference, will write about some of the more interesting sessions in upcoming days.


In Java Today, Toni Epple shows how you can "Simplify your life!" by simplifying NetBeans:

I've just returned from a training at skyguide in Geneva. We where invited there by a group of enthusiastic Java pros who are thinking about porting some of their applications to NetBeans. When teaching the NetBeans Platform some APIs are harder to understand for new users than others - especially the Nodes API, System FileSystem and Lookups. If you've been using these APIs for a while they actually seem very simple. So when it's hard to explain an API which is actually quite elegant and simple, there must be something wrong...

peligri provides an overview of JavaZone 2009 - GlassFish and Hudson:

JavaZone 2009 is this week, Sept 9-10th, at Oslo Spektrum. It looks like a nice venue, see Wikipedia and Bird's Eye, and they do all sorts of events, from Tom Jones toMuse.

Josh Marinacci announces JFXStudio Challenge Theme Revealed:

The theme for September’s challenge is: Time

Yep, Time. You can interpret this however you want. Calendars, time in a bottle, cosmic time, space time continuum. Even a totally rockin’ ELO album. Just remember: do something cool in 30 lines or 3000 characters, and no external libs (see the original post for full details).


In today's Weblogs, Jim Driscoll studiesEval JavaScript in a global context:

Even though it's considered bad practice, it's often handy to eval code in JavaScript. And in my case, it was simply necessary, since the JSF specification requires eval of scripts. And it's also necessary to execute those evaluated scripts in the global scope. It's not as easy as it first looks...

Fabrizio Giudici asks What's in a name(space)? That which we call a rose...:

Well, religious beliefs apart, I'm not a man of immutable mind. Indeed I believe that you *have to* change your mind when a proof demonstrates that there's something wrong with an idea (hey, I'm not saying that it's *easy* to make me change my mind, but this is another story...)...

Felipe Gaucho is working on A REST project with Glassfish:

I am working out a new pet project, an online system to support PUJ Competitions. It is still a work under progress and I plan to start to blog some technical results here, but until that glorious free time I would give you a glimpse about what is keeping my blog so quiet :) ...

In the Forums,dmitrid has an issue with JAXB: AttachmentUnmarshaller does not work at all with swaRef: "First of all, version: JAXB 2.1.11, I am not using JAX-WS, only JAXB. My type in the WSDL looks like this..."

sebete responds Re: Problem with KeyNavigator: "I think that what you can do is to read all events in a proccessEvents in your behavior, and add the influence of the keys, in a Vector, lets say, directionVector. This function will be called in the proccessStimulus() function."

And rjlanc responds Re: Rev 3488: "3491 may fix this but I am unable to test sufficiently since now get a new error. I saw some added models but was not able to right click on any of them to get the menu and properties. I was testing on my laptop with Vista as server and..."


Our current Spotlightis Terrence Barr's annoucement of 4 New Screencasts: LWUIT, JDTF, JSR 290, and JavaCard: "Our documentation team has put together four brand-new screencasts on current subjects. They are 5 minutes each in length and a great way to get introduced quickly to the highlights of each topic. I encourage you to have a look..."


The current java.net Poll asks "What's your reaction to the JDK 7 feature list?" Voting will be open through early next Friday.


Our Feature Articles include Jeff Friesen's article Introducing Custom Paints to JavaFX, which shows how you can leverage undocumented JavaFX capabilities to support custom paints in JavaFX Version 1.2. We're also featuring Biswajit Sarkar's Using the Payment API for Microcredit and Other Applications, which describes how to apply the Payment API (JSR 229) in JavaME applications.


The latest Java Mobility Podcast is Java Mobility Podcast 86: Mobile Service Architecture 2: Introducing New Features in Mobile Devices: "Kay Glahn from Vodafone Group R&D and Erkki Rysa from Nokia share the new features in MSA2 in this abbreviated feature from JavaOne."


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.



Joe Darcy has posted a very interesting blog on the similarities between his own experience as a Project Coin lead and what the leaders of the C++ standards team experienced as that language evolved. He titles his post "Project Coin: Solidarity with C++ Evolution". The use of the word "solidarity" reflects a team or band of soldiers who are under fire, perhaps significantly outnumbered, and facing attacks on multiple fronts. Indeed, if you've been following the reactions to the progress of Project Coin, in particular the reaction to the final list of JDK 7 features, it's easy to see how the Project Coin team would find justification and support in looking at what Bjarne Stroustrup and the C++ committees experienced (as stated in Bjarne's paper "Evolving a language in and for the real world: C++ 1991-2006").

Prior to reading that paper, the Project Coin team might recently have been asking themselves: "Is it us? Are we being unreasonable in some manner?" But Bjarne's experiences tell them "no, it's not you, this is just the nature of software language evolution, and community reactions to the necessities imposed by reality... you're the messenger, and they shoot you -- no matter what you do."

Here's a key quote Joe cites from Bjarne's paper:

As ever, there are far more proposals than the committee could handle or the language could absorb. As ever, even accepting all the good proposals is infeasible. As ever, there seems to be as many people claiming that the committee is spoiling the language by gratuitous complicated features as there are people who complain that the committee is killing the language by refusing to accept essential features. If you take away consistent overstatement of arguments, both sides have a fair degree of reason behind them. The balancing act facing the committee is distinctly nontrivial.

And what is Joe's reaction to this? An interesting presentation of the economics and politics of software language evolution:

Viewed over the long term, one goal to evolving a platform is trying maximize value delivered over time. This is analogous to a net present value-style consideration from economics. A feature delivered in the future is less valuable than having the feature today, but the value of choosing to do a feature needs to be weighed against the opportunity costs of doing something else instead. Developers are chronically optimistic and eager to deliver something sooner rather than later, especially when the next release vehicle may be in the relatively distant future. As previously indicated, I too would prefer to see additional language changes as part of Project Coin in JDK 7. However, given the available resources, overcommitting to a large set of features is not responsible; either the large set won't get done in the end, it won't get done well, or the schedule would slip — all of which lead to reduced value too.

I myself have a generally sympathetic view toward what Joe is expressing. It's always easy for non-decision-makers to loudly criticize those who have undertaken the task of trying to advance a platform, and do so in a balanced manner that accounts for the real-world limits of resources and time. What a software language committee faces is not all that different from what an elected leader of a nation faces at times. No matter what you do, for a significant segment of the populace, it's wrong -- and what's going wrong for your particular society is all your fault!

If you'd like to express your own reaction to the proposed final JDK 7 features list, our current java.net poll provides you with a fast and simple opportunity to do that. Voting will be open through Thursday.

Or, if you'd like, post a comment below, or post a comment to Joe's post.


In Java Today,superpat announces OpenSSO Express Build 8 Released":

As I just reported in a little more detail over at Superpatterns, we released OpenSSO Express Build 8 yesterday, including features such as our new One Time Password feature, the Fedlet for .Net and a new task flow for enabling single sign-on to Salesforce.com.

Joe Darcy points out some similarities in the history of Java and C++ in Project Coin: Solidarity with C++ Evolution:

Recently I read with interest Bjarne Stroustrup's HOPL III paperEvolving a language in and for the real world: C++ 1991-2006. Despite the numerous technical differences between Java and C++, I was struck by some of the similarities in community involvement and expectations in the evolution of both languages. Selected excerpts from the paper are in block quotes below...

Simon Brocklehurst is seeking a few seconds of your time, to help with "Testing JavaFX Applet Deployment":

With the release of version 1.2, the JavaFX platform is starting to become a viable choice for developing real-world, browser-based rich internet applications (RIAs). However, there are questions to be asked about deployment. In particular, it's important to know what are the chances that people will actually be able to use a JavaFX app without having problems getting it to run.

In order to begin to answer this, I'd really appreciate your help in running a little test...


In today's Weblogs, Roger Kitain writes about Contexts and Dependency Injection (JSR 299) and GlassFish:

Version 1.0.0.PREVIEW3 of Web Beans (the implementation for JSR 299Contexts and Dependency Injection For Java EE) now uses the annotations from JSR 330 (Dependency Injection For Java) and it is available in GlassFish V3. In this entry, we'll look at a simple JSF 2 application that uses Web Beans and the JSR 330 annotations. There are other features available in this release of Web Beans which will be discussed in subsequent blog entries.

Masoud Kalali asks So you want to develop a rich client application on top of NetBeans RCP?:

I was involved with development of a RCP application based on NetBeans platform and now I find few minutes to share some of the experience with you.

All standard coding and best practices are applicable here. Use project management systems like Trac or any project management system that you know. Never start a project without a project management system. Use coding standard, unit testing, desing and implementation documents versioning, design discussion sessions and so on.

Sahoo describes Using a REST Console to administer OSGi runtime in GlassFish:

What are our options to administer OSGi runtime in GlassFish? We have already talked about

a) a command line tool, and

b) a web console.

We now have a third option. Recently I came across a RESTbased console being developed by Filippo Diotalevi. We already have all the necessary support in GlassFish - the REST console requires OSGi/HTTP Service and we have an implementation of the same in GlassFish. So,  I thought I would give it a try and I found it a smooth ride.


In the Forums,p3p0 wants to Connect to multiple databases with Glassfish v3: "Hi friends. How do I can connect to more than one database in the same EJB? I need to take some values from database A then after some process update in database B, update database C too and finally update in database A. Databases B..."

vkpandit is seeing a class not found exception in axis2: "I am using Axis2.1.5 and axis 2 eclipse plugin for service generator. I am including all the jar files for the imported classes for the creation of the aar file and deploying the aar file in axis2. However, I get a Class Not Found Exception at..."

And sebete asks about Text2d with non-standard font: "Hi, here i'm again. I was thinking about using some non-standard fonts in my project, adding my ttf as a resource in my .jar. But when i tryed to construct my Text2d I realised that Text2d constructor only take the name of the font, and nothing..."


Our current Spotlightis Terrence Barr's annoucement of 4 New Screencasts: LWUIT, JDTF, JSR 290, and JavaCard: "Our documentation team has put together four brand-new screencasts on current subjects. They are 5 minutes each in length and a great way to get introduced quickly to the highlights of each topic. I encourage you to have a look..."


The current java.net Poll asks "What's your reaction to the JDK 7 feature list?" Voting will be open through early next Friday.


Our Feature Articles include Jeff Friesen's article Introducing Custom Paints to JavaFX, which shows how you can leverage undocumented JavaFX capabilities to support custom paints in JavaFX Version 1.2. We're also featuring Biswajit Sarkar's Using the Payment API for Microcredit and Other Applications, which describes how to apply the Payment API (JSR 229) in JavaME applications.


The latest Java Mobility Podcast is Java Mobility Podcast 86: Mobile Service Architecture 2: Introducing New Features in Mobile Devices: "Kay Glahn from Vodafone Group R&D and Erkki Rysa from Nokia share the new features in MSA2 in this abbreviated feature from JavaOne."


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.



Terrence Barr announced the availability of four brand-new screencasts on current subjects in this week'sjava.net Spotlight. The screencasts, which are about five minutes long, provide introductions to LWUIT (Lightweight User Interface Toolkit), JDTF (Java Device Test Framework), JSR 290 (Java Language & XML User Interface Markup Integration), and Java Card.

The LWUIT screencast, titled Do It With LWUIT (LWUIT rhymes with "do it"), provides an introduction to the toolkit that's suitable for developers who may have heard of LWUIT but don't know much in detail about it. For example, LWUIT is an open source project that is hosted on java.net. It's licensed under GPL v2 with the classpath exception. It's built on MIDP 2.0 on top of Canvas. LWUIT is in part a response to the iPhone. LWUIT offers developers the capability to develop rich mobile user interfaces on a broad spectrum of devices. If you know Swing, getting going with LWUIT development is straightforward. Touchscreen support is included. The screencast closes with comparisons between LWUIT and JavaFX.

The Java Device Test Framework screencast introduces JDTF, which is a test harness that provides testing capability on JavaME devices. The screencast provides instruction on how to install, set up, and use JDTF. JDTF is also an open source project hosted on java.net. JDTF includes a NetBeans plugin that provides for convenient JDTF test development within the NetBeans environment.

The JSR 290 screencast, which runs just under 4 minutes, talks about the new XML UI capabilities provided by the specification. For example, JSR 290 provides support for, at minimum:

  • XHTML Basic 1.1
  • ECMAScript CP
  • CSS MP 2.0
  • SVG Tiny 1.2
  • XHR
  • DOM

The screencast describes how the API interacts with XHTML, DOM elements, etc., to render fluid graphics on a mobile device screen. See the JCP's JSR 290 page for details on the specification.

The Java Card Platform screencast introduces Java Card, which represents more than 90% of all mobile phone SIMs in the US and EMEA. This screencast has much more of a marketing feel to it than the others, but it still includes useful information if you'd like to learn some basics about the Java Card platform. Visit the Java Card home page for additional details.


In Java Today, Java Champion Adam Bien details Why Oracle Should Continue to Push NetBeans:

Oracle pushes JDeveloper and Sun NetBeans. Because Oracle is about to buy Sun, only one of the IDEs will be officially supported in long term. From strategic point of view, NetBeans would be the better choice:

  1. Footprint: Netbeans 6.7.1 download (with Java EE support and 2 Glassfish versions) is 158 MB big. JDeveloper comes with about 1 GB. The initial footprint is really important for adoption.
  2. Adoption: Netbeans became very popular. In this poll, from 2,753 voters, 1,191 voted for NetBeans, 1,340 for Eclipse, but only 39 for JDeveloper (plain text editor got 103 votes :-))...

peligri points us to Alexis Moussine-Pouchkine's post Let GlassFish update itself (v3 preview refresh). Alexis tells us:

If you were a little scared to switch your preferred repository from "stable" to "dev" as explained in my previous entry, you now have the ability to simply update your GlassFish v3 Preview installed image as we've just pushed out an update to the GlassFish stable repositories (both for the Java EE SDK and for GlassFish). See Abhijit's announcement . We carried out more tests than for typical promoted releases posted on the "dev" repository to allow people to upgrade their 3-month old GlassFish v3 release...

Kohsuke Kawaguchi hopes to See you at JavaZone:

I'll be leaving the bay area on Monday to give a talk about Hudson in JavaZone 2009. The talk will include both the general introduction of Hudson, as well as some of the advanced topics. Europe has a lot of Hudson adoptions (possibly better than in the U.S.), so I'm hoping to meet with many of Hudson users and developers there...

In today's Weblogs, Fabrizio Giudici provides a tip in Renaming a commit with Mercurial before pushing:

A quick and short tip for Mercurial, just an excuse for testing Scribefire with the new Java.Net platform.

You have previously seen my posts praising the possibility of working in asynchronous fashion with Mercurial. In short, you can commit while disconnected, and push a batch of commits when you're connected again.

Ed Burns provides instruction on Dealing Gracefully with ViewExpiredException in JSF2:

My previous entry dove under the covers for JSF 2.0 and examined composite component metadata. This one is far less esoteric and shows how to handle the ViewExpiredException using a new JSF feature, the ExceptionHandler, contributed byPete Muir a JSF Expert Group representative from JBoss....

And Jim Driscoll writes about Bridging to Open Ajax:

The Open Ajax Alliance is a standards organization with the mission of ensuring interoperability within Web based Ajaxified applications. One of their standards relates to intercomponent communication - the ability to subscribe and publish messages which can then be picked up by code written by other authors...

In the Forums,thorsten_s posted Blackberry implementation: "To whom it may concern, I have been working on a Blackberry implementation that could be used as an alternative to the default MIDP GameCanvas implementation. I know that the default implementation does work fine on a Blackberry...."

kaplanj responded Re: Web Admin security: "Do you get that exception after you change the rest of the server to use authentication? If you enable security, you will need to set a username and password for the SAS provider. You do this in the same way as you do for the Darkstar server (using..."

And robovanbasten asks about an LWUIT List memory leak?: "Hi All, Has anyone else noticed a memory leak when using the LWUIT List (release 20081222)? Using the WTK or S40_5th_Edition emulator I've noticed the memory is being eaten away when my app is idle and showing a List. Any help would be much..."


Our current Spotlightis Terrence Barr's annoucement of 4 New Screencasts: LWUIT, JDTF, JSR 290, and JavaCard: "Our documentation team has put together four brand-new screencasts on current subjects. They are 5 minutes each in length and a great way to get introduced quickly to the highlights of each topic. I encourage you to have a look..."


The current java.net Poll asks "What's your reaction to the JDK 7 feature list?" Voting will be open through early next Friday.


Our Feature Articles include Jeff Friesen's article Introducing Custom Paints to JavaFX, which shows how you can leverage undocumented JavaFX capabilities to support custom paints in JavaFX Version 1.2. We're also featuring Biswajit Sarkar's Using the Payment API for Microcredit and Other Applications, which describes how to apply the Payment API (JSR 229) in JavaME applications.


The latest Java Mobility Podcast is Java Mobility Podcast 86: Mobile Service Architecture 2: Introducing New Features in Mobile Devices: "Kay Glahn from Vodafone Group R&D and Erkki Rysa from Nokia share the new features in MSA2 in this abbreviated feature from JavaOne."


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.



The results of this past week's poll indicate that people who regularly visit the java.net home page spend most of their time on java.net reading content (blogs and articles). The actual poll question and results were:

Which aspect of java.net occupies the most of your time?

  • 18% (31 votes) - Projects
  • 2% (4 votes) - Communities
  • 5% (9 votes) - Forums
  • 69% (117 votes) - Content (blogs and articles)
  • 5% (9 votes) - Other

This outcome actually surprised me quite a bit. I expected projects to attract the most votes. But, it could be that many people who spend most of their time working on projects don't visit the java.net home page often, and instead go directly to the project pages. If that's the case, then those people probably wouldn't normally participate in our polls.

There is good news for the people who spend most of their time on java.net reading blogs and articles. Things are finally starting to settle down with respect to our new underlying CMS infrastructure. java.net bloggers are becoming more comfortable with the new platform, and people are resuming their normal blogging activities. So, you won't be seeing as many blog posts by me pointing you to interesting blogs I follow elsewhere. Instead, our own java.net community will be filling the "Weblogs" section on the front page, as is normally the case.

The other good news is that, after about a month of hiatus, I'll be getting back to publishing articles again. We've got quite a large queue of articles and interviews just waiting for me to give them some time. Now that is going to happen. You'll see the first new article by early next week.

New poll: what's your reaction to the JDK 7 feature list?

The new poll lets you describe your reaction to the JDK 7 feature list. I wrote about the final feature list this past Tuesday. See Joe Darcy's Project Coin: The Final Five (Or So) for additional details. And register your reaction by votingin the poll. Voting will be open until a new poll is posted next Friday.

Just a note: the new poll was submitted by Casper Bang. So, I'd like to publicly thank him for coming up with an excellent and timely follow-on to our earlier poll on JDK 7. At the time of that poll, the specific features that will be included in JDK 7 had not been finalized. Now that the list is out, it's a perfect time get people's reassessed view of the JDK.

If you have an idea for a java.net poll, please submit it using the java.net Submit Content form. Select "Poll Question" on the "Please choose where you think this item should go on the homepage" pull-down.


In Java Today, Joseph Darcy posted "Java Posse #277 Feedback: Not a view from an ivory tower":

The entry below is a slightly edited copy of a message I used to start a new thread on the Java Posse's Google Group, largely in response to comments make by Dick Wall in the first twenty minutes of episode #277 of the Java Posse podcast.

Terrence Barr invites developers to "Join me at OSiM World and WIPJAM, Sept. 15/16, Amsterdam":

WIPJAM has become a fixture on the conference circuit ... if you've never been to one of these then this is your chance to experience it. What is WIPJAM@OSiM, you ask? Find out all about it here - and be sure to register! I'm looking forward to it and I hope to see you there! ...

And John Smart announces "BDD, Easyb and JDave at the Canberra JUG meeting next week": "

I am absolutely thrilled to anounce that I will be talking at the Canberra JUG meeting next week (on Wednesday, September 9, to be exact), about BDD in general, and Easyb and JDave in particular...

In today's Weblogs, Masoud Kalili talks about JPA and a First tier application performance problems:

Well, this is the second time I am using the new blogging platform of Java.net. This time it was much easier and with less hurdle. I want to write about JPA, performance, caching and related things. Though it wont be very well organized but it may come useful for new JPA developers. recently I have assigned a task to work on performance problems of a first tier application and further extend it...

Ramesh Parthasarathy provides SailFin Tips : Advanced Configuration:

Lots of fixes have gone into SailFin 2.0, some of these fixes are related to functionality whereas others are to improve performance. The changes sometimes required creation of new user configurable properties in order to extract the optimal-performance/desired-behavior depending on the users deployment. This article tries to explain some of the properties/attributes that were introduced...

And Jim Driscoll talks about writing a Busy status indicator with JSF 2:

I've had a few requests on how to write a busy status indicator - you know, the little spinning ball that's there while an Ajax call is active, and which goes away once the request is complete. So, I spent about two hours today, and did just that - including putting it into a component so it's reusable. As usual, it involved no Java, and only a minimal amount of JavaScript. First, I needed...

In the Forums,jchamberlain responds Re: Problems configuring a server-side CertStore: "kumar, Thanks for all the help. I figured out what was wrong on my end. I have no need to provide my own CertSelector, I just thought that I had to when I read the documentation. The project that I am using this for uses this endpoint as an..."

superpacko has an issue involving DnD using AWT: "HI, im trying a simple DnD program. Just a JLabel inside a JPanel that im trying to move around. Im able to move it, but once i make the first move when i try to move it again an error comes out, DnD in Progress... the weird thing is that the JLabel..."

And kaplanj responds Re: Is KMZ importor working: "No the java version shouldn't make a different, but I was just looking back at your post, and I see that you are using the dev5 version of Wonderland. There have been a ton of fixes to KMZ importing since then, so if you try a nightly build it should..."


In the current Spotlight, the java.net Java Communications Community announces that SIP Communicator now supports file transfers: "The SIP Communicator project is proud to announce that it now supports file transfer for most protocols supported by SIP Communicator. Starting from build 2002 SIP Communicator users would be able to share files via the XMPP, MSN, Yahoo! Messenger, ICQ and AIM protocols. You can download the application at http://download.sip-communicator.org This implementation is part of an effort funded by the NLnet foundation. However, early research on the subject started long ago and many have contributed."


The current java.net Poll asks "What's your reaction to the JDK 7 feature list?" Voting will be open through early next Friday.


Our Feature Articles include Jeff Friesen's article Introducing Custom Paints to JavaFX, which shows how you can leverage undocumented JavaFX capabilities to support custom paints in JavaFX Version 1.2. We're also featuring Biswajit Sarkar's Using the Payment API for Microcredit and Other Applications, which describes how to apply the Payment API (JSR 229) in JavaME applications.


The latest Java Mobility Podcast is Java Mobility Podcast 86: Mobile Service Architecture 2: Introducing New Features in Mobile Devices: "Kay Glahn from Vodafone Group R&D and Erkki Rysa from Nokia share the new features in MSA2 in this abbreviated feature from JavaOne."


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.



One of the things that make software engineering a challenging endeavor is the fact that many problems seem to have an almost innate ability to hide themselves from the view of any number of developers. "Why doesn't this work?" or "Why is this so slow?" are questions that have been asked as I have stared at code that I'm working on, or stared at code that another developer has asked me to look at. All seems fine as you gaze through the listing. But, in fact, all is not fine.

Java performance tuning expert Kirk Pepperdine is well aware of difficulty of tracking down performance issues. Yesterday he posted a Simple logging tip that can help developers detect a typically difficult to find performance issue that arises due to object creation.

Included in the list of latest places where I've seen object creation become a hinderance to performance was the Scala compiler and a few applications that have been aggressively logging activity. In the former case the problem was due to frequent resizing of the main symbol table. Hopefully the next version of the Scala compiler will fix that problem. The later case had to do with premature construction of debug messages.

Taking the second case: Kirk is saying that the attempt to provide the operations team (which is often the development team) with a rich set of diagnostic messages can itself cause performance problems. I've seen an example of logging causing problems in my own work at a data center recently. In this case, we have an Oracle database that is at the center of a complex system consisting of more than a dozen multiprocessor servers (mostly Solaris, some Fedora Linux). The interactions with the database at each step of the processing are so numerous that if we don't monitor things closely it's possible for a disk where Oracle outputs its logs to fill up. And we're not even asking Oracle to do an incredible amount of logging. The problem simply arises because so many steps along the processing chain interact with the database, and we need to be able to go to those logs if something goes wrong, because we'd need to manually re-do the processing if something failed along the way, and the Oracle logs are our best view into where in the processing something failed.

That's not a performance issue, per se, but it's an example of logging itself having the potential to create issues within an operational environment.

Kirk goes on to show how a particular, common style of logging can create performance problems:

Most logging looks something like...

log.debug( "Some tag " + variable.toString() + ", " + someMoreInformation);

The problem is that log.debug(String msg) causes all of the stuff in the brackets to be executed. Not only can this coding style create a significant number of object, it is very hard to detect and very time consuming to fix in an application of significant enough size.

He then goes on to provide a "simple trick and certainly not a new one" but one that he considers "worth mentioning again":

In the case of log messages there is an easy solution, wrap each call in an if statement that checks the current log level. If the log message will never get logged, there isn't any point in creating all of those extra objects. The overall improvements may vary but I've never found them to insignificant.

It's a useful technique that improves performance based on the fact that object creation is a relatively heavy task compared with the computational effort to check if the current message is of sufficient importance that it will in fact be output into the log.


In Java Today, Pavel Rozenblioum reviews the new book "Beginning Java EE 6 Platform with GlassFish 3":

Recently I had an opportunity to read Beginning Java EE 6 Platform with Glassfish 3 by Antonio Goncalves. The book has the subtitle "From Novice to Professional" and that's a pretty accurate description of the book. After reading it a person not familiar with Java EE, but familiar with Java SE should feel comfortable developing a small Java EE application...

Paul Ponec announces a "New high performance ORM for Java: Ujorm":

Let me to introduce a new open source ORMframework for Java called Ujorm. I have created the ORM solution especially for a rapid development of persistent layer, however the first performance tests show that some types of SELECT query are very fast in comparison to its competitors. Next features are: the type safe parameters in the query, small memory footprint and the minimum size of the entire solution...

Java Champion Kirk Pepperdine provides a Simple Logging Tip:

Each time I go into a round of preparing for course delivery I try to drop in information about any recurrent problem that I've run into. This time round the recurrent problem is object creation.

Included in the list of latest places where I've seen object creation become a hinderance to performance was the Scala compiler and a few applications that have been aggressively logging activity...


In today's Weblogs, Carla Mott informs us about the Latest functionality in GlassFish v3 logging: "This blog highlights some of the changes that are part of GlassFish v3 logging. Since Prelude I have added 3 asadmin commands related to logging. The new commands are..."

John Ferguson Smart writes about Automated Deployment with Maven - going the whole nine yards : "Last week I gave a talk at the Agile 2009 conference about automating the deployment process with tools such as Maven, Nexus Cargo, Liquibase and Hudson. Here is a brief description of the talk..."

And Ed Burns provides instruction on JSF2 Composite Component Metadata: "This ultra-quick blog entry shows how to use the JSF runtime to access metadata for a composite component. Note that most of the metadata is optional when creating a composite component, therefore, this entry will be of interest to tool vendors and those wishing to write composite components that stand a chance of showing up nicely in tools..."


In the Forums,suneelkumar85 responds Re: Sending/Receiving SMS to SMPPSim: "m also doing same task wat u have done.. modify the code.. here they r using 0020 specific destination address but i want to more destination nmbers then the reply from the G-talk can be go to that mobile numbers.. so..."

suneelkumar85 also continues the conversation in Re: Mobicents Diameter v1.0.1.GA Released!: "Mendon

Josh Marinacci has announced a new JFXStudio Challenge: Small is the New Big. JavaFX developers will have from September 8 through September 30 to develop an interesting application in 30 or fewer lines of code (3000 characters maximum), all contained in a single JavaFX file.

Josh announced the contest on August 31, to give people time to "play around with different ways of building compact code.

On the 8th we will announce the secret theme so you can begin coding... The deadline for entries is the 30th of September, and we will announce the winners a week later. The prize will again be a 20$ gift certificate to Amazon and a badge to put on your website.

Here are the specific programming rules for submitted applications:

The 30 lines will be counted by actual lines or by 3000 characters, you're choice (please try not to have lines a 1000 columns wide :) You can have as many classes as you want but only one file. You can't use any 3rd party libraries, but you can load resources (images, videos, music) from the internet. You must submit your code by pasting the 20 lines of code in an email to joshua.marinacci@sun.com with the subject: JFXStudio Challenge: Small is the New Big

Josh provides an example demo application that potential contestants can run and study.

So, 30 lines of code in 23 days? Sounds easy, right? Just a little over a line a day is all it will take. And it's potentially paid work, too!

Seriously, the Small is the New Big JFXStudio Challenge sounds like a lot of fun. I look forward to seeing the winning and runner-up entries in early October.


In Java Today, Vikash Ranjan talks about Java Performance Tuning, Profiling, and Memory Management:

"Java application performance is an abstract word until you face its real implications. It may vary depending on your interpretation of the word 'performance'. This article is meant to give the developer a perspective of the various aspects of the JVM internals, the controls and switches that can be altered to optimal effects that suit your application. There is no single size that can fits all. You need to customize to suit your application..."

Chris Watts writes about JSF Application Level Access Control:

"After trying to work out how to do generically, or at least easily configurable, I wrote a handy little tool for JSF which allows you to perform security control similar to how you can in the web.xml using security-constraint tags but allowing for application level authentication. The trick is to use a PhaseListener, listening to the RESTORE_VIEW phase and checking the viewId in the afterPhase()..."

Josh Marinacci announces the next JFXStudio Challenge: Small is the New Big:

"With JavaFX 1.2 out the door and the summer almost over we thought it was high time to have another coding challenge. This time we are going to try something different. Harkening back to the demo scene of old, this month's challenge is to build something interesting with a very small amount of code: 30 lines in a single file! I bet with liberal use of bind and recursion you'll create something fantastic..."

In today's Weblogs, Shai Almog posted "Great Looking Flickr Viewer Demo": "A J2ME Developer just wrote to me with this really great looking demo of using LWUIT to communicate with flickr. The demo shows off lots of the ways in which LWUIT can be easily customized, backgrounds, transitions, theme and menu are all very easy to customize..."

At the Aquarium, P G Binod has posted "GlassFish Plugin For Eclipse: Improved SIP Support": "There are multiple IDE options for developing sip servlet applications in sailfin. Netbeans plugin is available for SIP Servlet development and for full fledged IMS service creation environment, Ericsson SDS can be used..."

And Jim Driscoll talks about Inline Scripts with Mojarra: "A few weeks ago, I blogged about ways to execute scripts on the client which you were writing out from the server via Ajax.  By popular demand, the latest build of Mojarra now allows execution of inline scripts..."


In the Forums,gyorke responds Re: EclipseLink issue: "This is usually a web.xml version issue. Make sure your header in the web.xml file says version 2.5..."

matty_x responds Re: Information needed: How to launch X11 apps: "Deron, many thanks for the write up. This cleared up many questions. A few additions to the how-to for clarity: For step 7, the remote.runner.properties should be on the remote server (not on the main WL server) What I..."

And derek_white responds Re: Squawk on a Spartan 3E FPGA: "Checkout the squawk_native branch, and set the build properties to PLATFORM_TYPE=NATIVE. You will need to add some specialized code for your platform in the builder, cldc, and vmcore modules. Search for the vxworks specialized code for examples."


In the current Spotlight, the java.net Java Communications Community announces that SIP Communicator now supports file transfers: "The SIP Communicator project is proud to announce that it now supports file transfer for most protocols supported by SIP Communicator. Starting from build 2002 SIP Communicator users would be able to share files via the XMPP, MSN, Yahoo! Messenger, ICQ and AIM protocols. You can download the application at http://download.sip-communicator.org This implementation is part of an effort funded by the NLnet foundation. However, early research on the subject started long ago and many have contributed."


The current java.net Poll poll asks "Which aspect of java.net occupies the most of your time?"Voting will be open through early Friday.


Our Feature Articles include Jeff Friesen's article Introducing Custom Paints to JavaFX, which shows how you can leverage undocumented JavaFX capabilities to support custom paints in JavaFX Version 1.2. We're also featuring Biswajit Sarkar's Using the Payment API for Microcredit and Other Applications, which describes how to apply the Payment API (JSR 229) in JavaME applications.


The latest Java Mobility Podcast is Java Mobility Podcast 86: Mobile Service Architecture 2: Introducing New Features in Mobile Devices: "Kay Glahn from Vodafone Group R&D and Erkki Rysa from Nokia share the new features in MSA2 in this abbreviated feature from JavaOne."


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.



Shai Almog posted "Great Looking Flickr Viewer Demo": "A J2ME Developer just wrote to me with this really great looking demo of using LWUIT to communicate with flickr. The demo shows off lots of the ways in which LWUIT can be easily customized, backgrounds, transitions, theme and menu are all very easy to customize..."  
At the Aquarium, P G Binod has posted "GlassFish Plugin For Eclipse: Improved SIP Support": "There are multiple IDE options for developing sip servlet applications in sailfin. Netbeans plugin is available for SIP Servlet development and for full fledged IMS service creation environment, Ericsson SDS can be used..."  

Filter Blog

By date: