http://issues.appfuse.org/browse/APF-537?page=com.cenqua.fisheye.jira:fisheye-tabpanel

On 11/30/06, thinkboy <[EMAIL PROTECTED]> wrote:

thanks for help

but I could not locate the "FishEye" link in JIRA. pls advise


Matt Raible-3 wrote:
>
> I've created an issue for this and have checked in the fix.
>
> http://issues.appfuse.org/browse/APF-537
>
> If you click on the "FishEye" link in JIRA, you should see the changes I
> made.
>
> Matt
>
> On 11/30/06, thinkboy <[EMAIL PROTECTED]> wrote:
>>
>> hi matt,
>>
>> sorry to trouble.
>>
>> i looked at /test/web/...webapp.action/BaseControllerTestCase which
>> actually
>> extend from junit's TestCase.
>>
>> and by default in appfuse, all spring mvc controller testcases  extend
>> from
>> BaseControllerTestCase
>>
>> so how can i extend AbstractTransactionalDataSourceSpringContextTests
>> from
>> MyControllerTest.java?
>>
>> very sorry,  if i sound a bit ignorance.
>>
>> thanks for your great help
>> ~thinkboy.
>>
>>
>> Matt Raible-3 wrote:
>> >
>> > If you extend AbstractTransactionalDataSourceSpringContextTests, it
>> > should solve your LIE problems.
>> >
>> > Matt
>> >
>> > On 11/30/06, thinkboy <[EMAIL PROTECTED]> wrote:
>> >>
>> >> i solved my problem by add interception in action-servlet.xml .
>> >> it works very fine in deployment to tomcat.
>> >>
>> >> however, I got the LazyInitializationException when I run testcases
>> for
>> >> xxControllerTest
>> >> how can I apply openSessionInViewInterceptor to my spring mvc
>> Controller
>> >> testcase ?
>> >>
>> >> ~pls advise
>> >>
>> >> ===setting===
>> >>         <bean id="openSessionInViewInterceptor"
>> >>
>> >>
>> 
class="org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor">
>> >>                 <property name="sessionFactory">
>> >>                         <ref bean="sessionFactory" />
>> >>                 </property>
>> >>         </bean>
>> >>
>> >>
>> >>         <bean id="urlMapping"
>> >>
>> >>
>> class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
>> >>                 <property name="interceptors">
>> >>                         <list>
>> >>                                 <ref
>> bean="openSessionInViewInterceptor"
>> >> />
>> >>                         </list>
>> >>                 </property>
>> >>                 ...
>> >>                 ...
>> >>
>> >>
>> >>
>> >>
>> >> thinkboy wrote:
>> >> >
>> >> > I managed to find the OpenSessionInViewInterceptor  offered by
>> >> > SpringFramework
>> >> >
>> >> > I think I can solved my problem. sorry to trouble u friends :-D
>> >> >
>> >> >
>> >> > On 2006-11-30 11:15:07 +0800, Man-Chi Leung
>> >> > <[EMAIL PROTECTED]> said:
>> >> >
>> >> >> hi
>> >> >>
>> >> >> in mvc controller , I am trying to do a call to manager and execute
>> >> dao
>> >> >> for getX() which returns a parent object as a model.
>> >> >> but when I try to read Parent's child object(which is lazily
>> >> >> initialized)  , hibernate will throw a LazyInitializationException
>> >> >>
>> >> >> after some reading, I understand that I need "Open Session in View
>> >> >> pattern" to extend hibernate's session to a single http request.
>> >> >>
>> >> >> may I know how to do it ?
>> >> >>
>> >> >> sorry for the trouble..
>> >> >>
>> >> >> ~thinkboy.
>> >> >>
>> >> >> ==Log===
>> >> >>     [junit] [platform] ERROR [main]
>> >> >> LazyInitializationException.<init>(19) | could not initialize proxy
>> -
>> >> >> the owning Session was closed
>> >> >>     [junit] org.hibernate.LazyInitializationException: could not
>> >> >> initialize proxy - the owning Session was closed
>> >> >>     [junit]     at
>> >> >>
>> >>
>> 
org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:60)
>> >> >
>> >> >
>> >> >>
>> >> >
>> >> >
>> >> >
>> ---------------------------------------------------------------------
>> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >> >
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> 
http://www.nabble.com/how-to-apply-the-Open-Session-in-View-pattern-in-appfuse--tf2729351s2369.html#a7614990
>> >> Sent from the AppFuse - User mailing list archive at Nabble.com.
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> >
>> > --
>> > http://raibledesigns.com
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> 
http://www.nabble.com/how-to-apply-the-Open-Session-in-View-pattern-in-appfuse--tf2729351s2369.html#a7615666
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> --
> http://raibledesigns.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>

--
View this message in context: 
http://www.nabble.com/how-to-apply-the-Open-Session-in-View-pattern-in-appfuse--tf2729351s2369.html#a7626594
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to