Skip navigation
1 41 42 43 44 45 Previous Next

editor

1,645 posts

In The Developer Insight Series, Part 2: Code Talk, Janice J. Heissinterviews five distinguished developers on the topic of developing good code. Last week I reviewed the first installment in the series, where developers are advised to "write dumb code"--that is, code that is sufficiently straightforward so that the compiler can "understand" the code sufficiently to do a good job in optimizing it.

In Part 2 of the series, Google chief Java architect Joshua Bloch and Sun software engineering manager Masood Mortazavi elaborate on this theme. Meanwhile, virtual reality pioneer Jaron Lanier and Grid Dynamics CEO Victoria Livshitz believe there are better ways to create code than how we do it today. And debugging ace Brian Harry talks about the benefits of an historical perspective in fixing bugs.

Joshua Bloch warns developers to beware of unwarranted optimism:

To be a software developer, you have to be an optimist -- otherwise, it would feel like a losing battle. Generally, this is a good thing, but it has a downside: Optimism can lead to overconfidence. It's easy to feel like the general warnings about premature optimization don't apply to you, because you just know which code is time-critical and how to make it fast. But no one can determine this without measuring before and after each attempted optimization.

Masood Mortazavi talks about how the best code makes the least assumptions:

For the logician, thinking of programs as a structure of predicates with bound and free variables can be very helpful. What's called a good "method" in Java, or "function" in other, traditional programming languages, is one that avoids local variables, which only serve for internal bookkeeping. The more internal bookkeeping we do, the more verbose our program becomes, which means the code will begin demanding that we break it up into more classes and methods.

For Jaron Lanier, the way we think about software is wrong:

The problem with software is that we've never learned how to control the side effects of choices, which we call bugs. We shouldn't be complacent about that. I still believe that there are ideas waiting to be created and that someday we will have new ways of writing software that will overcome these problems. And that's my principal professional interest. I want to make a contribution to making bugs go away.

Victoria Livschitz believes the solution may lie in a programming language that is a notch richer than OO:

I don't believe that future advances in software engineering will prevent developers from making mistakes that lead to design bugs. Over time, any successful software evolves to address new requirements. A piece of code that behaved appropriately in previous versions suddenly turns out to have deficiencies -- or bugs. That's OK! The reality of the program domain has changed, so the program must change too. A bug is simply a manifestation of the newly discovered misalignment. It must be expected to happen, really! From that vantage point, it's not the prevention of bugs but the recovery -- the ability to gracefully exterminate them -- that counts.

Brian Harry advises in fixing bugs, look at earlier versions of the plaform:

if you're doing a Java code fix, don't just look at the current version of the platform. I've routinely tested out bug tests on 4.0, 5.0, and 6 to investigate when a problem started and stopped. See if you can find why something started. My "uninitialized" problem has roots in the verifier spec. JDK bugs will have roots in some historical moment. Getting a bigger picture may provide clues about the design factors that led to the bug.

Once again, Janice Heiss has put together an interesting and thought-provoking set of interviews with developers who have been around long enough to really know what they're talking about. It's probably no surprise, though, that even among these much experienced and highly successful software development professionals, there is a variety of opinions on the past, present, and future of software engineering.


The latest Java Mobility Podcast is Java Mobility Podcast 77: Java and Symbian OS, in which Roy Ben Hayun talks about applying Java ME on the Symbian OS.


In Java Today,JavaTools Community Newsletter - Issue 195 has been published: "A new edition of the newsletter is available, with news, new projects and tips! If you want to receive the newsletter by email, please subscribe the announcements mailing list - or read the current issue here."

Vikram Goyal published a new Mobility Tech Tiprelated to JSR 179, titled Using the Location API for Favorite Spots: "Developing location-aware applications seems like a lot of work, especially since getting started seems to be the hardest part. In this tech tip, I will show you how to get started using the Location API (JSR 179) to get over the initial hurdle, and build a small location-aware application that you can use to tag your favorite spots. I have tested and verified that the MIDlet works on a Nokia N95 device. When testing this on your device, make sure that it supports the Location API (JSR 179)."

And Josh Marinacci has come up with a JavaFX overlay that lets you Right Click to View Source: "One of the criticisms of many RIA technologies is the lack of a right click menu which lets you view the source of the app. But it doesn't have to be that way. It's a tad bit more work than regular webpages, but you can add a view source menu to your own application very easily with just a single class and an ant task."


In today's Weblogs, Lance Andersen published Getting started with Mercurial and OpenJDK on Solaris: "A gentle guide to getting started with OpenJDK and Mercurial on Solaris. As I am about ready to start checking in some bug fixes and enhancements to the JDBC and RowSet code in Java SE, i figured i should finally spend some time configuring my Solaris 10 box forMercurial..."

Osvaldo Pinali Doederlein reports JDK 6u14 almost ready at b05; Making Java load faster and lighter: "A new build (possibly RC? FCS is scheduled for May) of the next JDK is available. A relatively small number of fixes this time, nothing major. But I reviewed the last builds and tested the improvements for loading time. As a bonus, some musings about Java's loading time and resource usage..."

And in JavaFX finally peaks my interest Dominic Da Silva writes about his new understanding of JavaFX: "So I headed to the Orlando JUG meeting tonight for a talk by Jim Clarke on JavaFX. Needless to say I was impressed with not only the JavaFX language and what Jim was able to do in the short space of time of 2 hours. The kicker for me was being able to drag an in-browser JavaFX applet out of the browser and have it run standalone on the desktop, in its on JVM sandbox, even after the browser is closed..."


This week's java.net Poll asks "Which aspect of Java technology is the primary focus your current work efforts?" Voting is open through Thursday, April 30.


This week's Spotlightis The Developer Insight Series, Part 2: Code Talk, in which Janice J. Heiss asks renowned developers about the keys to writing good code: "In Part Two, we hear code advice from five distinguished developers: Joshua Bloch and Masood Mortazavi echo Goetz's advice to keep code simple. Jaron Lanier and Victoria Livschitz want to radically change the way code is created. And renowned bug fixer Brian Harry provides tips on bug fixing while emphasizing what the process can teach us."


In the Forums, Mark Mielke poses the question Dependency injection - when to clean up injected resources?: "This feels like a newbie question - but it seems like this is a friendly group, and I've read through all of the specs and faqs and plenty of examples and I have been unable to find a solid answer here. Most examples of dependency injection do not clean up the injected resources. Whether DataSource, EntityManager, or EJB. The resource is injected, it is used, and resources allocated from it (like a Connection from a DataSource) are cleaned up, but the injected resource itself is not cleaned up. My assumption has been that these resources are safe to leave around. That is, they're only taking up memory which is the job of the garbage collector to deal with. They're not tying up any resources. In some cases like EntityManager or a UserTransaction, the container will always clean up any non-memory references held after the business method returns when the transaction is committed or rolled back..."

ido_ran asks the community about Transaction Scope - Web Application with EJB Project: "Hello, I'm new to GlassFish and J2EE so I hope I'm asking it right. I have an enterprise application which contain Web module and EJB Module. The EJB is the business logic which contain entity classes as well as session (currently only stateless) bean which manage them. There is nothing to fancy here, mostly boilerplate code for creating, updating, getting and deleting the entities. The Web module is a RESTful interface to the EJB module. I have resource and converter (item-container pattern) which expose the entities. Everything is working good except of the transaction management (I think) and I'll explain. I'm experiencing two issues: one is I get an LazyInitializationException when accessing a collection of a loaded entity in the web module. For example, I'm loading Process entity which has collection (OneToMany relation) of Activity entity. When I call getActivities on the Process I get the exception. As I understand it means that the entity manager which was used to load the Process entity is close by now..."

And tmilard is having problems with Re: 1.6.0_14-ea regression issue on Double JVM launch: "Well I could see it because simply ... I have a console opening each time a JVM lauches. So when I had Update 14 installed I could see : - after a few seconds a JVM console opens up. - First line written was something likle "Java Plug-in 1.6.0_14" so I am quite sure it was an issue of update 14. - Then I drag the console a bit on the right of the screen ... just to be able to see if some other console shows up. - After the tests (too long by the way) of the difffferents jar server-client ..... tatam : A new console opens up then rus my program ... while the first one (on the right of the screen) slowly vanishes and closes. So voila, 2 VM it seems : One to check the jar, do the technicall things, read JNLP file and the second to (really) run my program..."


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 "The Developer Insight Series, Part 2: Code Talk", Janice J. Heiss interviews five distinguished developers on the topic of developing good code...  

This past week's java.net pollasked developers to select which of the Java technologies that are being highlighted at this year's JavaOne Conference is of greatest importance for the future of Java. Given the diversity of Java technologies, I'm sure the authors of the JavaOne Topics guide had a difficult time selecting names for collating the Java technologies, and surely there is overlap between the categories they came up with. Nonetheless, here are the categories, along with snippets of their definition of what technologies each category is intended to cover:

  • Rich Media Applications and Interactive Content: Making the three-screen vision of unified experiences across computer, TV and mobile device a reality; Use of Scripting languages and tools, such as JavaFX; Tru2way, Blu-ray Disc, and other GEM-based platforms.
  • Mobility: Core Java ME technologies; Java in wireless devices; related IDEs and emulators.
  • Services: SOA platform and middleware; Web 2.0, next generation web, and cloud services platforms; techniques to support scalability and availability.
  • Core Technologies: Java SE and Java for the Desktop; Java EE; Embedded / real-time / Java Card; customized tools; integration of new languages with the Java VM.

The results of the pollsurprised me. 310 votes were cast, with the following breakdown:

Which of the technologies highlighted at JavaOne 2009 is of greatest importance for the future of Java?

  • 39.0% (121 votes) - Rich Media Applications and Interactive Content
  • 38.7% (120 votes) - Core Technologies
  • 15.4% ( 48 votes) - Mobility
  • 4.8% ( 15 votes) - Services
  • 1.9% ( 6 votes) - Other

What surprised me was the relatively low vote totals for Mobility and Services. However, this could be in part due to the category overlaps. If you're working on applications for mobile and hand-held devices, you may also consider yourself to be working on rich media applications and interactive content, since today these types of applications are migrating to hand-held devices, they're no longer bound to the desktop. Likewise, if you're working on SOA and middleware, where scalability and high 9's availability are critical, you are certainly also working within the core technologies realm. In fact, I'd almost call "Services" an aspect of "Core Technologies"...

Oracle impact

With the Oracle news, there has been quite a lot of discussion and concern about the fate of Java platforms and technologies that are not Data Center centric--technologies like Jave ME and JavaFX. Indeed, a year ago I was editor for two of BEA's developer sites when Oracle acquired BEA. (Hmm.. does Oracle ask "Where is Kevin Farnham working?" in deciding which company to acquire next???).

Anyway, at BEA the focus was clearly on SOA and middleware. But if you go to the front page of the Oracle Technology Network you'll find a link to the Embedded Developer Center, where you see links to products like the Oracle Database Lite Client for Windows Mobile 6 and Symbian 9. Yes, you can connect to Oracle databases from your mobile device! Then, there's also the Berkeley DB Java Edition, and an article describing how to develop code for Berkeley DB Java Edition and Android 0.9 Beta.

So, it's not like Oracle wasn't already moving into the micro world. Clearly, an understanding of the importance and future role of micro devices connecting to core services was already there prior to the Sun acquisition news.

If you visit Oracle's Java Developer Center, you find this page heading:

Oracle has been a leading and enthusiastic supporter of Java since its emergence in 1995. Today, Oracle is deeply involved in the EJB 3.0/JPA and JSF specifications and more than 100 other JSRs, as well as open-source communities such as Eclipse,Spring,Glassfish, and Apache.

Further down the page, you see links to JavaServer Faces, Rich Enterprise Applications, and Developing for the iPhone with Oracle JDeveloper and ADF.

