Diary of developing “pirent-homm3″ – The remote client application

It’s been 1 weeks since I left my job at TMA Solutions and there are a lot of things to settle down. Until this weekend, I get time for updating the last module of my “pirent-homm3” project. This module is used for building the command line application to interact with the “pirent-homm3” app deployed on JBoss server. For the version 1.0 Final, I don’t want to spend much time for the user interface, so the command line interface seems to be a good choice (Honestly, I’m the guy from the back-end world :D). There also a Java library for helping building command line program which is Apache Commons CLI. Even though this sounds simple, the “pirent-homm3” has passed all of my tests and deployed successfully to server, there still a lot of things give me troubles.

The logic of the “pirent-homm3-cli” command line app is simple: enter your option with value then it looks up the appropriate enterprise bean to handle request. To implement EJB invocation from remote client via JNDI API, the following is a useful one:

EJB invocations from a remote client using JNDI Continue reading “Diary of developing “pirent-homm3″ – The remote client application”

Diary of developing “pirent-homm3″ – Deploy nightmare

When it’s the time for packaging all of your modules and deploy to server, there are a lot of painful things waiting (in case you aren’t familiar with these activities). So today, they’re all my silly works.

Just because my logic module contains dependencies from both model and persistent ones, so I just deploy it to server and hope I got EJBs to lookup and do my works. The server always complains about NoClassDefFound exception for classes from these model and persistent module. Continue reading “Diary of developing “pirent-homm3″ – Deploy nightmare”

Diary of developing “pirent-homm3″ – Integration test troubles

Today morning, I’ve finished deploying my service modules to server and about to write a quick note of troubles I got in deployment. It seems like there was a draft that I nearly forgot which about the troubles during integration test. And this’s it. Just to make this become the full-fledged post.

One test always complains about the entity name

“pirent-homm3” has two modules named “logic” and “persistent”. There are corresponding integration tests for both. The test runs well on the “persistent” module but when it comes to the “logic”, it even cannot start the test. The server log always complains about not found a table/column with associated entity name/properties. Continue reading “Diary of developing “pirent-homm3″ – Integration test troubles”

Diary of developing “pirent-homm3” – The pain of testing

It’s been a month since the announcement of my side project pirent-homm3. So today, I write down my thinking during this period as a reminder for my Future Me.

Do I need unit test for my JEE project?

My project is backed by JEE with EJB and JPA. When it comes to testing phase, I wonder should apply unit test. I experimented the unit test for EJB with Google Mockito in the August 2013 and feel like it’s not really helpful. At this time, I had a task to investigate a way for testing functions of NVR-MC project and the testers can use easily since this project doesn’t have it own graphical interface and at first stage, it had not yet integrated with the 3rd-party software CastleRock for providing human-readable interface. I spent many hours to learn the concept of test-driven development, unit test and persuade Simon to follow my approach. But the result does not like what I expect. It cannot be used to test with real data, only mock and mock object, bored to death. Continue reading “Diary of developing “pirent-homm3” – The pain of testing”

Diary of developing “pirent-homm3” – The beginning

Once upon a time, I had a desire to write a small software application to apply my knowledge. But I have no idea what my app should do about. Recently, I have seen a poster of Might and Magic 3 HD Edition video game. It was one of my favourite video game when I was a child. It made me wanna see all HOMM3 creatures in HD graphic and then I got one idea. How about a small application about this video game? Even it may have a few of features (e.g., view creature’s info), do what I like is my purpose. So this post was created as a way to make me remember each stage when I’m developing this project. Continue reading “Diary of developing “pirent-homm3” – The beginning”