Coming Up for Air

2022

August

April

March

  • Exporting Arquillian Archives

    A big part of the testing we do on WildFly involves in-container testing, for which we use Arquillian. It’s a great tool when it works right, but sometimes things don’t. When that happens, I find it helpful to examine the archives that the tests produce. Fortunately, Arquillian makes that easy if you know that magic words, and they’re not easy to find, so I’m going to fix that here. :P

January

  • Testing with Quarkus, jOOQ, and Testcontainers Redux

    In a recent post, I showed how one could fairly easily test your Quarkus application against a Testcontainers-managed Postgres database. While that works great, my set up is a little more complex, and I found the solution lacking. In a nutshell, as part of my build, I use Flyway with H2 to create a schema, then jOOQ’s code generation against H2 to create the needed classes. That all worked well enough until I found some types that didn’t quite map correctly against newer versions of H2 (a security issue necessitated the update), so I decided I should finally make use of the same database from start to finish. In this post, I’ll show how I did it.

2021

December

  • Testing with Quarkus, jOOQ, and Testcontainers

    In a project I’ve been working on, I’ve been targeting PostgreSQL, but testing with H2. While that works, I’m a big fan of having the test environment match production as much as possible. That said, I don’t like to have external system dependencies for tests, such as requiring having a database installed. That’s where Testcontainers comes in. In this post, I’ll look at how I integrated Testcontainers into my Quarkus+jOOQ project

October

  • WildFly and Micrometer

    Earlier in the summer, I wrote some about the addition of OpenTelemetry support in WildFly. With the release of WildFly 25, that support is now official and in the wild. With 25 behind us, we start looking at 26, and my next effort will be to integrate Micrometer metrics into the server. In this post, we’ll take a look at what that might mean, as well as presenting a way to take an early look.

  • A Quarkus Command Line Application

    Most people know Quarkus as a great way to build fast, scalable microservices. What many may not be aware of, however, is that Quarkus can also be used to build command line applications as well. In this post, we’ll take a look at how we can leverage the Quarkus ecosystem we already know to build a command line utility quickly and easily.

July

  • An Update on OpenTelemetry and WildFly

    In a recent post, I worked through setting up OpenTelemetry support in your Jakarta EE application. Since that time, I’ve put quite a bit of work into integrating that support, as teased in the post, into WildFly. In this post, I’d like to provide an update on what that WildFly support currently looks like, and put out a request for feedback.

June

  • OpenTelemetry and Jakarta REST Services

    Knowing what’s going on in your microservices deployment is extremely important when something goes wrong. In a distributed system, though, it can be difficult to know where things have gone wrong. That’s where a tracing system such as OpenTelemetry can be immensely valuable. In this post, we’ll build two simple services, one of which calls the other, and trace the execution from end to end.

May

  • A Simple Jakarta EE 9.1 REST Project

    Jakarta EE 9.1 was released today, which now lets developers use — officially — Java 11 with the shiny new Jakarta EE namespace introduce in EE 9. So what does a simple Jakarta EE 9.1 REST project look like? I’m so glad you asked. :)

March

  • Microprofile Fault Tolerance Retry in Action

    As part of some of my recent work, I’ve gotten some exposure to some Microprofile specs I’ve not had the opportunity or need to use. One of those is Fault Tolerance. I was curious to see it action, so I’ve cobbled together this simple example that demonstrates some of that spec’s features, namely retries and fallback.

February

  • Securing and Testing Quarkus Applications using Keycloak and Wiremock

    Obviously, web apps need to be secured. If you’re brave (and some might say foolish), you can roll your own security. Unless you have compelling reasons to do so, however, you probably shouldn’t. Almost as if by design (nyuk nyuk), Quarkus makes it easy to use any OpenID Connect server. One such server is Keycloak, an open source offering also from Red Hat. If your experience is like mine, though, securing endpoints makes testing a touch more complicated. In this post, I’d like to present and walk through a complete example of a secured Quarkus app, using Keycloak, JUnit and Wiremock.

2020

September

  • Java 15: New and Notable

    JDK 15 hit General Availability today. While I spend most of my time in Kotlin these days, I do keep a close on Java, as it still has a special place in my heart, so I thought I’d make a quick post highlighting some of its new features. :) There are quite a few changes in the release, so I’ll list all of them, but focus on the ones I think most developers will find more interesting.

2018

December

  • A Possibly Silly Question about Java Visibility

    This morning, I was asked a question by a coworker that we both thought we knew the answer to: if a method is protected, can other classes see that method? The answer surprised us: maybe. :) It’s a pretty simple, basic question, but I thought I’d mention it in case there’s a beginner wondering, or more senior developers, such as myself and my team mate, that just have it wrong. :)

April

  • Resurrecting Turbo Vision

    If you wrote software on a DOS system in the 80s or 90s, you probably used one of the Borland products, Turbo Pascal or Turbo C, with that beautiful, beautiful blue, mouse-enabled text-based user interface (TUI, if you will). Those IDEs were powered by a library called Turbo Vision (TV), which Borland documented and published for others to use. I loved it. While we all live in a GUI world and there are lots of libraries for building GUIS, I have for years now been dying to be able to use TV again, if for no other reason than hard core nostalgia. The problem being that I have used C in about 2 decades, and, to be honest, I’m not sure I’m too excited about writing even toy apps in the language. Dead end, right? Not so fast.

    Enter, stage left: SWIG. SWIG, the Simplified Wrapper and Interface Generator, is a tool for building wrappers for libraries written in, say, C or C, for languages such as Python, PHP, and... Java. While it may not be the best option, it's an option, and I've been tinkering with it off and on for many, many moons now with the C version of the library open source by Borland long ago, before they were sold off and the Borland brand quietly disappeared. Tonight, I made great progress on it.

