have you seen this? http://code.google.com/p/gluw/ its a somewhat similar stack.
feel free to show us what you have already and we can discuss more.
-igor
Granted, a complete example project might appear more rounded, but it
takes more work, needs a cute theme (eg. the cheese shop) and then
future users need time to rip the features to get the project skeleton
I'm trying to provide them.
Igor, a tgz snapshot of my code is 11Kb (you can instantly do mvn test
on it with zero previous setup) but currently I'm unable to upload it
to any public locations. I can send it to you privately to have a
quick look if you're interested (I assume you usually dont attach such
to group lists).
Kristof
-igor
One of the problems I just realized is that 'mvn test' makes one test
fail while both tests run correctly standalone (mvn test
-Dtest=BasicMappingsTest and mvn test -Dtest=ComplexMappingsTest
succeeds). This is with the uploaded version fetched from my Hg repo,
my original working doesn't do that.. strange :)
K
one of the things i noticed is that it could potentially be cool to
build @Transactional support for warp-persist like there exists for
spring so you can put it on any method...
-igor
wget http://warp-persist.googlecode.com/svn/trunk/warp-persist/dist/warp-persist-1.0.1.jar
mvn install:install-file -DgroupId=warp-persist
-DartifactId=warp-persist -Dversion=1.0.1 -Dpackaging=jar
-Dfile=./warp-persist-1.0.1.jar
Anyway, I agree it's a pity that lots of projects don't care much
about providing maven artifacts. Using mvn for their build is a
personal choice, but I think the lack of maven artifact really sets
back their popularity.
I didn't really get your comment on @Transactional.. warp-persist has
one and it works correctly at both method at class level based on the
configuration:
forAll(Matchers.any()) for method=level and
forAll(Matchers.annotatedWith(Transactional.class), Matchers.any())
for class-level @Transactional usage.
I configured the latter in the example because I prefer clean
architectural layers with objects being clearly on either side of the
transaction boundary, not being here or there based on their methods'
annotations..
K
another problem is that it only works on methods if they are entered
through the proxy, at least that is how it works with spring, so if
you have
class bean {
@transactional void a() {}
void b() { a(); }
}
and you call
bean inst=guice.get(bean.class);
inst.b();
transaction is not invoked around a() because the call to a() is not
across the proxy boundary. this only applies to proxies, if you use a
weaver i think it should work fine.
anyways, what salve's spring txn integration does is to allow
@transactional on any method of any object by directly weaving the
transactional logic into that method...
-igor
> wanted to try it but couldnt get warp-core installed locally into
> maven repo. wish projects like that supported maven :(
sure, me too!!! this is one of the things i wanted when i published
gluw: to have all dependencies in maven repos. despite my messages
this is still a pending issue for dhanji and robbie.
http://groups.google.com/group/warp-core/browse_thread/thread/d43fcf7fb7b56d6f/af34279f297793c7
-> no replies after that post. i am going to insist :)
kristof, i agree projects are slightly different but still i mentioned
"In a near future I will see if it's worth to support other databases
and ORMs such as JPA/Hibernate". also, if you look the original thread
on the wicket mailing list, we discussed with nino and james who
proposed integrating this into maven archetypes. see replies here:
http://www.nabble.com/wicket-like-framework-to-complement-wicket--td19079579.html
> I compared our code but we don't even have
> common parts: I'm not into writing base Repository implementations
> (real-world repos has surprisingly few common points, even findAlls()
> tend to be different with default entity order properties),
true. but you can always override findAll() if it doesn't fit your
needs. http://code.google.com/p/gluw/wiki/Repositories
> and they
> don't seem to care much about adding a DDD-enabled Entity base class
> or a base test class dealing with transaction management.
well, i'm not into providing base entity classes - i prefer to leave
that to the client and this is what i meant with "Domain model
persistence without polluting it (at all) " - *although* i said:
ps: i should re-examine the way i'm handling getById(Serializable id).
as i don't force the end user to extend any particular domain base
class, i use a "string"/reflection-style ODB query -- which can cause
trouble if the id field is not present. will have to evaluate
tradeoffs of both approaches
the lack of features (and mostly better unit testing) it's basically
because i haven't had time to update - there are tons of things yet to
be done/ changed. i think it's great to have another project like
these out there. time will say if these ever get merged with each
other or not! just be sure to check out iolite, domdrides,
wicketopia.
francisco
I'll have a closer look at your spring transaction solution and think
it over if applying something similar will bring significant
advantages in my case.
K
On Mon, Oct 6, 2008 at 10:22 PM, francisco treacy
<francisc...@gmail.com> wrote:
> well, i'm not into providing base entity classes - i prefer to leave
> that to the client and this is what i meant with "Domain model
> persistence without polluting it (at all) "
so basically you leave the choice of applying either the active record
pattern or using a repository for CRD operations to the client, right?
(also, the statement about your targets being slightly different
wasn't mean as any criticism at all, just a plain observation ;))
K
are you working on this kind of transactional support for guice?
K