Migrate classic J2EE to Spring (Step 1) (revised) 2 October 2009
Posted by Marten Deinum in J2EE, Spring.Tags: Conversion, J2EE, Java, Migration, Spring
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.
Migrate classic J2EE to Spring (Step 1) 6 May 2009
Posted by Marten Deinum in J2EE, Java, Spring.Tags: Conversion, J2EE, Java, Migration, Spring
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…)
Securing Spring Web Flow 13 June 2007
Posted by Marten Deinum in Java, Spring Security, Spring Web Flow.Tags: acegi, security, Spring, web flow
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.
Converting String to Date and Date-formatting in Spring-MVC 9 February 2007
Posted by Marten Deinum in Java, Spring.Tags: Spring, spring mvc
add a comment
This week alone I answered the question about date formatting and how to bind Strings to Objects multiple times. If I would get an euro/dollar for everytime I gave the same answer. So I figured maybe it is time to create simple example to show how it is done in Spring. (The sources used are included in the propertyeditors.zip attached to this post, rename to .war to deploy it in tomcat or jetty (tested in Jetty 6.0.2))
(more…)
One application, per client database 5 January 2007
Posted by Marten Deinum in Java, Spring.Tags: aop, Spring, spring aop
2 comments
In one of my recent projects we came a cross an application model which had 1 codebase but for every client they had (around 40) they deployed one application. Sometimes they had to redeploy several times because they had memory and performance issues. We soon realized that we needed to do something about this way of deploying. The only two things which where different per client where the database connection and the front-end.
(more…)