aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2016-10-14 21:40:10 +0200
committerMartin Stockhammer <martin_s@apache.org>2016-10-14 21:40:10 +0200
commite7143b5e780a3cf66b16c8510961df199d86defa (patch)
treeb6167af4952523b3f93f34152dcb84e1853c880e /archiva-modules/archiva-web
parentb7174c444032ce5431fdf9d96cf7bd82060536cd (diff)
downloadarchiva-e7143b5e780a3cf66b16c8510961df199d86defa.tar.gz
archiva-e7143b5e780a3cf66b16c8510961df199d86defa.zip
Changing transaction handling
Diffstat (limited to 'archiva-modules/archiva-web')
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java1
-rwxr-xr-xarchiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/spring-context.xml5
2 files changed, 6 insertions, 0 deletions
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java
index 0a74e395b..b1cbc9cf8 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java
@@ -209,6 +209,7 @@ public class ArchivaUserManagerAuthenticator
{
log.warn( "Login for user {} and userManager {} failed, message: {}", source.getUsername(),
userManager.getId(), e.getMessage() );
+ e.printStackTrace();
resultException = e;
authnResultErrors.add( new AuthenticationFailureCause( AuthenticationConstants.AUTHN_RUNTIME_EXCEPTION,
"Login for user " + source.getUsername()
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/spring-context.xml b/archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/spring-context.xml
index d295d09c5..3c5ad2e98 100755
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/spring-context.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/spring-context.xml
@@ -58,6 +58,11 @@
</bean>
+ <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" >
+ <property name="entityManagerFactory" ref="entityManagerFactory" />
+ </bean>
+
+ <tx:annotation-driven transaction-manager="transactionManager"/>
</beans> \ No newline at end of file