cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonny Pony" <jonnypony...@hotmail.com>
Subject Questions on CHS (Cocoon, Hibernate, Spring) petstore project
Date Mon, 11 Apr 2005 08:40:12 GMT
Hi,

I've got a couple of questions on the CHS(Cocoon, Hibernate, Spring) 
petstore project:

Nr.1:
I want to replace the HSQL with my MySQL database. What must I exactly 
change in the "applicationContext.xml" to do that.
Is this part still neccessary for my needs or does this only start and stop 
the hsql-database?

<bean id="hsqlServer" class="org.apache.cocoon.petstore.database.HsqlServer" 
init-method="start" destroy-method="stop"></bean>

I'm starting my MySQL-db "by hand".

Nr.2:
I want to use the proxool connection-pooling. So is this part (in the 
"applicationContext.xml") still neccessary for my needs?:

<bean id="myDataSource" class="org.apache.commons.dbcp.BasicDataSource" 
destroy-method="close" depends-on="hsqlServer">
	<property name="driverClassName">
		<value>com.mysql.jdbc.Driver</value>
	...
	<property name="password">
		<value/>
	</property>
</bean>

Or can I totally exchange it with something like this?:

<bean id="sessionFactory" 
class="org.springframework.orm.hibernate.LocalSessionFactoryBean">
		....
	<property name="hibernateProperties">
		<props>
			<prop 
key="hibernate.connection.driver_class">com.mysql.jdbc.Driver</prop>
			...
			<prop key="hibernate.c3po.min_size">5</prop>
			...
			<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
		</props>
	</property>
	<property name="dataSource">
		<ref bean="myDataSource"/>
	</property>
</bean>

I'm new to spring, so I don't know what the "myDataSource"-bean stands for. 
Where is it used in the further application?
And do I need something like the "myDataSource"-bean for my approach then?

Nr3:
I couldn't find the mapping-files, like Account.hbm.xml,etc? Are there any? 
Or better: Is there a database-model for the petstore in generell?
In UML, mapping-files or whatever?

Nr4:
Is there some generell documentation for this chs-project?

Thanks in advance
Jonny

_________________________________________________________________
Die rote Karte für lästige E-Mails. MSN Hotmail mit Junk-Mail-Filter. 
http://www.msn.de/antispam/prevention/junkmailfilter Jetzt kostenlos 
anmelden!


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


Mime
View raw message