March

  • String.format()... You May Be Doing It Wrong

    If you’ve been working with Java for very long, you’ve probably had occasion to use String.format() . And, if you’re like me, you may very well have been doing it "wrong". Let’s take a look at what was, for me, common usage, and how, maybe, you should be doing it.

2015

July

  • Be Careful with Statics

    I recently came across an interesting piece of code at work:

    1
    
        private static final DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");
    

    What struck me as odd was the private qualifier and that the fact that SimpleDateFormat is not thread-safe. Is the private some odd attempt to work around concurrency issues, or was thread safety just overlooked? That led me to this question: Is a private static still one instance per JVM, or does the private actually change anything? My understanding was that this was a bug, but I thought I’d write a test just to make sure.

June

  • An Introduction to Programming with Minecraft at the Oklahoma City JUG

    On Monday, July 13, I will be leading the monthly OKC JUG session, whose topic this month is "An Introduction to Programming with Minecraft Mods". We’ll be using a modified version of the curriculum Arun Gupta has developed for this Devoxx4Kids program, with examples taken from the book he and his son wrote, Minecraft Modding with Forge: A Family-Friendly Guide to Building Fun Mods in Java.

    Here is the announcement sent to the Oklahoma City tech community. If you’re in the area, come check it out!

  • Running IDEA 14 on Java 8 on the Mac

    My team at work was having some issues with IDEA and the Checkstyle plugin. Based on the error message, and without actually looking at the JARs, it seemed pretty clear that the issue was a JDK version issue. While I think this issue has been resolved, when I set up my Mac months ago, I was forced to install Java 6 in order to install IDEA, but, apparently, the new version of the Checkstyle plugin was compiled with a newer JDK (as it should be). Whether or not the Java 6 issue still exists with IDEA, you can make IDEA run on Java 8 pretty easily, and I’ll show you how to do it.

2014

February

  • CLI Libraries Compared

    I recently ran across a couple of pretty cool libraries for creating command-line tools: Airline from the Airlift project, and crest from Tomitribe. Having spent the last few years working on administration for GlassFish, this is an area near and dear to my heart, so I thought I’d cobble together a quick example using each to see how usable they are.

2013

April

February

  • Simulating Swipes in Your Android Tests

    As some of you may or may not know, I have small Android project, Cub Tracker, that I’ve been working on for quite some time now in my spare time. I’ve been trying to be better about quicker releases, but all the testing for the app is currently manual (and, therefore, hit-and-miss), so updates tend to be a bit slower and very cautious. (For the record, it used to have pretty decent tests, but I rewrote the app for version 2 and just never got around to porting/rewriting the tests.) My next change, though, will be pretty invasive, so I’ve decided it’s time to fix that. In doing so, though, I hit a snag pretty quickly. Cub Tracker now uses a ViewPager as the main form of navigation, and I quickly realized I didn’t know how to swipe from one page to another. It turns out there are several different ways to do it. Here are some…​

January

  • Oracle JDK and the Linux Alternatives System

    For both work and fun, I run Linux. I’m also a Java guy, which poses some interesting challenges, as most Linux distributions have a long, sad tale regarding shipping Java. Things are a bit better, I guess, with OpenJDK, but I’ve always liked running the "real thing", which historically meant the Sun JDK, and now Oracle’s JDK (Note: current employment has no bearing on that choice ; ). If I were running an RPM-based distribution, I would be set. At the moment, though, I’m running Linux Mint, so I get to use the tarball.

    Most of the time that works fine, but for reasons I don’t remember, OpenJDK was installed on my system, and now everything is using that (which is at Update 7, and not the recently released and more secure Update 11 that I want). I’d rather not monkey with changing PATH and all that, so I turned to the Linux alternatives system to handle things. Sadly, it wasn’t quite that easy, as alternatives needs to know about your alternatives, so before I could change things, I had to educate it, which turned out be easier than I feared. With Java 7 Update 11 installed in /opt/java/jdk1.7.0_11 and symlinked from /opt/java/latest, I had to do two things.

2012