My point is: yes, Oracle is known for its rock-solid database, which clearly implies a Data Center focus. But, I don't think this is any reason for concern that aspects of Java that are not Data Center centric are going to be ignored or even EOL'd. Oracle is a company that thinks long-term, from what I've observed. If anything, I'd think one of the reasons behind the acquisition of Sun is to extend Oracle's reach, with solid, already-proven technology, into the micro realm and other areas where they previously had little or no reach (server hardware being the obvious one). I think Oracle's objective is to span the breadth of technology, from the Data Center all the way out to the hand-held device that queries and receives content from that Data Center. If they accomplish this, won't Oracle's reach actually out-extend that of both IBM and Microsoft?

Another way of thinking about this: look at the Google Trends graph for java me, java se, java ee. As of April 2009, the search volume for Java SE is nearly twice that of the search volume for Java ME, and the search volume for Java EE is about 75% of the volume for Java ME. You can't tell me that Oracle isn't aware of the extent of developer interest in Java ME!

Follow-on poll

Anyway, getting back to the poll: I found the last week's results interesting, so this week's poll is a kind of follow-on. Again using the JavaOne 2009 technology categories as the answers, it asks "Which aspect of Java technology is the primary focus of your current work efforts?" Do let us know!


The latest Java Mobility Podcast is Java Mobility Podcast 76: Sound of Motion, in which Vladimir Savchenko of Sound of Motion talks about their Java ME application that transforms their cycles into advanced cycling computer.


In Java Today, Danny Coward provides a JDK 7 update in JDK 7 watch: Milestone 3": "Even as The Planetarium was hearing all about its new landlord, it was good to see JDK 7 showing steady progress towards its milestones. The next one, M3, is going to be the JDK7 Preview release for JavaOne. With the inclusionof SDP, andearly sightings of SCTP, and ongoing work forward-portingJava SE 6u10 features into the JDK7 codebase, the next big thing to look out for this milestone will be the integration of JSR 292..."

Alexismp wrote about receiving More GlassFish v3 extensions from Jerome, Spring-flavored this time: "Applications using the Spring framework have always been able to run happily in GlassFish, be it v2 or v3. Now with GlassFish v3 approaching a final release, new opportunities are coming along. In a follow-up to last week's entry on managed OSGi bundles, GlassFish architect Jerome Dochez takes it a little further by implementing the GlassFish service using Spring beans and invoking it using a Java EE 6 webapp. All with no OSGi or Spring dependency whatsoever..."

And speaking of Spring, Jason Trump announced beet 1.4 beta 1 released - performance logging for Spring: "beet is a recently open-sourced library for logging performance metrics in a Spring-based Java application. Builders of Spring-based web or other multi-tier applications are the target audience. Beet's primary design goals are: 1. no code modification required for installation; 2. sensible default configuration; 3. strongly correlated performance event logging across application layers..."


In today's Weblogs, Kohsuke Kawaguchi announces that Hudson hits 1.300: "Hudson has reached version 1.300 last Friday. While it's not like this release is fundamentally different from any other past releases, it does feel like it is some kind of a milestone. The community continues to grow. We have around 1500 human-generated e-mails per month nowadays, with 7500/wk or so downloads of hudson.war..."

Terrence Barr posted Java ME Platform SDK 3.0 released ("Goodbye WTK, hello Java ME SDK", part 2): "A few days ago the final release of the Java ME Platform SDK 3.0 went live. This is a great new milestone for the most-widely used Java ME development toolkit, formerly known as the WTK (Sun Java Wireless Toolkit). The Java ME Platform SDK 3.0 sports redesigned underpinnings, improved device emulation, and a host of new features and improvements..."

And Marina Sum discovers a worthwhile video in How to Federate Google Apps for Single Sign-On With OpenSSO--Fast: "Sun's chief identity strategist Daniel Raskin has posted a three-minute video that steps you through the procedure of configuring OpenSSO for single sign-on to Google Apps. Be sure to first download Sun OpenSSO Express 7 and the Google Apps Starter Kit, as pointed out in the posting..."


This week's java.net Poll asks "Which aspect of Java technology is the primary focus your current work efforts?" Voting will be open through next Thursday, April 30.


This week's Spotlight, titled Java + You = Innovation, reminds us that JavaOne is just around the corner: "It's that time of year again. The 2009 JavaOne conferencetakes place at the Moscone Center in San Francisco from June 2-5 and is being sponsored by Intel (a Platinum sponsor), JBoss, and Sony Ericsson. This year's technical and Birds-of-a-Feather (BOF) sessions are organized around four topics: Rich Media Applications and Interactive Content; Mobility; Services; and Core Technologies. You can view information on all the sessions now and get a $200 discount on early bird registration until April 22."


In the Forums,boylejohnr responds to a question about a Re: Server Socket: "I do not think there is a way to exit the thread. However if interested for the JXTAServerPipe I have extended to remove the need for a thread. JXTA is rather wastefull of resources especially when trying to scale to thousands of peer groups. Every JXTAServer pipe also has three fixed executor threads, I consolidated to one static executor. Shutdown the executor in the super class. The code is a cludge, when get time would like to get more involved in JXTA to make more lightwieght and scalable. A lot of good work on the NIO integration, but higher up a bit wasteful. For instance a reliable retransmitter thread is required for every BIDI connection..."

hirowla describes a Problem making an outbound SSL connection from Glassfish to another server: "Hi, I'm having a problem making an outbound SSL connection to another system from an application running inside Glassfish. I'm running v2.1 Enterprise version (not the development one, which I believe is an important distinction). I'll paint the scenario. The remote site uses certificate "A", which is signed by party "B". Party "B" is an internal company CA, not somebody like Verisign. Using "certutil", I installed the public certificate for Party "B" in the main certificate database (as a "T,c,c" certificate). When I attempt to connect to the remote server, the connection fails - " unable to find valid certification path to requested target"... "

And gw1921 asks about LWUIT List Optimizations and Best practice?: "Hi, I'm fairly new to LWUIT and am loving it. I wish to develop an app for the latest high-end mobiles (HTC Touch, LG Arena etc) as these have fewer limitations on heap/memory etc but am unsure as to what I should do. Basically I need to know a few things: 1. I need to be able to put two list controls on the same screen. Is this possible? LCDUI only allowed a single List; 2. One of my list will display images per row. These images are PNGs that will be downloaded off the internet and stored on the device (possible the SD Card) and will range from 1kb to 9kb in size. Here's where the trouble is: there can be at least 300 rows in this list at any time (max)..."


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.



This past week's java.net poll asked developers to select which of the Java technologies that are being highlighted at this year's JavaOne Conference is of greatest importance for the future of Java...  
In a team-based software development environment, it has always been necessary to find the right balance between efficiency and clarity, between the clever and the readable. This is because software development entails two very important and very different types of productivity: that of the software itself (how much work gets done per millisecond or per CPU unit?), and that of the developers (how many hours are required for long-term maintain and enhancement of the software?).

 

Code that makes small processing efficiency gains at the cost of being difficult to maintain or enhance by future developers (or even by the original developer five years later) is more of a problem than a solution. The very clever eight lines that occupy an hour of a future developer's time for decoding its logic, are typically of less utility than 20 more straightforward lines. Perl is notorious (at least to me) for providing the capability for developer cleverness to go overboard in this way, enabling a piece of code to look more like an abstract puzzle than an encoding of a logical process into a symbolic language.

As it turns out, overly concise code that is difficult to understand for future developers can also present problems for compilers, resulting in a loss of processing efficiency, rather than a gain. Fewer lines or characters of source don't necessarily translate into fewer machine code steps.

This fact is clearly explained in the recent article The Developer Insight Series, Part 1: Write Dumb Code -- Advice from Four Leading Java Developers, written by Janice J. Heiss. In the article, Janice interviews Sun Technology Evangelist Brian Goetz and Java Champions Heinz Kabutz, Cay Horstmann, and Kirk Pepperdine.

Code readability is a key topic of discussion by the four experts--readability not only by humans, but also by compilers. Brian Goetz says:

Often, the way to write fast code in Java applications is to write dumb code -- code that is straightforward, clean, and follows the most obvious object-oriented principles. This has to do with the nature of dynamic compilers, which are big pattern-matching engines. Because compilers are written by humans who have schedules and time budgets, the compiler developers focus their efforts on the most common code patterns, because that's where they get the most leverage. So if you write code using straightforward object-oriented principles, you'll get better compiler optimization than if you write gnarly, hacked-up, bit-banging code that looks really clever but that the compiler can't optimize effectively.

Heinz Kabutz illustrates the tradeoffs between processing efficiency and code legibility by taking a single logical task (basic concatenation) and showing several different ways it can be coded. He then provides the benchmarking data for each example and discusses the advantages and disadvantages of that particular method. He warns against overly-clever coding:

In the early days of Java programming, I sometimes resorted to "clever" coding. For example, when I was optimizing a system written by a company in Germany, I changed the String addition to use StringBuffer after we had optimized the architecture and design of the system and wanted to improve things a bit. Don't read too much into microbenchmarks. Performance advantages come from good design and an appropriate architecture.

Cay Horstmann writes:

I learned over the years that it never pays to optimize code until after you profile. We all fret over caching values rather than recomputing them, eliminating layers, and so on. More often than not, it makes little difference in performance but introduces a huge headache in debugging.

Kirk Pepperdine sees writing dumb code and well-structured code as the two keys to performance and long-term maintainability:

While we write code to run on a machine, the primary consumers of code are humans. Dumb code tends to be more readable and hence more understandable. If we can iron out the twists, then we have a better chance of avoiding the dumb mistakes that clever code may hide from us...

... how does well-structured code help performance? Most performance problems can only be solved by adding or altering code in the application. I've found that if the code is well structured and loosely coupled, if the classes are cohesive, and the code uses delegation, I can avoid the whack-a-mole problem when I start to change code.

Even though I've been coding for nearly three decades, I foundThe Developer Insight Series, Part 1: Write Dumb Code -- Advice from Four Leading Java Developers interesting and enlightening. Writing overly-clever, unreadable code is surely a mistake junior developers are more apt to make than senior developers. But even senior developers and team leaders, caught up in the daily grind to meet the next release deadline, can easily forget that other consumer of their code--the compiler--and write code that is concise and clear to the experienced developer, which they believe is also sure to result in high processing efficiency; and yet the compiler, being a careful consumer and needing to account for all the possibilities with respect to how a processing thread may pass through that logic, won't reduce that source into maximally efficient byte-code.

Many thanks to Janice for coming up with the idea to do the interviews, and thanks to Brian and our Java Champions Heinz, Cay, and Kirk for providing their insight.

 


The latest Java Mobility Podcast is Java Mobility Podcast 76: Sound of Motion, in which Vladimir Savchenko of Sound of Motion talks about their Java ME application that transforms their cycles into advanced cycling computer.


In Java Today, Janice J. Heiss gathers advice that may sound surprising to some Java developers, in her article The Developer Insight Series, Part 1: Write Dumb Code -- Advice From Four Leading Java Developers: "Over the years, developers have talked about their favorite code, funniest code, most beautiful code, how to write code, how not to write code, the obstacles to writing good code, what they love and hate about writing code, the process of writing code, and so on. In the process, they have provided a lot of insight that is worth preserving. In the first of a multipart series, we begin with some general advice: Write dumb code..."

The Flying Saucer team announces the release of Flying Saucer XML/CSS Rendering Library R8: "We are proud to present our R8 release. This release includes no changes since R8 release candidate 2. We once again thank the people who contributed to this release. Features:ImageMapReplacedElementFactory.java: Sample for handling image maps, submitted via users mailing list by elbart0 at free.fr on March 5, 2008. This sample is a work-in-progress..."

And Paulo Moreira reviews the EJB 3.1 Proposed Final Draft in his article EJB 3.1 - A Significant Step Towards Maturity: "EJB 3.1 introduces a new set of features which intends to leverage the potential of the technology. It is, in my opinion, a release of major importance, which brings capabilities which were most wanted since long ago, making it more able to fulfill the needs of modern enterprise applications, and contributing for an increased adoption..."


