Recent Posts

RSS Feeds

Load Testing Tool

Here is a cool load testing tool that I discovered yesterday. Seems a friend of mine has been working on a load testing tool that is designed for web application developers. LoadStorm takes advantage of the Amazon EC2 cloud to dynamically instantiate as many servers as needed to generate http load against a target app.

The key objective of LoadStorm is to be easy and cheap. No servers to configure, and no open source to download and install. That eliminates most of the hassle that is a common reason developers don't load test more often. It's such a pain to cobble together the hardware.

Did I say cheap? They will give you a free subscription for 50 concurrent users (no expiration), and 500 users for only $40/month. That subscription gets you UNLIMITED tests for the month. So you don't have to worry about getting the test exactly right the first time. Performance engineering requires iteration because you find a bottleneck, fix it, and run the test again to find the next one.

My friend has figured out that by not penalizing us for running multiple tests, we will test early and test often. What a cool concept. And if you want to prepare for the Slashdot Effect, you can get up to 50,000 concurrent users. Here is hoping your site gets /.'d for all the right reasons :)

Permalink     1 Comment

Alfresco on OS X - ImageMagic and OpenOffice

Alfreso is a fantastic ECM solution that has some amazing features and some great momentum. It has been more than a year since I've used Alfresco and man have they gotten some cool stuff done.

I spent the last couple of days getting certified to teach a couple of Aflresco's classes. I used my mac (running leopard) and I figured I'd post a bit about what I did to get all the features up and running. Alfresco is able to use OpenOffice and Image Magick to do some cool stuff like transform any word doc to PDF or and GIF to PNG etc. Problem is the Alfresco site is short on detail about how to make all that goodness work on the mac.

Being the stubborn guy that I am I would not leave well enough alone and run it on some other OS. It took me a couple of hours but I got everything working. Here are the details...

Grab Open Office from here. I got the aqua interface cause I don't really care about the UI anyway. Install by copying it to your Applications folder. I renamed the app to OpenOffice.app (got rid of spaces) although I'm not sure that is necessary it ended up that way after all the experimentation and I've not had a chance to go back and check if it would work with a space (seemed at the time like something that Alfresco was using was not properly escaping spaces).

Now that you have the OO install done its time to teach Alfresco about it. In your alfresco install (the one that includes tomcat) there is an extensions folder (tomcat/shared/classes/alfresco/extension). Go there and add a folder called 'bootstrap'. Then in there create an XML file called openoffice-startup-context.xml. I've included mine here so you don't have to set it up from scratch. Basically this file tells Alfresco how to startup openoffice in headless mode so that it can be used to do doc transforms.

Install Image Magick with mac ports via a command line that looks basically like this sudo port install ImageMagick. If you are stubborn and you don't want to use Mac Ports the Image Magick community has a binary distro for you here. I used the mac ports build instead of the binary distro so your millage might vary if you use the binary.

That is it, now when you restart Alfresco it will be able to do the document conversion and image conversion. If you are looking for an ECM take a look, its really cool stuff.

Permalink     No Comments

Maven - Choose Your Pain (Re: mostly hate)

So I generally feel that using maven or ant or make or shell scripts, building is a pain in the neck and what ever way you choose you will have pain. You get used to the pain of one kind or another and sort of grow to like that sort of pain and you forget that you ever lived without it. And at times you even start to defend the kind of pain that you like as pleasure. I'm having one of those moments after reading this.

Agreed maven has bugs, agreed maven has some doc problems, but...

Point 1 - the maven release plugin has its faults to be sure but more or less it works as advertised and if you are following the 'typical' path of using your SCM then the plugin even does a very nice job of keeping tags and such for you.

Point 2 - you can specify the path to the parent pom if you don't have it in the default location (e.g. ../pom.xml) in your parent descriptor (look for relativePath).

Point 3 - Agreed this is really irritating (esp the silent failures) but I've not had much trouble with Checkstyle or PMD on my 'very big' multi-module project. More detail would probably turn up some links to fix whatever issues are being experienced.

Point 4 - We use the assembly plugin with great success on Crank. Geronimo uses it as well. I could not tell what the actual problem was from the description given but I'll bet again there are ways to do that.

