Thursday, December 20, 2007

All Apple Fan, All Geek?

So after reading Matt Raible's post, I had to know how I measured up. So here it is: 73% Geek 89%How Addicted to Apple Are You? For fun, my wife and I thought we'd see how we'll do in the pending Zombie Apocalypse, we got a 55% chance (I tried to copy the URL and reloaded the page, maybe I should re-evaluate my Geek percentage).

Tuesday, November 6, 2007

Rocky Mountain Software Symposium

I just finished uploading my slides for this weekends Rocky Mountain Software Symposium (aka NFJS Denver). I have two sessions, one on JPA and another on Maven 2. Here are my presentations. I hope to see you there.

Monday, November 5, 2007

Eclipse Tip

Are you tired of seeing all Java files in your Eclipse project showing this icon: Would you like to know if a Java file is an enum, an Interface, or maybe an annotation? Just turn on the Java Type Indicator preference and your class icons will change from this: to this: . For detailed instructions on how to turn this preference on, check out this Eclipse help page.

Sunday, October 28, 2007

Upgrade to Leopard, the story so far

I was really looking forward to upgrading to Leopard today but I'm not sure if I'm happier now that it's all done. Apple is starting to do some really stupid things lately. I've been a Apple/Next user/developer since 1992, eight years on Next and the last seven years on Apple. I have to ask, what the hell are they thinking? No Java 6 support, key bindings removed for Front Row, you cannot use an AirDisk with Time Machine, AirDisks don't work and so on. I guess I'll have to see how things go over the next week or two, but I'm not going to install Leopard on any other mac in my house till things get better. On a similar note, I bought a Apple TV a few months back and returned it after two days. I've never been unhappy with an Apple product before, but this seems to be becoming a trend :-) I love my iPhone, but Apple's tendency to control every aspect of my computer is really starting to piss me off. BTW, wtf is up with Front Row, when I browse out of the "Music" section the music stops, Front Row 1.x didn't do this, it played music till you picked something else for it to play. I'm going to watch a movie, I'm sure that will be more enjoyable than the last hour has been.

Thursday, October 11, 2007

Getting Maven and Eclipse to work together to filter resources

I don't really care for any of the Eclipse plugins currently available for Maven (m2eclipse or Q4E), however I do like the Maven plugin for eclipse (it seems to be the only one that works). At everyone uses Eclipse, so as we are moving to Maven it is important that Maven work well in the IDE. Most folks checkout their code, develop and then check there code back into svn via Eclipse, never hitting the command line. Obviously, the Maven Eclipse plugin won't be good for them, so currently we are using m2eclipse for Eclipse/Maven integration. One of the problems I've been running into is filtering resources, I believe if you are using m2eclipse and you choose (from the popup menu) Maven -> Update Source Folders all your resources will be filtered (if you have filtering turned on in your pom.xm). I don't want to do that and folks will forget to do it, furthermore, since I do use the Maven Eclipse plugin (requiring the command line) and I don't use m2eclipse, this won't work for me. So how do you get Maven and Eclipse to work together? This feature request for m2eclipse provides some pointers. Eugene suggests using a Maven build(er), but I cannot do that (because I'm not using m2ecilpse and I couldn't get it to work correctly when I tried), so I'll use a Program builder instead. In the Package Explorer, right click on your project and select properties, this brings up the Properties for xxx dialog box. In the list on the left, choose Builders, as shown in the image below (click on any of the images below for a larger version): Next, click the New... button and choose the Program builder: In the Properties for New_Builder (1) dialog box, use the Browse File System... button to locate your copy of the mvn executable. For the Working Directory section, click the Browse Workspace... button and select your project. For the Arguments section add the following:
resources:resources resources:testResources
Here is how the dialog should look like so far: To finish things off, select the Build Options tab at the top of the Properties for New_Build (1) dialog box and make sure the During auto builds check box is selected (actually you want all check boxes under Run the builder to be checked except for During a "Clean"). Next select the Specify working set of relevant resources check box and then click Specify Resources.... In the dialog box that pops up, navigate to your src/main/resources and src/test/resources folders and click the check box to the left so these folders are included in your working set, click Finish. Here is what the Build Options tab should look like: That's it, now when you refresh your workspace, try to run a unit test, etc. all your resources are filtered just as if you were doing it from the command line. If you have a way to do this correctly with m2eclipse or Q4E please let me know. Update: you may want to add the -o command line switch for Maven so that it doesn't try to look for JARs to download. You will want to add -o to the resources:resources... code above. Update 2: If you are using the m2eclipse plugin, check out Eugene Kuleshov's response to this post. Also, if you decide to keep using an external builder, you'll want to make sure the "Refresh resources upon completion." check box is selected on the Refresh tab of the builder dialog box. Update 3/12/08: In the "Build Options" section above you'll need to select all options under "Run the builder", so that it runs both during and after a clean. Also, I no longer use the m2eclipse builder, I only use a Program Builder.

