jump to navigation

Migrate classic J2EE to Spring (Step 1) (revised) 2 October 2009

Posted by Marten Deinum in J2EE, Spring.
Tags: , , , ,
add a comment

A couple of months ago I wrote a step 1 on migrating a classis J(2)EE application to a spring based application. Recently I had some time again on my hands and after studying the application and also after some discussions I had I decided to structure the project a little different.

“External” applications

The Adventure Builder applications uses 4 other applications to deliver its services. However in a normal real situation those 4 applications are outside of our control. We cannot change them nor redeploy them. So I decided to just include the ear files for those 4 projects instead of rebuilding them each time.

Generated stubs/skeletons

The application makes use of generated java and xml files. Also in a real situation you should generate those once and after that reuse. You should only (re)generate those files if the external interface changes (best would be to not generate at all). I decided to use the generated java files and xml files and include them in the project. They can be found in the src/generated directory.

Deployment

Deployment is now maven based, maven can start and create a glassfish domain for you. It will create all jms/jdbc/mail resources and deploy the 4 external applications. After that setup you can choose to start glassfish with the normal startServ command or reuse maven to start it. Simply run the setup.bat/setup.sh file from the setup directory. To deploy our own 2 applications simply go to the apps directory and type mvn glassfish:deploy.

Testing

The initial project as is has some test classes available so that we can make sure that the application still behaves as it should behave after we are going to change it to use Spring and Hibernate.

Hopefully Step 2 will follow shortly and that we can have a look at the different steps and easier code.

Spring Web Flow 2 Web Development 25 May 2009

Posted by Marten Deinum in Reviews.
add a comment

A few weeks ago I was contacted by packt publishing to review one of their books. They asked me if I wanted to review Spring Web Flow 2 Web Development (sample chapter).

In short the book consists of 254 pages in all those pages they try to explain Spring Web Flow, Maven, Ant+Ivy, Spring Security and some basics (and also not all basics) about the Spring Framework it self. Ofcourse not to mention all the normal stuff like title pages and indexes. All the explaining of the added frameworks takes away from the actual goal and that is to cover and explain Spring Web Flow. I also found that there is no real layering/build up in the book, they directly start with FlowExecutionListeners even before they covered the basics. Another draw back is the samples used, they don’t really use one sample (application) but different snippets which make it harded for a new Spring Web Flow user to get an overall feel. So the short verdict I wouldn’t say the book is bad but it could be a lot better, most of the information to be found in the book but it can be quite a search at times. If you are a Spring Web Flow beginner I would try to find other books covering the basics of Spring Web Flow.
(more…)

Migrate classic J2EE to Spring (Step 1) 6 May 2009

Posted by Marten Deinum in J2EE, Java, Spring.
Tags: , , , ,
1 comment so far

A few months ago SpringSource released a white paper describing the migration from J2EE to a Spring framework based application. Even before they wrote that white paper I already had the idea of writing something about how to migrate from J2EE to a Spring based application. However Colin Sampaleanu (at al.) beat me to writing the white paper :) .

However I also had the idea of providing some practical information like a sample. The white paper gives some thought on what to do and where but it doesn’t give a clear sample. So I started writing a possible migration path (multi step sample) from a J2EE application to a Spring based application.
(more…)

Configuring JNDI Resources in Tomcat 14 January 2008

Posted by Marten Deinum in Java, tomcat.
Tags: , ,
add a comment

It seems quite hard to configure a JNDI Resource in Tomcat. Especially when it comes to configuring XA capable resources. The key lies in understanding how Resources work/need to be configured.
(more…)

Securing Spring Web Flow 13 June 2007

Posted by Marten Deinum in Java, Spring Security, Spring Web Flow.
Tags: , , ,
2 comments


Well that is the title of the presentation I just gave at the NL-JUG 2007 conference. The presentation was about the Spring Web Flow solution we created to secure flows. The presentation can be found and the conference website. The code is available in the JIRA under issue SWF-93 but for your convenience also available for download (press the link on the bottom of this post).

The presentation went well, there were some nice questions and a little bit of discussion. So my conclusion was that it was a nice presentation. I will blog about using this security solutions shortly. However for now I have a conference to attend.

WebFlow Security