You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Stephane Decleire <sd...@cariboo-networks.com> on 2007/01/12 12:22:58 UTC
DojoAjaxResponseBuilder and OpenSessionInViewFilter
Hi,
I've got a strange behavior in my T4.1.1 application when triggering a
DirectLink with the DojoAjaxResponseBuilder :
@Component(id="selectLink", bindings={
"listener=listener:doClick",
"parameters=blockId",
"async=true" })
public abstract DirectLink getSelectLink();
When the async property is set to false, my page is displayed without
errors but when the property is set to true, i've got the awfull "lazy
initialisation exception" error when the page tries to access entity
beans managed by Hibernate.
It seems that the DojoAjaxResponseBuilder bypass the OpenSessionInView
filter declared in my web.xml file.
Is it a normal behavior for the Ajax requests ?
Any clue is welcome.
--
Stéphane Decleire
Re: DojoAjaxResponseBuilder and OpenSessionInViewFilter
Posted by Jesse Kuhnert <jk...@gmail.com>.
There should be nothing overly different between an ajax / non ajax
request. They all go through the same resource paths as everyone else.
I guess we'd have to know more about this filter and how it is/isn't
getting associated with all requests for some reason?
On 1/12/07, Stephane Decleire <sd...@cariboo-networks.com> wrote:
> I have checked the log files and the OpenSessionInViewFilter filter is
> called ...
> So i have no more idea why an asnchronous call could give a different
> result from a synchronous one ...
>
> --
> Stéphane Decleire
>
> Cariboo Networks SARL
> 05 56 57 99 20 / 06 63 78 69 06
> www.bebe-nounou.fr
>
>
>
> Stephane Decleire a écrit :
> > Hi James,
> >
> > Here is an extract from my web.xml file :
> >
> > <filter>
> > <filter-name>hibernateFilter</filter-name>
> >
> > <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
> >
> > </filter>
> >
> > <filter-mapping>
> > <filter-name>hibernateFilter</filter-name>
> > <servlet-name>myApp</servlet-name>
> > </filter-mapping>
> >
> > <servlet>
> > <servlet-name>myApp</servlet-name>
> > <servlet-class>org.apache.tapestry.ApplicationServlet</servlet-class>
> > <load-on-startup>1</load-on-startup>
> > </servlet>
> >
> > <servlet-mapping>
> > <servlet-name>myApp</servlet-name>
> > <url-pattern>/app</url-pattern>
> > </servlet-mapping>
> >
> > Perhaps the bug comes from a different location but i don't understand
> > why the error arises only with the Ajax Request as the page that
> > should be endered is exactly the same ...
> >
> > --
> > Stéphane Decleire
> >
> > Cariboo Networks SARL
> > 05 56 57 99 20 / 06 63 78 69 06
> > www.bebe-nounou.fr
> >
> >
> >
> > James Carman a écrit :
> >> How do you have your OpenSEssionInViewFilter mapped? What url-mapping
> >> are you using?
> >>
> >>
> >> On 1/12/07, Stephane Decleire <sd...@cariboo-networks.com> wrote:
> >>> Hi,
> >>>
> >>> I've got a strange behavior in my T4.1.1 application when triggering a
> >>> DirectLink with the DojoAjaxResponseBuilder :
> >>>
> >>> @Component(id="selectLink", bindings={
> >>> "listener=listener:doClick",
> >>> "parameters=blockId",
> >>> "async=true" })
> >>> public abstract DirectLink getSelectLink();
> >>>
> >>> When the async property is set to false, my page is displayed without
> >>> errors but when the property is set to true, i've got the awfull "lazy
> >>> initialisation exception" error when the page tries to access entity
> >>> beans managed by Hibernate.
> >>> It seems that the DojoAjaxResponseBuilder bypass the OpenSessionInView
> >>> filter declared in my web.xml file.
> >>>
> >>> Is it a normal behavior for the Ajax requests ?
> >>> Any clue is welcome.
> >>>
> >>> --
> >>> Stéphane Decleire
> >>>
> >>>
> >>>
> >>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >
>
>
--
Jesse Kuhnert
Tapestry/Dojo team member/developer
Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: DojoAjaxResponseBuilder and OpenSessionInViewFilter
Posted by Stephane Decleire <sd...@cariboo-networks.com>.
I have checked the log files and the OpenSessionInViewFilter filter is
called ...
So i have no more idea why an asnchronous call could give a different
result from a synchronous one ...
--
Stéphane Decleire
Cariboo Networks SARL
05 56 57 99 20 / 06 63 78 69 06
www.bebe-nounou.fr
Stephane Decleire a écrit :
> Hi James,
>
> Here is an extract from my web.xml file :
>
> <filter>
> <filter-name>hibernateFilter</filter-name>
>
> <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
>
> </filter>
>
> <filter-mapping>
> <filter-name>hibernateFilter</filter-name>
> <servlet-name>myApp</servlet-name>
> </filter-mapping>
>
> <servlet>
> <servlet-name>myApp</servlet-name>
> <servlet-class>org.apache.tapestry.ApplicationServlet</servlet-class>
> <load-on-startup>1</load-on-startup>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>myApp</servlet-name>
> <url-pattern>/app</url-pattern>
> </servlet-mapping>
>
> Perhaps the bug comes from a different location but i don't understand
> why the error arises only with the Ajax Request as the page that
> should be endered is exactly the same ...
>
> --
> Stéphane Decleire
>
> Cariboo Networks SARL
> 05 56 57 99 20 / 06 63 78 69 06
> www.bebe-nounou.fr
>
>
>
> James Carman a écrit :
>> How do you have your OpenSEssionInViewFilter mapped? What url-mapping
>> are you using?
>>
>>
>> On 1/12/07, Stephane Decleire <sd...@cariboo-networks.com> wrote:
>>> Hi,
>>>
>>> I've got a strange behavior in my T4.1.1 application when triggering a
>>> DirectLink with the DojoAjaxResponseBuilder :
>>>
>>> @Component(id="selectLink", bindings={
>>> "listener=listener:doClick",
>>> "parameters=blockId",
>>> "async=true" })
>>> public abstract DirectLink getSelectLink();
>>>
>>> When the async property is set to false, my page is displayed without
>>> errors but when the property is set to true, i've got the awfull "lazy
>>> initialisation exception" error when the page tries to access entity
>>> beans managed by Hibernate.
>>> It seems that the DojoAjaxResponseBuilder bypass the OpenSessionInView
>>> filter declared in my web.xml file.
>>>
>>> Is it a normal behavior for the Ajax requests ?
>>> Any clue is welcome.
>>>
>>> --
>>> Stéphane Decleire
>>>
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>
Re: DojoAjaxResponseBuilder and OpenSessionInViewFilter
Posted by Stephane Decleire <sd...@cariboo-networks.com>.
Hi James,
Here is an extract from my web.xml file :
<filter>
<filter-name>hibernateFilter</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>hibernateFilter</filter-name>
<servlet-name>myApp</servlet-name>
</filter-mapping>
<servlet>
<servlet-name>myApp</servlet-name>
<servlet-class>org.apache.tapestry.ApplicationServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>myApp</servlet-name>
<url-pattern>/app</url-pattern>
</servlet-mapping>
Perhaps the bug comes from a different location but i don't understand
why the error arises only with the Ajax Request as the page that should
be endered is exactly the same ...
--
Stéphane Decleire
Cariboo Networks SARL
05 56 57 99 20 / 06 63 78 69 06
www.bebe-nounou.fr
James Carman a écrit :
> How do you have your OpenSEssionInViewFilter mapped? What url-mapping
> are you using?
>
>
> On 1/12/07, Stephane Decleire <sd...@cariboo-networks.com> wrote:
>> Hi,
>>
>> I've got a strange behavior in my T4.1.1 application when triggering a
>> DirectLink with the DojoAjaxResponseBuilder :
>>
>> @Component(id="selectLink", bindings={
>> "listener=listener:doClick",
>> "parameters=blockId",
>> "async=true" })
>> public abstract DirectLink getSelectLink();
>>
>> When the async property is set to false, my page is displayed without
>> errors but when the property is set to true, i've got the awfull "lazy
>> initialisation exception" error when the page tries to access entity
>> beans managed by Hibernate.
>> It seems that the DojoAjaxResponseBuilder bypass the OpenSessionInView
>> filter declared in my web.xml file.
>>
>> Is it a normal behavior for the Ajax requests ?
>> Any clue is welcome.
>>
>> --
>> Stéphane Decleire
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
Re: DojoAjaxResponseBuilder and OpenSessionInViewFilter
Posted by James Carman <ja...@carmanconsulting.com>.
How do you have your OpenSEssionInViewFilter mapped? What url-mapping
are you using?
On 1/12/07, Stephane Decleire <sd...@cariboo-networks.com> wrote:
> Hi,
>
> I've got a strange behavior in my T4.1.1 application when triggering a
> DirectLink with the DojoAjaxResponseBuilder :
>
> @Component(id="selectLink", bindings={
> "listener=listener:doClick",
> "parameters=blockId",
> "async=true" })
> public abstract DirectLink getSelectLink();
>
> When the async property is set to false, my page is displayed without
> errors but when the property is set to true, i've got the awfull "lazy
> initialisation exception" error when the page tries to access entity
> beans managed by Hibernate.
> It seems that the DojoAjaxResponseBuilder bypass the OpenSessionInView
> filter declared in my web.xml file.
>
> Is it a normal behavior for the Ajax requests ?
> Any clue is welcome.
>
> --
> Stéphane Decleire
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org