RE: Axis, Spring and Hibernate

2005-03-14 Thread Oleg Lebedev
This looks like a Hibernate issue, so you may want to move this thread
to the Hibernate forum.
Some hints:
- When you open a new Hibernate session you need to re-attach your
cached objects to this session before using them.
- Use Hibernate.initialize(Object), Session.refresh(Object), and
Session.saveOrUpdateCopy(Object) methods

Regards.

Oleg

-Original Message-
From: Koney, Satish [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 14, 2005 2:31 AM
To: axis-user@ws.apache.org
Subject: RE: Axis, Spring and Hibernate


Ya...I could have used lazy="true"
but that requires the sesssion to be open when those elements are
accessed.

But I am using spring to maintain the sessions...It is opening at the
start of the method and closing 
session when it is done with that. so by the time the elements are
accessed in my client web applicatoin the sesssion is getting closed.
that results in exceptions

probably, I talked much about hibernate in Axis forum...but i believe
that
(De) serialzation is consuming time

Thanks,
.


> -Original Message-
> From: Arijit Mukherjee [SMTP:[EMAIL PROTECTED]
> Sent: Monday, March 14, 2005 2:24 PM
> To:   axis-user@ws.apache.org
> Subject:  RE: Axis, Spring and Hibernate
> 
> If you are using hibernate-style beans (that is, collections are 
> represented as sets/bags), you can set the option for "lazy loading" -

> in which case when you are retrieving one object, hibernate will not 
> retrieve all the children unless asked to do so. This will reduce the 
> time for mapping the relations and their children back into relevant 
> objects.
> 
> I have a similar problem because I am using Axis-generated stubs 
> (which contains arrays for collections - and this rules out the 
> possibility of lazy loading)...
> 
> Arijit
> 
> >-Original Message-
> >From: Koney, Satish [mailto:[EMAIL PROTECTED]
> >Sent: 14 March 2005 07:57
> >To: axis-user@ws.apache.org
> >Subject: RE: Axis, Spring and Hibernate
> >
> >it is not taking 20 minutes for executing the queries..the
> >queries are executed fast..
> >the problem is with constructing those retrvied records into
objects...
> >
> >Can someone plz help!!
> >
> >
> >> -Original Message-
> >> From:  Sebastien Mayemba Mbokoso 
> >[SMTP:[EMAIL PROTECTED]
> >> Sent:  Sunday, March 13, 2005 11:43 AM
> >> To:axis-user@ws.apache.org
> >> Subject:   Re: Axis, Spring and Hibernate
> >> 
> >> I am using Hibernaete in my current project with Axis too.
> >It's not an
> >> Axis issue but just a Hibernate trouble. You have to investigate in
> >> the Hibernate Forum.
> >> 20 minutes for executing a queries it's not possible. My databases 
> >> contains 32 tables with so many relationships and so many tables
are 
> >> full. My queries don't spend a lot of time as yours.
> >> 
> >> 
> >> Sebastien
> >> 
> >> 
> >> On Sat, 12 Mar 2005 10:52:28 -0500, Koney, Satish
> >> <[EMAIL PROTECTED]> wrote:
> >> > Hi,
> >> > 
> >> > I have two modules in my application.
> >> > The first one is a webservice. (Axis 1.1, spring 1.1.3 
> >> > and
> >> Hibernate
> >> > 2.1.6 ) This web service is responsible for fetching, updating,
> >> > deleting the records in database.
> >> > 
> >> > The second one is web application which is consuming this
> >> > web service. It is purely for presentation.
> >> > It does not do anything other than presentation.
> >> > 
> >> > The problem I am facing now is, when I request Hibernate
> >for records
> >> > in
> >> one
> >> > table, it is executing so many queries.
> >> > It is fetching records from the tables which have foreign-key
> >> > relation
> >> with
> >> > that table. So when the web application is using this web 
> >> > service,
> >> > it is taking lot of time to load the page. ( 20 minutes just to 
> >> > display 5-6 records)
> >> > 
> >> > On the Axis side, how can I control the
> >(De)serialization of
> >> objects
> >> > that I am getting from the web service?
> >> > 
> >> > Please help!!!
> >> > 
> >> > Thanks,
> >> > .
> >> > 
> >> > 
> >> > Confidential:  This electronic message and all contents contain
> >

RE: Axis, Spring and Hibernate

2005-03-14 Thread Arijit Mukherjee
What if you persist the session factory? Opening a session during each
start will mean you will have to load the hibernate config properties
each time (unless ofcourse spring does something for that)...This
(persisting the session factory and loading the config properties only
once) improved my server's performance a little...

De-serialization does ofcourse take some time - but I wasn't actually
able to measure the amount of time taken just for the
serialization/deserialization...that would have given a better
picture...

Cheers
A

>-Original Message-
>From: Koney, Satish [mailto:[EMAIL PROTECTED] 
>Sent: 14 March 2005 09:31
>To: axis-user@ws.apache.org
>Subject: RE: Axis, Spring and Hibernate
>
>Ya...I could have used lazy="true"
>but that requires the sesssion to be open when those elements 
>are accessed.
>
>But I am using spring to maintain the sessions...It is opening 
>at the start of the method and closing session when it is done 
>with that. so by the time the elements are accessed in my 
>client web applicatoin the sesssion is getting closed. that 
>results in exceptions
>
>probably, I talked much about hibernate in Axis forum...but i 
>believe that
>(De) serialzation is consuming time
>
>Thanks,
>.
>
>
>> -Original Message-
>> From:Arijit Mukherjee [SMTP:[EMAIL PROTECTED]
>> Sent:    Monday, March 14, 2005 2:24 PM
>> To:  axis-user@ws.apache.org
>> Subject: RE: Axis, Spring and Hibernate
>> 
>> If you are using hibernate-style beans (that is, collections are 
>> represented as sets/bags), you can set the option for "lazy 
>loading" - 
>> in which case when you are retrieving one object, hibernate will not 
>> retrieve all the children unless asked to do so. This will 
>reduce the 
>> time for mapping the relations and their children back into relevant 
>> objects.
>> 
>> I have a similar problem because I am using Axis-generated stubs 
>> (which contains arrays for collections - and this rules out the 
>> possibility of lazy loading)...
>> 
>> Arijit
>> 
>> >-Original Message-
>> >From: Koney, Satish [mailto:[EMAIL PROTECTED]
>> >Sent: 14 March 2005 07:57
>> >To: axis-user@ws.apache.org
>> >Subject: RE: Axis, Spring and Hibernate
>> >
>> >it is not taking 20 minutes for executing the queries..the queries 
>> >are executed fast..
>> >the problem is with constructing those retrvied records 
>into objects...
>> >
>> >Can someone plz help!!
>> >
>> >
>> >> -Original Message-
>> >> From: Sebastien Mayemba Mbokoso 
>> >[SMTP:[EMAIL PROTECTED]
>> >> Sent: Sunday, March 13, 2005 11:43 AM
>> >> To:   axis-user@ws.apache.org
>> >> Subject:  Re: Axis, Spring and Hibernate
>> >> 
>> >> I am using Hibernaete in my current project with Axis too. 
>> >It's not an
>> >> Axis issue but just a Hibernate trouble. You have to 
>investigate in 
>> >> the Hibernate Forum.
>> >> 20 minutes for executing a queries it's not possible. My 
>databases 
>> >> contains 32 tables with so many relationships and so many tables 
>> >> are full. My queries don't spend a lot of time as yours.
>> >> 
>> >> 
>> >> Sebastien
>> >> 
>> >> 
>> >> On Sat, 12 Mar 2005 10:52:28 -0500, Koney, Satish 
>> >> <[EMAIL PROTECTED]> wrote:
>> >> > Hi,
>> >> > 
>> >> > I have two modules in my application.
>> >> > The first one is a webservice. (Axis 1.1, spring 1.1.3 
>> >> > and
>> >> Hibernate
>> >> > 2.1.6 ) This web service is responsible for fetching, updating, 
>> >> > deleting the records in database.
>> >> > 
>> >> > The second one is web application which is 
>consuming this 
>> >> > web service. It is purely for presentation.
>> >> > It does not do anything other than presentation.
>> >> > 
>> >> > The problem I am facing now is, when I request Hibernate
>> >for records
>> >> > in
>> >> one
>> >> > table, it is executing so many queries.
>> >> > It is fetching records from the tables which have foreign-key 
>> >> > relation
>> >> with
>> >> > that table. So when the web application is using this web 
>> >> >

RE: Axis, Spring and Hibernate

2005-03-14 Thread Koney, Satish
Ya...I could have used lazy="true"
but that requires the sesssion to be open when those elements are accessed.

But I am using spring to maintain the sessions...It is opening at the start
of the method and closing 
session when it is done with that. so by the time the elements are accessed
in my client web applicatoin the sesssion is getting closed. that results in
exceptions

probably, I talked much about hibernate in Axis forum...but i believe that
(De) serialzation is consuming time

Thanks,
.


> -Original Message-
> From: Arijit Mukherjee [SMTP:[EMAIL PROTECTED]
> Sent: Monday, March 14, 2005 2:24 PM
> To:   axis-user@ws.apache.org
> Subject:  RE: Axis, Spring and Hibernate
> 
> If you are using hibernate-style beans (that is, collections are
> represented as sets/bags), you can set the option for "lazy loading" -
> in which case when you are retrieving one object, hibernate will not
> retrieve all the children unless asked to do so. This will reduce the
> time for mapping the relations and their children back into relevant
> objects. 
> 
> I have a similar problem because I am using Axis-generated stubs (which
> contains arrays for collections - and this rules out the possibility of
> lazy loading)...
> 
> Arijit 
> 
> >-Original Message-
> >From: Koney, Satish [mailto:[EMAIL PROTECTED] 
> >Sent: 14 March 2005 07:57
> >To: axis-user@ws.apache.org
> >Subject: RE: Axis, Spring and Hibernate
> >
> >it is not taking 20 minutes for executing the queries..the 
> >queries are executed fast..
> >the problem is with constructing those retrvied records into objects...
> >
> >Can someone plz help!!
> >
> >
> >> -Original Message-
> >> From:  Sebastien Mayemba Mbokoso 
> >[SMTP:[EMAIL PROTECTED]
> >> Sent:  Sunday, March 13, 2005 11:43 AM
> >> To:axis-user@ws.apache.org
> >> Subject:   Re: Axis, Spring and Hibernate
> >> 
> >> I am using Hibernaete in my current project with Axis too. 
> >It's not an 
> >> Axis issue but just a Hibernate trouble. You have to investigate in 
> >> the Hibernate Forum.
> >> 20 minutes for executing a queries it's not possible. My databases 
> >> contains 32 tables with so many relationships and so many tables are 
> >> full. My queries don't spend a lot of time as yours.
> >> 
> >> 
> >> Sebastien
> >> 
> >> 
> >> On Sat, 12 Mar 2005 10:52:28 -0500, Koney, Satish 
> >> <[EMAIL PROTECTED]> wrote:
> >> > Hi,
> >> > 
> >> > I have two modules in my application.
> >> > The first one is a webservice. (Axis 1.1, spring 1.1.3 and
> >> Hibernate
> >> > 2.1.6 ) This web service is responsible for fetching, updating, 
> >> > deleting the records in database.
> >> > 
> >> > The second one is web application which is consuming this 
> >> > web service. It is purely for presentation.
> >> > It does not do anything other than presentation.
> >> > 
> >> > The problem I am facing now is, when I request Hibernate 
> >for records 
> >> > in
> >> one
> >> > table, it is executing so many queries.
> >> > It is fetching records from the tables which have foreign-key 
> >> > relation
> >> with
> >> > that table. So when the web application is using this web service, 
> >> > it is taking lot of time to load the page. ( 20 minutes just to 
> >> > display 5-6 records)
> >> > 
> >> > On the Axis side, how can I control the 
> >(De)serialization of
> >> objects
> >> > that I am getting from the web service?
> >> > 
> >> > Please help!!!
> >> > 
> >> > Thanks,
> >> > .
> >> > 
> >> > 
> >> > Confidential:  This electronic message and all contents contain
> >> information
> >> > from Syntel, Inc. which may be privileged, confidential or 
> >otherwise 
> >> > protected from disclosure. The information is intended to 
> >be for the 
> >> > addressee only. If you are not the addressee, any 
> >disclosure, copy, 
> >> > distribution or use of the contents of this message is 
> >prohibited.  
> >> > If
> >> you
> >> > have received this electronic message in error, please notify the 
> >> > send

RE: Axis, Spring and Hibernate

2005-03-14 Thread Arijit Mukherjee
If you are using hibernate-style beans (that is, collections are
represented as sets/bags), you can set the option for "lazy loading" -
in which case when you are retrieving one object, hibernate will not
retrieve all the children unless asked to do so. This will reduce the
time for mapping the relations and their children back into relevant
objects. 

I have a similar problem because I am using Axis-generated stubs (which
contains arrays for collections - and this rules out the possibility of
lazy loading)...

Arijit 

>-Original Message-
>From: Koney, Satish [mailto:[EMAIL PROTECTED] 
>Sent: 14 March 2005 07:57
>To: axis-user@ws.apache.org
>Subject: RE: Axis, Spring and Hibernate
>
>it is not taking 20 minutes for executing the queries..the 
>queries are executed fast..
>the problem is with constructing those retrvied records into objects...
>
>Can someone plz help!!
>
>
>> -Original Message-
>> From:Sebastien Mayemba Mbokoso 
>[SMTP:[EMAIL PROTECTED]
>> Sent:Sunday, March 13, 2005 11:43 AM
>> To:  axis-user@ws.apache.org
>> Subject: Re: Axis, Spring and Hibernate
>> 
>> I am using Hibernaete in my current project with Axis too. 
>It's not an 
>> Axis issue but just a Hibernate trouble. You have to investigate in 
>> the Hibernate Forum.
>> 20 minutes for executing a queries it's not possible. My databases 
>> contains 32 tables with so many relationships and so many tables are 
>> full. My queries don't spend a lot of time as yours.
>> 
>> 
>> Sebastien
>> 
>> 
>> On Sat, 12 Mar 2005 10:52:28 -0500, Koney, Satish 
>> <[EMAIL PROTECTED]> wrote:
>> > Hi,
>> > 
>> > I have two modules in my application.
>> > The first one is a webservice. (Axis 1.1, spring 1.1.3 and
>> Hibernate
>> > 2.1.6 ) This web service is responsible for fetching, updating, 
>> > deleting the records in database.
>> > 
>> > The second one is web application which is consuming this 
>> > web service. It is purely for presentation.
>> > It does not do anything other than presentation.
>> > 
>> > The problem I am facing now is, when I request Hibernate 
>for records 
>> > in
>> one
>> > table, it is executing so many queries.
>> > It is fetching records from the tables which have foreign-key 
>> > relation
>> with
>> > that table. So when the web application is using this web service, 
>> > it is taking lot of time to load the page. ( 20 minutes just to 
>> > display 5-6 records)
>> > 
>> > On the Axis side, how can I control the 
>(De)serialization of
>> objects
>> > that I am getting from the web service?
>> > 
>> > Please help!!!
>> > 
>> > Thanks,
>> > .
>> > 
>> > 
>> > Confidential:  This electronic message and all contents contain
>> information
>> > from Syntel, Inc. which may be privileged, confidential or 
>otherwise 
>> > protected from disclosure. The information is intended to 
>be for the 
>> > addressee only. If you are not the addressee, any 
>disclosure, copy, 
>> > distribution or use of the contents of this message is 
>prohibited.  
>> > If
>> you
>> > have received this electronic message in error, please notify the 
>> > sender immediately and destroy the original message and all copies.
>> >
>> 
>
>Confidential:  This electronic message and all contents 
>contain information from Syntel, Inc. which may be privileged, 
>confidential or otherwise protected from disclosure. The 
>information is intended to be for the addressee only. If you 
>are not the addressee, any disclosure, copy, distribution or 
>use of the contents of this message is prohibited.  If you 
>have received this electronic message in error, please notify 
>the sender immediately and destroy the original message and all copies.
>
>


RE: Axis, Spring and Hibernate

2005-03-13 Thread Koney, Satish
it is not taking 20 minutes for executing the queries..the queries are
executed fast..
the problem is with constructing those retrvied records into objects...

Can someone plz help!!


> -Original Message-
> From: Sebastien Mayemba Mbokoso [SMTP:[EMAIL PROTECTED]
> Sent: Sunday, March 13, 2005 11:43 AM
> To:   axis-user@ws.apache.org
> Subject:  Re: Axis, Spring and Hibernate
> 
> I am using Hibernaete in my current project with Axis too. It's not an
> Axis issue but just
> a Hibernate trouble. You have to investigate in the Hibernate Forum.
> 20 minutes for executing a queries it's not possible. My databases
> contains 32 tables with so many relationships and so many tables are
> full. My queries don't spend a lot of time as yours.
> 
> 
> Sebastien
> 
> 
> On Sat, 12 Mar 2005 10:52:28 -0500, Koney, Satish
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> > 
> > I have two modules in my application.
> > The first one is a webservice. (Axis 1.1, spring 1.1.3 and
> Hibernate
> > 2.1.6 ) This web service is responsible for
> > fetching, updating, deleting the records in database.
> > 
> > The second one is web application which is consuming this web
> > service. It is purely for presentation.
> > It does not do anything other than presentation.
> > 
> > The problem I am facing now is, when I request Hibernate for records in
> one
> > table, it is executing so many queries.
> > It is fetching records from the tables which have foreign-key relation
> with
> > that table. So when the web application is
> > using this web service, it is taking lot of time to load the page. ( 20
> > minutes just to display 5-6 records)
> > 
> > On the Axis side, how can I control the (De)serialization of
> objects
> > that I am getting from the web service?
> > 
> > Please help!!!
> > 
> > Thanks,
> > .
> > 
> > 
> > Confidential:  This electronic message and all contents contain
> information
> > from Syntel, Inc. which may be privileged, confidential or otherwise
> > protected from disclosure. The information is intended to be for the
> > addressee only. If you are not the addressee, any disclosure, copy,
> > distribution or use of the contents of this message is prohibited.  If
> you
> > have received this electronic message in error, please notify the sender
> > immediately and destroy the original message and all copies.
> >
> 

Confidential:  This electronic message and all contents contain information
from Syntel, Inc. which may be privileged, confidential or otherwise
protected from disclosure. The information is intended to be for the
addressee only. If you are not the addressee, any disclosure, copy,
distribution or use of the contents of this message is prohibited.  If you
have received this electronic message in error, please notify the sender
immediately and destroy the original message and all copies.


Re: Axis, Spring and Hibernate

2005-03-12 Thread Sebastien Mayemba Mbokoso
Oops sorry i sent me message but i don't finish. Do you use the lazy
initialisation ? I
think no. So can you use it. The Hibernate Lazy mode will permit you
don't load all
the Hibernate graph in memory but just the necessary tables. When this
option is not aactivated Hibernate load all the table when there are
relationships between them.


On Sun, 13 Mar 2005 07:13:20 +0100, Sebastien Mayemba Mbokoso
<[EMAIL PROTECTED]> wrote:
> I am using Hibernaete in my current project with Axis too. It's not an
> Axis issue but just
> a Hibernate trouble. You have to investigate in the Hibernate Forum.
> 20 minutes for executing a queries it's not possible. My databases
> contains 32 tables with so many relationships and so many tables are
> full. My queries don't spend a lot of time as yours.
> 
> 
> Sebastien
> 
> 
> On Sat, 12 Mar 2005 10:52:28 -0500, Koney, Satish
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I have two modules in my application.
> > The first one is a webservice. (Axis 1.1, spring 1.1.3 and Hibernate
> > 2.1.6 ) This web service is responsible for
> > fetching, updating, deleting the records in database.
> >
> > The second one is web application which is consuming this web
> > service. It is purely for presentation.
> > It does not do anything other than presentation.
> >
> > The problem I am facing now is, when I request Hibernate for records in one
> > table, it is executing so many queries.
> > It is fetching records from the tables which have foreign-key relation with
> > that table. So when the web application is
> > using this web service, it is taking lot of time to load the page. ( 20
> > minutes just to display 5-6 records)
> >
> > On the Axis side, how can I control the (De)serialization of objects
> > that I am getting from the web service?
> >
> > Please help!!!
> >
> > Thanks,
> > .
> >
> > 
> > Confidential:  This electronic message and all contents contain information
> > from Syntel, Inc. which may be privileged, confidential or otherwise
> > protected from disclosure. The information is intended to be for the
> > addressee only. If you are not the addressee, any disclosure, copy,
> > distribution or use of the contents of this message is prohibited.  If you
> > have received this electronic message in error, please notify the sender
> > immediately and destroy the original message and all copies.
> >
>


Re: Axis, Spring and Hibernate

2005-03-12 Thread Sebastien Mayemba Mbokoso
I am using Hibernaete in my current project with Axis too. It's not an
Axis issue but just
a Hibernate trouble. You have to investigate in the Hibernate Forum.
20 minutes for executing a queries it's not possible. My databases
contains 32 tables with so many relationships and so many tables are
full. My queries don't spend a lot of time as yours.


Sebastien


On Sat, 12 Mar 2005 10:52:28 -0500, Koney, Satish
<[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I have two modules in my application.
> The first one is a webservice. (Axis 1.1, spring 1.1.3 and Hibernate
> 2.1.6 ) This web service is responsible for
> fetching, updating, deleting the records in database.
> 
> The second one is web application which is consuming this web
> service. It is purely for presentation.
> It does not do anything other than presentation.
> 
> The problem I am facing now is, when I request Hibernate for records in one
> table, it is executing so many queries.
> It is fetching records from the tables which have foreign-key relation with
> that table. So when the web application is
> using this web service, it is taking lot of time to load the page. ( 20
> minutes just to display 5-6 records)
> 
> On the Axis side, how can I control the (De)serialization of objects
> that I am getting from the web service?
> 
> Please help!!!
> 
> Thanks,
> .
> 
> 
> Confidential:  This electronic message and all contents contain information
> from Syntel, Inc. which may be privileged, confidential or otherwise
> protected from disclosure. The information is intended to be for the
> addressee only. If you are not the addressee, any disclosure, copy,
> distribution or use of the contents of this message is prohibited.  If you
> have received this electronic message in error, please notify the sender
> immediately and destroy the original message and all copies.
>


Re: Axis, Spring and Hibernate

2005-03-12 Thread Steve Sobol
Koney, Satish wrote:
It is fetching records from the tables which have foreign-key relation with
that table. So when the web application is 
You can turn this off in Hibernate, so that you must specifically get those 
records in tables which have the relationships. I forget how.

--
JustThe.net - Apple Valley, CA - http://JustThe.net/ - 888.480.4NET (4638)
Steven J. Sobol, Geek In Charge / [EMAIL PROTECTED] / PGP: 0xE3AE35ED
"The wisdom of a fool won't set you free"
--New Order, "Bizarre Love Triangle"