Simple fixes.

This commit is contained in:
marcins78@gmail.com
2012-07-30 18:06:56 +00:00
parent ae3c7f9e59
commit 765dba111a
3 changed files with 2 additions and 40 deletions

View File

@@ -28,7 +28,7 @@ public class ChatRoomMediator {
} }
public List<ChatMessage> joinUser(String playerId) { public List<ChatMessage> joinUser(String playerId) {
_lock.writeLock(); _lock.writeLock().lock();
try { try {
GatheringChatRoomListener value = new GatheringChatRoomListener(); GatheringChatRoomListener value = new GatheringChatRoomListener();
_listeners.put(playerId, value); _listeners.put(playerId, value);

View File

@@ -1,37 +0,0 @@
package com.gempukku.lotro.server.provider;
import com.gempukku.lotro.game.LotroCardBlueprintLibrary;
import com.sun.jersey.core.spi.component.ComponentContext;
import com.sun.jersey.core.spi.component.ComponentScope;
import com.sun.jersey.spi.inject.Injectable;
import com.sun.jersey.spi.inject.InjectableProvider;
import javax.ws.rs.core.Context;
import javax.ws.rs.ext.Provider;
import java.lang.reflect.Type;
@Provider
public class CardLibraryProvider implements InjectableProvider<Context, Type>, Injectable<LotroCardBlueprintLibrary> {
private LotroCardBlueprintLibrary _library;
public CardLibraryProvider() {
_library = new LotroCardBlueprintLibrary();
}
@Override
public ComponentScope getScope() {
return ComponentScope.Singleton;
}
@Override
public LotroCardBlueprintLibrary getValue() {
return _library;
}
@Override
public Injectable getInjectable(ComponentContext ic, Context context, Type type) {
if (type.equals(LotroCardBlueprintLibrary.class))
return this;
return null;
}
}

View File

@@ -34,8 +34,7 @@ public class DaoProvider implements InjectableProvider<Context, Type> {
private DbAccess _dbAccess; private DbAccess _dbAccess;
private CollectionSerializer _collectionSerializer; private CollectionSerializer _collectionSerializer;
@Context private LotroCardBlueprintLibrary _library = new LotroCardBlueprintLibrary();
private LotroCardBlueprintLibrary _library;
public DaoProvider() { public DaoProvider() {
_dbAccess = new DbAccess(); _dbAccess = new DbAccess();