Wednesday, December 14, 2005

WAS integration with WebSphere MQ

Just a small update. I was able to get a small spike solution working with WAS 6.0 integrated to a remote WebSphere MQ 5.3 installation. I did have to do all the work in Rational Application Developer, but I did get it to finally work. Actually doing the integration with WMQ seemed to be very much easier than the default messaging baked into WAS 6.0. I really hope that IBM improves this thing (WAS) so development and deployment are easier. RAD is a barrier to entry to using WAS for learning J2EE or working with J2EE as a independent developer. A litmus test should be: Can I build a small application just using a text editor and Ant? If I can't reasonably do this with a little bit of documentation, then the software and the process is too complex.

BTW, this article was very helpful in my integration quest. Bobby Woolf does a nice job clearing away the fog surrounding the WAS platform. I strongly suggest reading anything that Bobby writes if you're working on WAS.

Wednesday, November 30, 2005

Websphere 6.0 versus WebLogic 9.0 versus JBoss 4.0

I've had an opportunity to work on a full J2EE application server lately. I really haven't done a lot of full-on J2EE stuff in a long while (2001), staying with servlet containers and lightweight solutions like Hibernate and Spring. In this new effort, I wanted to investigate messaging within the J2EE realm, using message-driven beans and perhaps web services to facilitate loosely coupled messaging. I did my initial work on JBoss 4.0.3 SP1. Nothing earth-shattering here--I was able to develop and iterate through my spike solution in very short order. JBoss just works and the free online documentation has actually gotten much better, so things went well here. I expected this sort of user experience from JBoss and I think its a testament to where JBoss is today and the journey it has travelled to get to this point. I have a lot of confidence in JBoss as a J2EE platform.

I then attempted to take my existing spike solution and move it to WebSphere 6.0. Wow! This was not the user experience that I expected. I've heard from many of my colleagues that WAS is extremely difficult to work with in development and you had better be using WSAD if you expect to be semi-productive in the WebSphere world. But this was WAS 6.0 and things will be much better with this new version of WAS. Hmmmm. The short story is no, it's still tedious to work with WAS 6.0 and you had better be using Rational Application Developer (aka WSAD) if you plan to do anything with WAS 6.0. Very frustrating, especially since the J2EE spec seems to have slowed down and vendors should be improving their products with increased productivity advances. I was not able to move my spike solution to WAS 6.0.

Finally, I got WebLogic 9.0 involved. I easily took the spike solution and migrated it to WLS 9.0, and JMS configuration was as easy as it was in JBoss. Autodeploy/hot deploy worked as well (and was quick). I was also able to do all my development in IntelliJ IDEA--WLS and JBoss did not force me to a specific IDE to complete my work. Overall, I experienced excellent out-of-the-box experiences with newest versions of JBoss and WebLogic. I will also mention that both JBoss and WebLogic were running on Java 5 JVMs (used both Sun and BEA JDKs). WebSphere 6.0 is still at 1.4.2, which is another annoyance.

Sunday, November 13, 2005

Duck hunting in South Dakota

Finally got into some ducks during the annual South Dakota hunt. We saw tons of ducks (a lot of those being mallards), but the ducks are in large flocks and are very weary of decoys and calling. We ended up with 2 ducks this morning, a hen and a drake mallard. Also saw a good number of Canadian and snow geese. Yes, that is snow on the ground! We experienced the first snow of the season on Saturday night/Sunday morning. Posted by Picasa

More pheasant hunting

Spent most of Saturday braving a late fall rain and getting after some pheasants. Awesome hunt! We had 7 hunters and ended up with 19 pheasants. The pheasants seemed to stay tighter in cover before they would break out in flight, allowing much better shots while walking through the brush. I had many pheasants bust out nearly at my feet and there were times that they'd only bust out if you stopped and paused for a moment. They certainly didn't seem keen on coming out into the rainy weather if at all possible. Posted by Picasa

South Dakota sunset

The end of a good day of hunting. Posted by Picasa

Pheasant hunting in NE South Dakota

First afternoon of hunting vacation. We ended up with 4 pheasants. Posted by Picasa

Monday, October 24, 2005

Fussing over ACEGI Security and CAS

Wow!! What a night of frustration. I spent about 3 hours Googling and attempting to unearth all the magical incantations necessary to get ACEGI Security 0.8.3 to work with CAS 2.0.12. In the end, it came down to some funky SSL and keystore configuration crap. Luckily, I found a very relevant tidbit of information. Seems that a self-cert needs to be named localhost for the CN. Wow! Who would have guessed?!?

I was able to use Keystore Explorer from Lazgo Software Ltd to aid me in dealing with my mistakes with the Java keytool. If you do any amount of tinkering with keystores, certificates, and the like, you owe it to yourself to buy a license for this handy utility. Why Sun can't build small GUI helper Java utilities like this is beyond me. Yeah, the command line invocations are so easy, why would I ever need anything else.

Coming back to the ACEGI/CAS integration: This stuff needs some serious documentation around it. Currently its smatterings here and there and to get a working example WAR file, you have to build it through Maven (which I did not do). Why o' why can't you just build the example file and post it as part of an optional download? I'm not interested in using Maven and building on my host. None of the current Spring Framework books even attempt to brush up against the CAS integration, which should have tipped me off that it's going to be difficult go.

Monday, October 17, 2005

Goose hunt gang

Here's the final picture for the goose hunt. Unfortunately I'm not pictured, as I was fussing with my digital camera when this picture was taken by Dean Tlougan of Premier Flight. Not too shabby for about 3 hours of hunting on a beautiful October morning. Posted by Picasa

More goose hunting...

Everyone into their pits! This is what the geese saw before Dean buzzed us to open our pit doors and commence firing. Very cool way to hunt. Posted by Picasa

Goose hunting in Rochester, MN

Dean Tlougan and one of his other guides (forgot his name) of Premier Flight Guide Service. A couple of neighbors travelled down to Rochester on the wee morning hours of October 15th to partake in a guided goose hunt. A couple of hours later, we had bagged 16 geese with a party of 9 hunters and the 2 guides. Awesome morning, if a bit too clear, but the geese we're more than accommodating with the calling by the guides. Very much recommended hunt. Check these guys out. Posted by Picasa

Monday, September 26, 2005

Measuring test coverage with Cobertura

Discovered a new tool for my arsenal: Cobertura ( It's a unit test coverage tool. It's open source and is easy to integrate into your Ant build process. It seems very similar to Clover, but I could never get Clover working in my Ant build so I looked for an alternative and found Cobertura. So far I'm very impressed. I really like the highlighting of the source code, showing where I have test coverage and where I don't. Definitely worth a look.

Wednesday, August 31, 2005

More Facelets observations

Development of my first JSF/Facelets application is going along smoothly. I really, REALLY like Facelets. It makes JSF web programming very easy. The templating features, when compared to using Tiles with JSF, are great. The error messages support is very well thought out. I'm going to add in some AJAX stuff (using DWR) and other eye candy features (OpenRico, etc. ). Having tons of fun.

Sunday, August 28, 2005

Facelet observations, day 1

Here are my initial observations of Facelets:
  • Error message are much better reported through Facelets than without. Jacob has scratched an itch many of us in the Java EE community have had for a very long, long time. Thank you for informative error message pages. Much appreciated.
  • Very quick. JSF overall seems very spunky, compared to Struts. Just unquantified observations at this point, but it does seem quick.
  • I like that I don't have to define everything in JSF XML markup. That's a tough sell to most dev. shops. XHTML is the way to go.
I have FORM-based authentication finally working within my example application. Nothing special, but I was have some difficulties with this and I think I have those issues resolved.

Saturday, August 27, 2005

Starting to use Facelets

In my endeavor to learn the JSF thing, I've started playing around with Facelets. So far so good. I've integrated into my existing MyFaces project. I did have some initial problems with the Facelets JARs to add to the project. I ended up only using jsf-facelets.jar, el-api.jar, and el-ri.jar. Seems really easy to use and I really like the templating support in Facelets; it's a definite improvement over Tiles.

Tuesday, August 16, 2005

Using the type-safe enumeration pattern in Java

I just completed some programming duties, pairing with another developer at my day job. We needed to add some new attributes to an address, specifically an address type and a foreign address indication. Instead of making these String types, we used Josh Bloch's type-safe enum pattern and narrowed the interface contract to AddressType and ForeignAddressIndicator types. Worked out great. I've seen a lot of Java source lately that just passes ints and Strings and does nothing to validate that the values are correct for the usage. This pattern works well for this validity checking, limiting the possible values and allowing the compiler to enforce type safety.

Monday, July 11, 2005

Exception handling patterns paper

I came across a fine exception handling patterns paper in a topic on A patterns for exception handling paper was included in the discussion:

Excellent paper. Definitely worth reading.

Thursday, April 14, 2005

First observations of Eclipse AJDT plugin

I've just started my immersion into Eclipse (coming from IntelliJ IDEA 4.5) and one of the first plugins I wanted to work with in Eclipse was the AspectJ development tooling, AJDT. I'm using Eclipse 3.1M6 and I used the Software Update feature to hook in the latest release of AJDT. Wow!! Very cool stuff. Makes working with AspectJ aspects much easier. Still fumbling my way around Eclipse (and using the mouse way too much), but so far so good. I really like being able to visualize the pointcuts in the Cross References pane. The gutter icons are also a very nice touch.

Friday, April 08, 2005

YourKit Java profiler observations

I started using YourKit 4.0.7 Java profiler to profile a web application deployed in Tomcat 5 on Windows XP. YourKit is one of several Java profiler offerings and since I'm an IntelliJ IDEA user and these guys previously worked on IntelliJ IDEA, I thought I'd give it a whirl. I'm impressed with YourKit. I only used it to profile memory allocations.

Friday, March 25, 2005

Observations from pairing with Eclipse developers

I'm an IntelliJ IDEA user. I really like the Java IDE that they produce and I've become fairly good at using it. I've been pair programming with a couple of excellent developers who use Eclipse. Eclipse is a beautiful looking IDE and it sure has a ton of features. However, as I've been observing these two developers code, I have noticed that the manner in which Eclipse 3.0.x presents quick fixes (intentions to us IntelliJ people) is unnecessarily cumbersome. An emblem icon shows up in the gutter and you have to use the mouse to activate the quick fix list. Arghhh! In IntelliJ, I can active the intention list from the keyboard. Can the quick fix list be activated from keyboard? Just an observation. Writing code in Eclipse is much different than writing code in IntelliJ. I think I actually write code fragments and then complete code statements with intentions and refactorings. It's so damn easy to do this in IntelliJ; it seems clunky in Eclipse.

Monday, March 14, 2005

Enumeration types and Apache Axis WSDL2Java

I ran into a interesting situation today with Apache Axis. If any of your enumeration values in your enumeration definition start with a number (i.e. 3DES), Apache Axis WSDL2Java generation tool will generate static enumeration instances with nonsense names (i.e. VALUE1, VALUE2, ... VALUEn). Not at all what I was expecting. Seems your values have to abide by Java naming standards for variables if you want Apache Axis to use the value strings as the variable names for the enumeration instances. If any of the values is not compliant, Axis dumps down into the aforementioned VALUEn naming scheme for all values. It would be helpful if Axis dumped a block comment into the generated enumeration Java type stating why the names are nonsense.

Saturday, March 12, 2005

Apache Axis WSDL2Java generator problem

I've been working on some Java web services using the Apache Axis toolkit. The WSDL2Java generator creates a static initializer in the server-side skeleton class that seems to be valid, compilable code. In our situation, we have two methods initially defined in our web service API, and invariably the second method would not be callable from a client test case. It didn't matter if you swapped the method order, the second method metadata (operation descriptions) would be goofed up and the method invocation would puke.

After spending several hours looking at code in the IDE and the debugger, I finally just refactored the static initializer to call two static methods, each setting up an exposed web service method in Axis. This simple method extraction refactoring fixed the problem, but I don't know what was causing the problem in the first place. Very odd stuff.

Friday, March 11, 2005

Securing web services with SSL

I'm currently working on a project where we need to invoke web services hosted in Java (Apache Axis 1.2RC2 in Tomcat 5.0.x) from a Pocket PC 2002 platform. We're using .NET Compact Framework 1.0 SP3 on the handheld. Things have gone surprisingly well and today I added SSL/TLS into the equation. From the Java/Tomcat side, this is very well documented and simple to setup. From the .NET Compact Framework side, things are a bit more unclear. However, this link provided me with a solution. I now have HTTPS working between the .NET CF client application and the Java/Tomcat/Apache Axis web service endpoint. Cool!