Wednesday, October 10, 2007

Welcome to the Twilight Zone

Since I'm caught up on the latest Java Posse episode, I thought I'd listen to the radio on my way into work today. It turns out my local NPR station just started it's fall membership drive. After about five minutes of listening, one of the local sponsor's (a car dealership) joked about programming everyone's car radios to always tune to an NPR station. Laughing, I decided to switch stations, well guess what? Every station I turned to was NPR. No kidding, it was so bizarre that I had to call my wife to tell her. When I turned the radio back on, it was on another station. Then when I went back to NPR, all stations played NPR. I'm not sure what was going on but it seems that my radio only wants NPR ;-)

Friday, September 28, 2007

Annotated JAXB Classes

Over the last week or so, I've started to use JAXB along with the Restlet framework. We are actively developing RESTful web services here at So being new to the Restlet framework, I was eager to get started. One type of representation supported by Restlet is of course XML. To generate XML representations we are using JAXB 2. Being an advocate of annotations, I thought I'd start with annotated POJO's and let the JAXB provider do the rest (I assumed this would be a lot like JPA). I ran into a problem however, trying to create a JAXBContext for my package, I got this error:
WARNING: Problem creating Marshaller
javax.xml.bind.JAXBException: "com.overstock" doesnt contain ObjectFactory.class or jaxb.index
It took me a while to figure out what went wrong. So now that I've got things working correctly, I thought I'd post this example and solution to hopefully save you some time. Given this class:
 1 package com.overstock;
 3 import javax.xml.bind.annotation.XmlAccessType;
 4 import javax.xml.bind.annotation.XmlAccessorType;
 5 import javax.xml.bind.annotation.XmlElement;
 6 import javax.xml.bind.annotation.XmlRootElement;
 8 @XmlRootElement(name="example", namespace="")
 9 @XmlAccessorType(XmlAccessType.FIELD)
10 public class ExampleJaxbClass {
12   @XmlElement(required=true)
13   private String elementOne;
14   private String elementTwo;
16   protected ExampleJaxbClass() {
17     super();
18   }
20   public String getElementOne() {
21     return elementOne;
22   }
23   public void setElementOne(String elementOne) {
24     this.elementOne = elementOne;
25   }
26   public String getElementTwo() {
27     return elementTwo;
28   }
29   public void setElementTwo(String elementTwo) {
30     this.elementTwo = elementTwo;
31   }
32 }
You can easily convert it to XML via the javax.xml.bind.Marshaller class, like this:
 1 public class ExampleTest {
 3   @Test
 4   public void generateXml() throws JAXBException {
 5     ExampleJaxbClass ex = new ExampleJaxbClass();
 6     ex.setElementOne("first Element Value");
 7     ex.setElementTwo("second Element Value");
 9     // Get a JAXB Context for the object we created above
10     JAXBContext context = JAXBContext.newInstance(ex.getClass());
12     // To convert ex to XML, I need a JAXB Marshaller
13     Marshaller marshaller = context.createMarshaller();
15     // Make the output pretty
16     marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
17     StringWriter sw = new StringWriter();
19     // marshall the object to XML
20     marshaller.marshal(ex, sw);
22     // print it out for this example
23     System.out.println(sw.toString());
24   }
25 }
Here is the XML generated by the annotations above:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:example xmlns:ns2="">
<elementOne>first Element Value</elementOne>
<elementTwo>second Element Value</elementTwo>
Now for the problem. To create a marshaller, you first need to create a JAXBContext via its newInstance() factory method. You can create a context for a specific JAXB class, as in the example above, or you can create a context for a list of packages (check out the javadoc page for more). When using the Restlet class JaxbRepresentation (only available in Restlet 1.1m1), it uses the package version of newInstance(), that's when I got my error above. I didn't want to create an ObjectFactory (apparently this is another way to get around the above error), at least not yet if I could help it, so I wanted to get some more info on the jaxb.index file. I couldn't find out much, I even looked at the JSR-222 spec. Well, it turns out that all you need to do is add class names to the file and place the file in the package (directory) where your JAXB annotated classes reside (it's similar in one way to a jpa persistence.xml file but without the xml). Here is the content of my jaxb.index file for the example class above:
As you can see, its just the class name, not the fully qualified name (the package name is determined by the directory you placed the file in) or the .class name. If you want to test this out, we need to slightly change the test above. Modify line 10 in the unit test above to look like this:
JAXBContext context = JAXBContext.newInstance(ex.getClass().getPackage().getName());
If the package com.overstock does not have jaxb.index file, this change will cause the test to throw the JAXBException. Add the file and everything works great. If you know where there is good documentation on this let me know I couldn't find any :-)
Code formatting courtesy of Code2HTML.