The 4 specific pain points I think are relatively easy to work through. The other 50+ things who knows. On my team we were tempted to write a custom plugin but we were able to make things work without it and were much better off in the long run IMO. Not that writing a custom plugin is bad, but in most of the cases on IT projects that I've seen folks writing a plugin its because they want to do something counter to the way maven expects. Such a plugin will be nothing but pain long term.

All that said, I feel his pain. I've been using maven for 2+ years and its only the last few months that I feel competent to make a big project really work. I'm not sure if that is completely a lack of docs or problems with maven. But I've gotten used to the pain of maven and I've really started to dislike the pain that I received from Ant (perhaps 2.0 will be worth a look when its done).

Permalink     5 Comments

Java on Leopard - enough complaining

So while reviewing the release notes for Java on Leopard I noticed a couple of interesting bits. First they included junit 4.1 and maven 2.0.6 in the mix, which is great (except that maven 2.06 had some serious bugs with transitive dependencies). mvn is now on your path so you don't have to download to get maven on your leopard box. Second they really cleaned up the awt/swt issues in this release so we can use stuff like Batik in Eclipse now. They also made the default rendering pipeline the Sun pipeline. Over all a ton of good work. JDK 6 and hopefully the full open source stack of 7 will be happening soon enough.

So for Leopard apple did a ton of java work as well as deeply integrating ruby, over all i think we got a sweet package. And I am ignoring all the complaining.

Yes the lack of official information is irritating to me too...

Permalink     3 Comments

Beware, the lawyers are coming

good for tool vendors, perhaps, bad for programmers for sure[Read More]

Permalink     No Comments

OpenJPA Class Enhancement with Maven

While attempting to put my time and energy where my mouth is I figured I'd take the time to make OpenJPA work in an example I've been doing of getting Spring/JPA/DbUnit to all play nicely together. I've got the example almost ready to post but not quite. Part of what has held me up is a couple of issues I was having getting the tests to work as I expected.

I was consistently getting the following errors:

testSingleParameterQuery(net.dudney.jpaund.dao.jpa.BaseDaoJpaTest)  Time elapsed: 0.11 sec  <<< FAILURE!
<4|true|0.9.6-incubating> org.apache.openjpa.persistence.ArgumentException: Could not locate metadata for the class using alias "Portfolio". Registered alias mappings: "{Portfolio=null}"
	at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:343)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getClassMetaData(JPQLExpressionBuilder.java:164)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.resolveClassMetaData(JPQLExpressionBuilder.java:142)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:211)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:181)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateType(JPQLExpressionBuilder.java:174)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.access$500(JPQLExpressionBuilder.java:61)
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.populate(JPQLExpressionBuilder.java:1657)
	at org.apache.openjpa.kernel.jpql.JPQLParser.populate(JPQLParser.java:52)
	at org.apache.openjpa.kernel.ExpressionStoreQuery.populateFromCompilation(ExpressionStoreQuery.java:145)
	at org.apache.openjpa.kernel.QueryImpl.newCompilation(QueryImpl.java:642)
	at org.apache.openjpa.kernel.QueryImpl.compilationFromCache(QueryImpl.java:623)
	at org.apache.openjpa.kernel.QueryImpl.compileForCompilation(QueryImpl.java:589)
	at org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryImpl.java:651)
	at org.apache.openjpa.kernel.QueryImpl.getOperation(QueryImpl.java:1464)
	at org.apache.openjpa.kernel.DelegatingQuery.getOperation(DelegatingQuery.java:120)
	at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:202)
	at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:251)
	at net.dudney.jpaund.dao.jpa.BaseDaoJpa.find(BaseDaoJpa.java:97)
	at net.dudney.jpaund.dao.jpa.BaseDaoJpa.find(BaseDaoJpa.java:74)
	at net.dudney.jpaund.dao.jpa.BaseDaoJpa.find(BaseDaoJpa.java:109)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:199)
	at $Proxy9.find(Unknown Source)
	at net.dudney.jpaund.dao.jpa.BaseDaoJpaTest.testSingleParameterQuery(BaseDaoJpaTest.java:172)

