Friday, June 27, 2008
Human Space Invaders
Sunday, June 22, 2008
Redeploying cactus tests in JBoss
(I am using Cactus 1.8.0 and JBoss 4.2.2.GA)
According to the Cactus documentation, there are two ways to deploy your cactus tests:
(this documentation refers to tomcat deployment ...)
I tried to go with the first method, but it didn't work:
After the first deployment everything ran fine, triggering the ServletTestRunner resulted in a nice report showing the test results.
But then I changed my tests, redeployed the application and hit the ServletTestRunner again... but nothing changed. The resulting report was still showing the results of the previous deployment.
When I restarted JBoss, the actual report was shown. But redeploying the app did not update the report.
So I changed to method two from above and removed the cactus jars from the global JBoss libraries and packaged them into my app (that's what the cactify-ant-task is for anyway).
After that everything was fine. Redeploying the app resulted in a up-to-date report when hitting the ServletTestRunner.
My guess is, that the result of the ServletTestRunner is cached if this servlet is deployed globally...?
Probably there is another way to solve the problem while having the cactus jars deployed globally, but the solution works for my needs...
The only resource I found on the net was this.
Friday, June 20, 2008
Frameworks: Responsibility Traps
-- Eric Evans, SET 2008 |
The best programmers are fully occupied with technical details and are allowed to totally ignore the business problems at hand. The less skilled/experienced/passionate developers then are tasked to solve the business problems while forced in a straight-jacked by an ivory-tower-framework...
I blogged about this before.
Jeremy Miller has his own opinion about this:
Making development "safe" for lesser skilled developers by taking choices away from developers [...] does far more to hamper the efforts of your best developers than it does to make weaker developers more productive.
I'll say that there is a silver bullet(s), it's: Skill. Knowledge. Experience. Passion. Discipline.
Thursday, June 19, 2008
Teamwork
-- Eric Evans, SET 2008 |
In a team of five programmers the top three are always busy to observe and correct the work of the worst one. The only one productive is the second worst programmer.
Hmm... do you feel productive?
Sunday, June 15, 2008
Listen to Rocky!
|
|
Episode 105 of Hanselminutes "Rocky Lhotka on Data Access Mania, LINQ and CSLA.NET" is very interesting.
Some observations from my part:
Friday, June 13, 2008
The Internet ... somebody takes care!
Don't ask, I will not tell you the url :-P
I try to imagine those specialists, fully aware of the responsibility to bring the most important service back to the world. Probably they are part of the secret special unit called 'Turbo Cycle Patrol'.
Thursday, June 12, 2008
Don't worry...
|
Wednesday, June 11, 2008
News from the Palahniuk fandom
I bought his latest piece two days ago:
... and I am looking forward to reading it. Although critics on Amazon seem not to be the best... maybe he has played his trick too many times...
Just out of curiosity I went to YouTube... and was surprised what I found:
The man is just unique... I can't decide if I should find this funny or just strange ...
If you can make up your mind: Part 2 and Part 3
But there is more! Choke is coming o the Movies! I hope they will show it here in Switzerland... I can't wait!
Here is the imdb-page for Choke.
Still not enough? Invisible Monsters (probably my favorite of his books) is also turned into a movie... I already fear a disappointment!
And there are some great tributes to the books on YouTube: Birds Ate My Face, Invisible Monster Credits, SURVIVOR, Lullaby Teaser...
Tuesday, June 10, 2008
When maven starts to pay off...
I have an existing maven project. For QA I have to document it. Maven is a big help here: I just included the following snippet in my pom.xml:
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<sourcepath>src-gen;src/main/java</sourcepath>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.4.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>2.3</version>
<configuration>
<targetJdk>1.5</targetJdk>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
</plugin>
</plugins>
</reporting>
Then run mvn site
...
... and you get the following useful reports:
Friday, June 6, 2008
Hibernate Annotations: what they don't tell you about mapping a package
I just spent some time setting up a project using hibernate-annotations.
In the reference documentation you find the following example for hibernate.cfg.xml:
<hibernate-configuration> <session-factory> <mapping package="test.animals"/> <mapping class="test.Flight"/> <mapping class="test.Sky"/> <mapping class="test.Person"/> <mapping class="test.animals.Dog"/> <mapping resource="test/animals/orm.xml"/> </session-factory> </hibernate-configuration>
What they don't tell you is what the element <mapping package="test.animals"/> means...
Intuitively I would expect, that any annotated class in the given package is picked up automatically by the session factory, so that you can save the work of explicitly enlisting them.
But this is not the case! And I could not find any clear documentation why...
I only found the following clues:
- According to this documentation, a package can be annotated. I never heard of this. It seems that you have to place the annotations in a file called
package-info.java
.
Here is an example, using annotated packages. - According to the api documentation of the class
AnnotationConfiguration
, the methodaddPackage
'reads package level metadata'.
So I guess the element <mapping package="test.animals"/> picks up any annotation-configuration that's available on the given package. But it does not pick up any configuration of the classes in the package...
This is still a speculation on my part, but I think I am not the only one tripping over this ...
Thursday, June 5, 2008
Striving for professionalism?
I don't think you can count someone even as a semi-decent java dev until he wrote his very own web framework at least once in his life.
-- comment on this
blog post