Friday, September 14, 2007

Goodbye consulting, hello

It would have been much better if I'd posted this month's ago but I've been so busy with work and the UJUG (Utah Java User Group) that I haven't had much time to blog. I'm hopping this will change from today onward. So my first bit of news is that after being a consultant for most of the last eight years or so I've finally decided to take a full-time job with I actually started back in April of this year, so I've been there for a while now. I must say that I'm having more fun at than I've had in years. That is part of the reason I haven't been blogging, my day job is so satisfying that when I get home I don't need to challenge myself with something interesting, I get to do interesting stuff all day long. I'm hoping to start blogging a little more often (like more than every two months) and talk a little bit about what we are doing, from a technology standpoint that is. On another note, I just finished an article on JPA for I think it will be posted on Tuesday of next week (Sept. 18th). If you are interested in looking at the source, you can check out the project page here.

Friday, July 20, 2007

Salsa and the iPhone

On Tuesday my wife and I (along with our three boys) went out for dinner. At some point my wife asked what time it was, so I reached down, grabbed my mobile phone (SLVR) and much to my surprise, it slipped out of my hands and right into the salsa in front of me. Once I cleaned it off, I told my wife it was 6 PM or something. Then I realized that the USB port was full of salsa. I cleaned it out the best I could and hoped that I hadn't toasted another phone (the last time I had a "cool" phone was about three years ago and that one was washed with the rest of my clothes about a week after I got it). When we got home, I plugged it in and let it charge all night. The next day, around 9 AM or so, I started to get the low-batter warning. Around 10 AM, it shut off. Another phone, gone. Joking around I said, now it's time for an iPhone. After talking with my wife for a while I realized that it would be really cool to get an iPhone. After all, I was now phoneless (never mind the beaten up, featureless one I had at home). A quick run down to our local Apple store, and I had an 8GB iPhone.

Friday, July 13, 2007

I was on the Java Posse?

I was really surprised last week wen I was listening to the Java Posse and who are they interviewing at the booth? Java User Group folks, and low and behold there I am. Check out episode #129 at the 39:29 mark to hear about the Utah Java User Group. BTW, if you don't already listen to the Posse, I'd highly recommend it, it's a great source for the latest news and interviews with the who's who of the Java community.

Tuesday, June 12, 2007

Safari 3.0 Public Beta

After hearing about the various Mac OS X Leopard announcements, I was happy to see a public beat for Safari. I downloaded it yesterday and started to play around with it. I was really surprised, it is a lot faster than Safari 2.x. Not only is it faster, but I cannot live without the new inline find feature - it is so cool. Yes Firefox has had this for years, but not as usable as Safari's implementation. As a longtime emacs user, I've always liked inline searching way more than the popup finder window most applications have. If you haven't tried out the new Safari yet, I'd suggest you give it a try. If you are a windows user, have you tried it yet? The closest I get to windows is Parallels on my mac and I try to avoid that if possible too. Oh yeah, Apple also fixed the annoying quit "feature" where Safari would just quit, no matter how many windows you had open, if you hit apple-q (or Safari->Quit Safair). Again, another Firefox feature but a welcome addition nonetheless. Go windows? Let me know how Safari performs. Update: I just installed Safari in Windows via Parallels, and to my surprise not only did Safari get installed but so did Software Update. Wow, Software Update is an integral part of Mac OS X. Does this mean that Apple is starting to take over the Windows desktop? What do you think?

Tuesday, May 8, 2007

CommunityOne comments so far

After JavaOne last year, I told myself I'd attend NetBeans day in 2007. A month or so ago I registered for JavaOne and signed up for NetBeans day (not a very smooth process, I actually had to call someone to register for NB days because I'd already registered for J1) anyway, just after that Sun started to promote CommunityOne Day. So here I am at the first CommunityOne day, the day before JavaOne starts. The reason I wanted to come to NetBeans day (now CommunityOne day) was because it is so small. James Gosling just walked by me and he wasn't mobbed :-) I attended a presentation earlier today where Jonathan Schwartz was speaking and he was standing right behind me before the session started. Where else could you talk to Jonathan Schwartz with only 100+ people in the room? The message today has been pretty clear, Sun is going to open source all of its SW and innovation is the key. Almost every talk I went to today emphasized innovation. The argument goes like this, if Sun isn't trying to control everything, then their engineers are free to think about and work on innovation, it's what will set Sun apart from the others. Jonathan described the market as a really big pie and that there is plenty of room for many players. He also described how Sun will make money with this strategy, pull-through business by selling support, services and hardware. I think for me personally, I'm really excited about what Sun is doing. By making everything open source and freely available, means I can use the SW at home and on my own personal projects and in turn I can use it at work. I can see CommunityOne day being really big in a year or three so if you get a chance, I'd suggest trying to attend next year, before it's as big as JavaOne itself. For me, being able to talk to Jonathan or stop James in the hall is reason enough to come to CommunityOne. The content is somewhat different from J1. Instead of only being about Java (you could argue J1 is also going this way) you get exposure to everything Sun is doing in the open source space.