In today's Weblogs, Jitendra Kotamraju writes about JAX-WS RI 2.1.7/Metro 1.5 Released: "Metro team is pleased to release JAX-WS RI 2.1.7/Metro 1.5. JAX-WS RI team is pleased to announce the release of 2.1.7 version. It is also included in Metro 1.5. There was no 2.1.6(pretty much 2.1.5) java.net release as it was primarily created for JDK 6u14. As most of the effort has been going into JAX-WS RI 2.2, this is a minor release. Some of the changes since 2.1.5 are..."

John Ferguson Smart writes about An introduction to easyb at Devoxx: "The easyb talk I gave at Devoxx in November is now available on Parleys. Most people would agree that testing your code is a good thing. And there is little doubt that modern Test-Driven development practices, when applied well, can produce high quality software that is reliable, flexible and easy to maintain. However, one of the big problems that often happens when developers adopt Test-Driven Development is that they concentrate so much on the tests that they lose focus on what they are actually meant to be testing..."

And Jean-Francois Arcand writes about Grizzly 2.0.0-M1 released! With extra: History of Grizzly: "Today we are releasing our first Grizzly 2.0 release, which we are working on since almost 2 years. Get ready for the revolution! But how this Grizzly things started? It has been years since I've jumped into the blogosphere and started talking about Grizzly. Officially, Grizzly started in 2004 when Vivek Nagar and I talked about NIO..."


This week's java.net Poll asks "Which of the technologies highlighted at JavaOne 2009 is of greatest importance for the future of Java?" Today is the last full day of voting on this poll.


This week's Spotlight, titled Java + You = Innovation, reminds us that JavaOne is just around the corner: "It's that time of year again. The 2009 JavaOne conferencetakes place at the Moscone Center in San Francisco from June 2-5 and is being sponsored by Intel (a Platinum sponsor), JBoss, and Sony Ericsson. This year's technical and Birds-of-a-Feather (BOF) sessions are organized around four topics: Rich Media Applications and Interactive Content; Mobility; Services; and Core Technologies. You can view information on all the sessions now and get a $200 discount on early bird registration until April 22."


In the Forums,glassola asks for help with a Prblm creating two separate/independent JMS queues?: "Dear forum readers, I have a problem configuring separate JMS queues in GlassFish. What I would like to accomplish is to set up two different queues, Queue1 and Queue2. In the GlassFish administration console I added two separate destination queues with separate Physical Destinations (I assume that different PD:s are a must to separate them?) and one Connection Factory. I've also created two very simple Message Driven Beans (MDB) in NetBeans 6.5.1 and a Session Bean to post messages to these two JMS queues. Each MDB just consumes the text message and prints the text on System.out i.e. in the GlassFish log. The problem is that even if I send to those two queues the message ends up in the first MDB which should be mapped only to the first queue..."

stratum Cannot add node agents to cluster: "HI all, Sorry if I am asking a lame question but I am trying it for almost a week all ready and cannot solve the issue. I have 2 Solaris boxes with 3 zones - two onto one machine and third onto second. I want to have the GF DAS working into one zone and two nodes onto other two zones. I am creating the node agent for DAS, creating instance for DAS but when I do the node agent for the nodes - I cannot start the node agent - getting this error:[#|2009-04-22T10:37:30.350+0100|SEVERE| ..."

And peterdelaney is having difficulty applying JNDI and Serializable objects: "Hello; I am implementing the LifecycleListener interface in an implementation class calledRuleServerLifecycleImpl. TheRuleServerLifecycleImpl will create an object calledRuleServer that will perform some remote messaging to a RV listener. The RV listener then publishes back to theRuleServer object. Once the application is up and running and the Client call into my application an EJB will be called which will then get a reference to theRuleServer bean via the JNDI tree and the EJB will call methods on the RuleServer object..."


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 team-based software development environment, it has always been necessary to find the right balance between efficiency and clarity, between the clever and the readable...  

Yesterday's Java Todayincluded Danny Coward's discussion about the benefits of the new Java ME SDK 3 release. Today I'm highlighting the Java ME SDK Team's formal announcement of the platform release.

The announcement includes a bit of history, quite useful for people who are new to Java technologies, or who are re-catching up with what's happened recently (like me):

Java ME SDK 3.0 is the successor to the popular Java Wireless Toolkit 2.5.2 and Java Toolkit 1.0 for CDC. It provides device emulation, a standalone development environment and a set of utilities for rapid development of Java ME applications.Users will get all-in-one for cldc/midp, cdc and BD-J development.

The primary new features include:

  • on-device deployment and on-device debugging
  • CLDC runtime based on PhoneME Feature
  • optimized MSA 1.1
  • new development environment based on Netbeans platform
  • integrated profiler and network monitor
  • lightweight UI Toolkit (LWUIT) support
  • device database WURFL search tool
  • BD-J support
  • Windows Mobile Java VM included

I have recently tended to believe that mobile applications might be the most important aspect of Java's future. Wondering what others think about this is what prompted this week's poll.

But the Oracle acquisition of Sun definitely brings the data center capabilities of Java to the fore. I've worked in a data center environment for a long time. We needed to guarantee a certain level of 9's, and to do so we went with techologies we considered highly reliable and capable of withstanding the kind of sometimes unpredictable stress that occurs in the data center environment. The software we needed to implement was not Java-based, but we chose Sun as our primary vendor for the servers, and we used an Oracle database.

It's a remarkable thing about Java, to me: that it's adept both at the "micro" level (i.e., Java ME in devices) and at the high-stress, high-volume, mission-critical data center level. Having tried to get a Microsoft-based mission-critical application suite to withstand hits from a few hundred users (I did this in the early 2000s), and having worked for more than a decade in Unix-based data centers, I really am someone who appreciates the difficulties involved in creating and maintaining a data center operating at a multiple 9's uptime level.

I know Java can be the basis of such high-end performance. So, to me, it reveals incredible flexibility when I see Java also being a significant force in the micro world. That's impressive!

Also: my investigation of Jersey continued with Paul Sandoz's Enterprise Tech Tips article Jersey and Spring. Thanks to peligri for pointing this out to us.

Jersey provides integrated support for Spring, and Paul's article demonstrates how to bring Spring into a simple web application, using Apache's Maven as the development and build tool.

Paul's demo brings a lot of prominent Java technologies into the mix. For example, GlassFish V3 Prelude must be running when you deploy the demo application.

The core of the article describes how to bring Spring into the application:

Now let's change the web application to use Spring. To do that, you need to take the following actions:

  • Modify the pom.xml file to include Spring dependencies.
  • Create a Spring application context configuration file.
  • Modify the web.xml file to declare the Spring configuration.
  • Modify the root resource class to be a Spring component.

Unfortunately, I didn't have time to actually try out the coding myself. But I'm hoping to be able to get into actual experimentation with the new Java technologies my new position as Java.net editor is exposing me to at some point soon!


The latest Java Mobility Podcast is Java Mobility Podcast 76: Sound of Motion, in which Vladimir Savchenko of Sound of Motion talks about their Java ME application that transforms their cycles into advanced cycling computer.


In Java Today, as I talked about above, the Java ME SDK Team formally announced Released: Java ME Platform SDK 3.0 now available: "Java ME SDK 3.0 is the successor to the popular Java Wireless Toolkit 2.5.2 and Java Toolkit 1.0 for CDC. It provides device emulation, a standalone development environment and a set of utilities for rapid development of Java ME applications.Users will get all-in-one for cldc/midp, cdc and BD-J development..."

Also as mentioned above, Paul Sandoz published Jersey and Spring, describing how to integrate the two frameworks: "In this tip, you will learn how to use Jersey's integrated support for Spring, a framework for building and running enterprise Java applications. You'll learn how to configure Spring with Jersey and use Jersey's Spring-related features... To demonstrate Jersey's Spring-related features, you'll first create a simple web application, one that does not use Spring and then change it to use Spring..."

And peligri announces OpenDS, the Java OpenSource LDAP Server - This Week's Webinar, which will take place on Thursday at 11 AM US Pacific time: "This week's webinar is on OpenDS, the Open Source Java LDAP server that is at the core of the next generation for Sun's market leading DSEE Product. Ludovic will provide an overview of the project including the recent developments on the v2 release... Full details (and recordings) at the Show Page..."


In today's Weblogs, Greg Brown is Announcing Pivot 1.1: "The Pivot development team is happy to announce the release of Apache Pivot version 1.1! Pivot is an open-source 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..."

Felipe Gaucho provides an interesting description of A Generic CRUD Facade for your @Entity Beans: "I am using a pattern to provide the basic CRUD operations to all @Entity types in my Java EE projects. This blog introduces the idea and give you a sample code to play. CRUD (create-read-update-delete) is a repetitive code in Java EE projects but it can be isolated in a unique class through the usage of JPA annotations and Generics - a class I call CRUDEntityFacade..."

And Sergey Malenkov answers the question How to store preferences?: "The Preferences API can be used by applications along with the installed security manager that enables using the preferences permission. However, WebStart-based applications cannot permit preferencesonly. You can permit all or deny all by using ajnlp-file. So, how to store user preferences for unsigned applications deployed through Java WebStart? ..."


This week's java.net Poll asks "Which of the technologies highlighted at JavaOne 2009 is of greatest importance for the future of Java?" The next poll will be coming out on Friday, so cast your vote in this week's poll soon if you want your voice counted.


This week's Spotlight, titled Java + You = Innovation, reminds us that JavaOne is just around the corner: "It's that time of year again. The 2009 JavaOne conferencetakes place at the Moscone Center in San Francisco from June 2-5 and is being sponsored by Intel (a Platinum sponsor), JBoss, and Sony Ericsson. This year's technical and Birds-of-a-Feather (BOF) sessions are organized around four topics: Rich Media Applications and Interactive Content; Mobility; Services; and Core Technologies. You can view information on all the sessions now and get a $200 discount on early bird registration until April 22."


In the Forums,rl7007 wonders about Glassfish support dynamic class loading from stand alone RMI app clients?: "I can't seem to dynamically load classes from my RMI standalone client. I've included the codebase option at run time, generated a policy file and a Security Manager. I've followed the instructions in the Glassfish FAQ by supplying the appropriate libraries (appser-rt.jar etc) to the classpath. I've also included the -javaagent option for toplink-essentials-client.jar (which one post recommended). I've verified with the Admin Console JNDI browser that the remote apps are registered. I can get the RMI client working if I supply it the classpath to all my jars, however, as the client will eventually reside on a different server, any time I make a change to a class, I don't want to have to copy and move the jar(s) to the client machine... "

technolgia has a new question about Re: JSR 75(PIM) Support for PhoneME: "Hi Davy, Thank you so much. I got it working. The problem was with the Base64 i was using to encode and decode. For some reason it does not work fine on HTC touch. I have another question. System.getproperty("os.name") and System.getproperty("os.version") on PhoneMe Advanced returns the name of the operating system and the version.But when i try the same on PhoneME feature it returns null and when i trySystem.getproperty("microedition.platform") it returns j2me and i badly need the version of the windows OS it runs. Could u kindly help me out with this..."

And cjno is experiencing some Encoding issues: "Hi, I've set up glassfish and deployed a war unto it, and everything seems to be fine. However, after playing around with my application I realized that it didn't handle UTF-8 characters in input well. The content-type header from the server says UTF-8, and all content (from db) is ok. But if I search for a character such as..."


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.



Yesterday's Java Today included Danny Coward's discussion about the benefits of the new Java ME SDK 3 release. Today I'm highlighting the Java ME SDK Team's formal announcement...  

Late last week, Jersey Version 1.0.3 was released. Jersey is an open source implementation of JAX-RS(JSR311), a Java API for RESTful Web Services.

REST(which stands for REpresentational State Transfer) has gotten a lot of publicity in technology publications and a lot of attention from developers in recent years. Yet, what it actually means has been somewhat unclear. The term "RESTful" is often used in debates over particular implementations of APIs and the services that use them. An API will be produced and called "RESTful" by its creator, but the developer community may argue that the API "really isn't all that RESTful."

