Unit Testing with a GigaSpaceFactoryBean

I was talking to Shay Banon (Gigaspace Software Architect) he mentioned using GigaSpaceFactoryBean for writing gigaspace unit tests. I could find no examples on their site, although I concede it may be there somewhere. This shows post shows a simple example.

He also mentioned using the admin api to do full end to end integration testing.  The admin api has huge potential as its able to control gigaspace containers, deploy into them and collect statistics.  Its a powerful api.

This is documented on their site: http://www.gigaspaces.com/wiki/display/XAP7/Administration+and+Monitoring+API
Continue reading

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Gigaspace API design – the GigaSpace write method

Now don’t get me wrong, I like gigaspaces and I am not into bashing someones API for the sake of it.  Take a look at the GigaSpace interface documented in javadoc: http://www.gigaspaces.com/docs/JavaDoc7.1/org/openspaces/core/GigaSpace.html Its time the API was cleaned up.  Take the write method for instance:

<T> LeaseContext<T> write(T entry,
                          long lease,
                          long timeout,
                          int modifiers)
                      throws DataAccessException

These are the things I dislike about it:
Continue reading

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Untangling a Gigaspace Pojo

I am going to build myself another example application.  I find these very handy for exploring ideas.  If you already have a project with hibernate, spring, gigaspaces and such setup, your much more likely to try a few ideas out, and then blog them.  So for a while this blog might be more quiet than usual.  I think I may use Roo to do it.  Roo looks like a great platform for quickly building something up for an experiment.  i.e You can throw together a new set of entities, and then build an example on top of them.  Before I begin, one last thing from my current experiments.

Sometimes JPA entity classes get hijacked.

Say for instance you have a need to pass entity classes to another system, via JAXB.  Its possible to use DTO objects for the transfer or you could just annotate the the entity classes.  In the example below, I wanted to fetch something from a database via JPA and write it into gigaspaces.  It soon gets messy your Entity classes start to become a hub in the middle of your application with things dipping into some of the classes and annotating them and throwing them here and there.
Continue reading

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)