Matt Morton on 30/11/05 15:00, wrote:
I have always wrestled with the DTO question. I guess I haven't seen the
need for it while using Spring and Hibernate. I have also created objects
that are specific to the view object (like a set of menu links) that is
being created dynamically and then pop
ce of that exception, I suppose it's better to
> handle
> > That exception in your service layer, so you will give to the web layer
> > A 'proper' collection rather than let the web layer handle that...
> >
> > HTH
> > marco
> >
> >
>
Tom
Basically the initialization occurs in the DAO and then passes back a list
of the requested objects. I try to limit what dom objects I am sending back
so i only have to initialize a couple of branches occasionally.
I have thought about having a layer that is specific to the view where the
ob
e that...
>
> HTH
> marco
>
>
>
> -Original Message-
> From: Tom Ziemer [mailto:[EMAIL PROTECTED]
> Sent: 30 November 2005 15:39
> To: Struts Users Mailing List
> Subject: Re: slightly [OT] Hibernate and domain objects in web apps
>
> Hi,
>
collection rather than let the web layer handle that...
HTH
marco
-Original Message-
From: Tom Ziemer [mailto:[EMAIL PROTECTED]
Sent: 30 November 2005 15:39
To: Struts Users Mailing List
Subject: Re: slightly [OT] Hibernate and domain objects in web apps
Hi,
@Matt:
thanks for y
: slightly [OT] Hibernate and domain objects in web apps
Hi,
@Matt:
thanks for your elaborate answer. My setup is a lot like yours: Spring
manages the business objects and the DAOs. My problem is this:
Struts->Business layer->HibernateDAO->Database will return a hibernate
proxy of my dom
eb layer handle that...
HTH
marco
-Original Message-
From: Tom Ziemer [mailto:[EMAIL PROTECTED]
Sent: 30 November 2005 15:39
To: Struts Users Mailing List
Subject: Re: slightly [OT] Hibernate and domain objects in web apps
Hi,
@Matt:
thanks for your elaborate answer. My setup is a
Hi Borislav,
yes, this is actually one big part of my problem: sometimes I'll need
collections A and B of an object and sometimes no collections at all or
different collections.
How does your business layer represent this? Do you have one method in
which you specify the attributes that are n
Tom Ziemer wrote:
Hi Borislav,
unfortunately I cannot do this, because I have a rich client and a
(struts-based) web frontend. Consequently, my business layer must load
and initialize all dom objects that are requested, because I cannot
have an open session on my rich client that is using we
Hi,
@Matt:
thanks for your elaborate answer. My setup is a lot like yours: Spring
manages the business objects and the DAOs. My problem is this:
Struts->Business layer->HibernateDAO->Database will return a hibernate
proxy of my dom object. I have to load all objects lazily, because our
db ha
Marco Mistroni wrote:
In my case I chooseed to have a common interface for DTO & domain, and I am
just using BeanUtils to copy Properties between the two (so I save the
hardcoded method copy)
I use in most cases a mapped form i.e. a form with a map and use as well
BeanUtils to copy the value
Borislav Sabev wrote:
Tom Ziemer wrote:
Hi,
I have got a little problem with Hibernate - well actually it is only
partially related to it:
My app uses Spring + Hibernate (lazy loading), but should I return
the value beans (dom) from Hibernate to my Struts actions? If I do
this, I'd have
Hi Borislav,
unfortunately I cannot do this, because I have a rich client and a
(struts-based) web frontend. Consequently, my business layer must load
and initialize all dom objects that are requested, because I cannot have
an open session on my rich client that is using web services to
commu
Tom Ziemer wrote:
Hi,
I have got a little problem with Hibernate - well actually it is only
partially related to it:
My app uses Spring + Hibernate (lazy loading), but should I return the
value beans (dom) from Hibernate to my Struts actions? If I do this,
I'd have to deal with LazyInitial
LazyInitializationException in your hibernate layer?
Any reasons of why you can't do that?
Regards
marco
-Original Message-
From: Tom Ziemer [mailto:[EMAIL PROTECTED]
Sent: 30 November 2005 14:51
To: Struts Users Mailing List
Subject: Re: slightly [OT] Hibernate and domain
Hi Tom
In our app we are using pattern where Struts calls a method from what I call
a service layer object. Then the service layer calls the dao interface.
Then there is an implementation of the dao for Hibernate. So the call stack
is something like:
Struts Action -> ServiceManager.getSomeObjec
Struts Users Mailing List
Subject: slightly [OT] Hibernate and domain objects in web apps
Hi,
I have got a little problem with Hibernate - well actually it is only
partially related to it:
My app uses Spring + Hibernate (lazy loading), but should I return the
value beans (dom) from Hibernate to
y [OT] Hibernate and domain objects in web apps
Hi,
I have got a little problem with Hibernate - well actually it is only
partially related to it:
My app uses Spring + Hibernate (lazy loading), but should I return the
value beans (dom) from Hibernate to my Struts actions? If I do this, I'd
ha
Hi,
I have got a little problem with Hibernate - well actually it is only
partially related to it:
My app uses Spring + Hibernate (lazy loading), but should I return the
value beans (dom) from Hibernate to my Struts actions? If I do this, I'd
have to deal with LazyInitializationExceptions fo
19 matches
Mail list logo