testSaveOrUpdateObjectNewObject(net.dudney.jpaund.dao.jpa.BaseDaoJpaTest)  Time elapsed: 0.233 sec  <<< FAILURE!
org.springframework.dao.InvalidDataAccessApiUsageException: The type "class net.dudney.jpaund.domain.VersionedObject" has not been enhanced.; nested exception is <4|true|0.9.6-incubating> org.apache.openjpa.persistence.ArgumentException: The type "class net.dudney.jpaund.domain.VersionedObject" has not been enhanced.
Caused by: <4|true|0.9.6-incubating> org.apache.openjpa.persistence.ArgumentException: The type "class net.dudney.jpaund.domain.VersionedObject" has not been enhanced.
	at org.apache.openjpa.meta.ClassMetaData.resolveMeta(ClassMetaData.java:1590)
	at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1564)
	at org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:654)
	at org.apache.openjpa.meta.MetaDataRepository.resolveMeta(MetaDataRepository.java:554)
	at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:479)
	at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:283)
	at org.apache.openjpa.meta.MetaDataRepository.resolveMeta(MetaDataRepository.java:519)
	at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:479)
	at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:283)
	at org.apache.openjpa.meta.MetaDataRepository.resolveMeta(MetaDataRepository.java:519)
	at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:479)
	at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:283)
	at org.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:233)
	at org.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:97)
	at org.apache.openjpa.kernel.BrokerImpl.attach(BrokerImpl.java:3124)
	at org.apache.openjpa.kernel.DelegatingBroker.attach(DelegatingBroker.java:1120)
	at org.apache.openjpa.persistence.EntityManagerImpl.merge(EntityManagerImpl.java:591)
	at org.springframework.orm.jpa.JpaTemplate$6.doInJpa(JpaTemplate.java:272)
	at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:191)
	at org.springframework.orm.jpa.JpaTemplate.merge(JpaTemplate.java:270)
	at net.dudney.jpaund.dao.jpa.BaseDaoJpa.update(BaseDaoJpa.java:118)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
	at $Proxy9.update(Unknown Source)
	at net.dudney.jpaund.dao.jpa.BaseDaoJpaTest.testSaveOrUpdateObjectNewObject(BaseDaoJpaTest.java:121)

Which of course lead me to look into how one enhances for OpenJPA with Maven. Which lead me here. Unfortuanately that leaves off the important bit that you have to attach the plugin to a phase (I expected it was attached to process-classes by default, but as you know we should never as-u-me anything:). So anyway after another 20 minutes of googling around to here and here. It finaly dawned on me that my classes were not actually enhanced. So I updated my pom to look like this;

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>openjpa-maven-plugin</artifactId>
  <executions>
    <execution>
      <id>JPA Enhance</id>
      <phase>process-classes</phase>
      <goals>
        <goal>enhance</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <toolProperties>
      <property>
        <name>addDefaultConstructor</name>
        <value>true</value>
      </property>
      <property>
        <name>enforcePropertyRestrictions</name>
        <value>true</value>
      </property>
    </toolProperties>
  </configuration>
</plugin>

And bada-boom bada-bing it started working like a champ.

I post this so that others that might be struggeling with the same frustration might find a quicker solution.

Permalink     4 Comments

Open Source Rocks!

So right after JavaOne I had to go to DC to do a sales call (ok stuff) and right after that I went to New York (cool stuff). It was my first time to do the tourist thing in NYC. It was really fun my super Mom came out to watch our kids so Sarah and I could go and 'live it up' :-).

While there I had the great pleasure of spending some time with Mike Milinkovich of Eclipse and Mike Talyor from Instations doing a webcast. They just released a new product RCP Developer and we spent some time talking about that and the advantages of the RCP.

The RCP talk was cool but the thing that really impressed me is what Mike Taylor had to say about the open source value that they got from moving to Eclipse. Before Eclipse they had IBM's ear and some inside info on the products that became Eclipse, which of course gave them a great competitive advantage. However he sees the space they have to play in in the Eclipse space as so much better than the competitive advantage they got from being part of IBM's preferred partner program. I love that! The bit I'm talking about is a short bit after the first break so hang in there. He then does a bang up job of explaining why Open Source works so well for IT shops. Mike M then gives a action call to IT shops to start to contribute back to open source (and of course specifically to Eclipse).

Permalink     No Comments

NetBeans Day Wrap-up