I've heard this complaint from many developers who attempted to develop applications using supposedly "RESTful" APIs that really were something else. And their complaints were sometimes directed at me, because I was the editor of the article we'd agreed they would write about this difficult-to-use, highly unRESTful API (since I was the point of contact, I took the blame!)

Hence, for me it's refreshing to see the Java process, where "RESTful" isn't just a term that means a lot of different things to different people. Rather, in the Java world, we have an actual specification (JSR311). Refreshing indeed!

So, what's new in Jersey 1.0.3? Lots of bug fixes (see the change log), and some significant enhancements:

  • Guice 2.0 integration
  • Developer defined WADL-based resource classes
  • Multipart MIME improvements to the jersey-multipart module
  • Container support for the Simple HTTP server
  • Enterprise session beans as resource classes
  • Client API listeners when producing/consuming representations
  • Plug-in Java type support for @*Param annotations
  • A sample showing how to use Jersey with HTTPs, client certificates and Grizzly.

All completed in just two months since Jersey 1.0.2 was released. I'd consider that a lot of accomplishment, based on my 30 years of software development experience.

As you now know, I've had a lot of interaction in the past with RESTful APIs and systems (along with many would-be pretenders to the term). Jersey has captured my interest, and I intend to delve into it in much greater detail in the coming months.


The latest Java Mobility Podcast is Java Mobility Podcast 76: Sound of Motion, in which Vladimir Savchenko of Sound of Motion talks about their Java ME application that transforms their cycles into advanced cycling computer.


In Java Today, alexismp posted Jersey 1.0.3 released, coming to a GlassFish Update Center near you: "Paul is announcing the release of Jersey 1.0.3, an update to the open source, production-quality JAX-RS reference implementation. You can download it today or, if you're using GlassFish, simply wait a little bit for it to appear on your GlassFish Update center (both v2 and v3). New features include Guice 2.0 integration, developer-defined WADL-based resource classes, building on Grizzly 1.9.8, integrated use of MIMEPull..."

In Java ME SDK 3 released for Java (and JavaFX) developers, Danny Coward writes about the benefits of the new Java ME SDK 3: "Yesterday, the new all-in-one Java ME SDK 3.0 was released, which folds in all you need for developing Java apps for phones, settop boxes or Blu-Ray discs into one SDK... Other than tidying up the hitherto multiplying SDKs (and including LWUIT !), there's a nice consequence for JavaFX developers too: you can use it to see where the hot spots are in your mobile app are..."

Superpat announces a milestone for the OpenSSO project in OpenSSO Hits 1000 Members: "OpenSSOreached 1000 members last week... this means that 1000 people haveregistered at opensso.dev.java.net to be able to participate in the mailing lists and forums, and to be able to file and track issues. OpenSSO is on a real upward trend right now, with a whole bunch of events over the next few weeks, at the RSA Conference, MySQL Conference, European Identity Conference and more..."


In today's Weblogs, James Gosling postedJava for FIRST Robotics Competition: "I spent the end of last week in Atlanta at the finals for the FIRST Robotics Competition. This is a competition where high school students build robots that perform some task. This year's task looked an awful lot like building a robotic basketball player. I was there partly because it's just a cool event; but mostly because we were announcing (along with the folks from FIRST and from the Robotics lab at WPI) that beginning with next years event, students could do their programming in Java..."

Giovani Salvador investigated available IDEs and found the Best IDE to teach SOA and ESB concepts: "If you were assigned to teach SOA using an IDE integrated with an ESB in way students can see how you can technically implement SOA, which IDE would you use? That's the question I did myself and start investigating which one I should use."

And Terrence Barr announces that he'll be Speaking tomorrow (4/21) at SDG in Helsinki: "I just got back from a much-needed 5-day vacation break (Italy/Lago Maggiore region). Benissimo! ... and no Internet connectivity, either ;-) Just a quick note that I will be speaking tomorrow (Tue, April 21) at the SDG (Startup Developers Gathering) in Helsinki, Finland, on JavaFX..."


This week's java.net Poll asks "Which of the technologies highlighted at JavaOne 2009 is of greatest importance for the future of Java?" Voting will be open through Thursday. So, cast your vote!


This week's Spotlight, titled Java + You = Innovation, reminds us that JavaOne is just around the corner: "It's that time of year again. The 2009 JavaOne conferencetakes place at the Moscone Center in San Francisco from June 2-5 and is being sponsored by Intel (a Platinum sponsor), JBoss, and Sony Ericsson. This year's technical and Birds-of-a-Feather (BOF) sessions are organized around four topics: Rich Media Applications and Interactive Content; Mobility; Services; and Core Technologies. You can view information on all the sessions now and get a $200 discount on early bird registration until April 22."


In the Forums,tolvantolvan would like to Update web services variables dynamicly on deployment: "Hi, I have a few web services that are deployed on a testing system and on a production system. Everytime I need to deploy my code on the other system I need to manually change all the wsdl variables so that the web service client connects to the host which its being deployed on. How do I specify the variables on the glassfish server so that the wsdl variables are changing dynamic by reading the correct values from the system its being deployed on? I have a BPEL process which successfully do this by accessing the Application Variables on the sun-http-bindings component in the JBI. Can I do something similar for Web Services? ..."

zappen is exploring a problem involving Reverse DNS lookup during SSL handshake: "HI! I have run into what I believe perhaps not is a clean bug but more of erroneous design in the JSSE, or whereever the dns lookup happens. To explain a bit futher: Consider a scenario where we have a Java client who wishes to communicate with a Java server, now consider the wide use of Java software through out the world. Now consider that these two would like to communicate privately. Using some imagination and perhaps experience one can quite easily see that this scenario is in fact quite common. Now if we go through what happens during the SSL handshake between these two (note that this is for ordinary stand alone applications and not those big applications servers out there)..."

And methius asks for performance advice in Recording program - AWT.Robot or Paint/Print performance: "Hello, Since it's my first post on this forum, I'll try to avoid one of the most common pitfalls and state that: Yes, I've (intensely) searched through as many forums / sites I could find. My task: To record a steady 25fps movie, with audio of a Java Application encoded in Xvid. For the recording and encoding I am succesfully using JMF. What's the problem then? The recording of (eg. Taking snapshots of the program) is far too slow. In my current best solution I use a custom RepaintManager to only take snapshots of the "dirty" regions of the screen. But the process is too slow when I go to resolutions beyond 800x600 and the entire program becomes "dirty"..."


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.



Late last week, Jersey Version 1.0.3 was released. Jersey is an open source implementation of JAX-RS (JSR311)...  

This week's Java.net Spotlight is on the 2009 JavaOne Conference. It's starting to feel like the conference is just around the corner. And, indeed, if you want to take advantage of early bird registartion, time is running very short: Wednesday, April 22, is the last day you can register at the early bird rate.

Our Java.net Spotlight note links you to the article Java + You = Innovation, by Janice J. Heiss. According to Janice and other people who have attended past JavaOne conferences, this year's conference promises to be unique:

Those of us who have attended past JavaOne conferences are particularly jazzed this year as the JavaFX platform takes off and Sun aspires to appear from behind every cloud computer

The Open Enterprise Service Bus (OpenESB) project released Version 2.1 Milestone 2 on Tuesday:

This milestone includes numerous bug fixes compared with the previous milestone. This milestone introduces an additional installer that will only install the runtime and design time components on top of an existing installation of GlassFish and NetBeans. The full installer now also supports AIX.

You can download OpenESB v2.1 M2 on the OpenESB downloads page.

The OpenESB developers believe that, with Milestone 2, OpenESB v2.1 is beginning to achieve some stability. Their current schedule has Release Candidate 1 being available in just a few weeks.

Given its critical role in the development of the National Health Information Network, it's clear that OpenESB will be gaining significant recognition in the coming months and years. The project has come a very long way since Sun's JavaOne 2005 introduction of:

the Java ESB, the first fully open sourced enterprise service bus implementation based on the Java Business Integration (JBI) specification (JSR 208) and reference implementation.

Changing topics, I want to re-remind everyone about the upcoming changes to Java.net Project wikis. Sonya Barry's recent blog posts The Big Upgrade Part Two: What's happening to the wikis? and More Wiki Upgrade cover the upcoming changes, and include lots of comments and conversation with the community.

