Hey Thilo

You don't have to use the autobuild feature if you don't want to.
Declare your resteasy resources as normal Tapestry IoC services and
then contribute them to the javax.ws.rs.core.Application.
Here is an example from then tapestry-resteasy guide:

@Contribute(javax.ws.rs.core.Application.class)
public static void configureRestResources(Configuration<Object>
singletons, ReloadableEchoResource reloadableEchoResource)
{
        singletons.add(reloadableEchoResource);
}

BTW,  remember NOT to put this service in the autodiscovery package.

Check the guide, specially the Live class reloading part.
http://tynamo.org/tapestry-resteasy+guide#tapestry-resteasyguide-Liveclassreloading

Cheers.
Alejandro.


On Thu, Apr 5, 2012 at 13:35, Thilo Tanner <ttan...@astina.ch> wrote:
> Dear Tapestry Users
>
> We would like to integrate Tynamo's Resteasy module with the JPA
> module (from Tapestry with Hibernate 4). The problem is, that we
> cannot advise Tapestry to observe the @CommitAfter annotations for the
> web service resources. The following doesn't work:
>
> @Match("*Resource")
> public static void adviseTransactions(HibernateTransactionAdvisor
> advisor, MethodAdviceReceiver receiver)
> {
>        advisor.addTransactionCommitAdvice(receiver);
> }
>
> The Resteasy module uses the autobuild() method to create singletons
> of the resource classes (without having interfaces).
>
> Is it not possible to advise a service which has no interface?
>
> Is there may be a better way integrate JPA with Resteasy?
>
> Thanks in advance for your help!
>
> Kind regards and happy easter
>
> Thilo
>
> ---------------------------------------------------------------------
> 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