You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Philipp Rech <re...@iuw.fh-darmstadt.de> on 2004/11/23 13:52:50 UTC

Cocoon and Hibernate (connection-pool) ...since it is getting colder outside

Hello Cocooners,

my Versions:
[Cocoon Version 2.1.6 *new*]
[Tomcat 5]
[Hibernate 2.1.6 / 2.1.7]

since my CForms are working so far (thanks to you guys) and the binding 
somwhat works too, i want to get started with Hibernate (2.1.6 or 2.1.7). I
have been trying stuff out the last week and i am still confused:

1) i have a "connection-pool" and "datascource" in Tomcat, Cocoon and Hibernate
which of the 3 should - and can I use? And if i use one how to tell other
players in the team? i would like to use a cocoon.xconf datasource, if i can...


2) i have heard about java-tools (wrapper) that integrate Hibernate with Cocoon
is anyone using those?

3) what is the best way to inegrate the two (Hibernate with Cocoon)? any
tutorials out there (the cocoon-wiki is kinda confusing and not up-to-date on
that i thought *sorry*)? any best-practices?

Thank you very much for your help!

philipp 

*ready to fall asleep till march*



-- 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Cocoon and Hibernate (connection-pool) ...since it is getting colder outside

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Philipp Rech wrote:
> Hello Cocooners,
> 
> 
> 
> my Versions:
> 
> [Cocoon Version 2.1.6 *new*]
> 
> [Tomcat 5]
> 
> [Hibernate 2.1.6 / 2.1.7]
> 
> 
> 
> since my CForms are working so far (thanks to you guys) and the binding 
> 
> somwhat works too, i want to get started with Hibernate (2.1.6 or 2.1.7). I
> have been trying stuff out the last week and i am still confused:
> 
> 
> 
> 1) i have a "connection-pool" and "datascource" in Tomcat, Cocoon and Hibernate
> which of the 3 should - and can I use? And if i use one how to tell other
> players in the team? i would like to use a cocoon.xconf datasource, if i can...
Integrate hibernate with spring. Use spring managed datasource.

-- 
Leszek Gawron                                      lgawron@mobilebox.pl
Project Manager                                    MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Cocoon and Hibernate (connection-pool) ...since it is getting colder outside

Posted by Andrew M <an...@jibeya.com>.
Phillipp,
I am using the following setup

1. Jboss 4.0.0 - Hibernate is included with this build
2. Cocoon 2.1.5.1 (Cforms/Flow)
3. PostgreSQL 8

JNDI is used to connect Hibernate to postgreSQL. Connection pooling is 
handled by JNDI.

regards

Andrew

On 23 Nov 2004, at 12:52, Philipp Rech wrote:

> Hello Cocooners,
>
> my Versions:
> [Cocoon Version 2.1.6 *new*]
> [Tomcat 5]
> [Hibernate 2.1.6 / 2.1.7]
>
> since my CForms are working so far (thanks to you guys) and the binding
> somwhat works too, i want to get started with Hibernate (2.1.6 or 
> 2.1.7). I
> have been trying stuff out the last week and i am still confused:
>
> 1) i have a "connection-pool" and "datascource" in Tomcat, Cocoon and 
> Hibernate
> which of the 3 should - and can I use? And if i use one how to tell 
> other
> players in the team? i would like to use a cocoon.xconf datasource, if 
> i can...
>
>
> 2) i have heard about java-tools (wrapper) that integrate Hibernate 
> with Cocoon
> is anyone using those?
>
> 3) what is the best way to inegrate the two (Hibernate with Cocoon)? 
> any
> tutorials out there (the cocoon-wiki is kinda confusing and not 
> up-to-date on
> that i thought *sorry*)? any best-practices?
>
> Thank you very much for your help!
>
> philipp
>
> *ready to fall asleep till march*
>
>
>
> -- 
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

Re: Cocoon and Hibernate (connection-pool) ...since it is getting colder outside

Posted by Johannes Textor <jc...@gmx.de>.
Hi Phillipp,

Ugo Cei wrote:

> Il giorno 23/nov/04, alle 13:52, Philipp Rech ha scritto:
>
>> 1) i have a "connection-pool" and "datascource" in Tomcat, Cocoon and 
>> Hibernate
>> which of the 3 should - and can I use? And if i use one how to tell 
>> other
>> players in the team? i would like to use a cocoon.xconf datasource, 
>> if i can...
>
I have compiled some information on the wiki that covers this aspect.
you can find it here:

http://wiki.apache.org/cocoon/CocoonAndHibernateTutorial

It covers setting up Hibernate to use the cocoon connection pool.

Also have a look at Derek's page at

http://wiki.apache.org/cocoon/GettingStartedWithCocoonAndHibernate

It contains some bits of information.

Both docs are still in a poor state but they are pretty recent and I 
tested the installation
instructions against the 2.1.6 build.

If you have more questions about Cocoon & Hibernate, please feel free to 
contact me
directly as I want to continue writing up docs about these topics and 
beginner's questions
are always helpful.

Cheers,
Johannes

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


[thanks] Re: Cocoon and Hibernate (connection-pool) ...since it is getting colder outside

Posted by Philipp Rech <re...@iuw.fh-darmstadt.de>.
Hello Coconners, 

thank you very much for all the answers. i looked into 
the options (also Spring) and decided to follow the
way suggested by the wiki-tutorial from J. Textor
using the build in connection-pool from cocoon.
sounds like great fun... thanks again for
your help and thoughts! 

philipp

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Cocoon and Hibernate (connection-pool) ...since it is getting colder outside

Posted by Ugo Cei <ug...@apache.org>.
Il giorno 23/nov/04, alle 13:52, Philipp Rech ha scritto:

> 1) i have a "connection-pool" and "datascource" in Tomcat, Cocoon and 
> Hibernate
> which of the 3 should - and can I use? And if i use one how to tell 
> other
> players in the team? i would like to use a cocoon.xconf datasource, if 
> i can...

There was a patch somewhere that enabled Hibernate to use an Avalon 
datasource, but it's not been maintained anymore AFAIK. You can use a 
container-provided (Tomcat in your case) datasource, or use a 
Hibernate-local datasource. The latter would work even outside of a 
J2EE container, but in any case switching between the two is just a 
matter of changing a config file, so in the end it makes no difference 
at all.

> 2) i have heard about java-tools (wrapper) that integrate Hibernate 
> with Cocoon
> is anyone using those?

What do you mean by "integrate"? I am aware of no special tools.

> 3) what is the best way to inegrate the two (Hibernate with Cocoon)? 
> any
> tutorials out there (the cocoon-wiki is kinda confusing and not 
> up-to-date on
> that i thought *sorry*)? any best-practices?

What is considered a "best" practice in this issue is largely a matter 
of opinion. My own best practice is to use the Spring framework as a 
glue to bind together Hibernate and various other "enterprise" 
resources. You can find a sample here: 
http://new.cocoondev.org/main/projects/43

You might also want to have a look at the slides I presented at the 
last GetTogether: 
http://www.cbim.it/it/bacheca/download/varie/Ugo_Cei_GT2004.pdf

	Ugo

-- 
Ugo Cei - http://beblogging.com/