Whats the best way to manually acquire and manage a
session/transaction in tapestry?

I am sending off 'build requests' to a build queue. I have a Executor
service set up to pull items from that queue. They of course need to
mark the build as done in the db when the build is finished. I don't
think @inject session will work in this case, unless it is somehow
aware of the worker threads in the Executor service. Of course, once
they are submitted to the queue, they will become detached.

So I need some more fine grained control over detaching/merging instances.

-Daniel

On Tue, Apr 14, 2009 at 6:37 AM, Christian Köberl
<tapestry.christian.koeb...@gmail.com> wrote:
>
> Hey Daniel!
>
> This will not work - you have to create a service for storing/loading your 
> entities. Using services (DAOs/Repositories) to access the database is 
> usually a better design. I would also recommend to put your named queries in 
> your orm.xml. This helps to find slow queries.
>
> The other option is to use injection into entities (this is for 
> Pico-Container, you have to modify this for Tapestry IOC):
> http://www.hibernate.org/182.html
>
> --
> Chris
> --
> View this message in context: 
> http://n2.nabble.com/%40CommitAfter-tp2626098p2633128.html
> Sent from the Tapestry Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to