The same (if you mean the hibernate session).

With get it works instead of load...but Strange that getDomainName() which is 
in the same table cause it to load associated tables....

-------- Original-Nachricht --------
> Datum: Sun, 25 Jan 2009 01:11:54 +0100
> Von: Tomas Kolda <ko...@web2net.cz>
> An: Tapestry users <users@tapestry.apache.org>
> Betreff: Re: Weird bug

> What happen when you use injected session instead of sessionmanager?
> 
> @Inject
> private Session session;
> 
> public Object onActivate(int domainID) {      
>  domain = (Domain)this.session.get(Domain.class,
> Integer.valueOf(domainID));
>  return this;
> }
> 
> Tomas
> 
> superoverdr...@gmx.de napsal(a):
> > The following code:
> >
> > public Object onActivate(int domainID) {
> >     
> >  domain = (Domain)sessionManager.getSession().load(Domain.class, new
> Integer(domainID));
> >  return this;
> >
> > }
> >
> > leads to:
> >
> > HTTP ERROR: 500
> >
> > Render queue error in BeginRender[core/ExceptionReport:renderobject_0]:
> could not initialize proxy - no Session
> >
> > RequestURI=/editdomain
> >
> > Powered by Jetty://
> >
> >
> > However, if I add this line:
> >
> > public Object onActivate(int domainID) {
> >     
> >  domain = (Domain)sessionManager.getSession().load(Domain.class, new
> Integer(domainID));
> > System.out.println(domain.getDomainName());
> >  return this;
> > }
> >
> > The error does not occur.....
> >
> > My question is:
> >
> > 1. How do you avoid this error?
> >
> > 2. Why is this a Jetty error and not a Tapestry5 error message? Is this
> something I should report as bugreport?
> >
> > Thanks!
> >
> > Toby
> >
> >
> > ---------------------------------------------------------------------
> > 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

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

Reply via email to