Hi Glenn,
I recently deployed a set of web services, realized on top of ibatis 2, in a
cluster of 3 nodes; the application was installed in each node of the
"cloud".
The difficulty I had to face[1] is that, using memcached as a distribuited
caching layer, since ibatis 2 keys generation is not uniqu
Does anyone have experience using Ibatis in an application that is deployed
in a "cloud" environment? What, if any, customization or other constraints
should I be facing?
Thanks!
Unfortunately the data model is very thin (it's a database representation of
a very large series of XSD schema documents), with "types" that have
"properties", where each "type" has a "parent", and each "property" has a
"type" as well (among other things).
Big objects and N+1 selects don't bother
That's exactly what should happen. Here's the catch: you should only
depend on lazy loading OR caching... not both. I would suggest caching.
Try disabling lazy loading and use one sqlSession instance.
Clinton
On Mon, Jan 18, 2010 at 9:37 AM, Dave Rafkind wrote:
> Unfortunately the data model
Hmm... it looks to me like your situation is a perfect storm.
* You're loading lots of objects.
* You're loading big objects.
* You are guaranteeing an N+1 selects problem with that for loop.
No one of these situations should create a major problem, but all three
together are a guaranteed disa
Ok, that's some good information, I understand that you should marshall your
objects with care. Unfortunately for me at some point I will have to
marshall every single one of my database rows into an object graph. However
what I took from your advice was not to be so stingy in re-using the session
For me, this didn't work. The Set eventually contained String
objects.
Here's how I solved it:
I have a class called Customer which contains a a set of Service. The
customer is saved in CUSTOMERS and the services in CUSTOMER_SERVICES.
The Enum class
public enum Service {
CLEANING;
}
My
I wrote a generic EnumTypeHandler some time ago which made things quite a
bit easier. I don't have access to the source right now but I'll try to dig
it out this evening if needed, it's fairly basic and straightforward (and I
think even based off some protoype handler I found somewhere else).
Othe
By default iBATIS expects enums to be stored in the DB using the enum _names_.
I am working with a legacy DB where the enum's ordinal is stored instead.
On a global level I managed to do this by patching the default EnumTypeHandler.
The only alternative that I currently see is to write a specific