Re: [SOT] SingleThreaded components vs. Singletons

2004-12-12 Thread Leszek Gawron
Reinhard Poetz wrote: For a quick hack I wrote a singleton (simple Java class) that manages the Hibernate SessionFactory. As it is only a Cocoon/Hibernate-demo I haven't thought much about it, but if I use Hibernate in production, I would write a SingleThreaded Avalon component. I would do it

Re: [SOT] SingleThreaded components vs. Singletons

2004-12-12 Thread Reinhard Poetz
Leszek Gawron wrote: Reinhard Poetz wrote: For a quick hack I wrote a singleton (simple Java class) that manages the Hibernate SessionFactory. As it is only a Cocoon/Hibernate-demo I haven't thought much about it, but if I use Hibernate in production, I would write a SingleThreaded Avalon

Re: [SOT] SingleThreaded components vs. Singletons

2004-12-12 Thread Ugo Cei
Il giorno 12/dic/04, alle 08:38, Reinhard Poetz ha scritto: For a quick hack I wrote a singleton (simple Java class) that manages the Hibernate SessionFactory. As it is only a Cocoon/Hibernate-demo I haven't thought much about it, but if I use Hibernate in production, I would write a

Re: [SOT] SingleThreaded components vs. Singletons

2004-12-12 Thread Reinhard Poetz
Ugo Cei wrote: Il giorno 12/dic/04, alle 08:38, Reinhard Poetz ha scritto: For a quick hack I wrote a singleton (simple Java class) that manages the Hibernate SessionFactory. As it is only a Cocoon/Hibernate-demo I haven't thought much about it, but if I use Hibernate in production, I would

Re: [SOT] SingleThreaded components vs. Singletons

2004-12-12 Thread Ugo Cei
Il giorno 12/dic/04, alle 14:24, Reinhard Poetz ha scritto: As advantages I can think of putting the confiuguration of the component into cocoon.xconf and I only have to choose the right interface. Are there other advantages of having the ECM manage the component? Not that I know of.

[SOT] SingleThreaded components vs. Singletons

2004-12-11 Thread Reinhard Poetz
For a quick hack I wrote a singleton (simple Java class) that manages the Hibernate SessionFactory. As it is only a Cocoon/Hibernate-demo I haven't thought much about it, but if I use Hibernate in production, I would write a SingleThreaded Avalon component. I would do it because Cocoon is based