Tons of interesting stuff came from todays NetBeans shindig. I am impressed with the progress they have made in just a year. The tool set is tons better and seems to be making significant progress on the way to being a first class player. Yet another reason to be glad for Eclipse. The Eclipse team has really forced the issue to make NetBeans better. One of my favorite quotes last year from a NetBeans/Swing guy was that they didn't realize how important native look and feel was to developers (and ultimately users). Duh! They have a much better story for that now and espically on the performance side of things. It runs fast (esp on my shiny new 17" MacBook Pro:).

Ok so back to todays content.

Started with some history and stuff and a big thank you to the folks that stuck with the NB platform through some lean years. A little chest thumping too with their success. From the sounds of it they have something to be happy about too, 6 fold increase in # of active users. Which is a great growth curve. Hard to know what it was last year but still that is a good curve. They were also very keen on thanking the folks that are new to NB and willing to try it out.

Next up was the Subversion demo. Looks like very good support all the typical stuff worked as exected (checkout, checkin, chaged files, diff etc). But there was some really cool stuff to. You can cut a branch or tag from inside the GUI, which I thought was great. But hands down the best thing was the branch and merge view. So the guy doing the demo made a branch and performed a change on the branch then merged it back into the main line. The subversion integraion showed in a graphical tree view the branch history and the current trunk history and would give the ability to choose to merge down and stuff. It looked really cool indeed.

Next up was Jonathan Schwartz (BTW, is that a big announcement he is foreshadowing?). He talked about his love for developer tools which stem not from actually doing development but trying to lead a group of developers at his previous company. They were grumpy with bad tools and happy with good tools (simplification of what he said of course but not that far off). So he likes good tools. He convinced Rich Green to come back and take over software and tools. He then did a bit of mock question and answer, first question 'so are you going to opensource java'. Which I guess is a growing question in many folks minds. His basic answer was still the 'maybe' that we have been hearing for the last couple of years but there was still a lot of 'we don't want the platform to fracture'. So we will have to see what comes out this week. I wouldn't expect an open source java announcment. There was a bit more talk about how cool NB is and how much they are going to be adding to the platform over the next little bit. Sounds very interesting to me for sure, I'll have to start watching more closely. Ended with 'you will be asked to deliver more, join the JCP and help define the standars. Join the community and help define it etc.

Next up was the Sprint guys with a really cool demo of building a MIDP app in about 9 minutes that played a commercial for Sprint phones. It was very cool and easy to do. Though there was a bit of code that the demo guy had to copy and paste, I'll have to stop by their booth and see what the scoop was with that.

Next up was the google guys, Josh and Neal. They were great, the content was good but they did a great job of presenting. Basically it was a bit of info from their book and a bit of a plug for what you can do with NB and their new Jackpot integration. and finally Ben Brewin (one of the Sun NB guys) gave a quick history of where things are with NB and where they are going. Basically tons of new and cool stuff is going to be added to the community over the next 12 months or so as Sun puts all its dev tools basically into the NB community.

So that was basically it, I tried to get into the GUI builder talk but it was way overcrowded. I went to part of the JavaEE 5 talk but had to bail so I missed the rest of the sessions. Overall very interesting indeed.

I finished up NetBeans day about half way through because I had to meet up with Chris. So I didn't stay to try to win the iPod raffle... Ah well seems that a video iPod is the thing to give away this year at the conference so I'm sure I'll have another chance...

Permalink     No Comments

NetBeans Day

I'm sitting here tring to get into the NetBeans Day thing. I was here at 20 till and didn't want to wait in line so I went to starbucks for a coffee (assuming the line would die down), came back and the line was twice as long. Its been steady stream of people ever since. Kind of cool. Seems to be alot of energy in the NB team too, a couple of folks have walked by and been happy campers cause of the turn out. If I ever do get into the show I'll make sure to post something about the content.

Permalink     No Comments

JavaOne - on the ground

I'm in SF on the ground heading out to NetBeans day. I'll post my general impressions once there. I also have some stuff to do with the JCP. Should be interesting.

I was just reviewing the session and there is as usual way too much to see but I'm going to get a change to hang out with old friends (Chris and Kevin and a couple of others) which is half the reason to come here anyway...

Permalink     No Comments

Arriving Today

Got a call from the shippers, the box arrives today - going to be hard to get any work done :-)

Permalink     1 Comment

Taking Sun up on the T2000 try and buy offer

