Wednesday, September 24, 2008

On Server Push Technologies

I've been impressed with how much information there is on the Internet on comet-like frameworks. Yet, I have not found a good reference implementation or even sample code that works. I see lots of pleas for help in forums posted by newbies trying to get the skinny examples they follow online to work. Its enough to make me pause for a second but not stop. I'm architecting a real-time message accepting web application, even if I have to code a nio page bus myself. Right now, I'm playing with Tomcat servlets. Next, I'll see how Jetty works. I'll keep it posted.

The issue with Active MQ was a typo in an example they provided; I ended up joining Confluence in an attempt to correct errors as I discovered them. In the end, I almost became an expert in embedded brokers (didn't need to really go there).

Wednesday, September 10, 2008

Struts 2 - Small Preview Successes

So no luck still connecting JBoss to ActiveMQ on a separate server but won't give up. There was some partial success binding a Queue (no stacktrace vomit), but haven't tested it yet so can't say this piece is over.

I'm looking also at Struts 2 for a small web application we're creating at work. After using the Maven archetype for the starter application, I successfully used the Jetty mojo that came included in the pom.xml file. A small thing - the example they have online published on Apache in the Creating an Application Using an Archetype section doesn't work. I had to change:
-DarchetypeVersion=2.0.5-SNAPSHOT \

To

-DarchetypeVersion=2.0.11.2-SNAPSHOT
I then installed the Maven pluggins for Eclipse so that I could see my source files to edit/play with them. But now, Eclipse is complaining about not seeing the JDK. I can't believe it doesn't use the JAVA_HOME enviornment variable. I know from dealing with this problem at work that I have to go modify an ini file or the Icon properties that launch the IDE, but jeez.

Setting up the development environment for this new project at work hasn't been easy, but I'm getting closer. Struts 2 seems like a good thing - I said the same about the Shale framework which was supposed to be Struts's evolution. I guess Struts 2 has a better chance at infiltrating the development world because of the name.

Tuesday, September 9, 2008

Integrating Active MQ with JBoss - Attempt 1

I have been trying to integrate JBoss with Active MQ for a few days now. I have found numerous how-to's on the net for embedding the Q broker using the same virtual machine, and even got an example to work after minor modifications using: http://activemq.apache.org/jboss-integration.html and http://activemq.apache.org/integrating-apache-activemq-with-jboss.html.

What I really need though is access opened to a remote Queue Broker. I thought it would as easy as setting up a data source, creating a few xml files, and adding a driver to the classpath on JBoss, but so far, no luck. I found some more clues and things to try. I'll post my findings as soon as I get the thing to work.

Monday, September 8, 2008

Maven feet

So we're working on this new project and decide to pick Maven as our build tool. Getting started wasn't too difficult - just download, add MAVEN_HOME to System's environment variables and modify path to include it's the Maven's bin directory. Voila - I typed mvn -version at a command line and was ready to go.

Creating the project shell from a template wasn't as easy. I decided to use archetypes. After updating software in Eclipse, and configuring the IDE to see Maven and SVN, I thought all I had to do to create a Maven module was follow the wizard. Wrong. The archetypes presented from a drop down list don't exist in repositories anymore.

So, after about an hour or so of fighting with Eclipse, I end up creating my project shell at the command line after using a slightly modified example I found online. I'm new to Eclipse so getting it to see a new snapshot of the code I need wasn't as intuitive as I had hoped.

Using mojo's was a different story - I plugged one into my pom.xml that deploys war files to JBoss and it worked without major issues. Yeah baby! I still haven't had any luck getting the mojo's start/stop goals to work right, but partial success was encouraging.

I guess everything worthwhile takes a little effort at the beginning. As a colleague contended that .NET is a lot easier to use as a framework for web applications, I secretly wondered what it would be like to not struggle with all of the plumbing just to get something going...neh.