Tomorrow, April 17, is an important day: the current wikis will be locked for editing (they'll become read-only). On June 12, the current wikis will go offline. During that period, all data from the current wiki will remain available for integration into the new wiki via page redirects. As Sonya notes:

A text dump snapshot of the entire wiki on Friday afternoon (taken after we turn edit permissions off) will be available via the docs and files section of the java-net project, so there will be no permanent loss of data. If you want to do the wiki conversions yourself after the upgrade, you will be able to access your data there, and then submit your own list of page redirects which will be updated on the server weekly through June 12.

Sonya and her team are quite aware of the difficulty a migration of this type entails for the user community:

I wish I had the power to wave a magic wand and make it all just happen. I don't, but I hope you will all take full advantage of the help we can offer...

The latest Java Mobility Podcast is Java Mobility Podcast 76: Sound of Motion, in which Vladimir Savchenko of Sound of Motion talks about their Java ME application that transforms their cycles into advanced cycling computer.


In Java Today, fkieviet reports OpenESB v2.1 Milestone 2 now available: "As was announced on the OpenESB site and on Mark White's blog, Milestone 2 of the upcoming GlassFish ESB v2.1 release is now available. This milestone includes many bug fixes compared with the previous milestone. Also, AIX is now a supported platform..."



In Sun's Garbage First Collector Largely Eliminates Low Latency/High Throughput Tradeoff, Charles Humble looked into the advantages of Sun's new G1 JVM technology: "Sun's Garbage First garbage collector (hereafter referred to by its nickname G1) is the new low latency garbage collector planned to replace CMS in the Hotspot JVM. It is a server-style collector, targeted at multi-processor machines with large amounts of memory. There are two major differences between CMS and G1. The first is that G1 is a compacting collector..."



Bruce Eckel summarizes What I learned at Java Posse Roundup '09 based on his own notes and some from other attendees: "1. Most people have been trained to believe they can spend freely without risks or consequences. So in most software development organizations, discussions of technical debt and risk management are seen as annoying and "negative thinking." We need to change this..."



 

In today's Weblogs, Arun Gupta writes about LOTD #20: How to create a JPA application using GlassFish Tools Bundle for Eclipse ?: "Here is a great screencast (from the community) that shows how to create a JPA application using EclipseLink and deploy on GlassFish v2.1 - all using GlassFish Tools Bundle for Eclipse..."


In today's Weblogs, Arun Gupta presents another lesson, LOTD #20: How to create a JPA application using GlassFish Tools Bundle for Eclipse ?: "Here is a great screencast (from the community) that shows how to create a JPA application using EclipseLink and deploy on GlassFish v2.1 - all using GlassFish Tools Bundle for Eclipse..."

Marina Sum posts notification of another pre-JavaOne event, theThird OpenSSO Community Day: San Francisco, Sunday, May 31: "OpenSSO community manager and Sun principal engineer Pat Patterson has just announced the third OpenSSO Community Day. It'll be held on Sunday, May 31 at the Moscone Center in San Francisco, CA, between 1:00-7:00 p.m. in an unconference format. Attendance is free."

And Sebastien Dionne provides an update onhttp-deployer in Grizzly http-deployer moved to module in Release 1.9.11: "The little baby : Grizzly http-deployer just moved from contrib to modules since release 1.9.11... There are few new options. Let's describe the new command line params..."


There is still time to participate in this week's java.net Poll, which asks: "Does the U.S. Federal Government's embrace of OpenESB for the NHIN imply a brighter future for open source projects?" Voting ends on Friday.


This week's Spotlightannounces Registration for C1 Unconferences Now Open - GlassFish and OpenSSO Day: "The registration for our CommunityOne Unconferences is now open. We are hosting two intertwined events, one for all the GlassFish projects, the other for OpenSSO, OpenDS et al. Both in Hall A at the Moscone the Sunday before JavaOne, May 31st. Both events are free..."


In the Forums,jaymalya seeks clarification relating to authentication in glassfish & apache: "Hi. We have deployed one app in glassfish (v2.1) which uses standard JAAS authn & Authz mechanisms. The app is making getRemoteUser and isUserinRole to derive the ACLs. The app is using one LDAP realm. When we login to the app directly, everything works great. However, when we try to connect to the app via apache ( we authenticate through siteminder on apache), we are getting double prompted - one from apache/siteminder & again from the glassfish realm I can see REMOTE_USER header is getting populated . Is there any way to tell glassfish to accept the REMOTE_USER as the principal & then do LDAP checkups to verify authorization policies ( and may be the password)?"

peterdelaney has a JEE LifecycleListener Question: "Hello; I have a messaging application that, hopefully, will run in the SUN application server (glassfish). We will have clients call our application and our application needs to post a message request to a third party application via RV messaging. The third party has provided a Java api for us to call, but under the covers a RV message is sent out then a response is returned. This returned response is then parsed and sent back to the calling client. We plan on using LifecyceListener object to execute the call between the EJB and the third party application. We plan on spinning some threads during that call. This from what I am told is the proper implementation especially when running a thread. My first question is this the proper way to go?..."

And lamah is conversing Re: Swing performance problems: "Although classloading is a major bottleneck in big applications during startup I don't believe reflection is the way to go to solve it. Like you say, you lose easy refactoring/discoverability and compile time safety. Currently, according to JProfiler, loading a class only takes 400ns (in my app) which I find is pretty quick so I don't expect to find any more ways to improve it (except to load fewer classes perhaps). The result may be somewhat incorrect since JProfiler just averages the time. Still, loading 2000 classes will cost somewhere along 600-1000ms of startup time which is not that bad if you consider what actually is done during class loading. If you also do multiple startup related tasks in parallell you can lower the impact of classloading on total startup time even more on multicore machines. My point is that applications made with Swing takes too long to start up..."



 

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 Open Enterprise Service Bus (OpenESB) project released Version 2.1 Milestone 2 on Tuesday...  

Despite the global economic downturn, activity related to mobile devices continues to grow. Indeed, the Google Trends graph for "mobile applications" shows an acceleration in search volume that started in the second quarter of 2008 ]]>. </p> <p> Google's <a href="http://android-developers.blogspot.com/2009/04/getting-ready-for-android-15.html">Early Look Android 1.5 release</a> is garnering a lot of attention, for example, prompting Elliotte Rusty Harold to <a href="http://www.cafeaulait.org/oldnews/news2009April14.html">modify next week's schedule</a> to make room for some Android experimentation: </p> <blockquote> I think it's time to get serious about Android development. This week is pretty full; but next week it may be time to knuckle down and start writing the mobile app I've been contemplating for the last few years. </blockquote> <p> Mobility is one of the core topic areas at this year's <a href="http://java.sun.com/javaone/">JavaOne</a>. The <a href="http://java.sun.com/javaone/2009/pdfs/09J1_ACG_Prospect.pdf">JavaOne 2009 Conference Guide</a> (PDF) lists 35 Technical Sessions, 2 Panel Sessions, and 17 BOF Sessions in the Mobility category. </p> <p> The JavaOne <a href="http://java.sun.com/javaone/2009/topics.jsp#2">Topics Overview</a> does a good job of portraying the meaning and importance of mobility today: </p> <blockquote> Mobility today goes beyond the laptop to encompass a wide range of computing environments connected together, exchanging data, context and services, and each providing a personalized and relevant experience to the end user. About 3 billion Java-enabled handsets are currently connected to mobile networks worldwide, leveraging the richness and power of Java for the development and deployment of mobile data services. Java Platform, Micro Edition has been designed to meet the needs of connected mobile environments. It provides deep access to the functionality of consumer devices while ensuring application portability and empowering developers with the latest generation of tools. In combination with JavaFX technology, it delivers a powerful and intuitive experience to demanding users of internet-connected services. </blockquote> <p> The <a href="http://forums.java.net/jive/index.jspa">Java.net Forums</a> provide another indication of the significance of mobile technology development: among the most actively discussed topics recently are those related to <a href="http://forums.java.net/jive/category.jspa?categoryID=55">Mobile and Embedded</a> applications, including the <a href="http://forums.java.net/jive/forum.jspa?forumID=139">LightWeight UI Toolkit</a> (LWUIT), and <a href="http://forums.java.net/jive/category.jspa?categoryID=62">JavaFX</a>. </p> <p> If you're working on mobile applications, and you're able to act upon <a href="http://blogs.sun.com/jag/entry/sign_up_for_javaone">James Gosling's invitation</a> to "come join us" at <a href="http://java.sun.com/javaone/">JavaOne</a>, I think you'll find yourself in the typical situation of finding that there are more interesting and relevant mobile-related sessions than you can possibly attend. The sessions: </p> <blockquote> will provide an excellent opportunity for developers to become familiar with key Java ME technologies and to learn advanced techniques for developing, testing, optimizing, and deploying mobile Java content, all demonstrated through real world examples from experienced developers. </blockquote> <p> That sounds exciting to me. Hopefully I'll be able to catch some of it! </p> <hr /> <p> The latest <b><a href="http://today.java.net/pub/ct/mobileandembedded">Java Mobility Podcast</a></b> is <a href="http://today.java.net/pub/a/today/2009/04/07/javamobility-podcast76.html">Java Mobility Podcast 76: Sound of Motion</a>, in which Vladimir Savchenko of Sound of Motion talks about their Java ME application that transforms their cycles into advanced cycling computer. </p> <hr/> <p> In <a href="http://community.java.net/"><b>Java Today</b></a>, Elliotte Rusty Harold talks about the <a href="http://www.cafeaulait.org/oldnews/news2009April14.html">Google Early Access Release of Android 1.5, Cupcake</a>: "Google has posted an early access release of <a href="http://android-developers.blogspot.com/2009/04/getting-ready-for-android-15.html">Android 1.5, Cupcake</a>. According to Xavier Ducrohet, "This new version (which will be 1.5) is based on the cupcake branch from the Android Open Source Project. Version 1.5 introduces APIs for features such as soft keyboards, home screen widgets, live folders, and speech recognition." I think it's time to get serious about Android development." </p> <p> At <a href="http://blogs.sun.com/theaquarium">The Aquarium</a>, Peligri announces an upcoming (Thursday) webinar on <a href="http://blogs.sun.com/theaquarium/entry/fuji_the_next_generation_of">Fuji, The Next Generation of OpenESB</a>: "This week's webinar is on <a href="http://fuji.dev.java.net/">Fuji</a>, the project delivering the core of <a href="http://openesb.dev.java.net/"OpenESB</a> v3 that provides a lightweight, developer-friendly, and extensible platform for composite application development. Since Fuji leverages OSGi directlly, it is a perfect match for <a href="http://glassfish.dev.java.net/">GlassFish v3</a>. </p> <p> And the <a href="http://community.java.net/javatools/">JavaTools Community</a> released the <a href="https://javatools.dev.java.net/newsletter/2009/20090402.html">JavaTools Community Newsletter - Issue 194</a>: "A new edition of the newsletter is available, with news, new projects and tips! If you want to receive the newsletter by email, please subscribe the <a href="https://javatools.dev.java.net/servlets/ProjectMailingListList">announcements mailing list</a> - or read the current issue <a href="https://javatools.dev.java.net/newsletter/2009/20090402.html">here</a>." </p> <hr /> <p> In today's <a href="http://weblogs.java.net/"><b>Weblogs</b></a>, James Gosling invites developers to <a href="http://blogs.sun.com/jag/entry/sign_up_for_javaone">Sign up for JavaOne!</a>: "The Java crew at Sun is once again totally into getting ready for this year's JavaOne conference. The papers submitted were awesome: they'll make for a great lineup of technical sessions. EE6 will be a major feature of the enterprise track, as will RESTful techniques. Swing and JavaFX will be all over the place. The device world continues to get more interesting: among many other cool devices, the <a href="http://www.lincvolt.com/">LincVolt</a> will be there. I know the economy is a mess, and it feels like the world is melting down, but JavaOne is a great opportunity to get your head out of all of that and take a geek's vacation. Come join us!" </p> <p> Tim Boudreau writes about his new project, <a href="http://weblogs.java.net/blog/timboudreau/archive/2009/04/a_simple_librar.html">A simple library for Swing UI validation</a>: "I recently created a project for Swing UI validation, which is now available on Sun's new open source hosting site, Kenai. I'd love to get some feedback on it. If you have an existing Swing UI and want to add input validation with user feedback to it, you might find it useful..." </p> <p> And John O'Connor provides a <a href="http://weblogs.java.net/blog/joconner/archive/2009/04/javafx_quick_ti.html">JavaFX Quick Tip: Printing to the console</a>: "JavaFX improves the println method to interpolate placeholder variables. Like Java, the JavaFX Script has its own println statement. You can use the println statement to print output to the console..." </p> <hr /> <p>Our new <a href="http://today.java.net/today/polls/index.csp"><b>java.net Poll</b></a> asks "Does the U.S. Federal Government's embrace of OpenESB for the NHIN imply a brighter future for open source projects?" The poll ends on Friday. </p> <hr/> <p> This week's <a href="http://today.java.net/today/projectspotlight.csp"><b>Spotlight</b></a> announces <a href="http://blogs.sun.com/theaquarium/entry/glassfish_and_identity_unconferences_registrations">Registration for C1 Unconferences Now Open - GlassFish and OpenSSO Day</a>: "The registration for our <a href="http://blogs.sun.com/theaquarium/entry/javaone_communityone_unconference_and_party">CommunityOne Unconferences</a> is now open. We are hosting two intertwined events, one for all the <a href="http://glassfish.org/">GlassFish</a> projects, the other for <a href=http://opensso.dev.java.net/>OpenSSO</a>, <a href="http://opends.dev.java.net/">OpenDS</a> et al. Both in Hall A at the Moscone the Sunday before JavaOne, May 31st. Both events are free..." </p> <hr /> <p> In the <b><a href="http://forums.java.net/jive/index.jspa">Forums</a></b>, <code>mmaxey</code> is having a problem with <a href="http://forums.java.net/jive/thread.jspa?messageID=341978&tstart=0#341978">Garbage Collection Pauses &amp; Non-interruptable System Calls</a>: "I have a problem I was hoping with which I need some advice. We wrote a custom JNI library for file I/O that sits underneath the Java NIO FileChannel. One of our driving requirements is highly performant file I/O. We achieved this by doing DMA I/O from large direct memory aligned buffers. The JNI is very trivial - it just takes a buffer and performs the appropriate system call based on the parameters given to it. 100% of the logic for calculating offsets, buffer management, etc. is all in our implementation of java.nio.FileChannel. Here's our problem: We have requirements to respond to some messages in as little as 250 ms. During this time, we're doing file writes of 128 MB that take around 200 ms. When GC kicks in, it tries to pause all threads. Because the DMA write is non-interruptable, GC waits for the I/O to complete before being able to pause the thread &amp; run. That means that GC can take well over 200 ms putting us in grave danger of missing our timelines..." </p> <p> <code>arthas67</code> requests help with a Nokia 5800xm phone application in <a href="http://forums.java.net/jive/thread.jspa?messageID=341932&tstart=0#341932">Lwuit - Touch screen problem</a>: "Hi, I am develop a project for touch screen phone specially for Nokia 5800xm. I had done a project by using lwuit also for standard phone (keypad and qwerty phone), so far work fine and it was great in UI. For right now, I found that a bit problems in landscape screen and textfield input in touch screen phone. First, could the lwuit have any listener to know when the screen is rotate? Or any suggestion can force the midlet not able to rotate, i mean disable the rotate screen for the midlet. Second, the textField problem, i found that lwuit is not support on screen keyword/qwerty right? so the way is force user use the T9, but once i focus to textfield the T9 command will replace the existing one(let say login), so after I fill in the text(after commit), the T9 command still there..." </p> <p> And <code>svyr</code> posted <a href="http://forums.java.net/jive/thread.jspa?messageID=341915&tstart=0#341915">Feasibility question-java3d for path intersection detection (no displaying)</a>: "I'm working on a simple simulation project that involves simple (point) objects moving on (continuous) linear and curved paths in a 3d plane. I need to detect if there are any possible conflicts between their paths. However, the definition of 'potential' conflict is in allowing tolerances not just detecting intersections between continuous point paths (tolerances are fixed number of units horizontal, and fixed number of units vertical (potentially unequal and I'm interested in either horizontal or vertical path wrapped in a tolerance breaches)) . To do that I would like to wrap the paths in a rectangular tolerance (the fixed point tolerance, is represented by a cylinder) (with a possible extension of curving the starting and ending points as semi-cylinders.)..." </p> <hr/> <p>Current and upcoming <a href="http://www.java.net/events"> <b>Java Events</b> </a>:</p> <ul> <li>April 13-17 - <a href="http://www.activelearning.ph/courses/323_java_servlets_jsp_struts_philippines.html">Java EE Training Philippines</a> </li> <li>April 20-24 - <a href="http://www.wakaleo.com/training/java-power-tools-bootcamp/melbourne-20-24-april-2009">Java Power Tools - Melbourne Australia</a></li> <li>April 20-24 - <a href="http://www.java.net/events/www.jax.de">JAX 2009</a></li> <li>April 24-26 - <a href="http://www.java.net/events/www.nofluffjuststuff.com/sh/2009-04-reston">2009 Northern Virginia Software Symposium: Spring Edition</a></li> <li>April 27-30 - <a href="http://www.regonline.com/builder/site/Default.aspx?eventid=710798">Eclipse Training Series Spring 2009</a></li> <li>May 1-3 - <a href="http://www.java.net/events/www.nofluffjuststuff.com/sh/2009-05-omaha">2009 Greater Nebraska Software Symposium</a> </li> <li>May 15-17 - <a href="http://www.java.net/events/www.nofluffjuststuff.com/sh/2009-05-atlanta">2009 Greater Atlanta Software Symposium: Spring Edition</a> </li> <li>May 18-19 - <a href="http://www.gr8conf.org/">GR8 Conference</a></li> <li>May 18-22 - <a href="http://www.wakaleo.com/training/java-power-tools-bootcamp/canberra-18-22-may-2009">Java Power Tools - Canberra Australia</a> </li> <li>May 29-31 - <a href="http://www.java.net/events/www.nofluffjuststuff.com/sh/2009-05-denver">2009 Rocky Mountain Software Symposium: Spring Edition</a></li> <li>June 1-3 - <a href="http://developers.sun.com/events/communityone/2009/west/">CommunityOne West</a></li> <li>June 2-5 - <a href="http://java.sun.com/javaone/index.jsp">JavaOne 2009</a></li> <li>June 22-25 - <a href="http://www.jazoon.com/">Jazoon'09</a> </li> <li>June 26-28 - <a href="http://www.java.net/events/www.nofluffjuststuff.com/sh/2009-06-raleigh">2009 Research Triangle Software Symposium</a> </li> </ul> <p>Registered users can submit event listings for the <a href="http://www.java.net/events">java.net Events Page</a> using our <a href="http://today.java.net/cs/user/create/e">events submission form</a>. All submissions go through an editorial review before being posted to the site.</p> <hr /> <p><b>Archives and Subscriptions:</b> This blog is delivered weekdays as the <a href="http://today.java.net/pub/q/java_today_rss?x-ver=1.0">Java Today RSS feed</a>. Also, once this page is no longer featured as the front page of <a href="http://www.java.net">java.net</a> it will be archived along with other past issues in the <a href="http://today.java.net/today/archive/">java.net Archive</a>.</p> <br/><br/> <div class="grayline"></div>Despite the global economic downturn, activity related to mobile devices continues to grow....