Java SE: Present and Future

Presented by Danny Coward Java SE Platform Lead, Sun Microsystems ( Everything you need to know about what's going on in the Java Platform, Standard Edition (Java SE platform). The goal is to give you an overview of everything that has happened over the last year or so. Danny will talk about things available today and things that will be covered in SE 7 tomorrow. Agenda, it's all about Java SE 6 Platform, the making of Java SE: java speaks in many tongues, breaking up is hard to do, Java SE on the desktop, some important upgrades. Changing the face of java, we are shown a slide with a timeline showing the various Java releases: JDK 1.0 pre 1997, J2SE 1.2 pre '99, J2SE 1.3 around 2000, j2SE 1.4 2002, pre 2005 J2SE 5.0 and just before 07 Java SE 6. Java SE 7 may be available just before 2009. Year in review, JDK 6 adoption, slightly more than half of all downloads of the JDK are SE 6.0. Java 6 JRE was release in April of 07. There are about 50,000,000 JDK downloads a month. The top 10 new features in SE 6, Web Services, Scripting, database, more desktop API's (SwingWorker, JTable sorting and filtering, GroupLayout - the layout manager used by Matisse), monitoring and management, compiler access, pluggable annotations (define your own annotations), desktop deployment, security, the -ilities: quality, compatibility, stability. Tools as part of SE 6: jconsole, jps, jmap, jhat (analyze memory usage), jstack (see BOF-2816), you don't need to start the JVM with any special options to use the probs, they attach dynamically. Java SE 6 is much faster than previous version of Java. Today, Java SE is open sourced, available under GPL. There are a couple of components only available in binary format due to licensing issues. As part of Java SE 6, the team started to do weekly builds and that made the move to open source much easier. Open JDK Community now available at An interim governance board has also been establish (see Opening Session for member names). How Java SE Platform gets developed, the JCP defines API Specifications and OpenJDK implements those specifications. Why go multi-lingual? the Java programming language is the best general purpose language! Many other languages, many other virtues, rapid prototyping and experimentation, particular styles of programming, mixing different types of developers, or just for fun. In Java SE 6, Sun implemented JSR 223, Scripting for the Java Platform, developer APIs to mix script fragments in, Framework APIs for adding script engines, Collecting conforming scripting engines, see, Sun added a JavaScript technology engine, JavaScript technology works out of the box. Here is a code sample: ScriptEngineManager m = new ScriptEngineManager(); ScriptEngine js = m.getEngineByExtension("js"); js.eval("print('Hello, world!')"); Check out the SE 6 demo directory for examples of how to use the new features. Multiple Languages in JDK Version 7, turbo-charging scripting engines, new bytecode for dynamic method dispatch, 'supporting dynamically typed languages on the Java Platform (JSR 292)', investigate hot swapping. Bundling more dynamic languages and engines, see JSR 274, JRuby, Jython, BeanShell, JavaFX technology script. Java SE is an enabling technology for these new technologies. Changes in Java SE 7 (for a complete list, check out Alex Miller's blog), reading is more important than writing, one language same meaning; everywhere, simplicity matters. Seeking a small number of changes for SE 7. Candidate changes for Java SE 7, superpackages, extensions to the annotation syntax, language support for java technology properties, control abstraction constructs (closures, CICE, first-class methods), operator overloading,rough edges (shorter variable declaration, strings in switch statements, etc. Modularity in Java SE 6, deployment time, interfaces and implementation classes, information hiding, assertions. Deployment time, JAR and Resources framework. One of the problems is with the packaging structure, let's say you have a picture and text package and they in turn use a data package, but the client can access all three package. What if you only want to selectively provide access to packages or classes in the package you can use superpackages. For an indepth discussion see the Strawman Proposal for JSR 294. Packaging, as in ZIP files and later JAR files, was originally put together for applets, but the specification hasn't changed in quite a while. This will allow you to define versions, dependencies, etc. and will likely be called JAM files, JAR file will still be supported however. For modularity see superpackages JSR 294, modularity 277 & 291 OSGi interoperability. They both have open mailing lists. Swing development, swing is a powerful toolkit, some developers are put off, time to make it easier. See JSR 295, 303, and 296 for how Swing will be simplified. However, SE 7 is a ways off, so what can we do for SE 6? How does Java stack-up against Flash? Not well, start-up time is poor, installing the JRE is slow, install tool is not consumer friendly and the size of the JRE keeps getting bigger and bigger (~ 12 MB). To fix these problems, Sun is going to release a consumer JRE release in late 2007 early 2008. Qickstarter, pre-load the cache, before launch, not the same as having a running VM, cooperates with the OS, a radically improved experience. Java Technology-based kernel, modularizing the JRE software, just enough to run "hello world", install the rest in the background: referencing a class, Class.getResource or equivalent, System.loadLibrary() or equivalent, custom JRE version for applications that need it. As a prototype, the team put together some trial, to run "hello world" the JRE was 2 MB, the SwingSet2 demo was just under 4 MB, whereas the whole JRE is 12MB. In SE 7, JMX is going to be revamped, see JSR-255 Java Management Extensions v 2.0 (JMX) and JSR-262 for web services connector for JMX agents. JSR-203, in early draft, a new file system API, java.nio.filesystem.Filesystem, listen for file-system changes. Other Kiri's to note 360 Javadoc Tag Technology Update and JSR 310 Date and Time API. Java SE 6 is available today, Open JDK is being built See for Java SE blogs.

JavaOne General Session

Well, I managed to almost get a front row seat, I'm in row three, right in front of the main podium, very cool. They have a DJ (Anna, - not sure if this is the right link but I think that's what John said) playing some good trance music (if you like that sort of thing) and now the DJ is being shown on the big screen,she's mixing songs, and she even has a record player she's using (BTW, she's using a mac and a Dell, I think it's a Dell). One interesting thing, all the web browser being shown on giant screens are Safari, the Mac OS browser, I guess the folks at Sun like Apple. Another Apple note, the two laptops on the podium's are MacBook Pro's and there's also a PS 3. Here is a list of some of the pages shown being shown on the screens up front:,,,,, (showing the Lost page),,,,,, the Vine from E! on-line, they are also running some animations on Google earth, and They are also showing videos of folks walking down to the session. It's 8:30, so the session should be starting any minute now... ah, it's starting now, they just asked everyone to take their seats. Okay, I thought it was starting but it seems we are still waiting, I guess everyone hasn't sat down yet. BTW, I just stood up and looked around, the room it completely packed, there are people as far as I can see, looks like there is a good attendance this year. Rich Green is pacing around, getting ready to talk I think. The music just got a lot louder and then faded out. John Gage was just announced and is now on stage. "Welcome to the 12th annual JavaOne Conference", said John Gage. John read from an article in today's NY Times. John held up the SavJe phone and said Sun is going to Open Source all the SW that made up the phone. Sun wants to make the phones so ubiquitous that the cost comes down. We need to remove our dependency on power and create new power sources (e.g. solar). John asked that everyone forget that they are British, Norwegian, etc. and be Brazilian! Then all the Brazilians started to yell and holler, "that's what Brazilians are like, warm and friendly". Don't sit with someone you know, sit with someone you don't know. Next he had everyone stand up and then asked those first-time attendees to sit down, then 2nd, 3rd, 4th, etc. and ended with quite a few 12th time attendees still standing. One of the goals for this year's J1 is to be zero-carbon or carbon-neutral, that is, all carbon expended for travel, catering, toilet flushing, etc. be accounted. They didn't realize just how massive an undertaking this would be, so they are going to work towards being carbon-neutral for next year's JavaOne. One key to being carbon-neutral is having small devices instead of large one's we've used before. We are now shown a video on how Java technology effects all of our lives. Next up is Rich Green, EVP Software, Sun Microsystems, Inc. We are going to have some big name guests on the stage today. Later we will talk about some new things we are going to be doing with Java. Rich is taking about, technology as a catalyst, the network is an unstopable social force. More than 1/2 a billion folks joined the network this year compared to millions (I missed the number) connecting via traditional computers. This is Rich's one year anniversary of returning to Sun. Here are some numbers for Java, 6M Developers, 5.5B Devices, 2.5M GFD downloads, 800M desktops, 1,8B phones, 11M phones. Here is a state of Java summary: GF from Enterprise to Media, V2 is an enterprise ready with scripting source (JRuby), available for Solaris, Windows, Linux and Mac OS X. GF is an enterprise transaction system, but it can do a lot more, so using the GF technology as a server-side technology. Rich asks up Martin Harriman, VP Marketing & Biz Dev from Ericsson to join him to talk about how Ericsson is going to open source (they are not doing a good job of telling us what it is, they mentioned it once and I missed it) multi-media IMS using GF on the server-side. Real time java: Ultimate predictability, finance, telecom, aviation, industrial-control and more, real-time with conventional tools and standard operating system. Given this code: java.lang.Thread can now be replaced with javax.realtime.RealtimeThread The CIO of NASDAQ is coming up Anna Ewing, the NASDAQ has more transaction per day than the next two equity exchanges combined, for a total of 150,378 transactions per second and it's all on Java technology. Anna is really excited about real-time Java and NASDAQ will be using real time Java. Her team is currently working with Rich's at Sun on using this technology. Java is Digital Entertainment, meet millions of consumers where they live - engage, PS 3, Blu-ray Disc, set top boxes. Next up is Tom Hallman, the VP of production operation Digital Authoring Center, Sony. Tom is talking about BDJ (Blu-ray Disc Java) and online connectivity. So this year when you buy S-M 3 at Christmas you'll see trailers relevant to 07, but next year you'll see trailers for '08 (live content). Tom shows us Open Season on BD and how Java technology is being used for animation and Tom said they are looking for Java folks to do something new. NetBeans 6: Unlock you potential, dynamic scripting with Java: JRuby 1.0 and JavaScript, GUI builder further simplifies client apps, robust new editor, modular packs for everything you need (Mobility, C/C++, Web, and more). Announcing today, OpenJDK, Sun is announcing the completion of open sourcing Java. Next, the governing board for Java, Doug Lea (State University of NY), Fabiane Nardo (CTO VIDATIS), Simon Phipps, Mark Reinhold, Dalibor Topic are the board. Also announced today, is the open sourcing of the TCK to ensure compatibility across the OSS community (note: I wonder if Harmony will be happy with this or not). So why did Sun choose GPLv2 as the license for Java? The GPL license forces all the development to be done in the open to keep all versions compatible. Java and NB will be part of the next Ubuntu release all thanks to the GPL licensing of these tools. Using a MacBook Pro, Rich is composing an email to the community, body: Today begins the next phase for Java. I am pleased to announce that we have completed the open source release of Open JDK. It's a great day for innovation - and remember compatibility matters! Rich. The email was sent off to the Open JDK community. We are now done open sourcing Java. Open equals opportunity, so what's next? It's open so what do we do now... Rich said some things could be done better, Java on servers is great, they are on mobile devices and desktops, but there is something else folks want them to do. It's time to reach the rest of the planet, Humankind: the biggest opportunity of all. Everyone want's Java to be faster, faster, faster (download, execution, etc.) The following releases of JDK 6 will all be focused on making all areas faster. But wouldn't it be cool if... let's a new focus on media, a new platform, JavaFX. Introducing JavaFX, consumer focused family of Java technologies, high impact consumer markets, based on Java SE. It's all based on Java SE. The big announcement is: JavaFX. Introducing JavaFX Script, scripting language for rich Internet applications, road map for content authoring tools, designed for content professionals, leverages Java's unmatched reach, stability and security. Rich is going to show us a demo, and is asking up Dr. James Gosling (the father of Java). James things JavaFX script is a really exciting new technology, created by one of the Sun engineers Chris Oliver. The system is all about creating really rich, exciting Java interfaces. Rich said, this is Sun at it's best, an engineer at Sun working on his own. Chris Oliver joins James and Rich on stage. First demo is a rewrite of a Motorola site using JavaFX. Underneath is Java, Swing, and Java 2D. It took Chris three days to reproduce a really cool looking site from Motorola, (see studiomoto for an example of what was reproduced). Next is a partial recreation of Tesla Motors site but all in JavaFX. A demo release is now available. JavaFX script runs on all JavaSE release out there without modification. But, wouldn't it be cooler if we could reach everyone else? Is there a way to take the power of Java on the desktop and make it available to everyone else? JavaFX Mobile, The network in your hand. Complete and fully integrated Java software system for mobile devices. Open, standards-based Java technologies, Supports JavaFX content authoring tools. When Rich went to show the demo it turns out he had the wrong handset. Then he shows a (editor note: iPhone like) phone all written in/with JavaFX. It is an open development platform. Sun wants to separate the OS from the phone much like we would do with a desktop and it's OS. This will be run as a traditional OEM business model. Now Rich is going to show us a showcase application, first Rich asks up Marco Boerries, SVP of Yahoo!, Yahoo! Go. Yahoo! Go, reinvents mobile search, to create a set of search results that are mobile phone friendly. We see flickr, maps, news, etc. Yahoo! Go is an open system, later this year, Yahoo! will let developers get access to the code so they can add their own content. Reaching humankind: now you can. Next up is Jonathan Schwartz, CEO and President Sun. Jonathan thanked Rich for doing what he had hoped Rich would do, drive creativity like JavaFX. Not only does Sun want to reach the largest companies and countries of the world but they also want to reach the smallest companies and countries in the world. While in the US we are used to computers as the gateway to the Internet the rest of the world uses mobile devices. Jonathan welcomes up, Dr. Djibril Diallo, NY Office of Sport for Development and Peace ( It is unacceptable that 1.5 B people will go to bed tonight hungry. The UN is fighting for equality between women and men through out the world (no country teats their men and women the same). Sun is going to establish, engineers without boards (like doctors without borders). Sun is going to work with the UN on how to start connecting SW engineers and connect them to other engineers in the world. Jonathan asked Scott McNealy (Chairman and Co-Founder Chairman, Sun Federal, join them on the stage to talk about bringing education to the world. Scott said that with Rich Green, Sun now has it's own version of Steve Jobs, everyone laughed. When Scott went to look for free open information for his kids and couldn't find anything, so Sun started The goal is to give the entire world access to a first grade to twelveth grad education. Final slides: Unstoppable growth, java joined world's largest OSS community, rich Internet applications, network in your hand. Imagine the possibilities... the source for Java Technology Collaboration, Get Involved... Contribute... Innovate.

