Re: Hibernate Configuration and SessionFactory startup time

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Hibernate Configuration and SessionFactory startup time

Kent Tong
John Anderson <ardour <at> semiosix.com> writes:

> Exactly. But usually after one has made a change to a .class file, one
> wants to see that the change did what one expected it to, not so?

It only takes a couple of seconds to configure the Configuration
object for each test run. How does it bother you? If it is taking
a lot of time, are you using logging? This will slow it down
significantly.



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Hibernate Configuration and SessionFactory startup time

Javier Sánchez-4
Just use JNDI.  JBoss 3.2.7 supports Hibernate in native form making
this configuration easier.  You just have to build the .har file,
DS,... JBoss understands those files with no extra effort.

JAVIER SANCHEZ

On 5/6/05, Kent Tong <[hidden email]> wrote:

> John Anderson <ardour <at> semiosix.com> writes:
>
> > Exactly. But usually after one has made a change to a .class file, one
> > wants to see that the change did what one expected it to, not so?
>
> It only takes a couple of seconds to configure the Configuration
> object for each test run. How does it bother you? If it is taking
> a lot of time, are you using logging? This will slow it down
> significantly.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Hibernate Configuration and SessionFactory startup time

John Anderson
On Fri, 2005-05-06 at 16:46 -0500, Javier Sanchez wrote:
> Just use JNDI.  JBoss 3.2.7 supports Hibernate in native form making
> this configuration easier.  You just have to build the .har file,
> DS,... JBoss understands those files with no extra effort.

The configuration itself is fine. What I'm not happy with is the
constant recreating of the SessionFactory.

Is it possible to serialize a SessionFactory instance in JNDI? If so is
there a fairly lightweight JNDI provider I can use? I don't want to use
up 400M of memory running JBoss when I'm going to use only JNDI.

thanks
John



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Hibernate Configuration and SessionFactory startup time

John Anderson
In reply to this post by Kent Tong
On Fri, 2005-05-06 at 10:27 +0000, Kent Tong wrote:
> John Anderson <ardour <at> semiosix.com> writes:
>
> > Exactly. But usually after one has made a change to a .class file, one
> > wants to see that the change did what one expected it to, not so?
>
> It only takes a couple of seconds to configure the Configuration
> object for each test run. How does it bother you?

10-20 seconds to reload the app, of which Hibernate is usually 5 - 8.
Which doesn't seem like much, except when you do a change that takes 20
or 30 seconds, and you do an hour of that, you spend 15-20 minutes of
that hour waiting for app reloads.

And regardless of the numbers, it got to the point where that startup
time of the app was annoying.

> If it is taking a lot of time, are you using logging? This will slow
> it down significantly.

Exactly. I'm only allowing log4j to show Hibernate warnings, so I can
see if something goes wrong. The reams and reams of debug logging is
turned off. An app restart generates about 10 lines of logging, which I
don't think is going to cause much of a slowdown.

bye
John



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Hibernate Configuration and SessionFactory startup time

Kent Tong
John Anderson <ardour <at> semiosix.com> writes:

> 10-20 seconds to reload the app, of which Hibernate is usually 5 - 8.
> Which doesn't seem like much, except when you do a change that takes 20
> or 30 seconds, and you do an hour of that, you spend 15-20 minutes of
> that hour waiting for app reloads.

How many persistent classes do you have? Have you tried the
serialization tip (http://www.hibernate.org/194.html)?




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]