Thanks++;
I kinda of had it working, but it was too much trouble to maintain which
classes were getting advised.  Also I had the issue of talking to multiple
embedded Neo4J instances (something not many people do), and different
transactional advice is needed depending on where the attached Node came
from. (i.e. a Neo4J Node from database A needs transactional advise from
database A).  This worked as well using Markers but further complicated the
issue, and it wouldn't scale well when we have several graph databases to
talk to at once.

Here's what I ended up doing in case people follow in my footsteps with
embedded Neo4J and T5:

In the end I just created detached domain POJOs, and adjusted my DAOs to
return those instead.  Now I explicitly save the detached by
dao.update(myDetachedObj), and the DAO worries about the transaction, etc.
 It's very simple, seems that's the way nature intended.  Hahaha

In other exciting news, I received official word that the particular set of
code I've been working on will be released as open source on Github.  So
I've got that going for me.  :-)



On Tue, Jan 14, 2014 at 6:49 AM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Mon, 13 Jan 2014 22:20:41 -0200, Daniel Jue <teamp...@gmail.com> wrote:
>
>  Thanks Thiago!
>>
>
> My pleasure!
>
>
>  Now I want to apply it to all my pages and components in my web module
>> using @Match("*").  It causes a recursion error since it sees the
>> services in the DAO module which are needed to create the transaction!
>>
>
> Pages and components aren't services, so I don't think using @Match("*")
> will work for them. I guess you'll need to write a
> ComponentClassTransformWorker to advise page and component methods. See the
> source of CachedWorker for an example.
>
>
>  One more thing:  When I have one of these Neo4J-backed domain objects
>> (let's say User.class), I might have something like this in a page:
>>
>> @Property
>> private User theUser;
>>
>> In my template, if I do ${theUser.firstName}, will the transactional
>> advise be applied to the automatically constructed getters and setters for
>> that
>> property?
>>
>
> No.
>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to