In the past couple weeks we've featured lots of news about the scheduling of developer events at this year's JavaOne Conference. In today's blogs, Roberto Chinnici announces the JavaOne 2009 Script Bowl Call for Proposals. The actual session for the script bowl is PAN-5348, "Scripting Bowl 2009: A Scripting Languages Shootout."

But what kind of script must you write if you participate? Finding the answer to that question is exactly why Roberto posted his blog:

Last year we had as an assigned task writing a Twitter client -- we like to think we anticipated the fad of writing Twitter clients in all possible languages and platforms by a month or two. This year, I'd like to poll my blog's audience to suggest tasks: if you think you have an idea for a task for our panelists, just leave a comment on this blog entry in the next couple of weeks.

Meanwhile, the current Java.net Spotlightfeatures Peligri's announcement Registration for C1 Unconferences Now Open - GlassFish and OpenSSO Day. The JavaOne / CommunityOne Conference ... and Party starts on Sunday afternoon, May 31 (before the start of JavaOne), so you'll have to arrange your travel accordingly to attend.

Scheduling for Java.net CommunityCorner 2009 is also underway. Last week, Sonya Barry outlined the procedure for signing up for a CommunityOne podcast. See the CommunityOne wiki for details, and the podcast schedule to select an available time slot for your podcast.

Would you like to attend JavaOne for free? The Code Project is featuring aJava Article Contest where the prize is a conference pass to JavaOne and up to $1500 in travel expenses. To win the prize:

Write a great article on The Code Project and make sure it refers to Java technology (just make sure either or both of the Language and Platform attributes read "Java")... The highest rated articles - as rated by The Code Project community - will be considered for the final award to be determined by The Code Project's panel of judges.

Articles must be submitted by one minute before midnight (Eastern U.S. time) on April 30. So, time is beginning to run short...

Speaking of timing, Early Bird registration for JavaOne ends on April 22. If you register by then, you save $200 off the $1995 full registration price. Registering between April 23 and June 1 saves you $100. If you wait until the conference actually begins on June 2, you'll have to pay the full $1995.


The latest Java Mobility Podcast is Java Mobility Podcast 76: Sound of Motion, in which Vladimir Savchenko of Sound of Motion talks about their Java ME application that transforms their cycles into advanced cycling computer.


In Java Today, Nikita Ivanov writes about a high-relevance topic in his Introduction to Native Cloud Applications: "Over the last several months I've had number of opportunities to present about Native Cloud Application (NCA) and I think deserves a bit more explanations. I'll try to give very practical introduction to what stands behind this new type of applications (and something that GridGain is so squarely aimed at)."

Frank Sommers visits the opposite side of the development spectrum (i.e., applications that are likely to utilize the advantages of the cloud) in Integrating Flex with a Java EE Application, Part I: "Rich-client technologies can be analyzed according to how easy, or difficult, they make enhancing an existing enterprise application with rich-client features: a more interactive user interface and better use of a client's computing resources. This article series introduces five techniques to progressively enhance an existing enterprise application using Flex. The examples start with a non-intrusive way to replace an HTML table with a high-performance Flex datagrid, and culminate in integrating a Flex client with an enterprise Java message queue."

Finally, Cedric Beust gets into aspects of theory and practicality in Why Java Doesn't Need Operator Overloading (and Very Few Languages Do, Really): "Operator overloading is a topic that never fails to generate very passionate responses, and this monster thread on Artima is no exception. First of all, I'd like to address a common complaint heard from people who dislike operator overloading..."


In today's Weblogs, Roberto Chinnici announces the JavaOne 2009 Script Bowl Call for Proposals: "Call for ideas for this year's Script Bowl at the JavaOne 2009 conference: JavaOne 2008 conference attendees and loyal readers of my blog may remember the first edition of the Script Bowl. In it, representatives of four scripting languages vied to get the most votes from the audience by extolling the virtues of their creations, all while avoiding getting incinerated by the scathing comments from the highly combustible judges. (Just kidding, it was all very civilized.)"

Sergey Malenkov wants to make sure people Don't miss this--"this" being the language keywordthis: "I would like to discuss code conventions. In particular, the usage of the this keyword. Recently we have argued with one of my colleagues again. I always use thethis.name pattern to access class fields. Whereas he says that I should not differ from everybody else and usethis to avoid shadowing only. Let me explain my position on the question..."

Meanwhile, John Ferguson Smart continues his series CI Adoption Customer Stories (2/8): Aligning work habits: "This case study is the second of an 8-part blog series about why so many developers adopt continuous integration, and originally published on the Atlassian blogs. It naturally has a bit of a Bamboo slant to it (if you look..."


Our new java.net Poll asks "Does the U.S. Federal Government's embrace of OpenESB for the NHIN imply a brighter future for open source projects?" The poll ends on Friday.


This week's Spotlightannounces Registration for C1 Unconferences Now Open - GlassFish and OpenSSO Day: "The registration for our CommunityOne Unconferences is now open. We are hosting two intertwined events, one for all the GlassFish projects, the other for OpenSSO, OpenDS et al. Both in Hall A at the Moscone the Sunday before JavaOne, May 31st. Both events are free..."


In the Forums,erice is facing a Grab bag of issues: WSIT, MTOM, training: "Hello, I am fairly new to Metro Web Services and would appreciate some pointers on a host of smallish issues. I'm having a bit of trouble finding the best documentation, so if the answer is RTFM, please send a link to the FM. Some background: We are doing both "start from Java" and "start from WSDL" for a few different services. We are doing some development using NetBeans 6.5 and other development, build and deployment from the Linux command line. 1) [Biggest] We have secured one web service (with a home grown WSDL) using the mutual certificate mechanism, but are having trouble duplicating that success on another service with a WSDL from a standard's body which uses import heavily.."

enygma2002 asks Can a peer use a Relay for group communication and also be a Rendezvous?: "Hi guys! It's been a while since I posted and I see the forum has gone quite silent, but here goes nothing: This thread is related to an earlier one (http://forums.java.net/jive/thread.jspa?messageID=339599#339599) where it was concluded that, in order to use a relay peer (if your ports are blocked), you have to set a relay seed but that is not enough. You must *also* set to not allow HTTPIncoming and TCPIncoming connections so that the relay peer does not try to contact you (you are unreachable from his point of view) and that you will poll the data from him (done by jxta automagically). In this scenario, when you disable HTTPIncoming and TCPIncoming, you do so for your whole connection. There is no option to say, do these changes only for the an outside network, but not for an inside one.."

And jamesj is frustrated because 'on replace' stops working sometimes: "Here is a frustrating little bug. When I run the code listed below, then resize the window by dragging it. After a second or two of dragging the frame corner, the triggering stops. In the larger piece of code that this was extracted from, it also stops the binding updates. I am running on a moderately powered windows laptop using the latest Netbeans/FX downloads. It is hard to write larger functionallity when basic language featues can't be trusted. Any ideas?"


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 the past couple weeks we've featured lots of news about the scheduling of developer events at this year's JavaOne Conference...  

NetBeans IDE 6.7 Milestone 3 was recently released and is now available for download. Key features in the new release include:

  • Project Kenai integration
  • Maven availability
  • PHP code coverage and Selenium support
  • Enhanced output window, update center catalog, and search performance
  • Export profiling data into CSV, HTML, and XML file formats
  • Easy host setup for remote C/C++ development
  • Enhanced GlassFish integration
  • Integration with the Hudson Continuous Integration server

Kevin Yinkei Chan expressed his Impressions with Netbeans 6.7 M3 for PHP a few days ago, saying "I could not be more impressed by its performance and feature-set." Kevin was particularly impressed by the IDE's speed, code completion ("the best code completion for PHP in any IDE I've used"), and project/code navigation capabilities.

See the complete list of NetBeans IDE 6.7 Milestone 3 features and enhancements for the full details.

