<?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: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">

    <bean id="twitterFactory" class="twitter4j.TwitterFactory"/>

    <bean id="asyncTwitterFactory" class="twitter4j.AsyncTwitterFactory"/>

    <bean id="twitterStreamFactory" class="twitter4j.TwitterStreamFactory"/>
    <bean id="twitter" class="twitter4j.Twitter"
          factory-bean="twitterFactory" factory-method="getInstance"
          depends-on="twitterFactory">
    </bean>
    <bean id="asyncTwitter" class="twitter4j.AsyncTwitter"
          factory-bean="asyncTwitterFactory" factory-method="getInstance"
          depends-on="asyncTwitterFactory">
    </bean>
    <bean id="twitterStream" class="twitter4j.TwitterStream"
          factory-bean="twitterStreamFactory" factory-method="getInstance">
    </bean>
    <!--
    <bean id="productRepository" class="spring.kickstart.repository.ProductRepositoryImpl"/>

    <bean id="customerService" class="spring.kickstart.domain.CustomerServiceImpl" autowire="byName"/>

    <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
        <property name="entityManagerFactory"
            ref="entityManagerFactory" />
    </bean>

    <bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/>

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

    <tx:annotation-driven />

    <bean id="entityManagerFactory" depends-on="database"
          class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
        <property name="jpaProperties">
          <props>
            <prop key="toplink.logging.level">FINE</prop>
            <prop key="toplink.jdbc.driver">org.hsqldb.jdbcDriver</prop>
            <prop key="toplink.jdbc.url">jdbc:hsqldb:hsql://localhost:9101</prop>
            <prop key="toplink.jdbc.user">sa</prop>
            <prop key="toplink.jdbc.password"></prop>
            <prop key="toplink.target-database">oracle.toplink.essentials.platform.database.HSQLPlatform</prop>
            <prop key="toplink.ddl-generation">create-tables</prop>
          </props>
        </property>
        <property name="persistenceUnitName" value="kickstart"/>
    </bean>
    <bean id="database" class="spring.kickstart.db.hsqldb.ServerBean" scope="singleton" lazy-init="false">
       <property name="serverProperties">
           <props>
               <prop key="server.port">9101</prop>
               <prop key="server.database.0">./db/KICKSTART</prop>
               <prop key="server.dbname.0"></prop>
           </props>
       </property>
    </bean>
    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
        <property name="driverClass" value="${db.driverClassName}"/>
        <property name="jdbcUrl" value="${db.url}"/>
        <property name="user" value="${db.userName}"/>
        <property name="password" value="${db.password}"/>
        <property name="minPoolSize" value="2"/>
        <property name="maxPoolSize" value="15"/>
        <property name="maxStatements" value="50"/>
    </bean>
    -->
</beans>
