These are chat archives for ninjascribble/coolkidz

7th
Jan 2015
Scott Grogan
@ninjascribble
Jan 07 2015 17:19
sweet
ehee
etetete
aosenuthaoesunthaoeu
Elrond
@elrondshep
Jan 07 2015 17:20

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

    <context:property-placeholder location="
        classpath:/properties/app.properties,
        classpath:/properties/jpa.properties,
        classpath:/properties/log4j.properties,
        classpath:/properties/encrypt.properties,
        classpath:/properties/db.properties,
        classpath:/properties/expression.properties,
        classpath:/properties/apiclient.properties,
        classpath:/properties/email.properties,
        classpath:/properties/job.properties"/>

    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="${db.driverClass}" />
        <property name="url" value="${db.jdbcUrl}" />
        <property name="username" value="${db.username}" />
        <property name="password" value="${db.password}" />
         <property name="validationQuery" value="${db.validationQuery}" />
           <property name="removeAbandoned" value="true"/>
        <property name="initialSize" value="${db.connection.pool_size}"/>
           <property name="maxActive" value="${db.connection.max_pool_size}" />
   </bean>

    <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
        <property name="dataSource" ref="dataSource" />
        <property name="persistenceUnitName" value="${jpa.persistenceUnitName}" />
        <property name="jpaVendorAdapter"> 
            <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> 
                <property name="databasePlatform" value="${jpa.dialect}"/>
                <property name="showSql" value="${jpa.showSQL}" />
            </bean>
        </property>
        <property name="jpaPropertyMap">
            <map>
                <!-- Connection release fix -->
                <entry key="hibernate.connection.release_mode" value="${jpa.release_mode}" />
                <entry key="hibernate.dialect" value="${jpa.dialect}" />
            </map>
        </property>
    </bean>

    <!--
    JPA Specific:

    Use a local resource transaction manager (rather than JTA) as we will only ever be
    accessing the active database in one transaction.
    -->
    <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
        <property name="entityManagerFactory" ref="entityManagerFactory" />
    </bean>
Ben McEldowney
@bmceldowney
Jan 07 2015 17:21
wat
Scott Grogan
@ninjascribble
Jan 07 2015 17:21
wat wat?
Ben McEldowney
@bmceldowney
Jan 07 2015 17:21
this seems pretty l33t
Scott Grogan
@ninjascribble
Jan 07 2015 17:25
indeed
Elrond
@elrondshep
Jan 07 2015 17:25
db.driverClass=com.mysql.jdbc.Driver
db.jdbcUrl=jdbc:mysql:replication://192.168.3.52,192.168.3.52/traceregister_demo?loadBalanceBlacklistTimeout=5000&loadBalanceConnectionGroup=ugc&loadBalanceEnableJMX=true&autoReconnect=true&autoReconnectForPools=true&useUnicode=true&characterEncoding=UTF-8
db.username=
db.password=
db.validationQuery=select 1
Scott Grogan
@ninjascribble
Jan 07 2015 17:25
I'll get the rest of the team an invite as soon as I figure out what their usernames are ;)
Elrond
@elrondshep
Jan 07 2015 17:26
jpa.persistenceUnitName=trPU
jpa.dialect=org.hibernate.dialect.MySQLDialect
jpa.showSQL=false
jpa.release_mode=after_transaction
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0"
    xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
                        http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">

    <persistence-unit name="trPU" transaction-type="RESOURCE_LOCAL"/>

</persistence>
Ben McEldowney
@bmceldowney
Jan 07 2015 17:29
describe('_getExpirationPredicate', function () {
    it('should return truthy if a user has passed the expiration date', function (done) {
        user.getUsermeta().then(function (usermeta) {
            module._getExpirationPredicate(4)(usermeta[0]).should.not.be.ok();

            usermeta[0].meta_value = '2013-03-01 07:35:26';
            module._getExpirationPredicate(10)(usermeta[0]).should.be.ok();

            done();
        });
    });
});
Scott Grogan
@ninjascribble
Jan 07 2015 17:44
Waow, so shiny
Ben McEldowney
@bmceldowney
Jan 07 2015 17:50
what's the best/easiest way to add a modal to wordpress? should I look at plugins?
Elrond
@elrondshep
Jan 07 2015 17:58

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>${spring.version}</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
            <version>${spring.version}</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <version>${spring.version}</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
<tx:annotation-driven transaction-manager="transactionManager" order="10" />