The NetBeans team is actively seeking user feedback, and asks people to join the NetBeans discussion on the NetBeans mailing lists and forums, by adding NetBeans-related blogs to Planet NetBeans, and/or by participating in the new NetBeans User Survey.

The final release of NetBeans 6.7 is planned for June, so now is the time to get your comments and suggestions in.


The latest Java Mobility Podcast is Java Mobility Podcast 76: Sound of Motion, in which Vladimir Savchenko of Sound of Motion talks about their Java ME application that transforms their cycles into advanced cycling computer.


Our lead Java Today story is NetBeans 6.7 Milestone 3 Now Available for Download!: "The NetBeans team is pleased to announce the availability of NetBeans IDE 6.7 Milestone 3 (M3). Download NetBeans IDE 6.7 Milestone 3. Read more about feature highlights and the release schedule."

The Netbeans team also asks the community: Help Us Improve NetBeans - Take the NetBeans User Survey!: "We are launching the NetBeans User Survey so we can learn more about you and what you do with NetBeans.We want to know your perspective on NetBeans: what works and what doesn't; how you use NetBeans and how NetBeans can better serve you in the future.NetBeans's strength lies in its community, so please consider taking this survey. Click here to complete the NetBeans User Survey. Thank You."

And, Danny Coward highlights Planet Cast Three: What Tor Norbye thinks of JavaFX: "Tune in to the third in the Planet Cast series with an in-depth conversation with hard core Java programmer, JavaOne demo Ace and Java Posse co-host Tor Norbye on what was it that first hooked him about JavaFX, comparisons with JavaScript, on joining the team, and what he likes and doesn't like about the tools.


In today's Weblogs, Sonya Barry replies to comments from the community in More Wiki Upgrade: "A blog intended as a full response to comments about the wiki migration made here. In general, if you choose to have a wiki related to your project, then maintaining it is part of your project. By design, wikis are entirely subject to the whim of the last person who updated them. They require active management to keep current..."

Marina Sum points out an interesting article in Boot Environments in the OpenSolaris OS: Versatility Exemplified: "A March article on Sun Developer Network, Managing Boot Environments With OpenSolaris Package Manager, tells you how to manipulate BEs in the OpenSolaris OS. That is, efficiently and safely install, update, or delete software."

And Jean-Francois Arcand continues his series on Grizzly in Extending the Grizzly HTTP Runtime VII: Cluster/load balance GrizzlyAdapter using Apache: "With the release of Grizzly 1.9.11, it is now possible to cluster/load balance your GrizzlyAdapter using Apache! As I described in the previous entry on the topic, it is quite simple to embed Grizzly using its' extension point: GrizzlyAdapter ..."


Our new java.net Poll asks "Does the U.S. Federal Government's embrace of OpenESB for the NHIN imply a brighter future for open source projects?" The poll ends on Friday.

In the most recent poll, a 43% plurality said "It doesn't make a difference" in response to the question "Are you more likely to use a library or framework if it comes bundled for your IDE or build tool?" 48% answered either "Somewhat more likely" or "Much more likely." 691 people voted.


This week's Spotlightannounces Registration for C1 Unconferences Now Open - GlassFish and OpenSSO Day: "The registration for our CommunityOne Unconferences is now open. We are hosting two intertwined events, one for all the GlassFish projects, the other for OpenSSO, OpenDS et al. Both in Hall A at the Moscone the Sunday before JavaOne, May 31st. Both events are free..."


In the Forums,gsarrowood seeks help regarding some jms packaging confusion in Glassfish: "I have developed a client that connects to GF2u2 via JMS. I need to make it robust regarding disconnects, etc. I came across a sun doc for the MQ4.1 which according to the glassfish docs, was the MQ that was included in GF. My confusion is this: normal includes are jmx.jms.Connection. Using the event listener refered to in the docs which notifies me of JMS startup, shutdown, reconnects, etc, require me to replace this Connection with com.sun.messaging.jms.Connection. Its my understanding that "java.*" and "javax.*" are 'standard' while any "com..*" package is not really part of the standard jdk an may go away or be migrated into the standard at a later date. So, I guess my question is, is my assumption correct? Is it safe to use the com.sun.* connections (and other related objects) in my app?"

nicoley shares lessons learned in Two methods for capturing Wonderland error messages: "I just spent a considerable amount of time trying to find the location of my trace files on Windows, so I thought I'd share the secret in case anyone else is wondering where these files are stored. Backing up a little bit - whenever I run Wonderland, I always make sure my Java Console is visible in case there's a problem, If something bad happens, I can copy and paste the log file and send it off to someone to look at. How you enable the console is different on the different platforms. On Windows Vista, you open your control panel and look for and open the Java control panel. Then go to the "Advanced" tab. Expand the "Java console" item and click "Show console." This will open a console window every time you run Wonderland using Java Web Start. The problem is, if your client crashes completely, the Java console window will go away along with the client window, taking all your valuable error messages with it. In order to capture any errors that might have been generated when the client crashed, you'll need a trace file..."

And boutell wonders How to avoid @PostConstruct on page Faces beans during postback?: "Hello, we're using GlassFishV2/JSAS9.1 with Mojarra 1.2_04-b22-p05 for a large project, and experiencing performance issues on form-less JSF commands when used in conjonction with @PostConstruct annotations. I feel this is an architectural issue I'm not able to resolve though, so I was wondering if anyone could shed some light on whether I'm missing something, there is some known workaround or it's a known JSF problem? The scenario is as follows: Page my.jsp references Faces Beans MyFB.java; MyFB has @PostContruct method, which execute expensive logic to initialize the data model before rendering phase.."


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.



NetBeans IDE 6.7 Milestone 3 was recently released and is now available for download.  

The United States Department of Health and Human Services (HHS) is applying Sun Microsystems software, including the Open Enterprise Service Bus(OpenESB), in constructing the Nationwide Health Information Network (NHIN). finchannel, the open source information site, describes NHIN as "a secure, open technology platform to connect federal government agencies and health information exchanges in a "network of networks"--the Nationwide Health Information Network (NHIN)--built over the Internet."

Sun said:

the goal of NHIN is to support the secure exchange of interoperable health information within the federal government and with the tribal, state, local and private sectors to enable increased efficiency, better patient care and improved population health.

The NHIN site says the agency seeks to achieve its objectives by:

  • Developing capabilities for standards-based, secure data exchange nationwide
  • Improving the coordination of care information among hospitals, laboratories, physicians offices, pharmacies, and other providers
  • Ensuring appropriate information is available at the time and place of care
  • Ensuring that consumers

Java.net project owners: the time to act is now! The long anticipated Java.net Projects infrastructure upgrades will take place in just two weeks, starting on April 24. Two of today's featured blogs, by Sonya Barry, introduce the changes, talk about what project owners need to be thinking about, and provide pointers to resources on how to get started.

The Big Upgrade Part One: Have you done your testing? talks about the opportunity for project owners to experiment with the new platform prior to the actual upgrade:

Eric and Andrew from CollabNet have a project going that is dedicated to all things upgrade related. Please go take a look at the expected changes, and do some testing on the staging server to make sure everything works as you expect it to, and file bugs if it doesn't.

The 5dot2stage-site-issues project that Sonya refers to will let you see the current status of upgrade testing and review issues other project owners have noticed in their own testing.

Things you should really pay attention to - our mailing lists and project-based forums will be merged together in a new feature called discussion services. If you use mailing lists or forums as a part of your project, please play with this for a bit to make sure you understand how it works Also, please make sure you can get at your code, your issues, and see how the new wikis work.

In The Big Upgrade Part Two: What's happening to the wikis?, Sonya details the wiki conversion plan:

As part of the upgrade we're EOLing the existing community level wikis. Each project will have it's own wiki going forward. We're going to move things like the FAQ, javapedia, people pages, and the jobswiki into the java-net project wiki.

The timeline for wiki conversion is spread out, in order to give project owners adequate opportunity to move all relevant content from the old wiki platform to the new, and provide wiki readers with continuity. The current Twiki wikis will become non-editable on Friday, April 17. Population of wikis on the new moinmoin platform begins on Monday, April 27. On Friday, June 12, the current wikis will go offline.

A wiki conversion tool is available, to assist in converting specific wiki pages to the new format. Help from the conversion team is also available.

There really isn't a lot of time left before the projects infrastructure upgrade begins. If you'd like to test the new platform and begin converting your key wiki pages, the time to get started is now.


The latest Java Mobility Podcast is Java Mobility Podcast 76: Sound of Motion, in which Vladimir Savchenko of Sound of Motion talks about their Java ME application that transforms their cycles into advanced cycling computer.


In Java Today, olabini introduces Google's new App Engine release in Java on Google App Engine: "About 5 minutes ago, Google announced that they have released a Java version of App Engine... I have been involved in this for a few weeks ... and it's been a very interesting time. This post and a few others will take a closer look at what I've been experimenting with. First of all, GAE/J is not based on Dalvik, as far as I can tell. It is a full Java implementation, so you compile your applications locally, using any standard JDK and then upload them..."

The Pushing Pixelssite, it announced that the First signs of Nimbus designer in JDK 7 have been sighted: "A few hours ago an interesting changelist has made its way into the JDK 7 Swing branch. It definitely looks like the Nimbus designer will be available as part of JDK 7. Unfortunately, it does look like this changelist does not contain all the files that are part of Nimbus designer (see below for the walkthrough), but hopefully this will be amended in the following days. In the meanwhile, here is what i've been able to do..."

And the Jspresso team announces the release of Jspresso Java RIA Framework 3.0.0: "Jspresso - http://www.jspresso.org - is a free and opensource framework dedicated to building RIAs that offer a desktop-like user experience. Among many improvements, one of the major features of this release is the native support of Adobe's Flex as a deployment option. All Jspresso-based applications will instantly run on the Flash plugin without a single, hand-written, line of MXML or ActionScript in their code base."


As I said above, today's Weblogs feature two blogs by Sonya Barry about the upcoming changes to the Java.net projects infrastructure: The Big Upgrade Part One: Have you done your testing yet? andThe Big Upgrade Part Two: What's happening to the wikis?

Also, Jean-Francois Arcand writes about the new Grizzly in 1.9.11 released! What's cool with Grizzly 1.9.11? "Grizzly 1.9.11 is freshly released. What's cool? Get ready: Servlet Deployer, HttpService OSGi spec support, SSLConfig, XML config a la "Spring", Performance improvement...and a new LOGO. Meet the new monster!"


The current java.net Poll, which ends tomorrow, asks "Are you more likely to use a library or framework if it comes bundled for your IDE or build tool?"


This week's Spotlightis about the upcoming Community Corner Podcasts at JavaOne.


In today's Forums,vkoniecz has a question about applying One UserTransaction with one XA resource and two non-XA resources?: "Hello. I made several tests on GlassFish 2.1 about the Last Agent Optimization. First thing, it looks like that this parameter is not taken into account, see https://glassfish.dev.java.net/issues/show_bug.cgi?id=7262. I have just attached an EAR to reproduce this bug. This EAR is using 3 datasources, one is an XA datasource, the two others are non-XA ones. I configured two connection pools : the first one with javax.sql.XADatasource and the second one with javax.sql.Datasource."

jslott provides the answer to a question in Re: Programatically loading cell from xml- WL.5dev3: "Hi there, Yes, what are you seeing is what we'd expect to happen. The Darkstar middleware layer imposes a 100 ms timeout on all tasks. This is necessary to ensure the real-time nature of the system. This works fine when simply updating the state of objects, but one quickly runs into the 100 ms timeout when doing things like I/O, as you have run into. (So it's not the actual creation of the object that's taking too long, it's the downloading data over the network that's taking more than 100 ms). The solution is to write a Darkstar "service" which is free from the 100 ms timeout constraint."

And euqaz is trying to integrate Glassfish, Spring, EJB - EntityManagers: "Hello, I'm working on an application and trying to find a good way to integrate Spring into EJB3. My goal is to be able to inject an EntityManager into my Spring beans so that they can access entities and the database when needed. When running in Glassfish I would like my Spring beans to get a container managed EntityManager from Glassfish and when running in a testing capacity I'd like to be able to use an entity manager provided by Spring."


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.net project owners: the time to act is now! The long anticipated Java.net Projects infrastructure upgrades will take place in just two weeks...  

