declare Session as parameter in you service constructor
you dont even need to call any inject annotation ...


MyServiceImpl(Session session){
  this.session=session;
}

in your module use:

  public static void bind(ServiceBinder binder)
  {
    binder.bind(MyService.class, MyServiceImpl.class);
  }




please read this page:
http://tapestry.apache.org/tapestry5/tapestry-ioc/service.html

Davor Hrg

On 9/14/07, Angelo Chen <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I need to use Tapestry-Hibernate in a service, what is the correct way of
> calling the Session? following construct does not compile:
>
>      @InjectService("Session") Session _session;
>
>      public List members() {
>
>         List lst = _session.createQuery("from MemberNew m order by name
> desc").list();
>         return lst;
>
>     }
> --
> View this message in context:
> http://www.nabble.com/T5%3A-Hibernate-and-InjectService-tf4440952.html#a12670846
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to