Hi Chris,

If what you want is, accessing the hibernate session from your service,
Davor has answer to my similar question before:

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); 
  } 

It works very well.
A.C.


Chris Lewis-5 wrote:
> 
> Hi all,
> 
> So my question is, how should I go about getting access to my database 
> from my service? I'd like to use the blinding simplicity of of IoC just 
> giving it to me, but I;m not sure that's an option. Any ideas?
> 
> thanks,
> chris
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/t5%3A-%40Inject-hibernate-Session-into-a-service--tf4501533.html#a12852161
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