When it was first announced I thought 'hmmm cool but not relevant for me...'. Then I got a really cool gig to run Pentaho BI and Alfresco on various app servers open source and not (in particular - JBoss, JOnAS, WebSphere, WebLogic, GlassFish and Geronimo).

Well that is no simple task to be sure but I figured while I'm at it I might as well try to score a free server from Sun. So I ordered one of the T2000 servers. I will be configuring it and deploying all these app servers to the T2000 in the next few days (as soon as it gets here). I'll let you know how getting Pentaho and Alfresco running on each of them goes. I'll also be running some performance #'s on each server and each hardware platform. Look for me to be performance drama man for the next several weeks :-).

In addition to the Sun hardware I will also be hitting Unisys (hoping I don't have any problems with that one:), Dell and IBM machines.

I also created a new category to track these posts. Feel free to subscribe if you are interested in the drama :-)

Permalink     No Comments

TSS Wrap-up

So another year of TSS under my belt. Over all it was cool, I got to spend a good bit of time hanging out with friends and eating great food. I only ended up at 4 or 5 sessions though, there was lots of interesting stuff going on outside the sessions so I ended up in just a few.

I went to two of them that were awful, I won't mention names cause I don't want to be rude. If I wanted the slides read, i'd read them myself instead of listening to someone else read them...

I went to Linda DeMichael and Mike Kieth's talk about EJB 3.0. It was well attended and well done. The basic thrust of the talk was how much simpler it was to build EJB's in 3.0. And man is it. If you've not had a chance to play with EJB 3.0 yet you really should.

I went part of Dion Almaer and Alex Gehtland. Both of these guys have spent a bunch of time in front of people and you can tell, I'm not that much of an AJAX head but I went here to escape the boredom of having someone read me their slides. It was worth coming to even if I'm not that interetsed in the content.

I went to Raible's talk on web frameworks. Good content and he bought some beer (along with other sponsors) which seemd to go over well for a Friday night session.

Genenders talk was great, esp the video. Essentially JBoss = Pack Man, Geronimo = big blue ghost, the gost wins in the end. Very funny... The Geronimo content was good to. Lots of cool stuff can be done with the console. The fact that it will download DB drivers for you is really cool. He wen't through installing Roller via the console and had it running in 5 minutes or less. That was cool.

Anyway over all a good show.

Permalink     1 Comment

TestNG is a leap beyond JUnit 3.8

Ok so so a little background first. I'm toying with testing the JSF runtime and wanted to run some multi-threaded tests. Everything I googled about JUnit said basically the same thing 'don't try this at home boys and girls'. But while googling I found numerous hits that TestNG had threading built into its nature. I remember when Cédric Beust first announced TestNG I thought I'd have to give that a shot but you know how things go, busy with this that or the other thing and it drops off the 'need to do' and into the 'someday I'll do that' pile. Anyway, TestNG fell into the 'today' pile last night while I was thinking about the multi-threaded test stuff for the JSF bits I wanted to test. So I downloaded the latest copy of TestNG (4.5.2) and the Eclipse plugin (4.5.0.4) and started playing around. One of the cool features in the Eclipse plugin is that you can convert your JUnit tests to TestNG tests with a Quick Fix (kind of funny that converting to TestNG is a fix :). So I clicked on my JUnit test and hit Command-1 (on Windows its Cntrl-1) and choose 'use annotations' and bada-boom bada-bing I've got TestNG tests. Quick painless and everything is working as it was before! I love it when a plan comes together.

This definitely passes the 10 minute test!

Now on to a quick tip - While playing with the multi threaded stuff I noticed that my ConcurrentAccessException was rarely happening with a few threads (3 to 6) and 20 to 30 runs of the test method. So I started poking around, turns out that 'invocationCount' causes all the invocations of the method to run in the same thread. Hmmm I thought perhaps if I put in additional methods they will all get their own thread too.

  @Test(groups={"threaded"}, invocationCount=7)
  public void testSetFactory1() {
    testSetFactory();
  }
  @Test(groups={"threaded"}, invocationCount=3)
  public void testSetFactory2() {
    testSetFactory();
  }
  @Test(groups={"threaded"}, invocationCount=5)
  public void testSetFactory3() {
    testSetFactory();
  }

  @Test(groups={"threaded"}, invocationCount=9)
  public void testSetFactory() {
    System.out.println("Thread.name = " + Thread.currentThread().getName());
    FactoryFinder.setFactory(FactoryFinder.APPLICATION_FACTORY,
        MockApplicationFactory.class.getName());
    Object factory = FactoryFinder
    .getFactory(FactoryFinder.APPLICATION_FACTORY);
    assert factory != null;
    assert factory instanceof ApplicationFactory;
  }