Successful technologies have a natural tendency toward feature bloat over time. This makes sense, because once a technology becomes widely used, the user community--a varied lot--submits requests for enhancements. The development team naturally wants to respond to the community's needs, and new features are integrated into future releases of the technology. Unfortunately, this can ultimately lead to the technology becoming so feature rich that it becomes formidable for new users to embrace it.

Today's Java Today lead article, by Charles Humble, talks about the pruning that is planned for the upcoming Java EE 6. You can see all the details in JSR 316. Charles points out that the current Java EE appears complex and intimidating to new developers:

new developers looking at the the platform don't always realise that it is as well suited for developing simple systems, such as basic CRUD web applications, as it is for building much more complex ones.

JSR 316 admits that "the reach of the Java EE platform has become so broad that it has lost some of its original focus." To address this, the development of Java EE profiles is proposed. These profiles will consist of Java EE editions that target a specific platform or purpose. The first such profile will be the Java EE Web profile, which Roberto Chinnici outlined in his Java EE 6 Platform Public Review Java.net post in January.

The addition of profiles will bring to Java EE one of the advantages that has contributed to the success of Linux: a stable core technology that is available in multiple, differentiated packages. Users then would not say "I'm going to use Java EE"; rather, the decision would become "which Java EE profile is most suitable for my needs?" There appears to be widespread agreement with Rod Johnson's statementfrom last summer that the "one size fits all model" is less and less appropriate.

Profiles are a great idea. But pruning is always difficult. Even if relatively few developers are using the to-be-pruned features, when features are pruned, it puts those developers into a bind: upgrading to the new platform will break their applications! Yet, if they don't upgrade, then their application will be at acompetitive disadvantage, because it will no longer embody the state of the art underlying core technology. It is for this reason that many technologies adopt the deprecation approach, where features that are considered prunable remain available within the base technology for years, but developers are advised to steer clear of these implementations and apply their more up-to-date equivalents.

These difficulties may be part of the reason why Java EE 6 has experienced such a curious history thus far. Chris Adamson talked about the surprising events that occurred last year between April and July with the Java EE proposal: "Scratch JSR-313... EE 6 lives on as JSR-316." A Java.net poll on JSR-316 found that, among participants who were interested in the JSR, most liked it; but the largest plurality of voters had no intention to read the JSR, and quite a lot of people who planned to read it hadn't yet done so.

Even the JSR-316 Public Review Ballot didn't show the unity you'd like to see in a major technology specification: while major participants like Sun, HP, IBM, Intel, and Oracle voted "yes," Apache voted "no," SpringSource abstained, and Eclipse and Nortel did not vote. So, there were 12 "yes" votes. That's 75%, but still...

The history of Java EE 6 is indeed interesting. A valiant attempt is underway to mold and massage the technology into being a more viable competitor going forward. The development work to accomplish that will be substantial, just as the decision-making on what to prune and how to package the next Java EE has at times been a procession of fits and starts.


The latest Java Mobility Podcast is Java Mobility Podcast 75: Daniel Green on kids and computers, in which Daniel Green from Sun Microsystems talks about computers in education, getting kids excited, and computer clubs on thumb drives.


In Java Today, Charles Humble writes about Pruning The Deadwood from Java EE: "A key reason for the success of the Java EE platform is its breadth of coverage, however the number of APIs and technologies that make up the specification also create issues for both developers and vendors wishing to adopt it. For new vendors wanting to build a Java EE application server, the complete specification represents a substantial barrier to entry reducing competition in the space. For new developers coming to Java EE, the vast numbers of APIs and acronyms can be intimidating."

Rick Hightower published An Introduction to Spring AOP: "This article discusses Spring AOP in a tutorial format. It covers some of the newer features of Spring AOP like annotations, improved XML configuration and more. It builds on the DIIntroTutorial. It is meant as a simple introduction to AOP. Enough information so you ?can use AOP on a project."

And Danny Coward reports about the upcoming release of JavaFX inJavaFX: Faster, faster!: "One of the things the JavaFX team is working at for the next release is graphics and video performance, and, is doing so in the light of experience from app developers with the technology. Like book author Jim Connors, who today posts an interesting look at ways to keep an interesting design, but with fewer items in the scene graph to make it. Or in other words, how many nodes does it take to make a clock."


In today's Weblogs, Arun Gupta provides a new lesson of the day, LOTD #19: Securing GlassFish Installation: "Found great (old) blogs (part 1, part 2) by Masoud Kalali that discusses the different ways to secure a GlassFish installation. Changing master password and admin console passwords (both web-based and CLI) are two fairly trivial operations..."

In Much A-do About Nothing, Cay Horstmann writes about a dilemma relating to loops: "I describe my dilemma about the proper treatment of the do-while loop in an introductory computer science textbook. I want to position it as an advanced/optional topic, but reviewers want to give it equal billing with the while and for loop, even though it is rarely used (about 2% in the JDK library source)."

And Manfred Riem talks about EJB Almanac @ActivationConfigProperty: "How do you filter what messages are to be consumed by a message driven bean? There comes a time you want to split the stream of messages to particular message beans. This annotation can be a handy thing to accomplish that..."


The current java.net Poll, which will end on Friday, asks "Are you more likely to use a library or framework if it comes bundled for your IDE or build tool?"


This week's Spotlightis about the upcoming Community Corner Podcasts at JavaOne.


In today's Forums, Doub Twilleager responds to a query about Re: WL 5 Dev 3 "Pick" issues: "How are you sending this to Wonderland? Who calls createSceneGraph()? There are many systems that are built around jME to support all of the Wonderland features. Because of this, vanilla jME code needs to be put into the system in very specific ways. Here are a couple of examples: - Lights: jME has a very restrictive way of propagating light state in the graph, so we have a layer on top of jME to deal with lights."

greg80303 has questions about Executing java/javac build commands under Cygwin: "I am building phoneME Advanced CDC PBP on Win32 XP using Cygwin and cross-compiling to MinGW. Cygwin "make" does not support the use of windows-style pathnames. It does not like the ":" character found in windows pathnames and it confuses it with the ":" that separates targets from prerequisites. The error usually manifests itself when a makefile includes the GCC-generated dependency files (.d) and you will see something like this: obj/romjava0.d:1: *** multiple target patterns. Stop."

And Chen Fishbein responds to the query Re: Memory leak? Some profiler analysis: "Hi, The Dimensions and the Rectangles you see are basically the dirty areas on the screen that the ui needs to refresh, therefore they change all the time. Most application don't have a running thread that keeps changing the ui all the time, and if nothing is changed the UI thread is in a wait mode causing no harm to the memory. I agree there is room for improvement here, but you shouldn't get too concerned from this, please open an RFE on that matter."


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.



Successful technologies have a natural tendency toward feature bloat over time...  

It's time to start your JavaOne planning, especially if you're involved in a Java-net project and you'd like to take advantage of the opportunity to talk about your project in a Community Corner Podcast. These podcasts will be replacing the mini-talks that have taken place at past JavaOne conferences.

Sonya Barry, who's coordinating the Community Corner podcasts, had this to say in her recent announcement:

If you have a project you want to talk about email your Community Leader with your idea, a link to your people page, a brief abstract, preferred recording times, and if your prefer to be interviewed or do a slide deck presentation. NOTE: "presentations" will be made in a recording booth with only the host as an audience, but we will record the location of your slide deck in the beginning of the recording so listeners can follow along.

The Java.net CommunityCorner 2009 Wiki has the full details. There is also aJava.net Community Corner forum where you can post ideas, ask questions, etc.

You can view the current Community Corner Podcast Schedule and select your preferred time slots. Recording times will be on a first-come first-served basis, so if you'd like to talk about your project in a podcast, now is a good time to get started.

I'm really looking forward to my first JavaOne! I plan to see all of the Community Corner podcasts. I may even host a few!

Anyway, we're all very busy -- but the truth is that JavaOne will be upon us much sooner than we think. So, now is the time to take advantage of the opportunity to organize and submit your proposal for a JavaOne Community Corner Podcast.


The latest Java Mobility Podcast is Java Mobility Podcast 75: Daniel Green on kids and computers, in which Daniel Green from Sun Microsystems talks about computers in education, getting kids excited, and computer clubs on thumb drives.


In Java Today, Sonya Barry announces the details about the upcoming Community Corner Podcasts at JavaOne: "Will you be at JavaOne? Do you have something to talk about? Submit a proposal for a podcast! The Community Corner 2009 wiki is up now! It's got a full explanation of the shift from mini-talks to podcasts, as well as the complete instructions for signing up. You can also view the latest Podcast Schedule.

James Sugrue interviews the authors of a new refcard in Flex and Spring Integration Refcard Released: Meet The Authors: "Today we release the Flex & Spring Integration Refcard, which is now available to download. I asked the authors, James Ward and Jon Rose, a little bit more about integrating both technologies, as well as getting their views on the future of RIAs and whether JavaFX can fit it's place alongside Flex."

And Dave West covers the current state of Java transactions inTransaction Strategies Based on Java Transaction Models: "The concept of a transaction is essential to assure data integrity and consistency. A complete understanding of transactions requires familiarity with basics, models, and strategies... The Java platform supports three transaction models: Local Transaction model, Programmatic Transaction model, and Declarative Transaction model."


In today's Weblogs, Sergey Malenkov writes in his post Weather on SunTechDays about the JavaFX applications seminar he'll be co-leading at this week's Sun Techdays in St. Petersburg, Russia: "I'm going to participate in it and hold the "Developing Innovative Multimedia JavaFX Applications" seminar together with my colleague. I'll be talking about accessing the web services and deploying applications. My presentation will be based on the WeatherWidget sample that was slightly refactored. So, what kind of weather to expect on the conference?"

Vivek Pandey writes about how to Plug-in any Ruby/Rack based framework to GlassFish: "GlassFish gem as well as GlassFish v3 supports Rack. Rack provides an interface to plugin a Ruby web framework with a web sever. Similar to Python WSGI. This means that any ruby based framework that can talk Rack can be simply deployed on GlassFish."

And, Kumar Jayanti describes SOAP Message Security with Password Derived Keys: "With Latest Metro 2.0 bits you can now try signing and encrypting SOAP Messages using the WSS 1.1 Password Derived Keys Feature. This is useful incase one does not want to use Certificates or Kerberos tokens etc..."


The current java.net Poll, which will end on Friday, asks "Are you more likely to use a library or framework if it comes bundled for your IDE or build tool?"


This week's Spotlightis about the upcoming Community Corner Podcasts at JavaOne, which I wrote about above.


In today's Forums, Shai Almog explains the LWUIT project's branching and ports philosophy: "We don't open branches for a reason. We are already maintaining several ports and every branch will demand additional maintainance which will require resources we can't afford. I did tag the change to allow you guys to work against an older version until we get the code right. Furthermore, keeping a branch will provide no benefit since the main advantage of LWUIT is the one API for all."

Wolfram Rittmeyer asks for assistance form the community in Re: Getting a list of all active ServeltSessions?: "Hi Guys, We're woprking on a very interactive app. As such the code handling one user sometimes needs to be aware of the state of other users in the system. Is there a proper servlet way to do this? Logically info on a user's state belonsg in his or her session, but I cant find a way to read that from a servlet being executed on behalf of a different user."

And Marina Vatkina responds to the question Re: Glassfish process crashing. What are the recommended next steps?: "Are you using JPA in your database access? If yes, which implementation do you use? If you use JPA, check if caching is involved. If yes, look at tweaking caching size and strategies.Regards, -marina."


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.



It's time to start your JavaOne planning, especially if you're involved in a Java-net project and you'd like to take advantage of the opportunity to talk about your project in a Community Corner Podcast...  

Filter Blog

By date: