From JBoss to Glassfish: Part I

July 7th, 2008

This is the first in a multi-part post about my experiences migrating from JBoss to Glassfish.

First, a bit of background. We’ve recently started swapping our backend over to a service-oriented architecture based on RESTful services. All of our recent development has been involved in the creation of new RESTful services, but we still have a lot of legacy code that happens to take the form of EJBs and RPC-based web services. Faced with the need to either upgrade JBoss or switch to Glassfish, we chose the latter (which will probably make a fine post in the future). This meant we had to make changes to all three service types to get them all working in the new app server.

I’m going to start with the RESTful service migration, mostly because they were far and away the easiest part of the migration. So easy, in fact, that there were only two major issues I ran into.

The first came about because we were prepending numbers on the names of our web application archives. This was done for ordering reasons, and in JBoss, the number was ignored for determining things like context root. Glassfish, on the other hand, uses the entire war name. So while the services were working, and deploying correctly, you needed to have the correct number in the URL when accessing the service. Rather than change all the services to include numbers in the URL, I went looking for another solution. Thanks to the java.net forums (which I found to be an excellent resource throughout the project) I discovered that you could set the context root in the sun-web.xml file of the web app (which then sprung into existence for all our services).

A fairly obvious solution, to be sure, but less so when you’re learning. :-)

The second was finding a deployment solution for our JDBC resources (this, of course, covered more than just the RESTful services, as the EJBs also used them, but this was the first area I hit the problem in). Adding and configuring resources via the Glassfish admin console is very easy, and I had no trouble setting up the resources, but navigating a web console isn’t the most friendly method for a more automated install process. The java.net forums once again proved their worth, leading me to the solution. In this case, the solution is the add-resources command that is part of the command line administration tool.

This solution was doubly nice because we already had XML files for defining our resources in JBoss, and the formats were similar enough that creating the new files was mostly a matter of XML wrangling. This solution also nicely covered other resources, such as the few queues and topics we use for communication.

With those two things taken care of the RESTful services happily took up residence in Glassfish. And with the RESTful services out of the way, it was time to tackle the EJBs.

Twitter A Go-Go

May 29th, 2008

On a lark, I set up a twitter account a few days ago. Feel free to follow my tweets. I may or may not stick with it, as I’m not really sure I “get” twitter. But I do like fiddling with new things. I probably won’t add the twitter box you might see on other sites to my main page, mostly because I figure the bulk of my readers follow the RSS feed. If you’d like to see the box though, let me know in the comments.

Costa Rica ‘08

May 26th, 2008

My trip to Costa Rica began twelve hours before my flight left. In order to make the airport trip a little easier (and to give my car a free place to stay) I spent the night at a friend’s house, which happens to be much closer to the airport than my apartment. From there it was a quick drive to the airport. Once checked in I had some time to relax and read before boarding the first leg of my trip.

Read the rest of this entry »

To New Purpose

May 16th, 2008

So for the past month or so, I’ve been noodling about this blog in my spare time. That noodling brings you this post, which marks a change in the nature of this blog. But first, some boring expository text.

The basic line of my thinking started with the following: I like the idea of a blog, I just haven’t been very good at the execution of a blog. As I thought about it from there, the reasons why I wasn’t very good at writing the blog became apparent.

One reason is best illustrated with an example. I have been sitting on a post about my Costa Rica trip for over a week now. I haven’t published it because I’ve been waiting to get the pictures developed and uploaded to Flickr. My original plan was to make this post after the Costa Rica post was published. But because the Costa Rica post was basically stuck in the unpublished state, this post wasn’t happening either. Normally, the post that’s blocking me from writing anything is all in my head and so nothing ever gets written. This sort of behavior has sentenced many previous post ideas to death.

But the biggest reason is that what I want this blog to be has changed. I’m not really interested in trying to document the things that go on in my life, which is basically what I’d thought of as this blog’s purpose. After thinking things through, I decided it was better to do something else with this blog, something I’d be more interested in writing about. After all, I still like the idea of a blog, and the blog software and domain were already set up, so it seemed a shame to let it languish or to remove it.

And so, I’m making this post to announce that this blog is now going to be a place for me to talk about technology. A pretty open-ended topic, to be sure. But with this change I can cover a lot of ground that I’m actually interested in writing about. For example, there are interesting technological decisions and happenings going on at my job, which are cool and I’d love to share (though obviously there’s some detail that must be omitted). And I can talk about gadgets and such, because I really dig that sort of stuff.

That’s not to say that I will never make non-technology related posts. There’s still cool stuff I occasionally do that I do want to share, like my Costa Rican adventure. And it will likely be better and more interesting than what I was trying to do anyway, because it will be fun and cool stuff that I’ll want to spend time writing about. If you really want to skip out on the tech blather, feel free to point your browsers to this page or your RSS readers to this feed.

Oh, if anyone has a better category name than “Non-Tech”, I’m all ears.

Home

April 22nd, 2008

Back from Costa Rica (as most of you are probably already aware). I may or may not write more about the trip at some point. But pictures will be available soon-ish. And for those people especially anxious to see pictures, then I would recommend you keep an eye out. :-)

Ha Ha!

April 13th, 2008

I’m in Costa Rica, suckers!

Unsecured wireless networks are as common down here as they are back in the states, it seems.

Though I probably won’t post a lot (big surprise), as I’m on vacation.

Pictures and maybe more posts when I return.

Many Thanks

November 29th, 2007

Montana Deer

I went to my parent’s house for Thanksgiving. It was pretty nice, and there were some deer outside the window on numerous occasions, so I took a picture of one.

It was nice to visit home, I think it’s been two or three years since I was last there. And boy has the place changed, new interstate interchanges, new shopping areas, more homes in the neighborhood where I grew up, all sorts of things. I spent much of the time relaxing, and eating delicious turkey, and watching some football.

But I had to come home sometime, because those late work nights won’t happen by themselves.

Halloween Hair

November 1st, 2007

So, way back in spring I decided to shave my head (and then never post about it =) ). Here’s what I looked like then:

Shaved Head

Then with winter coming, I started to grow it back:

Growing Hair

Then a coworker (who also has shaved his head), suggested we do mohawks for halloween. And so, here’s me with a mohawk:

Mohawk’d!

I don’t think I’m punk enough to pull it off, but I’m still gonna keep it till the weekend.

Yummy

September 28th, 2007

From Autoblog, their first look at the 2008 Chevrolet Corvette. I highly recommend watching the video, if for nothing else than the sound of the engine. Mmmmmm.

Wedding Cake in My Freezer

September 24th, 2007

But it isn’t mine. I was a groomsman in Jeff and Becky’s wedding this past weekend, and they asked for someone to store their wedding cake while they finished their wedding time off (honeymoon isn’t until January). I’ve also got flowers and a few other things, so party at my place?

It was a lovely ceremony, though it started a bit late due to forgotten flowers. It was an outdoor wedding, and the weather was perfectly cooperative. The reception was nice and the food was pretty tasty. Not much dancing, which is kind of to be expected. And the bride had to retire early when it was discovered she was laying on the floor and wasn’t inclined to stand up. There were some ups and downs in other areas, and I wish I’d been less me during it all, but there’s only so much I can do.

Also, yesterday was my birthday, for which I am taking today off of work. The morning will be spent largely apartment bound, as I’m getting some work done on my car. The afternoon, running errands. And sometime this week, meat!