Re: restlet with open session in view for hibernate

2009-12-06 Thread kiwionly
wow, look good, never realize that (my experience to restlet still fresh) !

will going to give it a try !

thx a lot !

On Fri, Dec 4, 2009 at 11:04 PM, Rhett Sutphin wrote:

> Hi kiwi,
>
> On Dec 3, 2009, at 11:10 AM, kiwionly wrote:
>
> > hi,
> >
> > Infact my servlet is working correctly in servlet container
> >
> > for restlet, i not using spring MVC, and not running in servlet
> > container (so web.xml is not working anymore), instead I running
> > inside Netty. hence, that the problem arise, maybe i need to lookup
> > how to configure the server instead.
>
> Perhaps you could write a Restlet Filter which invokes the Spring OSIV
> interceptor.
>
> Rhett
>
> >
> > regards,
> > kiwi
> >
> > On Thu, Dec 3, 2009 at 11:46 PM, Dustin N. Jenkins <
> dustin.jenk...@nrc-cnrc.gc.ca
> > > wrote:
> > Hello,
> >
> > I currently use the Hibernate/Spring Open Session In View model too
> > with
> > FreeMarker and it works perfectly.  Can you post your web.xml?  Is it
> > setup properly?
> >
> > Dustin
> >
> >
> > kiwionly wrote:
> > > hi,
> > >
> > > I had create an web application that using restlet to replace
> > serlvet (for Resource that no need any session).
> > >
> > > my web app basically is using spring + hibernate + velocity
> > template (with restlet extension for velocity template)
> > >
> > > however, i had encounter LazyInitializeException, as my servlet
> > had an Inteceptor for hibernate session. But it don't have any OSIV
> > for reslet. hence the exception come. (spring close the session
> > before complete render the page).
> > >
> > > do restlet plan to support a use case for this ? or do anyone have
> > find a solution ?
> > >
> > > any idea ?
> > >
> > > regards,
> > > kiwionly
> > >
> > > --
> > >
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2426617
> > >
> >
> > --
> >
> >
> > Dustin N. Jenkins | Tel/Tél: 250.363.3101 |
> dustin.jenk...@nrc-cnrc.gc.ca
> >
> > facsimile/télécopieur: (250) 363-0045
> >
> > National Research Council Canada | 5071 West Saanich Rd, Victoria BC.
> > V9E 2E7
> >
> > Conseil national de recherches Canada | 5071, ch. West Saanich,
> > Victoria
> > (C.-B) V9E 2E7
> >
> > Government of Canada | Gouvernement du Canada
> >
> > --
> >
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2426730
> >
>
> --
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2427065
>

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2427265

Re: restlet with open session in view for hibernate

2009-12-04 Thread Rhett Sutphin
Hi kiwi,

On Dec 3, 2009, at 11:10 AM, kiwionly wrote:

> hi,
>
> Infact my servlet is working correctly in servlet container
>
> for restlet, i not using spring MVC, and not running in servlet  
> container (so web.xml is not working anymore), instead I running  
> inside Netty. hence, that the problem arise, maybe i need to lookup  
> how to configure the server instead.

Perhaps you could write a Restlet Filter which invokes the Spring OSIV  
interceptor.

Rhett

>
> regards,
> kiwi
>
> On Thu, Dec 3, 2009 at 11:46 PM, Dustin N. Jenkins 
>  > wrote:
> Hello,
>
> I currently use the Hibernate/Spring Open Session In View model too  
> with
> FreeMarker and it works perfectly.  Can you post your web.xml?  Is it
> setup properly?
>
> Dustin
>
>
> kiwionly wrote:
> > hi,
> >
> > I had create an web application that using restlet to replace  
> serlvet (for Resource that no need any session).
> >
> > my web app basically is using spring + hibernate + velocity  
> template (with restlet extension for velocity template)
> >
> > however, i had encounter LazyInitializeException, as my servlet  
> had an Inteceptor for hibernate session. But it don't have any OSIV  
> for reslet. hence the exception come. (spring close the session  
> before complete render the page).
> >
> > do restlet plan to support a use case for this ? or do anyone have  
> find a solution ?
> >
> > any idea ?
> >
> > regards,
> > kiwionly
> >
> > --
> > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2426617
> >
>
> --
>
>
> Dustin N. Jenkins | Tel/Tél: 250.363.3101 | dustin.jenk...@nrc-cnrc.gc.ca
>
> facsimile/télécopieur: (250) 363-0045
>
> National Research Council Canada | 5071 West Saanich Rd, Victoria BC.
> V9E 2E7
>
> Conseil national de recherches Canada | 5071, ch. West Saanich,  
> Victoria
> (C.-B) V9E 2E7
>
> Government of Canada | Gouvernement du Canada
>
> --
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2426730
>

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2427065


