Migration from Spring to Seam
aldian00 Nov 4, 2010 8:21 AMHello
I am working on the prototype of a project. Originally, I worked with JSF and Richfaces / Spring / Hibernate, but it eventually appeared that Seam should be better than Spring for what I intend. My goal is to totally replace Spring by Seam, but I have issues translating my application-context.xml file into Seam configuration files and annotations.
Actually, I am not very fan of annotations, I still feel that having all discribed in xml files is better, because in a few xml files I can see the whole configuration, but I will do my best using annotations.
For example, I would like to know how to describe the folowing bean to seam:
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="mappingResources"> <list> <value>entity/Table_1.hbm.xml</value> <value>entity/Table_2.hbm.xml</value> <value>entity/Table_3.hbm.xml</value> <value>entity/Table_4.hbm.xml</value> <value>entity/Table_5.hbm.xml</value> <value>entity/Table_6.hbm.xml</value> <value>entity/Table_7.hbm.xml</value> <value>entity/Table_8.hbm.xml</value> <value>entity/Table_9.hbm.xml</value> <value>entity/Table_10.hbm.xml</value> <value>entity/Table_11.hbm.xml</value> <value>entity/Table_12.hbm.xml</value> <value>entity/Table_13.hbm.xml</value> <value>entity/Table_14.hbm.xml</value> <value>entity/Table_15.hbm.xml</value> <value>entity/Table_16.hbm.xml</value> <value>entity/Table_17.hbm.xml</value> <value>entity/Table_18.hbm.xml</value> <value>entity/Table_19.hbm.xml</value> <value>entity/Table_20.hbm.xml</value> <value>entity/Table_21.hbm.xml</value> </list> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect"> org.hibernate.dialect.MySQLDialect </prop> <prop key="hibernate.show_sql">true</prop> <prop key="hibernate.cglib.use_reflection_optimizer"> true </prop> </props> </property> <property name="dataSource"> <ref bean="dataSource" /> </property> </bean>
Is there any page which explains how to do that? I presume I am not the first one to ask.. Thank you very much :)