Archive for August, 2009

How To: Load a spring application from a jar file

Monday, August 24th, 2009

Consider the following situation:

Loading 3 application context files in a Swing application. 2 of the context files are in jar-files.
All context files depend on the component-scan option. The Application context gets loaded from my Swing app.
The method I use, is the import resource option in the context file. Read on how to configure this in your application context.
(more…)

Webservices with Spring and Castor

Monday, August 17th, 2009

Today, webservices are used primarily to expose some services of an application to the outside world. There are a lot of tools available to consume webservices. Tools like Mule, Axis and Spring.
This article describes a method of exposing Java services as webservices. The technique’s / tools used to accomplice this are; Java, Spring and Castor.
There are many other tools available, like Axis, to expose java services as webservices. The reason I used Spring and Castor is the simplicity in creating webservices. Spring takes care of all boilerplate coding and Castor’s mapping capability takes care of the Object <-> XML mapping without the need to generate any java objects the way Axis does. This way you have clean java code, supported with configuration in Spring and a clean Castor mapping to expose your service as a webservice.
(more…)