Monday, May 7, 2007

GlassFish: Getting Started and What's New in GlassFish V2

I don't have anything planned till noon, so I thought I'd check out the "GlassFish: Getting Started and What's New in GlassFish V2" talk. Eduardo Pelegri-Llopart of Sun and the GlassFish Team (Karen) are giving an overview of GF V2. I got to see a preview of GF V2 last year, so I'm hoping to see some more cool things this time around. Karen started off, welcoming everyone to the first ever, "GlassFish Day". Since the are looking for user feedback, they've offered everyone who fills out a survey either a T-Shirt, memory stick (with GF v2 preloaded), or a sticker. Karen told us that instead of meeting Jonathan for lunch, he'll join us in this room for a Q&A for about 30 minutes, then it's lunch. Next up is Eduardo to talk about what's new in GF. In order to best answer everyone's questions, the leads for each technology in GF are here to answer questions, after the presentation. For more info on GF, check out,, He is now showing a time-line of Project GlassFish, showing the launch of GF June '05, v1 final JavaOne '06, V2 beta 2 J1 '07. What is Gf? It's the Java EE 5 RI, it's enterprise quality, bases for Sun's AS 9.0 & 9.1. What does RI mean? When you create a JSR, the EG also needs to produce either a proof-of-concept or implementation to prove the technology can be created. Earlier RI of other JSR's were proof-of-concept, but in the case of GF, this RI is actually production ready, not a prototype. It has a dual license, either CDDL or GPL v2, you as the user of the framework get to decide the type of license you want. GF is also a community, like Apache, but not nearly as large - Eduardo's words, not mine :-) In addition, GF is also a collection of other projects, like jMaki, Phobos, BlogApps, JAX-RS, etc. An important note, all GF related discussions, etc. are kept outside of Sun, except for a few instances, GF is it's own project run outside of Sun, outside of the firewall. Next slide, "A Taste of Java EE 5", for those who have not seen it yet... first we are shown an overview of J2EE 1.4, its powerful, a standard, but too difficult to get started, ever simple apps need boring boilerplate, in Java EE 5 we eliminate the boiler plate, and make simple things simple. Java EE 5.0 = (J2EE 1.4).next, the theme of Java EE 5 is "Ease of Development". It's embraces a POJO based programming model. We are shown the standard, here is how it was and here is what it's like now slides for JAX-RPC, of course the Java EE 5 version is about 5 lines of code with no deployment descriptor (compared to the 30 lines of code and 50 lines of XML for the J2EE 1.4 version). Bill Shannon said, "Not your father's J2EE". That's it about Java EE 5, just a taste. Now on to the GF community, the principles of the community are:
  • industry-leading technology, (no secret sauce)
  • want adoption of code base (no secrete sauce for code base
  • this is all of it (editors note: aka not like JBoss)
  • community centered
  • transparency
  • continuous improvements
  • participation
  • integrated
  • open standards - JCP
  • etc.
  • OSI License
  • clear copyright (SCA).
If you contribute code to GF you keep the copyright but you also give the copyright to GF (very similar to what Apache does). Why is Sun doing Open Source? Ubiquity, lower barrier to adoption, better products, more know-how, larger, faster adoption of Java EE 5. Revenue - training, support, consulting, systems (HW). Sun get big portion of pie, as pie gets bigger so does Sun's share. Code donations include Sun Microsystems, Oracle, TmaxSoft, BEA, JBoss, Jetty, etc. etc. GF v1 has been released, last year at J1 '06. GF v2 includes everything that could not make it into GF v1, new WS stack, load balancing, cluster management, some scripting support, community, transparency, adoption. GF v3 better modularization, better scripting, etc. GF would like everyone using Tomcat to start using GF. For memory replication Sun used to use a HADB (High availability DB), here they would store the HTTP session state, EJB's, etc. Now GF also has memory replication, which most customers will likely use. Memory replication of of the box, create a domain, use the cluster admin profile, create cluster and instances deploy your application with availability-enabled=true and that is it. The underlying technology used for memory replication is JXTA, originally developed for peer-to-peer but is good for managing memory replication. JAX-WS and JAXB implementations, considering giving this a new name because of their popularity. JAXB RI is the de-facto industry standard, JAX-WE is much faster than Axis. Next is JBI (Java Business Integration), built in support for JBI (JSR-208), JDB run-time OpenESB. As for GF, there used to be multiple profiles, platform, enterprise, etc. now there is just one download and the developer/administrator choose the profile the time of domain creating. Improve user experience based on the profile chosen, GF v2 will support Developer, Cluster, and Enterprise profiles. There are some security enhancements, JSR-196, ECC (Elliptic Curve Cryptography), JNKS (java key store), support for "assign-groups" in security realm, support for JDBCRealm. One the Web Container, includes JSF, JSP, Grizzly, ARP (Asynchronous Request Processing) and comet, non-blocking SSL, Apache ajp protocol, in-memory JSR 199 style JSP compilations, generic NIO framework Grizzly 1.5) Top Link Essentials/ JPA, oracle contribution, very active community Oracle, Sun, TmaxSoft, independents, Pluggable in GF, JEUS, Jonas, Tomcat, etc. GF V3 will have a modular system, you only load what you need, open, starts in 0.5 seconds on the best PC, 0.7 on Eduardo's laptop

Q & A Session with Jonathan Schwartz and Rich Green

Very cool, Jonathan Schwartz was right behind my seat and I didn't even see him. Steve Olson just joined me, so we are going to listen to Rich and Jonathan together. Jonathan is talking about the the minimal foot print for GlassFish and how it can now run on a phone (GF v3). Jonathan and Rich are doing everything they can to remove all obstructions. There was an old saying at Sun, "Innovation happens elsewhere" and they want to foster innovation. They want to breakdown barriers and foster innovation. Investors keep asking Jonathan why Sun keeps giving away their ideas and an engineer @ Sun said they are not afraid of running out of ideas. Question about convergence, OSGi vs Java Modules, etc. Rich could not really answer the question but he did say, if we use late binding for the implementation, we can then decide on the right solution at deployment and not have to make a decision @ development. Editorial comment: I'm not sure how viable this suggestion really is. Companies that handle really large volumes of data cannot wait till later to chose the technology but I'm many applications will be able to leverage this type of architecture or development style. Jonathan talked about the choice to Open Source their software and how he sees the value Sun provides. If you are self-sufficient (as most are) you shouldn't have to pay for SW, however, if it is important for you to have immediate support when something goes down or you don't want to support it yourself, Sun can provide support and that is where the value is. The more open the more folks can innovate, so Sun is really moving towards the real revenue. Sun isn't Costco, they are not interested in bulk, they are interested in innovation. In a sense, they don't have a plan, that is to day you cannot plan innovation, it happens but you can plan for and create an environment that fosters innovation.

Thursday, April 19, 2007

JavaOne 2007

A lot has been going on since my last post, I've changed jobs, almost crashed my car - twice, and I'm going to JavaOne. I hope to provide the same coverage as I did last year, which is to take almost transcript like notes for all sessions I attend, then I'll post them here. If you are going to be at JavaOne let me know so we can plan a meet-up.

Tuesday, March 6, 2007

JPA 101 on The ServerSide

Chapter 7 of JPA 101 is now available on I've got some JPA related material I need to put on this site, so check back later today for the Maven 2 JPA archetype and some other stuff :-) If you are interested in purchasing this book, you can find it here at Let me know what you think of the chapter.

Tuesday, February 20, 2007

AirPort Extreme - I want one

I was just reading an article on the new AirPort Extreme and I think I know where my next $200 - $500 is going :-) I've been thinking for a while now that Apple needs a good NAS solution, and here it is. It looks totally awesome. Now adding an AppleTV to my home network makes a lot more sense and besides I have a few episodes of Heroes that I'd like to watch, so what better reason to get some new toys.

Thursday, February 1, 2007

Good-bye JRoller hello eBlogger

I don't know how many of you use JRoller but it has just sucked the last couple of months. When I first started to use JRoller about a year ago it was pretty good, now it seems something is always broken. The referrer page has been broken for months and the summary of blog stats one the front page hasn't work for months either. What's going on guys? I decided instead of waiting for things to get better I'd just switch blogging software. As an avid Java user and champion it pains me to leave JRoller but like everything else if it doesn't work, fix it or replace it. So welcome to my new home. In case you check my old page from time to time you'll want to redirect your bookmark to this site. I'm sorry to say good-bye to JRoller but the time has come to move on. RIP JRoller.