Spring Integration Tests, Part II, Using Mock Objects

Mattias Severson

In the previous post, I wrote how you can use Spring’s FactoryBean to facilitate the creation of mock objects for Spring integration tests. Now, it is time to use the EasyMockFactoryBean (in this post EasyMock has been used for creating mock objects, but a similar approach applies to Mockito as well. Start by looking at [...]

Tags: , , ,

Autowiring Morphia entities

Jan Kronquist

My current project is using Morphia to handle object mapping to/from mongoDB and I wanted to add dependency injection using Spring to my entities like this: @Entity public class MyEntity { … @Autowired @Transient private SomeService someService; } Notice the @Transient annotation that tells Morphia to avoid persisting this field! I solved this problem by [...]

Tags: , ,

Spring Integration Tests, Part I, Creating Mock Objects

Mattias Severson

When writing integration tests with Spring, it can sometimes be convenient to mock one or more of Spring bean dependencies. However, during some circumstances strange things may happen… (In this post, Mockito has been used for creating mock objects, but the same problem applies to EasyMock as well. You can find the corresponding files if [...]

Tags: , , , , ,

Spring Web Flow + Roo – a simple example

Anders Davoust

The other day I was trying to implement a new user registration. The goal was to validate user input data and save it to a database. I am using Spring Roo in my project so Spring Web Flow would be a good candidate for the task. Since Roo has support for Web Flow I thought [...]

Tags: , ,

Dynamic FTP Client using Apache Camel and Spring

Mattias Severson

I was recently asked to develop an FTP client that could transmit files to various FTP servers as a part of a delivery system in a Java enterprise application. The requirements dictated a flexible implementation: Three different FTP protocols should be supported, namely FTP, FTPS and SFTP It should be possible to transmit different files [...]

Tags: , , ,

REST and XML using Spring MVC and Groovy

Mattias Hellborg Arthursson

There’s one particular thing Groovy is really good for and that is working with XML. When I started playing around with the REST support in the latest version of Spring MVC I wanted to try using Spring for the controller infrastructure and delegate to Groovy for producing XML responses. It turned out this wasn’t as [...]

Tags: , , , ,

Load-time weaving, Spring and Maven.

Mattias Ask

As some of you might have read in my earlier post, I’m using load-time weaving in the project that I’m working on. Lately I’ve run in to some problems with getting the tests to play nice with Maven. So what was the problem? Well, I’ve been using @Configurable and @Autowired to inject stuff in my [...]

Tags: , , , , ,

Referential Integrity using Spring LDAP

Vlado Palczynski

The directory servers of today are packed with a lot of nice features, one of them being Referential Integrity which performs integrity updates on attributes like member, uniqueMember, owner etc. Simpler put, when an entry updates its distinguished name, all references using the old distinguished name get updated to the new one. However, there can [...]

Tags: , , , ,

Spring Security For Real with Grails

Mattias Hellborg Arthursson

Spring Security is one of the basic building blocks I use pretty much every time I’m constructing a web application. It’s a very mature and incredibly powerful security framework, one of its main benefits being its versatility. There are hooks and plugs everywhere, allowing you to extend and combine basically any way you want. Now, [...]

Tags: , , , ,

Spring and load-time weaving of Neo4j-based domain objects

Mattias Ask

What do you do when your Spring configuration isn’t in charge of creating your objects that needs to be injected with stuff? This became a real problem for me when I tried doing some non-anemic domain object implementations persisted as Neo4j Nodes. I was playing around with creating a Twitter clone, in my opinion the [...]

Tags: , , , , ,

Simple Authentication Using Spring LDAP

Mattias Hellborg Arthursson

It’s with great pleasure that we can now finally announce the final 1.3.0 version of Spring LDAP. It’s been a while since we’ve made a major release, but there’s quite a bit in this one to make up for it. Among the highlights of this release are the improvements in the authentication area, which is [...]

Tags: , , , , , , , ,

Devoxx highlights

Jacob Mattsson

In order to embrace the true Christmas spirit, I thought I’d share a few goodies from the Devoxx conference that took place in Antwerp, Belgium in mid December. Devoxx is the former JavaPolis that has changed name due to trademarking issues with Sun. Nonetheless, it’s still the worlds largest independent Java conference, where the 3200 [...]

Tags: , , , , ,

Encrypting Properties With Jasypt

Ulrik Sandberg

Properties are used in many Java applications as a simple way of separating parts that are likely to change, from the parts that are not that likely to change. Consider for example this typical bean definition in a Spring configuration file:   <bean id="traditionalPersonDao" class="org.springframework.ldap.samples.article.dao.TraditionalPersonDaoImpl"> <property name="url" value="ldap://localhost:3901" /> <property name="base" value="dc=jayway,dc=se" /> <property name="userDn" [...]

Tags: , , ,

What’s New in Spring LDAP 1.3

Mattias Hellborg Arthursson

We recently released Spring LDAP 1.3.0.RC1. This long awaited release contains a number of new features and bug fixes. In this post I’ll highlight some of the changes, pointing out some of my favorite Spring LDAP features. Simple Authentication Mechanism By far the most requested feature for inclusion in Spring LDAP has been the ability [...]

Tags: , , ,

Testing Among the Clouds, Part 2

Mattias Hellborg Arthursson

In a recent post I wrote about the particular problems we’ve been having with integration testing the Spring LDAP project and the use we’ve made of Amazon EC2 for solving these problems. In this post I’ll present the implementation details. Prerequisites In order to keep this reasonably brief I’ll have to refer to the getting [...]

Tags: , , , , , ,