Our dependencies are configured via Ivy:

<dependency org="org.hibernate" name="hibernate-core"
rev="3.6.1.Final" conf="compile">
        <artifact name="hibernate-core" ext="jar"/>
</dependency>

<dependency org="org.springframework" name="spring-core"
rev="3.1.0.RELEASE" conf="compile"/>
<dependency org="org.springframework" name="spring-context"
rev="3.1.0.RELEASE" conf="compile"/>
<dependency org="org.springframework" name="spring-tx"
rev="3.1.0.RELEASE" conf="compile"/>
<dependency org="org.springframework" name="spring-jdbc"
rev="3.1.0.RELEASE" conf="compile"/>
<dependency org="org.springframework" name="spring-context-support"
rev="3.1.0.RELEASE" conf="compile">
        <artifact name="spring-context-support" ext="jar"/>
</dependency>

And yes, you need to use the Spring filter in your web.xml because
your transactional services will be Spring services - configured in
the usual Spring way via the application-context.xml.

Example DAO:

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Transactional(propagation=Propagation.REQUIRED,
isolation=Isolation.READ_COMMITTED, readOnly = true)
public class MyHibernateDAO extends HibernateDaoSupport {

  ...

}

Hope it helps,

Steve.
--
Steve Eynon
-------------------------------
"If at first you don't succeed,
   so much for skydiving!"



On 25 May 2012 17:26, bhorvat <horvat.z.bo...@gmail.com> wrote:
> Hi Steve,
>
> Thanks for posting. Can I ask you to help a bit more :)
>
> I have tried adding to pom tapestry-spring but it didn't resolve everything.
> I was under the impression that tapestry-spring includes everything spring
> related that is needed. The missing dependencies are related to hibernate
>
> import org.springframework.orm.hibernate3.SessionFactoryUtils;
> import org.springframework.orm.hibernate3.SessionHolder;
> import
> org.springframework.transaction.support.TransactionSynchronizationManager;
>
>
> Also will I need to do anything from this page
>
> http://tapestry.apache.org/integrating-with-spring-framework.html
>
> Something like
>
>
>  <filter>
>    <filter-name>app</filter-name>
>
>
> <filter-class>org.apache.tapestry5.spring.TapestrySpringFilter</filter-class>
>  </filter>
>
> So if you can share a bit more light on the configuration (how did you
> define services, since mine are defined in the code as normal tapestry
> service, as your custom OpenSessionInViewFilter), how do I plug in the
> filter into the tapestry (do I have to), do I have to change the hibernate
> configuration that I have so far, since my project does not use spring.
>
> Cheers and thanks for posting and helping
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Tapestry-Transactions-tp5713299p5713407.html
> Sent from the Tapestry - User 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