Ini lho mas.. Yang saya dapat dari manual Struts 2 nya.  Waktu pake 
Struts 2.0 dan Spring 2.0 sih jalan.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xmlns:aop="http://www.springframework.org/schema/aop";
    xmlns:tx="http://www.springframework.org/schema/tx";
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
    http://www.springframework.org/schema/tx 
http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
    http://www.springframework.org/schema/aop 
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd";>

    <bean 
class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"
 
/>

    <bean id="entityManagerFactory"
        
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
        <property name="dataSource" ref="dataSource" />
        <property name="jpaVendorAdapter">
            <bean 
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
                <property name="database" value="MYSQL" />
                <property name="showSql" value="true" />
            </bean>
        </property>
    </bean>

    <bean id="dataSource"
        class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        <property name="driverClassName" value="com.mysql.jdbc.Driver" />
        <property name="url" value="jdbc:mysql://localhost/jobengine_dev" />
        <property name="username" value="root" />
        <property name="password" value="rahasia" />
    </bean>

     <bean id="sessionFactory" 
        
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
        <property name="dataSource"><ref local="dataSource"/></property> 
        <property name="annotatedClasses">
            <!-- Bagian Penanganan Model -->
            <list> 
                <value>jobengine.model.Person</value>
                <value>jobengine.model.Role</value>
                <value>jobengine.model.User</value>
                <value>jobengine.model.Applicant</value>
            </list>
            <!-- End Bagian Penanganan Model -->
        </property> 
       
        <property name="hibernateProperties"> 
            <props> 
                <prop 
key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> 
                <prop key="hibernate.hbm2ddl.auto">create</prop> 
            </props> 
         </property> 
        
     </bean>
     
    <bean id="transactionManager"
        class="org.springframework.orm.jpa.JpaTransactionManager">
        <property name="entityManagerFactory" ref="entityManagerFactory" />
    </bean>

    <tx:annotation-driven transaction-manager="transactionManager" />
   
    <!-- Bagian Penanganan Service -->
    <bean id="personService" class="jobengine.service.PersonService" />
    <bean id="personAction" scope="prototype" 
class="jobengine.controller.PersonAction">
        <constructor-arg ref="personService" />
    </bean>
   
</beans>

O ya, libraray-library yang saya gunakan adalah:

antlr-2.7.6.jar
aopalliance-1.0.jar
asm-1.5.3.jar
asm-attrs-1.5.3.jar
cglib-2.1_3.jar
commons-collections-2.1.1.jar
commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar
commons-logging-1.0.4.jar
dom4j-1.6.1.jar
ehcache-1.2.3.jar
ejb3-persistence-1.0.1.GA.jar
freemarker-2.3.13.jar
hibernate-3.2.6.ga.jar
hibernate-annotations-3.3.1.GA.jar
hibernate-commons-annotations-3.0.0.ga.jar
hibernate-entitymanager-3.3.2.GA.jar
javassist-3.4.GA.jar
junit-3.8.1.jar
mysql-connector-java-5.0.8.jar
ognl-2.6.11.jar
spring-2.5.6.jar
spring-beans-2.5.3.jar
spring-context-2.5.3.jar
spring-core-2.5.3.jar
spring-test-2.5.6.jar
spring-web-2.5.3.jar
struts2-core-2.1.6.jar
struts2-spring-plugin-2.1.6.jar
xwork-2.1.2.jar




Reply via email to