December

  • Asynchronous JAX-RS

    Recently, I had to add support for asynchronous REST calls to the GlassFish REST interface to satisfy some customer requirements. In process of doing so, I learned something pretty interesting: while asynchronous REST may mean different things to different people (e.g., I’m pretty sure Atmosphere provides some sort of REST asynchrony, but I’m not sure what UPDATE #1: As noted in the comments, I know next to nothing about Atmosphere. I mention it here only as some weak attempt at completeness that is, in hind sight, a really bad choice), implementing an async REST resource with JAX-RS is really quite simple. In this post, we’ll take a look at two different approaches to "asynchronous" REST.

October

September

  • Converting Many Images to One PDF

    I recently had the need to convert several scanned images into one multi-page PDF. While there are probably tools to help do this manually, I knew that there was a good chance I’d have to do something like this again, quite possibly with a large number of images, so I did what any good geek would do: I scripted it. In this entry, I’ll show how I went about that.

July

  • Annotation Processing the New Way

    I recently ran into an issue with our dependency injection system: it won’t return a list of interfaces, only implementations. That system, for what it’s worth, is HK2, but CDI has the same "problem". Since the rest of the system worked using these interfaces, I really wanted to solve the discoverability issue rather than redesigning that part of the system. After considering and playing with a Maven plugin, I opted to use the javax.annotation.processing API. Let’s take a quick look.

June

  • Firefox, Linux, and the Java Plugin
    java plugin 300x284

    In a perfect world, Firefox, Linux and the Java plugin would get along happily. You’d install all three, and things would just work. If memory serves, that’s exactly what happened under Ubuntu. However, after installing Fedora 17, it just didn’t want to work for me (I’m not blaming Fedora, mind you. I like to live on the bleeding edge, so I install Java 7 nightlies from tar balls and not RPMs, so I probably broke something along the way). After much fumbling and guessing, I finally found a solution, which I’ll share here in case you’re in the same boat:

    1
    2
    
    $ mkdir $HOME/.mozilla/plugins
    $ ln -s $PATH_TO_JRE/lib/amd64/libnpjp2.so $HOME/.mozilla/plugins/libnpjp2.so
    

    And restart Firefox. You can verify that Java (i.e., applets and webstart) is working by going here.

April

February

  • Comparing JVM Web Frameworks - A Critique

    Recently, Matt Raible again presented his Comparing JVM Web Frameworks, this time at JFokus 2012. The intent of the presentation, as best as I can gather from half a world away, is to prevent some of the major JVM-based web frameworks, showing the various strengths and weaknesses, which will allow the audience to choose a framework more easily. While the goal is laudable, I’m just not sure how well executed the attempt was.

January

  • Grabbing Screenshots of Failed Selenium Tests

    For the GlassFish Administration Console, we have quite a few tests (about 133 at last count). Given the nature and architecture of the application, we’ve chosen Selenium to drive our tests. One of the problems we’ve faced, though, is understanding why a test failed due to the length of time the tests take (roughly 1.5 hours to run the whole suite). Sometimes, we can look at the log and know exactly what failed, but not the why. Did the screen render correctly? Did, perhaps, the click, etc. not get performed (we’ve seen instances of that) leaving the application in a state not expected by the test? Since I usually start the tests and move on to something else, we had no way of knowing. Until now. I finally sat down and figured out how to grab a screen shot when a test fails. I’ve distilled that technique down to its essentials, which I’ll share here.

2011

October

  • Funky Object Initialization

    I’ve been using a technique a lot, recently, for initializing an object a bit more succinctly. It looks pretty odd, I’ll admit, enough so that it really caught a coworker of mine off guard. If you’ve been reading my recent REST posts, you’ve seen this a few times. I like it a lot, so I thought I’d a take a quick look at it.

  • GlassFish REST Client Goes to the Flying Circus

    It happened a bit more quickly than I had planned, and, yes, I know that’s a pretty bad Python joke, but, as promised, I just committed code to add support for generating Python REST clients to the GlassFish RESTful Administration interface. Let’s take a quick look at it.

February

  • RESTful GlassFish Monitoring

    In previous posts, I’ve shown various ways to manage a GlassFish 3.1 server via its REST interface. As nice as that is, we also support monitoring your server via REST as well. In this article, we’ll take a look at some of the things you can ask of your server.

  • Java EE's Buried Treasure: the Application Client Container

    From time to time, I’m asked about accessing various EE artifacts (EJBs, etc) from a standalone client. Almost invariably, the user is having trouble getting the environment setup, grabbing an InitialContext, etc. Also almost invariably, my answer to them is "use the application client container", which is as far as I can take them. The topic of application client container, or ACC, came up again recently when I was asked on Twitter about an issue with ACC and GlassFish in a clustered environment. While this user (hi, Markus! : ) figured out his issue before I could be of much help, I took this opportunity finally to learn exactly what the ACC is and how to use it. Thanks to Oracle’s Tim Quinn for his patient and tireless help, here’s what I learned…​

  • Deploying Applications to GlassFish Using curl

    Over the past few months, I’ve been posting tips on how to use the REST interface in GlassFish v3 and later to perform various functions. My last post used Scala. In this much briefer and far less ambitious post, I thought I’d share how to deploy an app using curl (from the shell of your choice). If you’re familiar with the REST endpoint, there’s really not just a whole lot new here:

2010

December

  • Merry Christmas, 2010

    I’d like to wish all of my readers a very merry Christmas. It is my hope and prayer that in all the hustle and bustle of the season, that the first Christmas, the birth of the Jesus, the Savior of the world, is not lost. To help with that, I’d like to leave you with some of my current favorite Christmas songs. I hope you enjoy them. God bless.

    Hallelujah! Light Has Come - Barlowgirl

    Joseph’s Lullaby - MercyMe (fan video)

    Christmas Like a Child - Third Day

August

  • GlassFish Administration: The REST of the Story Part I

    Of the many great things about GlassFish, one that is often mentioned most (and is, in fact, what got me involved with GlassFish as an end user years ago) is the Administration Console. It’s an extremely powerful and capable interface, and is, if I may be so bold, orders of magnitudes better than its open source competition (it may even beat commercial competitors, but I have no experience with those). Another powerful tool in GlassFish administration is the asadmin CLI utility, which allows for quick and easy scripting of server provisioning, etc. Did you know, though, that GlassFish has a third administration interface? As of GlassFish v3, we offer a RESTful administration API, based on Jersey, to allow non-Java clients to configure the app server easily. For GlassFish 3.1, one of my main responsibilities, with the help, I should add of my coworkers Ludovic Champenois and Mitesh Meswani, has been to help improve upon the great start we had in in v3. In this entry, we’ll take a look at the current state of the interface and learn the basics of using.

May

  • Putting Facelets in a Jar

    In a recent forum post, a user asked how to store a Facelets file in a database. Although JSF doesn’t support this out of the box (though it would be a nice feature), it’s not too difficult to add. In this entry, I’ll show you how to serve Facelets from a JAR file, then give some thoughts that will help, I hope, implement a database-backed approach. I’ll be using JSF 2, so if you’re using Facelets 1.x with JSF 1.2, you’ll have to extend com.sun.facelets classes to make this work in that environment. With that out of the way, unto the breach!

2009

December

  • GlassFish v3 Virtual Conference

    This is a little late notice, but we at Sun are holding a "virtual conference" covering GlassFish v3, Java EE 6, etc. You can find details here. It starts in 30 minutes (10:00 CST, 8:00 PST). :)

November

  • The Mojarra Scales Demo Has Moved

    With the recent migration of Mojarra Scales to JSF 2, the old location of the Mojarra Scales demo was no longer adequate (upgrading that server posed some issues). For that reason, I have moved the demo to a new home. This server should be more up-to-date (both in terms of the application as well as the application server — which is GlassFish v3, of course — that runs it). When accessing the application, please keep in mind that it’s on an old server that’s running on an AT&T U-verse line, and the download times will reflect that. :)

    I’d also like to not that this showcases a couple of new components at the moment. I’ve begun an implementation of the YUI data table widget. At the time of this posting, basic table functions work, including client-side sorting. More complex functionality, such as Ajax updates, are in the offing.

    Another new component, which the demo uses extensively, is the excellent SyntaxHighligher script from Alex Gorbatchev. The demo uses this new component to show the page source for each demo, finally allowing you to see a given component in action, as well seeing the page markup that makes those components. The demo is still in flux, so some things aren’t quite "perfect" yet. For example, Safari really hates the markup the demo produces, which is a bug in the demo application itself. Hopefully, that will soon be fixed. For now, Safari users will need to use another browser.

    As I’ve noted, Scales has been migrated to JSF 2. While most components are working as expected, there are likely some minor issues to work out. If you run into any of these issues, or if you’d like to see extra functionality in any of the components, please feel free to file an issue on the Scales issue tracker on the Kenai project site.

October

  • JSF 2, h:dataTable, and Ajax Updates

    While JSF has had Ajax support for a long time now, it has always been through external libraries such as Ajax4Jsf/RichFaces, ICEfaces, DWR, DynaFaces, etc. With JSF 2, the framework now has first class, standardized support for Ajax. This is good news on several fronts. For those that want Ajax support but would rather not import another library, that capability is now baked in, and, for those familiar with a4j or DynaFaces, it should look very familiar. However, for those that don’t mind the external dependency, the standardized Ajax will make it much easier to mix and match component libraries on the same page, an issue that has plagued JSF for while. In this post, I’d like to take the first approach and show how easy it is to achieve Ajaxy updates on your h:dataTable using only standard JSF.

June

  • I've Updated My About Page

    I should note here, for those that don’t follow me on Twitter, that I have updated and expanded my About page, for those that are interested in that sort of thing. A word of warning: There’s some personal stuff in there! :)

  • JavaOne 2009 Day 4

    It just occurred to me that I never posted my final wrap up on JavaOne 2009. While it may be that, at this last date, no one cares anymore, I feel I should finish what I started, even if only for me. With that said, here’s my closing thoughts on what I hope is NOT the last JavaOne.

April

  • Mojarra Scales 1.3.1 Has Been Released

    Early this morning, I published Mojarra Scales 1.3.1. I’ve been remiss in making good updates where when I make release, so, rather than creating a new post for each release long after the fact, I’ll try to being everyone up to the current state in just one.

  • FacesTester 0.1 Released

    About a month ago, I announced a new project, FacesTester, a JUnit-based testing tool for JSF that my good friend Rod Coffin and I have undertaken. Since then, Rod posted a very nice introduction to FacesTester usage. Today, we made our first official release, FacesTester 0.1. The version number should indicate that it’s still a work in progress, but it is already quite functional (I, for one, have been using it to build a test suite for Mojarra Scales, which has helped drive out features and resolve bugs very quickly). We wanted to push out a release to encourage people to download it, use it, and give us feedback.

    So what does FacesTester currently support? Quite a bit. In this entry, we’ll take a quick look at what FacesTester offers, and what we have planned.

February

  • Another NetBeans Update

    Since the announcement in the recent layoffs at Sun on how the NetBeans team was affected, there’s been much concern over the health of the project. I’m not on the NetBeans team (I’m just a big Finkel fan! ;) so I can’t say for certain what’s going on, but it seems to me that Sun is still committed to the platform. Evidence of that comes in the form of an email I got today about the upcoming 6.7 release. Here is the email:

January

  • Mojarra Scales Gets a Z-Order Update

    As I noted in a recent entry, we are considering moving to a desktop-like interface for the GlassFish Administration Console, where the content is in separate "windows" (decorated DIVs, basically) which can be moved, closed, minimized, etc. As I’ve started working on a concrete implementation of some of those ideas, I quickly realized that we were going to have issues with multiple, overlapping windows. Once you have multiple windows open, the user has to be able to bring the desired window to the front, but YUI, which will likely be the library used, doesn’t support that natively. Fortunately, that’s easy to fix. First, an example of the problem:

2008

December

  • JavaFX 1.0 Release Set for December 4

    With the release of JavaFX 1.0 scheduled for this Thursday, December 4, the JavaFX team set up a technical pre-launch call and invited JUG leaders, Java Champions, NetBeans Dream Team members and others to call in and get a sneak peak at what was coming (audio and slides available here). Josh Marinacci was the engineer on hand to give us the preview. A couple of things stood out to me that has me pretty excited.

November

September

  • JSFOne: Day Two

    Day two is over, as I sit here on the morning of the third, despite my best intentions. It was a long day for me, but a good one, overall.

August

  • JSFOne Looms!

    JSFOne is just a week and a half away, so if you haven’t done so yet, buy those tickets! The Java Posse recently plugged the show in the Quick News section in what I think might be the greatest 34 seconds in Java Posse history. Listen for yourself. ;)

    http://www.macromedia.com/go/getflashplayer[Get the Flash Player] to see this player.

July

  • Maven and Annotations: Not as Easy as It Should Be

    Over the past year or so, I’ve been slowly migrating — somewhat accidentally — to Maven. I had even begun migrating the build environment for Scales from Ant to Maven, but hit a huge roadblock: annotation processing. Scales depends heavily on compile-time annotation processing, and the only thing I could find on the web was other people with the same problem. As I was working on some of my JSFOne examples, I really wanted to use Maven, as the NetBeans support is a lot cleaner with Maven versus an externally maintained Ant build file, so I set to with renewed purpose. Finally, I seem to have found the right query string, as I appear to have solved my problem. The solution? Ant.

June

  • Quercus on GlassFish via the Update Center

    Jim Driscoll wrote a really helpful blog entry regarding the GlassFish Update Center module he wrote for Mojarra. After reading that, I decided to revisit Quercus on GlassFish. Using Jim’s incredibly detailed entry, as well as looking at the code in the Mojarra 2.0 SVN repo, I was able to get an Update Center module working that installs and configures Quercus for you, so now all you have to do to get WordPress running, for example, is install this module, and extract WordPress into your document. Easy!

    For those interested, the Update Center url is http://uc.steeplesoft.com/quercus.xml. To set this up, you’ll need to start the Update Center ($GF_HOME/updatecenter/bin/updatetool.*), switch to the Preferences tab, click Add, and fill out the form. Once that’s done, switch to the "Available Software" tab, click the "Check for Updates" button in the upper right corner, and wait for the process to finish. You should now see Quercus available under the "Web Technologies" section.

    For those interested, the source code is in my Mercurial repository here.

    Due to some issues in GlassFish v2, automatic uninstallation is a bit complicated. The module supports it, but you have to get your hands dirty to make it work. Jim has details on his blog.

    If you use this, please let me know how it works out for you. :)

  • Mojarra Scales 1.0 RC2 is out

    I have just uploaded RC2 for Mojarra Scales 1.0, a JSF component set born of the Mojarra Sandbox. This release features a number of bug fixes and a handful of new enhancements. When updating, make sure you grab the latest JSFTemplating snapshot from either its download page or Maven, as there are some bug fixes and features there that Scales needs. You can download the last jar here.

  • GlassFish, PHP and WordPress

    With all the hype around JRuby, Jython, Scala, Groovy, etc., an oft-overlooked dynamic language with JVM support is PHP. Thanks to the hard work of the folks at Caucho Technology, the Quercus project offers a pure Java implementation of the PHP language, sporting support for a lot of the major PHP-based applications. In this entry, we’ll look at how to configure GlassFish to provide easy PHP support, and then look at installing WordPress, the popular blogging software (which runs this site) on GlassFish.

  • Where will you be the first weekend in September?

    For those of you that like to hear me speak (and, yes, I’m looking at you, Mom!) I will be at JSFOne, a conference brought to you by the No Fluff Just Stuff team and dedicated to the JSF ecosystem.

  • JSF 2.0 Early Access Review Available

    The JSF 2.0 Expert Group (operating under the auspices of JSR 314) has released Early Draft Review 1 of the upcoming revision of the spec. We are soliciting feedback, of course, and the window of opportunity for that runs through July 2. If you want to have some input on the direction of the specification, now is the time to speak up. :)

    The major changes in this draft release are baked in Ajax support, and what we’ve termed "EZComp," which is better described as composite components. Composite components, which touches on a change to finalized in a later release, namely, the inclusion of Facelets, allows a component developer to create a new component by piecing together several others in a template file. This functionality is very similar, as best as I can tell as I’ve never used them, to Facelets' component support, where a snippet of markup is specified in a file and can then be treated as an actual component. Unlike the Facelets version, though, these composite components are "real" components in that they are backed by a UIComponent. If you were at JavaOne, this is what Ed demoed in this presentation (with Roger demonstrating the Ajax support).

    There’s still much work to be done before September when we are schedule to deliver the Proposed Final Draft, but this is a pretty good start. If you have any interest at all, please review the spec and give us feedback. We really do want your input, as our goal is to improve upon the JSF experience and solve as many of the real world pain points as we can. If your favorite pain point isn’t being addressed, you owe it to yourself to speak up! :)

May

  • Mojarra Scales 1.0 Release Candidate 1

    Today, I released the first release candidate for Mojarra Scales, the JSF component library I helped create. Rather than repeat myself, I’ll just paste the email announcement here:

  • JavaOne 2008: Day 4

    Like every other day at JavaOne, Friday started with a general session, this one led by James Gosling. Unlike other days, though, today would be a short one.

  • JavaOne 2008: Day 3

    My day started today with the Intel general session. I went in with low expectations for some reason, but came away pretty pleased. The speaker, Douglas Fisher, Vice President, Software and Solutions Group and General Manager, Systems Software Division of Intel Corporation, talked about how software drives innovation in hardware, which makes possible more interesting things in hardware, which in turn drives more innovation in hardware, and the cycle repeats. Years ago, an Intel exec whose name escapes me described this as the software spiral. He then brought a Sun exec (Jeet Kaul, if I recall correctly) onto the stage to discuss performance gains in the JVM, presumably in the virtualization space. He shared how from January 2007 to JavaOne 2007, they made a 20% gain in performance, so they set their goal for JavaOne 2008 at 60%. They announced today a 68% gain, with the demo peaking at 74%, on the exact same hardware and software that was used last year. The only difference was the JVM. Very cool.

  • JavaOne 2008: Day 2

    Day 2 of JavaOne is effectively over. As I sit here typing, I have one more event, the hands-on-lab Plug Into GlassFish™ V3 With JavaServer™ Faces and jMaki in about an hour, which should be really good. It’s basically a lab showing how to do what Jerome demoed yesterday afternoon in the general session when he added a feature to the GlassFish admin console.

  • JavaOne 2008: Day 1

    Good morning. It’s time for my JavaOne 2008 Day 1 report (though it’s actually the morning of the 2nd day :). Thanks to the graciousness of Sun Microsystems, I’m here on the Java Blogger program, giving me really amazing access and privileges. All I have to do is blog about my experience, which I would have done anyway, so over the next few days, I’ll be filing "reports" on what I’ve seen and heard. So, with that introduction out of the way, let’s recap day 1.

April

  • JavaOne on Your Google Calendar

    Next week, I’ll be off to JavaOne. With everything that’s going on, I thought it would be nice to have my JavaOne schedule on my Google Calendar, which I could then sync with my phone. Sadly, it wasn’t as easy as I thought it would be (though I certainly could be the failure in the process :). After I imported my schedule into Outlook (used only — and grudgingly — as iTunes is broken in that it only supports Outlook) and then synced that with my Google Calendar, all of the event start times were adjusted for the time zone differences. Importing by CSV resulted in cryptic messages about my calendar not being available, so I did what any good geek would do: I wrote my own solution, creatively named J1Sync.

March

  • Reintroducing the JSFTemplating FileStreamer

    In a blog entry last year, Ken Paulsen gave a short introduction to the FileStreamer utility in JSFTemplating. Since Scales is now using JSFTemplating to make the component authoring process easier, I have been able to use this facility, allowing me to deprecate some custom code. In the process of making the migration, I’ve made changes to JSFTemplating that will be of benefit to all. In this entry, I’d like to highlight those changes, and show you how you, too, can use this great facility.

February

  • Web Profile Wackiness

    In a recent blog post, Java EE 6 (JSR 316) specification co-lead Roberto Chinnici discussed the two leading proposals for the web profile in the upcoming Java EE 6 specification (For more information about profiles, one can start with this article on TheServerSide.) The part that caught me by surprise and confuses me greatly is why the inclusion of JavaServer Faces in the web profile would be controversial. Having spoken with an expert group member, who I will not out :), the argument comes down to this: "We shouldn’t force a broken technology, that is not the clear winner on people." I think that’s a very interesting statement, in that it precludes doing just about anything in the spec.

January

  • Announcing Mojarra Scales

    Some of you may be wondering what the status is on the RI Sandbox. With the announcement of Project Mojarra, we can finally take the wraps off of Mojarra Scales, the promotion of the RI/Mojarra Sandbox to its own project. There are a few differences between the Sandbox of Scales to note, such as package names, namespace, etc. There has also been a fair amount of refactoring inside the library to simplify the components somewhat (more on that later). To migrate from the RI Sandbox to Mojarra Scales, you will need to do the following:

2007

August

  • JUGs Offer More Than Free Pizza

    As regular readers likely know, I am currently serving as the president of the Oklahoma City Java Users Group. One of the things we’ve really been focusing on is getting the word out about our JUG, hoping to increase not only attendance, but the size of our speaker pool as well. Since we’ve really started pushing this effort, I’ve done a fair amount of thinking about JUGs in general and have come to reinforce an idea I’ve long held: good JUGs are more than just a once-a-month meeting. They offer several very practical benefits to both [employees] and [employers].

July

  • Thank you, Sun

    I’m a bit hesitant to post this as I’m afraid that it may come across as self-congratulatory, which is not my intent at all, but I think Sun deserves an "atta-boy."

June

May

  • Virtual Hosting using Apache and GlassFish

    While many have found GlassFish to be a great choice for an internal application server, there are others that would like to push it a bit further, and use it in an ASP/ISP envrionment. Jan Luehe discussed GlassFish’s virtual hosting features in a recent blog entry. What I’d like to do in this entry is take the information that Jan presented, and walk through setting up a few different virtual hosting environments.