Re: restlet with open session in view for hibernate

2009-12-04 Thread kiwionly
hi,

Infact my servlet is working correctly in servlet container

for restlet, i not using spring MVC, and not running in servlet container
(so web.xml is not working anymore), instead I running inside Netty. hence,
that the problem arise, maybe i need to lookup how to configure the server
instead.

regards,
kiwi

On Thu, Dec 3, 2009 at 11:46 PM, Dustin N. Jenkins <
dustin.jenk...@nrc-cnrc.gc.ca> wrote:

> Hello,
>
> I currently use the Hibernate/Spring Open Session In View model too with
> FreeMarker and it works perfectly.  Can you post your web.xml?  Is it
> setup properly?
>
> Dustin
>
>
> kiwionly wrote:
> > hi,
> >
> > I had create an web application that using restlet to replace serlvet
> (for Resource that no need any session).
> >
> > my web app basically is using spring + hibernate + velocity template
> (with restlet extension for velocity template)
> >
> > however, i had encounter LazyInitializeException, as my servlet had an
> Inteceptor for hibernate session. But it don't have any OSIV for reslet.
> hence the exception come. (spring close the session before complete render
> the page).
> >
> > do restlet plan to support a use case for this ? or do anyone have find a
> solution ?
> >
> > any idea ?
> >
> > regards,
> > kiwionly
> >
> > --
> >
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2426617
> >
>
> --
>
>
> Dustin N. Jenkins | Tel/Tél: 250.363.3101 | dustin.jenk...@nrc-cnrc.gc.ca
>
> facsimile/télécopieur: (250) 363-0045
>
> National Research Council Canada | 5071 West Saanich Rd, Victoria BC.
> V9E 2E7
>
> Conseil national de recherches Canada | 5071, ch. West Saanich, Victoria
> (C.-B) V9E 2E7
>
> Government of Canada | Gouvernement du Canada
>
> --
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2426730
>

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2426767

Re: restlet with open session in view for hibernate

2009-12-03 Thread Dustin N. Jenkins
Hello,

I currently use the Hibernate/Spring Open Session In View model too with 
FreeMarker and it works perfectly.  Can you post your web.xml?  Is it 
setup properly?

Dustin


kiwionly wrote:
> hi, 
>
> I had create an web application that using restlet to replace serlvet (for 
> Resource that no need any session).
>
> my web app basically is using spring + hibernate + velocity template (with 
> restlet extension for velocity template)
>
> however, i had encounter LazyInitializeException, as my servlet had an 
> Inteceptor for hibernate session. But it don't have any OSIV for reslet. 
> hence the exception come. (spring close the session before complete render 
> the page).
>
> do restlet plan to support a use case for this ? or do anyone have find a 
> solution ?
>
> any idea ?
>
> regards,
> kiwionly
>
> --
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2426617
>   

-- 


Dustin N. Jenkins | Tel/Tél: 250.363.3101 | dustin.jenk...@nrc-cnrc.gc.ca

facsimile/télécopieur: (250) 363-0045

National Research Council Canada | 5071 West Saanich Rd, Victoria BC. 
V9E 2E7

Conseil national de recherches Canada | 5071, ch. West Saanich, Victoria 
(C.-B) V9E 2E7

Government of Canada | Gouvernement du Canada

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2426730


restlet with open session in view for hibernate

2009-12-03 Thread kiwionly
hi, 

I had create an web application that using restlet to replace serlvet (for 
Resource that no need any session).

my web app basically is using spring + hibernate + velocity template (with 
restlet extension for velocity template)

however, i had encounter LazyInitializeException, as my servlet had an 
Inteceptor for hibernate session. But it don't have any OSIV for reslet. hence 
the exception come. (spring close the session before complete render the page).

do restlet plan to support a use case for this ? or do anyone have find a 
solution ?

any idea ?

regards,
kiwionly

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2426617