Skip to content

Commit

Permalink
using Guice instead of relying on an internal class of XStream
Browse files Browse the repository at this point in the history
  • Loading branch information
kohsuke committed Sep 5, 2013
1 parent 8b2e148 commit 0775a70
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.jenkinsci.plugins.database.jpa;

import com.thoughtworks.xstream.core.util.ConcurrentWeakHashMap;
import com.google.common.collect.MapMaker;
import hudson.Extension;
import hudson.model.TopLevelItem;
import jenkins.model.Jenkins;
Expand Down Expand Up @@ -40,7 +40,7 @@ public class PersistenceService {

private final AtomicReference<EMFCache<Database>> globalCache = new AtomicReference<EMFCache<Database>>();
private final ConcurrentMap<TopLevelItem,EMFCache<PerItemDatabase>> perItemCache =
new ConcurrentWeakHashMap<TopLevelItem, EMFCache<PerItemDatabase>>();
new MapMaker().weakKeys().makeMap();

public EntityManagerFactory createEntityManagerFactory(DataSource dataSource, List<Class> classes) {
return new HibernatePersistence().createContainerEntityManagerFactory(new PersistenceUnitInfoImpl(
Expand Down

0 comments on commit 0775a70

Please sign in to comment.