April

  • TinyMCE Support in the Sandbox

    I have just committed preliminary support for the TinyMCE JavaScript HTML editor. There are parts that still don’t work correctly, but it’s a good start.

  • JSFTemplating Meets Facelets

    I could be wrong, but I think it’s safe to say that most people don’t know about JSFTemplating, which is a pity, as it’s a pretty nice alternate ViewHandler implementation from Ken Paulsen, GlassFish admin console architect. One of the coolest features, I think, is its introduction of templating events (e.g., one can attach a beforeEncode event to a component on a page and have a handler method fire before that component is encoded). The first comment I hear, though, is usually something about template syntax, and it does seem a bit foreign with things like <!if $attribute{in} & ! (#{in} = abc) > and <span class="code">#include /header.inc</span>. That’s where I come in.

March

  • Unit Testing EJBs

    As we’ve done more and more EJB development, we’ve had to think pretty hard about how to unit test our beans. We’ve tried a couple of different approaches (including not testing, which I don’t recommend ;), but weren’t ever just real comfortable with the results. I’m pretty happy with the method we’re using now, and it’s so simple, I’m a bit embarrassed that we didn’t think of it earlier.

  • GlassFish Success Stories

    Jamey Wood and Shreedhar Ganapathy of GlassFish fame asked me some time ago if I would be interested in filling out a questionnaire describing my company's use of GlassFish. I finally got the questionnaire completed and turned back in, allowing Jamey and Shreedhar to finish up the article, which is now posted here. We’ve been using GlassFish in production since, if I recall correctly, March of last year, well before Java EE 5 went "final." We’ve been very happy with it, so this piece was a nice way of giving back to a community of developers and users that have helped us a lot over the past year.

February

  • Using the Woodstock Sortable Table

    At long last, the Woodstock component set is finally here. At IEC, we have been anxiously awaiting its release for quite some time now, as we’ve been hoping to make use of the sortable data table component it offers, which we have now done. Having done it, allow me to show off the component a bit, as well as explain what I had to do make things work. It’s not hard, necessarily, just different enough to give one pause at first glance.

  • Sandbox Demo and Nightlies Available

    Thanks to the generosity of Ryan Lubke, Ed Burns and the javaserver.org folks, the Sandbox demo application, which can be found in the Sandbox source tree, is now available online. There are a couple of known issues with it, but it should give you a good sense of the current state of the components.

    We also have nightly snapshots of the sandbox source, binaries and demo available on the RI website. If you find any issues, please file an issue on the <a href="https://javaserverfaces.dev.java.net/issues/enter_bug.cgi?subcomponent=sandbox&version=current">tracker</a>.

January

2006

December

  • Yahoo! UI and JSF Update

    I’ve had several people ask for an update on where things stand with my YUI components and their JSF component wrappers, so I figure I should take the time to answer that question.

  • JSF Component Writing Check List
    = JSF Component Writing Check List I've been doing a fair amount of JSF component writing of late, and, invariably, I miss one or more "minor" details, causing my component to explode in spectacular fashion at runtime. What follows, then, is a check list for writing JSF components, with notes on the differences between the 1.1 and 1.2 versions of the specification.
  • Download and Multi-file Upload JSF Components

    At work, we have run into two issues several times: 1) We haves app that create PDFs, and we need our JSF apps to send that to the user, and 2) we need to be able to upload multiple files to one of our JSF apps. The solutions we’ve used have been less than exciting. For the first problem, we’d make the backing bean that coordinates the PDF creation (calling the service layer, basically) session-scoped, then have a hidden iframe on the result page whose source is a JSP that pulls the bean out the session (via Java code!) and sends the PDF to the browser in such a way that forces the user to save the file. For the upload issue, we’ve been using JUpload, which works fine, but, since it lives outside the JSF lifecycle, we have to do some interesting things to make it work. Luckily, my boss gave me time to create better solutions, resulting in the components <fl:download/> and <fl:multiFileUpload/>.

October

  • Review: Building Ajax JSF Components

    If you’re doing web development, you have likely at least heard of Ajax, and, if you’re not currently using it, you’ve likely investigated its possible use. One of the tricky aspects of working with a technology like Ajax is integrating it with various frameworks. JavaServer Faces, now a standard part of the Java EE stack, is no different. For both a page and component author, the integration issue can be a big question. Luckily for those of us in the JSF world, that question has been addressed by Chris Schalk and Ed Burns, in their new book JavaServer Faces: The Complete Reference.

September

  • Two 'Quick' Notes

    I thought I’d take a second to make two quick fairly self-congratulatory announcements:

  • A Disappointing Wait

    Several months ago at work, we evaluated a handful of methods for dependency downloads. We looked at extending our home grown solution, ivy, maven ant tasks, and even the unthinkable: migrating to maven2. In the end, we decided to stay with our home grown solution, as we were led to believe that the next version of ant would have transitive dependency management built in. We concluded that it would be a waste of time to migrate to one solution, just to do it again when the new ant came out, so we waited, and, oh, how disappointed we were.

August

  • JSF, PhaseListeners, and GET Requests Redux

    In an earlier post, I detailed how my company got around JSF’s dependence on POST requests in our efforts to implement pretty URLs. While this approach has worked well for us for quite some time, a pretty major flaw in the approach revealed itself to us in the past few days.

