Tom's Blog
During a JavaOne session today, Linda DeMichiel, Sun's EJB specification lead, said the EJB 3.0 experts group wants to make writing EJBs easier so that even "corporate developers" could write EJBs.
Yesterday, I heard a Sun person say one of the goals of Java Studio Creator is to allow "corporate developers" to write Java web applications.
Do corporations just hire less-skilled developers? Or does something happen to a developer when he or she joins a big corporation?
Update: Since my attempt at irony didn't come across after three hours of sleep, I want to point out that corporate developer is an unfair term when what is meant is lesser-skilled developer.
Tuesday June 29, 2004 Permalink
Comments [6]
Can you run multiple Java applications in one virtual machine to boost speed and reduce memory requirements? Apparently, engineers at Sun are trying to find a way to do this. And from this first JavaOne session I attended this morning, it sounds like this could happen in the next year or so.
This research effort at Sun is called Project Barcelona, being led by Grzegorz Czajkowski, a senior staff engineer at Sun. Sun wants a JVM to run multiple applications in order to:
- Improve application startup time
- Boost performance
- Lower the memory footprint for Java apps.
Some fruits of Barcelona will be available in the new HotSpot JVM in J2SE 1.5. Those improvements will allow classes running in different JVMs to share some read-only data. But Grzegorz Czajkowski stressed that Barcelona still is a project, not a product. The first real product to allow multiple Java applications to run in the same JVM should come this fall in the Connected Limited Device Configuration of J2ME, he said.
The Barcelona project has created a Multitasking Virtual Machine.
MVM works using a daemon process on Solaris,
called the mserver,
and acts as a central point
of contact for all Java applications that want to run.
The Java startup command becomes a short-running application to contact
the mserver daemon, which starts the Java app within its single JVM.
Pretty neat.
The current MVM shares common classes, bytecodes and some of the runtime system, Grzegorz Czajkowski said. The MVM is in charge of isolating the different applications to ensure they don't collide with each other, and that security constraints are still handled on an application level and don't run with the security permissions of the MVM. Here's the great news:
- Application startup time is reduced by about 96% for non-GUI applications, 33% for GUIs.
- Memory requirements shrink 30% to 50% for each application.
- Runtime performance suffers only slightly. I think he said the MVM creates a performance overhead of only about 1%.
If Sun can make the MVM part of Java, our Java applications should become less of the memory hogs they are, and start up much faster. Can you imagine the day when Eclipse launches in a few seconds rather than after you've returned from your coffee break?
Tuesday June 29, 2004 Permalink
Comments [2]
Scott McNealy, during his JaveOne keynote today, made sure everyone knew Sun Microsystems and Microsoft are partners moving forward. With a $2.4 billion check, MS and Sun will be working together for the next 10 years, getting the Liberty Alliance and Passport systems working together, getting LDAP and MS Directory Server to work together for an enterprise single-signon solution, integrating .NET and Java, and other joint ventures.
But even though Sun and MS will be working together, the Redmond relationship isn't all warm and fuzzy. First, he publicly invited Microsoft to get involved in the Java Community Process.
"Come to class and participate and contribute," he told the crowd. "This is my open letter."
Apparently, his private invitation for Microsoft to join the JCP hasn't worked, and a little public pressure was in order. Second, McNealy took a few digs at Windows. He referred to the Java Deskstop System as an "upgrade" to Windows, then blasted Windows for being a warm, moist and welcoming host for a plethora of computer viruses. Viruses cost companies $300 billion a year, he said.
"Where's the outrage against viruses? ... They're Microsoft viruses."
Some other notable remarks from McNealy:
- Sun will continue running Java.
"Someone's gotta be in charge." And that someone will be Sun in the foreseeable future, apparently. - 90% of all web visitors will hit a site running Java.
"Java is everywhere," he said. "You can't get away from it." - Sun is healthy and isn't going anywhere.
A little scary that McNealy felt he had to say this. But he pointed out that sales are up and the latest quarter's numbers that will be announced in a few weeks will reinforce this, he said. - Java.net has 41,000 members, with 1,000 open-source projects hosted.
- Project Looking Glass is now open source under the GPL.
This was announced yesterday, as coming soon. Soon turned out to be today. - Legislation to force companies to expense stock options will harm innovation.
He said everyone with stock options will lose them if companies have to count them as expenses. Tell your representatives in Congress to stop the move toward the requirement for companies to consider options an expense. "We can't have this world run by accountants," he said.
Now, I'm off to the technical sessions. I'll update later today on what was interesting.
Tuesday June 29, 2004 Permalink
My favorite technical session of the day was the new concurrency utility package scheduled for release this fall in J2SE 5. (the newly rebranded J2SE 1.5.) If you're writing multi-threading applications today and you're not using Doug Lea's package, get it. The new java.util.concurrent package is based on it.
The session was conducted by Brian Goetz and David Holmes, both on the JSR 166 experts group.
The new concurrent package offers higher performance for multi-threaded applications in a package that's easier to use than using synchronize blocks and calling wait() and notifyAll() in a while loop. As David Holmes said in the session, if you find yourself synchronizing a block of code, look at the new concurrent package for a better solution.
The new java.util.concurrent package offers:
- Built in thread pools
- A class to let you schedule a runnable
The runnable may execute at a certain time from now, on a specific date, or run on a regular interval. - New concurrency-friendly Collections classes
As Brian Goetz said, you can get thread-safe Collections objects in Java 1.2+, but those collections aren't concurrency friendly. I.e. they don't run efficiently in a multi-threaded environment. - Atomic variables
These are thread-safe variables you can get and set in a multi-threaded environment without worrying about synchronizing access.
An example from the session: Instead of writing:
Runnable r = ... new Thread(r).start();
and creating a new, and potentially unlimited number, of threads each time, you'd write:
Executor pool = Executors.newFixedThreadPool(10); ... Runnable r = ... pool.execute(r);
to ensure your runnables are executed in a maximum of 10 threads, that are reused and not left around as garbage upon each use.
The new threading package should make threading easier to use for those times when you must use threads, don't want to write a lot of synchronized blocks with notification loops, and want to use a standard Java package.
Monday June 28, 2004 Permalink
I just arrived at JavaOne on a sunny Sunday afternoon. I got side-tracked on my way over to the Moscone by the Gay Pride parade rolling down Market Street. At first, my goal was to cross Market to wend my way over to the conference center, but then the parade was fun to watch for a while.
Once I checked in and got my conference catalog, I noticed just about every session is marked Advanced. If the session is labeled a "round-table" or sounds like marketing, it gets the Introductory label. There seem to be about three "intermediate" sessions offered. I'm wondering if most of the content this week really will be advanced, or is the labeling more of a grade inflation in our supersized world.
I point out this "advanced" nature of the sessions because I think a lot of the excitement in the Java world right now -- a lot of what will make JavaOne hot this year -- is the trend toward simplicity.
In the Java language itself, we have new features in 1.5 that should make programming easier: autoboxing/unboxing, the enhanced for loop, generics, typesafe enums, and the new java.util.concurrent package J2SE 1.5 that should make threading easier.
On the application server side, we have products like the Spring Framework and Pico Container to make developing and testing applications easier. On the data persistence side, we have products like Hibernate, iBatis, and Cayenne to help turn our database data into Java objects without all that messy JDBC code. And we even have the coming features of EJB 3.0 itself, which holds out the promise to make enterprise computing easier by not having to worry about the container as much as we have to today.
So overall, I see the life of a Java developer getting easier, at least in the coding part.
What I do see getting more difficult, though, is the increase in what Java can do. AWT, JFC, SWT, EJB, JAXB, JAXP, CMP, CMT, JAX-RPC, SAAJ, JAXR, JAAS... We can't be experts in them all. Java is just too big and getting bigger all the time. But if your specialty is on the client tier, IDEs and plug-ins help create GUIs better today than a few years ago, including web GUIs with tools like Java Studio Creator. If your specialty is the web tier, you have easier abstractions over the servlet layer with Struts, Tapestry, JSF, Spring and the soon-to-be open-sourced Net-UI package from BEA. If your specialty is the application server tier, you have tools like Spring today to help you get past the EJB comlexity, and EJB 3.0 in the future to help do the same. And the above-mentioned data-persistence packages.
And that's why I'm at JavaOne this year. We can do more with Java, and doing it is getting easier. There is more excitement about Java today than there was in the past two years, when a malaise seem to set in after .NET grabbed not only the headlines, but the attentions of IT decision makers. Now that the reality of .NET is starting to spread, that it is not a magically "easier" solution, I can proudly say:
Java is back.
Sunday June 27, 2004 Permalink


