BlazeDS Spring integration – keep separate DispatcherServlets or hilarity will ensue

Today I spent some interesting time debugging my application, where I had Spring 3, Spring MVC and Spring BlazeDS integration working together in one web application. Web controllers were defined with annotations as introduced in Spring 2.5 in one servlet and BlazeDS handled calls from Flex frontend in it’s own servlet. However while setting everything up I had made a really simple mistake by including Spring Flex configuration into applicationContext – not into messagebroker servlet, which had everything else related to the BlazeDs-messagebroker.

I hadn’t worked with my MVC-controllers for some time as I had been focused on working with Flex and got a nasty surprise, when I tried them out again. As I tried to access my controllers via browser, I got strange errors about handler’s not having controller interface defined. Naturally I thought that I had somehow broken my annotation based configuration, but after doing diffs and numerous tests I couldn’t figure out what was wrong.

Not until I started to remove components away from the configuration I got to the solution and figured out that I had made just a stupid mistake in configurations.

Read through how it is supposed to be done:


http://static.springsource.org/spring-flex/docs/1.0.x/reference/html/ch02s05.html

Well. Not going to make that mistake again.

This entry was posted in java, programming. Bookmark the permalink.

Vastaa

Täytä tietosi alle tai klikkaa kuvaketta kirjautuaksesi sisään:

WordPress.com-logo

Olet kommentoimassa WordPress.com -tilin nimissä. Log Out / Muuta )

Twitter-kuva

Olet kommentoimassa Twitter -tilin nimissä. Log Out / Muuta )

Facebook-kuva

Olet kommentoimassa Facebook -tilin nimissä. Log Out / Muuta )

Google+ photo

Olet kommentoimassa Google+ -tilin nimissä. Log Out / Muuta )

Muodostetaan yhteyttä palveluun %s