
Objective
To have one self containing class that can be plugged into any servlet container. Class will log everything about the request and response, including the payload data coming in and going out.
The Problem
I need to dump out the payload for posts, gets and responses to troubleshoot some issues where data got mismatched between the request and response. Ideal solution would have all this data on one single line. Quick look around gave no off the shelf results, so I put together a quick Filter implementation to capture request and response data.
Continued…
Posted in Google App Engine, Spring Framework.
Tagged with Java, servlet filter.
By Tomas Mazukna
– October 4, 2011
After spending 3 years off the course, I pulled out my 87 325is out of a pile of leaves. Battery was dead, but after charging it up the beast came back to life. Old tires where shot, so I went on Buford highway and got some used tires. With runing car now I was able to register for the autox event. Since my schedule limited me to morning session only, I did not spent time trying to figure out what class my BMW supposed to be in and registered tor Time Only morning session.
Continued…
Posted in Car Stuff.
Tagged with cars, racing.
By Tomas Mazukna
– March 8, 2011

Objective
This article will show you how to implement a full text search in Google App Engine using JDO. I tried my hand at this couple month ago, but after watching this presentation I decided to do it properly.
The Problem
In my first attempt I managed to get the search working, but after watching Brett Slatkin’s presentaion I realized where the problem is. In short deserializing a list of strings (which is our search index) is a very costly operation, but he presented with a solution. Bellow you will find my solution to this problem.
Continued…
Posted in Google App Engine.
Tagged with Google App Engine, JDO.
By Tomas Mazukna
– May 19, 2010

Objective
This post will show you how to use Spring JDBC Template to perform real world CRUD operations. I hope I can show you that you do not need overweight Hibernate to interact with database of your choice.
The Problem Domain
Almost all application I have coded needed to store and get data of some sort. In most cases it was relational database. With hibernate being all the rage these days I have used it in multiple projects with varying degree of problems and success. In my personal opinion hibernate tries to solve a problem that really is not there. If you can not wire SQL you should not be using Hibernate or be doing any software development.
Continued…
Posted in Spring Framework.
Tagged with jdbc, JDO, Spring Framework.
By Tomas Mazukna
– February 23, 2010

Objective
I just wanted to share my thoughts about the frameworks in the Flex environment. You may have noticed that I am in love with Spring when I write Java code, but how about Flex? For a simple example application I go with KISS (keep it stupid simple) approach, but for serious data driven app I utilize a framework.
How to choose a framework that works for You
Firs of all you need to know what you are looking for, because if you do not know where you are going, any path will take you there. When I first started to p[lay with Flex about 3 years ago, I noticed that I need to add some structure to the application. Since I was already using Spring I started looking for a framework. At that point in time there where only two alternatives worth looking at: Cairngorm (heavily pushed by Adobe) and PureMVC.
Continued…
Posted in Flex, The Journey.
Tagged with Flex, Robotlegs.
By Tomas Mazukna
– February 17, 2010

Objective
This article will show you how to implement a simple search in Google App Engine using JDO engine including searching in child objects.
The Problem Domain
In my application I need to search for data and you probably need to do the same in yours. In Google App Engine you can not query for properties of the child objects. In SQL world this means you can not use “where” clause. So how we can not construct a query which looks at child objects. So how can we implement search in such restrictive environment?
Continued…
Posted in Google App Engine, Spring Framework.
Tagged with Google App Engine, JDO.
By Tomas Mazukna
– February 10, 2010

Objective
This article will show you how to persist real world data in Google App Engine. You will learn how to handle inheritance and one-to-many owned relationships in your model objects and store them correctly in the big table implementation of JDO.
The Problem Domain
In my application I need to segregate data by the customer this data belongs to. We will use inheritance in model objects, so all of them will have customer id defined in the base class. We will make the JDO save base class properties in the sub class “table”. We will also learn how to instruct Google App Engine JDO to handle customers with multiple addresses and phone numbers for us. If we define the relationship between model objects correctly JDO will manage storing/retrieving/deleting of these lined objects without our involvement.
Continued…
Posted in Google App Engine, Spring Framework.
Tagged with Google App Engine, Spring Framework.
By Tomas Mazukna
– January 13, 2010

Objective
We are talking REST+JSON from browser to the server and back, so we need to report errors nicely. Exception thrown on the server have to be converted to error messages and transmitted to the client in JSON format. Luckily there is a very elegant solution for this in Spring.
HandlerExceptionResolver interface
Spring provides a very handy HandlerExceptionResolver interface for mapping exceptions to views. If you check the documentation (and you should) you will notice that where are couple exception handlers already implemented, but we will create our own. Just because we can.
Continued…
Posted in Google App Engine, Spring Framework.
Tagged with Google App Engine, json, Spring Framework.
By Tomas Mazukna
– December 16, 2009
Recent Comments