What do you know, problem solved. I later emailed back and forth with the google group and found that Cédric is going to be introducing a new feature soon that will make this even easier. One quick side note about Cédric, I don't think he sleeps! I was emailing back and forth with him at 12:30 am MST and I saw posts from him at 7:30am EST this morning. Caffeine must be your friend Cédric!

One other quick question/problem I ran into... When trying to use the Eclipse plugin to run groups I was not seeing my list of groups. Well turns out that you actually need to initialize the annotations with the correct type for things to work (go figure!) so anyway. I had code like this;

  @Test(groups="threaded", invocationCount=7)
  public void testSetFactory1() {
    testSetFactory();
  }
  @Test(groups="threaded", invocationCount=7)
  @ExpectedException(FooException.class)
  public void testSetFactory2() {
    testSetFactory();
  }

Turns out Eclipse allows this wrong info no problem (the groups and exception stuff must be arrays in case its not obvious at first glance), must be a bug in the incremental compiler. So when the plugin was looking for groups it could not find them because there was a type mismatch in creating them. Interesting to me because I could not find anyting in the eclipse log either ($workspace/.metadata/.log for inquiring minds).

Well that is all I have today for tips and tricks of TestNG, put in on your plate of stuff to learn about now and take it for a spin soon, you won't regret it.

In other news: I've not had a chance to play with JUnit 4.0 so there could be some really cool stuff in there that compares with TestNG. If you have played with it please comment, I'd love to hear others experience. And yes JUnit 4.0 is on my plate of stuff to learn about now :-)

Permalink     4 Comments

Pentaho - Open Source Business Intelligence

Under the gracious invitation of the Pentaho folks I'm attending a week's training in Orlando. Now being in Orlando without my kids is a bit painful but is offset by the knowledge that I'll be back in a week's time for vacation, oh I can't wait for that.

But I digress, back to the point of the post.

Pentaho is a group of folks with years in the BI space, all are from one of the big 3 players and most have spent time together in other companies that were acquired by one of the big three. Its a close nit group and you can tell, makes for a very fun environment where special things can happen and often do.

So far in the class time we have covered the over all architecture of the product and reporting. Docs can be found here, I know I've seen an architecture document on their site too that I can't find right now. I'll update if/when I do find it.

Architecture: So far I'm impressed with the architecture. They have a solid product that looks like its easy to extend. You can for example provide your own integration with your favorite reporting solution (as an example) with a few hundred lines of java. Its very similar to the SPI idea you find in JNDI and many other tool sets. Pentaho defines a set of api's and you implement then and bada-boom you have integration. They of course provide support out of the box for good reporting but the point is extensibility, they have it in spades. There are lots of other interesting bits to the architecture. Just as another example, you can burst reports. So from a simple bit of XML you can specify that 1000 people are to get a report and farm that out to 10 servers to build the reports (this is accomplished through posting messages to JMS and each of the 10 machines picking up the work). Anyway enough geeking out, its cool.

Reporting: Looks very cool architecturally, they are integrated with JFreeReports (whats with the ape on the top of their page anyway, was it written with the help of Primate Programming?), BIRT and another one I don't recall at the moment. Anyway the way that these various engines are integrated is again with a couple of hundred lines of java code and its done. I think in the long haul they should focus on one and continue to make it possible to do others. I my opinion its just too much work to maintain all the integrations, but I digress. So with the solution they currently have you define a report in the respective reporting language/tool set (i.e. XML for the JFreeReports report). This definition is then matched with the data in a Pentaho Action Definition and executed and you have a report. The Actions in the action sequence are essentially an implementation of the Command Pattern. So they are easy to string together into the sequences. Its cool stuff.

So anyway if you are doing a Java EE project then you should check out this stuff. There are some rough edges but what I've tried works.

Permalink     4 Comments