July

  • Debugging jsf-extensions

    One of the things that has been frustrating with trying to come up to speed with jsf-extensions is that I just didn’t know where to look in all the Javascript involved to see what was going on. Today, I "watched" as Ed Burns walked a fellow extensions learner through debugging his app. Here’s what I learned.

  • Ajaxifiying JSF

    In October, I will be presenting Ajax at the <a target="_newwindow" href="http://wiki.okcjug.org">Oklahoma City Java Users Group</a>, of which I am a member (and vice president now, by the way, for what that’s worth). As I’ve prepared for that talk, I’ve thought quite a bit about the web apps I write, which are, for the most part, pretty boring. I like to think that they’re functional, but I have to admit that they’re pretty plain. Ajax, though, along with the Javascript pretties that usually accompany an Ajaxified application, is a good way of fixing that "problem", assuming it’s done properly. That line of thinking has affected how I’ve approached a new app I started at work, but finding a library that works well with JSF (read as, in a JSF-friendly manner) has been a bit of a challenge.

June

  • The Tyranny of Choice

    As I’ve mentioned before, my company is trying to decide if we really need to keep using Spring now that we’re in a "full" JEE environment. As I’ve pondered this over the past few days, I’ve realized (as I figured we would) that the choice is not so simple. Our desire in this evaluation is to try to make the best decision for our company, but that’s not so easy with the cacophony of voices out there.

May

  • Yahoo! UI Meets JavaServer Faces

    In my ongoing efforts to learn the JSF framework as thoroughly as possible, I decided to write a component, but, with the myriad of high quality components available, what was left for me to do? :P At the suggestion of my brother, who has been watching a similar effort underway in the Wicket space, I’ve decided to wrap Yahoo’s UI library. The problem I ran into pretty quickly, though, was that the documentation wasn’t too clear as to what I needed to make it happen (though it’s quite likely I was having an obtuse moment or three). There are a plethora of resources that discuss what needs to be done, but all seemed either incomplete or too disjointed (see disclaimer above). So, to help ameliorate that, let’s walk through wrapping Yahoo’s calendar component as a JSF component, step by step. Before I go much further, though, I must note that I am by no means an expert in this, so it’s likely that you’re going to see some less than ideal examples. So, without further ado…​

  • A Little Less Spring in Our Step?

    Friday I had an interesting discussion with my boss, Mitch. I have been doing a lot of thinking about Java EE 5 and what it offers, and that has me reevaluating some of our technology decisions. Most notably, which was the bulk of my discussion with Mitch, is, "Do we really need Spring anymore?"

  • SOAP to slsb

    As part of our migration to GlassFish, one of my tasks is to migrate all of the web services we’ve exposed via Mule to a session bean environment, which won’t be too hard since we only have two such deployments. The code changes are really pretty small, but non-obvious (given my nascent EJB3 knowledge). For those that might be in a similar situation, let’s take a quick look at what this process entailed.

April

  • MyEclipse and GlassFish

    My shop has adopted MyEclipse as the standard development environment. Our recent adoption of GlassFish, though, makes things a little difficult for MyEclipse (and likely Eclipse in general) as integration with the app server has not yet landed in any GA release that I’m aware of. This difficulty, however, is not insurmountable. Let’s take a look at how to debug a GlassFish-hosted application using (My)Eclipse.

  • JIRA and GlassFish

    Officially, GlassFish is not a supported platform for JIRA, Atlassian’s extremly popular issue tracker. Since we’re migrating to GlassFish at work, it’s pretty important that we get it the two to work together. As it turns out, it’s really not that bad at all. Here’s what I had to do to get JIRA, PostgreSQL, Active Directory and GlassFish all playing nicely together.

2005

July

  • A Java-based 'Playground' App

    As I’ve noted earlier, I’ve been debating whether or not I should continue PHP development and move to only Java. Part of the process has included writing a web application using some of the newer Java libraries…​

March

  • To PHP or not to PHP…​

    After years of PHP development, I find myself trying to decide if I should stick with the language…​I have been doing PHP for years; since the PHP3 days. I have found it to be a powerful and flexible language that is easy to code in and deploy. Every web application I have running at home, on this site, or any of the other hand full of sites I maintain or help maintain is written in PHP. I love the language. However, after having professionally written in Java in addition to other languages, including PHP, I am now in a full time, 100% Java position, and, having had the opportunity to dig deeper into the myriad of libraries available in Java, I find myself wondering if I should use only that.

Search

    Quotes

    Sample quote

    Quote source

    About

    My name is Jason Lee. I am a software developer living in the middle of Oklahoma. I’ve been a professional developer since 1997, using a variety of languages, including Java, Javascript, PHP, Python, Delphi, and even a bit of C#. I currently work for Red Hat on the WildFly/EAP team, where, among other things, I maintain integrations for some MicroProfile specs, OpenTelemetry, Micrometer, Jakarta Faces, and Bean Validation. (Full resume here. LinkedIn profile)

    I am the president of the Oklahoma City JUG, and an occasional speaker at the JUG and a variety of technical conferences.

    On the personal side, I’m active in my church, and enjoy bass guitar, running, fishing, and a variety of martial arts. I’m also married to a beautiful woman, and have two boys, who, thankfully, look like their mother.

    My Links

    Publications