Skip to content

Commit

Permalink
Merge commit '03b923f744368125dfaa8bbc83ed3bb68ea895c3' into feature_214
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Robbins | hybris committed Jan 16, 2016
2 parents 624bb12 + 03b923f commit 984930d
Show file tree
Hide file tree
Showing 15 changed files with 64 additions and 95 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">

<context:property-placeholder location="classpath*:/default.properties,classpath*:/override.properties" order="1" ignore-unresolvable="true" />
<import resource="classpath:META-INF/applicationContext-config.xml" />

<bean id="objectMapper" class="org.robbins.flashcards.client.jackson.CustomObjectMapper"/>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?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:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">

<context:property-placeholder location="classpath*:/default.properties,classpath*:/override.properties" order="1" ignore-unresolvable="true" />

</beans>
1 change: 0 additions & 1 deletion FlashCards_Config/src/main/resources/default.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#Profiles
repository.profile=spring-data
security.profile=security-http
database.profile=embedded
tests.data.profile=test-data

# DataSource properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

@Category(IntegrationTest.class)
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath*:META-INF/applicatonContext-client.xml"})
@ContextConfiguration(locations = {"classpath:META-INF/applicatonContext-client.xml"})
public class FlashCardsAppResourceIT {

@Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import static org.junit.Assert.assertTrue;

@Category(IntegrationTest.class)
@ContextConfiguration(locations = {"classpath*:META-INF/applicatonContext-client.xml"})
@ContextConfiguration(locations = {"classpath:META-INF/applicatonContext-client.xml"})
public class TagsResourceIT extends GenericEntityRestTest<TagDto, Long> {

final static String TAG_NAME = "Web API Test 'Tag'";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import static org.junit.Assert.assertTrue;

@Category(IntegrationTest.class)
@ContextConfiguration(locations = {"classpath*:META-INF/applicatonContext-client.xml"})
@ContextConfiguration(locations = {"classpath:META-INF/applicatonContext-client.xml"})
public class UsersResourceIT extends GenericEntityRestTest<UserDto, Long> {

private static final String OPEN_ID = "Web API Test 'openid'";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import junitparams.Parameters;

@Ignore
@ContextConfiguration(locations = {"classpath*:META-INF/applicatonContext-loadtester.xml"})
@ContextConfiguration(locations = {"classpath:META-INF/applicatonContext-loadtester.xml"})
@RunWith(JUnitParamsRunner.class)
public class LoadTesterIT {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?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:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd" >

<context:property-placeholder location="classpath*:/default.properties,classpath*:/override.properties" order="1" ignore-unresolvable="true" />
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd" >

<import resource="classpath:META-INF/applicationContext-repository-cassandraNamespace.xml" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">

<import resource="classpath:META-INF/applicationContext-config.xml" />
<import resource="classpath:META-INF/applicationContext-repository-jpa-commons.xml" />
<import resource="classpath:META-INF/infrastructure.xml" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">

<context:property-placeholder location="classpath*:/default.properties,classpath*:/override.properties" order="1" ignore-unresolvable="true" />
<import resource="classpath:META-INF/applicationContext-config.xml" />

<bean id="mapper" class="org.dozer.DozerBeanMapper">
<property name="mappingFiles">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,78 +15,45 @@
<bean
class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" />

<beans profile="mysql">
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="jpaVendorAdapter" ref="jpaVendorAdapter" />
<property name="jpaProperties">
<props>
<prop key="hibernate.connection.provider_class">${hibernate.connection.provider_class}</prop>
<prop key="hibernate.hikari.dataSourceClassName">${hibernate.hikari.dataSourceClassName}</prop>
<prop key="hibernate.hikari.dataSource.url">${hibernate.hikari.dataSource.url}</prop>
<prop key="hibernate.hikari.dataSource.user">${hibernate.hikari.dataSource.user}</prop>
<prop key="hibernate.hikari.dataSource.password">${hibernate.hikari.dataSource.password}</prop>
<prop key="hibernate.hikari.dataSource.cachePrepStmts">${hibernate.hikari.dataSource.cachePrepStmts}</prop>
<prop key="hibernate.hikari.dataSource.prepStmtCacheSize">${hibernate.hikari.dataSource.prepStmtCacheSize}</prop>
<prop key="hibernate.hikari.dataSource.prepStmtCacheSqlLimit">${hibernate.hikari.dataSource.prepStmtCacheSqlLimit}</prop>
<prop key="hibernate.hikari.maximumPoolSize">${hibernate.hikari.maximumPoolSize}</prop>
<prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>
<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
<prop key="hibernate.format_sql">${hibernate.format_sql}</prop>
<prop key="hibernate.jdbc.batch_size property">${hibernate.jdbc.batch_size}</prop>
<prop key="hibernate.order_inserts">${hibernate.order_inserts}</prop>
<prop key="org.hibernate.flushMode">${org.hibernate.flushMode}</prop>
<prop key="use_sql_comments">${use_sql_comments}</prop>
</props>
</property>
</bean>

<bean id="jpaVendorAdapter"
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="database" value="${jpaVendorAdapter.database}" />
<property name="databasePlatform" value="${jpaVendorAdapter.databasePlatform}" />
</bean>

<!-- data source is only used by jdbc initializer. it should be moved into a confing bean -->
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
<property name="driverClass" value="com.mysql.jdbc.Driver" />
<property name="jdbcUrl" value="jdbc:mysql://localhost:3306/flashcardapp_db?useConfigs=maxPerformance&amp;rewriteBatchedStatements=true" />
<property name="user" value="fcuser_c3po" />
<property name="password" value="flashcard" />
</bean>
</beans>

<beans profile="embedded">
<bean id="jpaVendorAdapter"
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="database" value="H2" />
<property name="databasePlatform" value="org.hibernate.dialect.H2Dialect" />
</bean>
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="jpaVendorAdapter" ref="jpaVendorAdapter" />
<property name="jpaProperties">
<props>
<prop key="hibernate.connection.provider_class">${hibernate.connection.provider_class}</prop>
<prop key="hibernate.hikari.dataSourceClassName">${hibernate.hikari.dataSourceClassName}</prop>
<prop key="hibernate.hikari.dataSource.url">${hibernate.hikari.dataSource.url}</prop>
<prop key="hibernate.hikari.dataSource.user">${hibernate.hikari.dataSource.user}</prop>
<prop key="hibernate.hikari.dataSource.password">${hibernate.hikari.dataSource.password}</prop>
<prop key="hibernate.hikari.dataSource.cachePrepStmts">${hibernate.hikari.dataSource.cachePrepStmts}</prop>
<prop key="hibernate.hikari.dataSource.prepStmtCacheSize">${hibernate.hikari.dataSource.prepStmtCacheSize}</prop>
<prop key="hibernate.hikari.dataSource.prepStmtCacheSqlLimit">${hibernate.hikari.dataSource.prepStmtCacheSqlLimit}</prop>
<prop key="hibernate.hikari.maximumPoolSize">${hibernate.hikari.maximumPoolSize}</prop>
<prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>
<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
<prop key="hibernate.format_sql">${hibernate.format_sql}</prop>
<prop key="hibernate.jdbc.batch_size property">${hibernate.jdbc.batch_size}</prop>
<prop key="hibernate.order_inserts">${hibernate.order_inserts}</prop>
<prop key="org.hibernate.flushMode">${org.hibernate.flushMode}</prop>
<prop key="use_sql_comments">${use_sql_comments}</prop>
</props>
</property>
</bean>

<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
<property name="driverClass" value="org.h2.Driver" />
<property name="jdbcUrl" value="jdbc:h2:mem:flashcardsDb;MVCC=true" />
</bean>
<bean id="jpaVendorAdapter"
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="database" value="${jpaVendorAdapter.database}" />
<property name="databasePlatform" value="${jpaVendorAdapter.databasePlatform}" />
</bean>

<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="jpaVendorAdapter" ref="jpaVendorAdapter" />
<property name="jpaProperties">
<props>
<prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>
<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
<prop key="hibernate.format_sql">${hibernate.format_sql}</prop>
<prop key="hibernate.jdbc.batch_size property">${hibernate.jdbc.batch_size}</prop>
<prop key="hibernate.order_inserts">${hibernate.order_inserts}</prop>
<prop key="org.hibernate.flushMode">${org.hibernate.flushMode}</prop>
<prop key="use_sql_comments">${use_sql_comments}</prop>
</props>
</property>
</bean>
</beans>
<!-- data source is only used by jdbc initializer. it should be moved into a confing bean -->
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
<property name="driverClass" value="com.mysql.jdbc.Driver" />
<property name="jdbcUrl" value="jdbc:mysql://localhost:3306/flashcardapp_db?useConfigs=maxPerformance&amp;rewriteBatchedStatements=true" />
<property name="user" value="fcuser_c3po" />
<property name="password" value="flashcard" />
</bean>

<beans profile="minimal-test-data">
<jdbc:initialize-database>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.google.common.collect.Lists;
Expand All @@ -24,6 +25,7 @@
import scala.PartialFunction;
import scala.runtime.BoxedUnit;

@Scope("prototype")
@Component("batchSavingCoordinator")
public class BatchSavingCoordinator extends AbstractActor
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">

<context:property-placeholder location="classpath*:/default.properties,classpath*:/override.properties" order="1" ignore-unresolvable="true" />

<import resource="classpath:META-INF/applicationContext-config.xml" />
<import resource="classpath:META-INF/applicatonContext-akka.xml"/>

<tx:annotation-driven />
Expand Down
5 changes: 5 additions & 0 deletions FlashCards_WebServices/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
<artifactId>FlashCards_Service</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.robbins.flashcards</groupId>
<artifactId>FlashCards_Client</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>javax.ws.rs</groupId>
Expand Down
11 changes: 0 additions & 11 deletions FlashCards_WebServices/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,8 @@
<param-value>
org.robbins.flashcards.jersey.filters.SecurityFilter;
org.robbins.flashcards.jersey.filters.AcceptFilter;
<!--com.sun.jersey.api.container.filter.LoggingFilter;-->
</param-value>
</init-param>
<!--<init-param>-->
<!--<param-name>com.sun.jersey.spi.container.ContainerResponseFilters</param-name>-->
<!--<param-value>-->
<!--com.sun.jersey.api.container.filter.LoggingFilter;-->
<!--</param-value>-->
<!--</init-param>-->
<!--<init-param>-->
<!--<param-name>com.sun.jersey.config.feature.Trace</param-name>-->
<!--<param-value>false</param-value>-->
<!--</init-param>-->

<load-on-startup>2</load-on-startup>
</servlet>
Expand Down

0 comments on commit 984930d

Please sign in to comment.