First of all, thanks for this neat little framework :-)
I'm about to use iBatis for a project that is already using Guice.
This project has a bit of legacy attached to it, amongst other things
that it needs to work with multiple schemas (in Oracle fwiw). I can
probably figure out how to achieve this, but before I do, I'd like
any's opinion here on how I could neatly achieve that with ibaguice.
I'm new to iBatis too, so I'm still figuring out how everything fits
together.
Thanks for any suggestions!
Eelco
The suggestion I can provide you is reading the core (and maybe DAO)
module of iBaGuice code - don't be scared: it is VERY small - and
adapt it for your needs, working with Guice's Binding Annotations,
which help you on discriminating SqlMapFactory instances into your
iBatis clients.
BTW if you've nice ideas about it and would contribute to iBaGuice,
you're welcome :)
Best regards, have a nice day,
Simone
http://people.apache.org/~simonetripodi/
I guess you're right. I was thinking about varying just the data
source initially, as I need to work with different schemas only until
we fixed this problem in the application and move towards a single
schema, but on second thought, the only way to do this neatly really
is to have separate iBatis configurations.
> The suggestion I can provide you is reading the core (and maybe DAO)
> module of iBaGuice code - don't be scared: it is VERY small - and
> adapt it for your needs, working with Guice's Binding Annotations,
> which help you on discriminating SqlMapFactory instances into your
> iBatis clients.
Hey, that's the first thing I do with any open source project :-) I
like the code, and even if I end up not using it (writing my own),
it'll be helpful as an example. Thanks for that.
Btw, a project like this really shows how awesome Guice is. Where we
used Spring in the past to just hook up stuff, we're using Guice -
much like this project does - to build more abstractions.
Theoretically, you can achieve many of the same things with Spring,
but I find that Guice just encourages to take your APIs to the next
level.
Anyway... of to figure this thing out. If I have something worth
sharing, I'll do :-)
Eelco
My thoughts about Guice are *exactly* the same you expressed in your
last message: we started developing applications using the Spring
framework, but after bad episodes caused by OutOfMemory exceptions,
latencies introduced in every abstraction layer, I convinced the team
approaching Guice and porting the old code to the new stuff: it was a
great result!!! The application resulted faster, lighter, no
OutOfMemory errors!
At the same time, we're great fan of iBatis: light, fast, easy to use,
and the 3.0 version is more and more improved!!!
So for us it was quite "natural" sharing modules and providers - in
every application where we use them, we probably should develop the
same code - that integrate this great frameworks.
Feel free to express any kind of suggestion/feedback/doubt/trouble
about iBaGuice!!!
Best regards,
Simo
http://people.apache.org/~simonetripodi/