Dependency upgrades

* Spring upgraded from 3.0.3 to 3.1.0 - As a consequence, all code that
used SimpleJdbcTemplate has been modified to use JdbcTemplate, as the
former has been deprecated.

* SLF4J upgraded from 1.5.11 to 1.6.4

* Apache Commons: DBCP upgraded from 1.2.2 to 1.4, Codec upgraded from
1.4 to 1.6

* CGLib upgraded from 2.2 to 2.2.2

* javax.mail upgraded from 1.4.1 to 1.4.4

* XStream upgraded from 1.3.1 to 1.4.2

* JUnit upgraded from 4.7 to 4.10

* FreeMarker upgraded from 2.3.16 to 2.3.18

* PostgreSQL JDBC glue upgraded from 8.4-701 to 9.1-901

* legacyworlds-server-tests no longer considered a dummy package
This commit is contained in:
Emmanuel BENOîT 2012-01-16 18:09:45 +01:00
parent a981d1653e
commit 2adc754a2c
28 changed files with 97 additions and 105 deletions

View file

@ -11,8 +11,8 @@ import javax.sql.DataSource;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import com.deepclone.lw.cmd.admin.users.SessionTerminationType;
import com.deepclone.lw.cmd.admin.users.UserSession;
@ -25,7 +25,7 @@ public class UserSessionDAOBean
implements UserSessionDAO , InitializingBean
{
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
private final RowMapper< UserSession > mSession;
@ -66,7 +66,7 @@ public class UserSessionDAOBean
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
this.fSessionStart = new StoredProc( dataSource , "users" , "sessions_login" );
this.fSessionStart.addParameter( "credentials_id" , Types.INTEGER );
@ -84,7 +84,7 @@ public class UserSessionDAOBean
@Override
public void afterPropertiesSet( )
{
this.dTemplate.getJdbcOperations( ).execute( "SELECT users.sessions_server_restart()" );
this.dTemplate.execute( "SELECT users.sessions_server_restart()" );
}

View file

@ -11,8 +11,8 @@ import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import com.deepclone.lw.cmd.admin.users.AccountBanEntry;
import com.deepclone.lw.cmd.admin.users.AccountListEntry;
@ -55,7 +55,7 @@ public class UsersDAOBean
private final AccountListMapper< AccountListEntry > mAccountList;
private final AccountListMapper< AccountViewEntry > mAccountView;
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
private StoredProc fCreateAccount;
private StoredProc fMailFailure;
@ -181,7 +181,7 @@ public class UsersDAOBean
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
this.fCreateAccount = new StoredProc( dataSource , "users" , "create_credentials" );
this.fCreateAccount.addParameter( "address" , Types.VARCHAR );
@ -426,7 +426,7 @@ public class UsersDAOBean
@Override
public void expireRequests( )
{
this.dTemplate.getJdbcOperations( ).execute( "SELECT users.expire_requests( )" );
this.dTemplate.execute( "SELECT users.expire_requests( )" );
}
@ -469,7 +469,7 @@ public class UsersDAOBean
@Override
public void processVacations( )
{
this.dTemplate.getJdbcOperations( ).execute( "SELECT users.process_vacations( )" );
this.dTemplate.execute( "SELECT users.process_vacations( )" );
}
@ -529,7 +529,7 @@ public class UsersDAOBean
@Override
public void deleteOldAccounts( )
{
this.dTemplate.getJdbcOperations( ).execute( "SELECT users.delete_old_accounts( )" );
this.dTemplate.execute( "SELECT users.delete_old_accounts( )" );
}

View file

@ -13,8 +13,8 @@ import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import com.deepclone.lw.cmd.admin.adata.AdminOverview;
import com.deepclone.lw.interfaces.admin.AdminDAO;
@ -34,7 +34,7 @@ public class AdminDAOBean
private static final String sGetAdminByName = "SELECT * FROM admin.admins_view WHERE lower( name ) = ?";
private static final String sListAdministrators = "SELECT * FROM admin.admins_view ORDER BY active DESC , name";
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
private final RowMapper< AdminRecord > mAdminRecord;
private final RowMapper< AdminOverview > mAdminOverview;
@ -89,7 +89,7 @@ public class AdminDAOBean
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
this.fCreateAdmin = new StoredProc( dataSource , "admin" , "create_admin" );
this.fCreateAdmin.addParameter( "address" , Types.VARCHAR );

View file

@ -12,8 +12,8 @@ import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import com.deepclone.lw.cmd.admin.bans.ArchivedBanRequest;
import com.deepclone.lw.cmd.admin.bans.BanRequest;
@ -51,7 +51,7 @@ public class BansDAOBean
}
}
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
private final BanRequestMapper< BanRequest > mPending;
private final BanRequestMapper< BanRequest > mArchived;
@ -122,7 +122,7 @@ public class BansDAOBean
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
this.fRequestBanAddress = new StoredProc( dataSource , "admin" , "request_ban_on_address" );
this.fRequestBanAddress.addParameter( "admin_id" , Types.INTEGER );
@ -251,14 +251,14 @@ public class BansDAOBean
@Override
public void expireBanRequests( )
{
this.dTemplate.getJdbcOperations( ).execute( "SELECT admin.expire_ban_requests( )" );
this.dTemplate.execute( "SELECT admin.expire_ban_requests( )" );
}
@Override
public void expireWarnings( )
{
this.dTemplate.getJdbcOperations( ).execute( "SELECT admin.expire_warnings( )" );
this.dTemplate.execute( "SELECT admin.expire_warnings( )" );
}

View file

@ -12,8 +12,8 @@ import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.annotation.Transactional;
@ -70,7 +70,7 @@ public class PreferenceDefinitionsBean
private SystemLogger logger;
private Translator translator;
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
private StoredProc uocGroup;
private StoredProc uocDef;
@ -95,7 +95,7 @@ public class PreferenceDefinitionsBean
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
this.uocGroup = new StoredProc( dataSource , "defs" , "uoc_preference_group" );
this.uocGroup.addParameter( "name" , Types.VARCHAR );

View file

@ -12,8 +12,8 @@ import java.util.Map;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import com.deepclone.lw.interfaces.prefs.AccountPreferences;
import com.deepclone.lw.interfaces.prefs.Preference;
@ -30,7 +30,7 @@ public class PreferencesDAOBean
implements PreferencesDAO
{
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
private PreferenceTypesRegistry registry;
private StoredProc fReset;
private StoredProc fSetPref;
@ -39,7 +39,7 @@ public class PreferencesDAOBean
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
this.fReset = new StoredProc( dataSource , "users" , "reset_preferences" );
this.fReset.addParameter( "a_id" , Types.INTEGER );

View file

@ -11,9 +11,8 @@ import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import com.deepclone.lw.cmd.admin.adata.Administrator;
import com.deepclone.lw.cmd.bt.data.*;
import com.deepclone.lw.interfaces.bt.BugsDAO;
@ -25,7 +24,7 @@ public class BugsDAOBean
implements BugsDAO
{
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
private final RowMapper< BugReport > mBugReport;
private final RowMapper< BugEvent > mBugEvent;
@ -129,7 +128,7 @@ public class BugsDAOBean
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
this.fPostUserReport = new StoredProc( dataSource , "bugs" , "post_player_report" );
this.fPostUserReport.addParameter( "empire_id" , Types.INTEGER );

View file

@ -9,8 +9,8 @@ import java.util.Map;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import com.deepclone.lw.beans.bt.esdata.*;
import com.deepclone.lw.interfaces.bt.EmpireSummary;
@ -22,7 +22,7 @@ public class EmpireSummaryBean
implements EmpireSummary
{
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
private final XStream xStream;
@ -188,7 +188,7 @@ public class EmpireSummaryBean
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
}

View file

@ -13,8 +13,8 @@ import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.TransactionCallback;
@ -39,7 +39,7 @@ public class LogReaderBean
implements LogReader
{
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
private TransactionTemplate tTemplate;
private final RowMapper< LogEntry > mLogEntry;
@ -88,7 +88,7 @@ public class LogReaderBean
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
}

View file

@ -12,7 +12,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
import javax.sql.DataSource;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.TransactionCallbackWithoutResult;
import org.springframework.transaction.support.TransactionTemplate;
@ -35,7 +35,7 @@ class I18NData
private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock( );
/** Database interface */
private final SimpleJdbcTemplate dTemplate;
private final JdbcTemplate dTemplate;
/** Transaction manager interface */
private final TransactionTemplate tTemplate;
@ -53,7 +53,7 @@ class I18NData
/** Copies the required references then loads all data */
I18NData( DataSource dataSource , TransactionTemplate tTemplate )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
this.tTemplate = tTemplate;
this.fUocLanguage = new StoredProc( dataSource , "defs" , "uoc_language" );

View file

@ -6,8 +6,8 @@ import java.sql.SQLException;
import java.util.HashMap;
import java.util.HashSet;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.TransactionCallbackWithoutResult;
@ -27,7 +27,7 @@ class LoaderTransaction
{
/** Database interface */
private final SimpleJdbcTemplate dTemplate;
private final JdbcTemplate dTemplate;
/** String definition map being initialised */
private final HashSet< String > strings;
@ -37,7 +37,7 @@ class LoaderTransaction
/** Copies the required references */
LoaderTransaction( SimpleJdbcTemplate dTemplate , HashSet< String > strings ,
LoaderTransaction( JdbcTemplate dTemplate , HashSet< String > strings ,
HashMap< String , LanguageStore > languages )
{
this.dTemplate = dTemplate;

View file

@ -11,8 +11,8 @@ import java.util.Map;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import com.deepclone.lw.cmd.admin.naming.Name;
import com.deepclone.lw.cmd.admin.naming.NameType;
@ -33,7 +33,7 @@ public class NamingDAOBean
long count;
}
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
private StoredProc fGetEmpire;
private StoredProc fRenamePlanet;
@ -75,7 +75,7 @@ public class NamingDAOBean
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
this.fGetEmpire = new StoredProc( dataSource , "emp" , "get_current" );
this.fGetEmpire.addParameter( "account_id" , Types.INTEGER );

View file

@ -10,8 +10,8 @@ import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import com.deepclone.lw.cmd.player.gdata.NameIdPair;
import com.deepclone.lw.cmd.player.gdata.alliance.AllianceLeaderData;
@ -28,7 +28,7 @@ public class AllianceDAOBean
implements AllianceDAO
{
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
private StoredProc fCreateAlliance;
private StoredProc fJoinAlliance;
private StoredProc fCancelJoin;
@ -42,7 +42,7 @@ public class AllianceDAOBean
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
this.fCreateAlliance = new StoredProc( dataSource , "emp" , "create_alliance" );
this.fCreateAlliance.addParameter( "empire_id" , Types.INTEGER );

View file

@ -12,8 +12,8 @@ import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import com.deepclone.lw.cmd.ObjectNameError;
import com.deepclone.lw.cmd.player.gdata.NameIdPair;
@ -30,7 +30,7 @@ import com.deepclone.lw.utils.StoredProc;
public class EmpireDAOBean
implements EmpireDAO
{
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
private StoredProc fImplementTech;
private StoredProc fAddEmpEnemy;
private StoredProc fAddAllEnemy;
@ -44,7 +44,7 @@ public class EmpireDAOBean
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
this.fImplementTech = new StoredProc( dataSource , "emp" , "implement_tech" );
this.fImplementTech.addParameter( "empire_id" , Types.INTEGER );

View file

@ -12,9 +12,8 @@ import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import com.deepclone.lw.interfaces.game.BattlesDAO;
import com.deepclone.lw.sqld.game.battle.*;
@ -34,7 +33,7 @@ public class BattlesDAOBean
private static final String sGetAllBattles = "SELECT * FROM battles.battles_list WHERE empire = ? ORDER BY last_tick DESC NULLS FIRST , first_tick DESC , x , y , orbit";
private static final String sGetNewBattles = "SELECT * FROM battles.battles_list WHERE empire = ? AND ( last_update > ? OR NOT finished ) ORDER BY last_tick DESC NULLS FIRST , first_tick DESC , x , y , orbit";
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
private final RowMapper< EmpireBattleRecord > mGetBattleRecord;
private final RowMapper< PresenceRecord > mGetPresenceList;
@ -173,7 +172,7 @@ public class BattlesDAOBean
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
}

View file

@ -13,8 +13,8 @@ import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import com.deepclone.lw.cmd.player.gdata.NameIdPair;
import com.deepclone.lw.cmd.player.gdata.PlanetRelationType;
@ -42,7 +42,7 @@ public class FleetsDAOBean
private static String sqlSingleMoving = "SELECT * FROM fleets.moving_fleets WHERE empire = ? AND id = ?";
private static String sqlFleetShips = "SELECT * FROM fleets.ships_view WHERE empire = ? AND id = ?";
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
private RowMapper< FleetLocation > mLocations;
private RowMapper< RawFleetOwner > mOwners;
@ -209,7 +209,7 @@ public class FleetsDAOBean
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
this.fMoveFleets = new StoredProc( dataSource , "fleets" , "move_fleets" );
this.fMoveFleets.addParameter( "empire_id" , Types.INTEGER );

View file

@ -9,9 +9,8 @@ import java.util.List;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import com.deepclone.lw.cmd.player.gdata.planets.BuildableBuildingData;
import com.deepclone.lw.cmd.player.gdata.planets.BuildableShipData;
import com.deepclone.lw.cmd.player.gdata.planets.BuildingData;
@ -30,7 +29,7 @@ public class PlanetDAOBean
implements PlanetDAO
{
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
private RowMapper< Basic > mPlanetBasics;
private RowMapper< Orbital > mPlanetOrbital;
@ -195,7 +194,7 @@ public class PlanetDAOBean
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
this.fFlushBuildQueue = new StoredProc( dataSource , "verse" , "flush_build_queue" );
this.fFlushBuildQueue.addParameter( "planet_id" , Types.INTEGER );

View file

@ -8,8 +8,8 @@ import java.util.List;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import com.deepclone.lw.interfaces.game.UniverseDAO;
import com.deepclone.lw.sqld.game.MapData;
@ -19,20 +19,20 @@ import com.deepclone.lw.sqld.game.MapData;
public class UniverseDAOBean
implements UniverseDAO
{
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
}
@Override
public void generate( )
{
this.dTemplate.getJdbcOperations( ).execute( "SELECT verse.generate( )" );
this.dTemplate.execute( "SELECT verse.generate( )" );
}

View file

@ -13,8 +13,8 @@ import java.util.Map;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import com.deepclone.lw.cmd.msgdata.MessageType;
import com.deepclone.lw.cmd.player.msgs.MessageBoxAction;
@ -87,7 +87,7 @@ public class MessageBoxDAOBean
private final Map< CacheKey , CacheData > cache = new HashMap< CacheKey , CacheData >( );
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
private final RowMapper< InboxRecord > listMapper;
private StoredProc fSendSpam;
@ -135,7 +135,7 @@ public class MessageBoxDAOBean
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
this.fSendSpam = new StoredProc( dataSource , "msgs" , "deliver_admin_spam" );
this.fSendSpam.addParameter( "admin_id" , Types.INTEGER );

View file

@ -10,8 +10,8 @@ import java.util.Map;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import com.deepclone.lw.interfaces.msg.MessageRecordsDAO;
import com.deepclone.lw.sqld.msgs.*;
@ -43,7 +43,7 @@ public class MessageRecordsDAOBean
private static final String sGetQueueLocations = "SELECT * FROM events.queue_locations_view WHERE event_id = ANY( ? ::BIGINT[] )";
private static final String sGetEventFleets = "SELECT * FROM events.fleet_lists WHERE event_id = ANY( ? ::BIGINT[] )";
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
private final RowMapper< TextMessageRecord > mTextMessage;
private final RowMapper< EventTypeRecord > mEventTypes;
@ -219,7 +219,7 @@ public class MessageRecordsDAOBean
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
}

View file

@ -10,8 +10,8 @@ import java.util.List;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import com.deepclone.lw.interfaces.msg.NotificationsDAO;
import com.deepclone.lw.sqld.msgs.InboxRecord;
@ -26,7 +26,7 @@ public class NotificationsDAOBean
private static final String sGetInstantNotifications = "SELECT * FROM msgs.get_mail_data() WHERE last_unmailed IS NOT NULL";
private static final String sGetRecapNotifications = "SELECT * FROM msgs.get_mail_data() WHERE last_unrecaped IS NOT NULL";
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
private final RowMapper< NotificationsRecord > mNotifications;
private RowMapper< InboxRecord > mList;
@ -81,7 +81,7 @@ public class NotificationsDAOBean
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
this.fMarkInstantMessages = new StoredProc( dataSource , "msgs" , "mark_instant_notifications" );
this.fMarkInstantMessages.addParameter( "empire_id" , Types.INTEGER );
@ -163,6 +163,6 @@ public class NotificationsDAOBean
@Override
public void cleanupMessages( )
{
this.dTemplate.getJdbcOperations( ).execute( "SELECT msgs.cleanup( )" );
this.dTemplate.execute( "SELECT msgs.cleanup( )" );
}
}

View file

@ -14,10 +14,10 @@ import java.util.Set;
import javax.sql.DataSource;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.SqlParameter;
import org.springframework.jdbc.core.simple.SimpleJdbcCall;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.TransactionCallbackWithoutResult;
import org.springframework.transaction.support.TransactionTemplate;
@ -43,7 +43,7 @@ import com.deepclone.lw.utils.StoredProc;
class ConstantsData
{
/** Database interface */
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
/** Transaction manager interface */
private TransactionTemplate tTemplate;
@ -85,7 +85,7 @@ class ConstantsData
*/
ConstantsData( DataSource dataSource , TransactionTemplate tTemplate , Logger logger )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
this.uocConstantNoBounds = new SimpleJdbcCall( dataSource );
this.uocConstantNoBounds.withCatalogName( "sys" ).withFunctionName( "uoc_constant" );

View file

@ -9,10 +9,10 @@ import java.util.Map;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.SqlOutParameter;
import org.springframework.jdbc.core.simple.SimpleJdbcCall;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.TransactionCallback;
@ -33,7 +33,7 @@ public class SystemStatusBean
{
/** Database interface */
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
/** Transaction template */
private TransactionTemplate tTemplate;
@ -55,7 +55,7 @@ public class SystemStatusBean
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
this.fEnterMaintenanceMode = new StoredProc( dataSource , "sys" , "enter_maintenance_mode" );
this.fEnterMaintenanceMode.addParameter( "admin_id" , Types.INTEGER );

View file

@ -17,8 +17,8 @@ import javax.sql.DataSource;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.TransactionCallback;
@ -42,7 +42,7 @@ public class TickerManagerBean
private final Set< Integer > registered = new HashSet< Integer >( );
private TransactionTemplate tTemplate;
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
private final RowMapper< TickerTaskRecord > mTask;
@ -80,7 +80,7 @@ public class TickerManagerBean
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.dTemplate = new JdbcTemplate( dataSource );
this.fRegisterTask = new StoredProc( dataSource , "sys" , "register_ticker_task" );
this.fRegisterTask.addParameter( "task_name" , Types.VARCHAR );

View file

@ -14,8 +14,8 @@ import javax.sql.DataSource;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.TransactionCallback;
@ -67,7 +67,7 @@ public class ExportDB
private File file;
private TransactionTemplate tTemplate;
private SimpleJdbcTemplate dTemplate;
private JdbcTemplate dTemplate;
private ClassPathXmlApplicationContext createContext( )
@ -93,7 +93,7 @@ public class ExportDB
PlatformTransactionManager tManager = ctx.getBean( PlatformTransactionManager.class );
this.tTemplate = new TransactionTemplate( tManager );
this.dTemplate = new SimpleJdbcTemplate( dSource );
this.dTemplate = new JdbcTemplate( dSource );
}

View file

@ -10,8 +10,8 @@
<artifactId>legacyworlds-server-tests</artifactId>
<version>${legacyworlds.version.main}.${legacyworlds.version.release}-${legacyworlds.version.build}</version>
<name>Legacy Worlds - Server - Tests (OH WAIT!)</name>
<description>This package regroups all tests for server capabilities.</description>
<name>Legacy Worlds - Server - Tests</name>
<description>This package contains all tests for server capabilities.</description>
<dependencies>
<dependency>

View file

@ -58,7 +58,7 @@ in another terminal.
6) Create the server's super user. First, create an inactive user account:
java -jar legacyworlds-server-main-0.0-0.jar --run-tool CreateUser
java -jar legacyworlds-server-main-1.0.0-0.jar --run-tool CreateUser
The tool will prompt for an email address, password (which /will/ appear on the
console) and language identifier ('en' or 'fr' are supported). Please note that

View file

@ -74,12 +74,7 @@
<repository>
<id>com.springsource.repository.bundles.release</id>
<name>Spring framework</name>
<url>http://repository.springsource.com/maven/bundles/release</url>
</repository>
<repository>
<id>com.springsource.repository.bundles.external</id>
<name>Spring framework - external</name>
<url>http://repository.springsource.com/maven/bundles/external</url>
<url>http://repo.springsource.org/release</url>
</repository>
</repositories>
@ -106,18 +101,18 @@
<!--
- DEPENDENCY VERSIONS
-->
<dep.springframework>3.0.3.RELEASE</dep.springframework>
<dep.slf4j>1.5.11</dep.slf4j>
<dep.springframework>3.1.0.RELEASE</dep.springframework>
<dep.slf4j>1.6.4</dep.slf4j>
<dep.log4j>1.2.16</dep.log4j>
<dep.dbcp>1.2.2</dep.dbcp>
<dep.codecs>1.4</dep.codecs>
<dep.cglib>2.2</dep.cglib>
<dep.mail>1.4.1</dep.mail>
<dep.xstream>1.3.1</dep.xstream>
<dep.junit>4.7</dep.junit>
<dep.freemarker>2.3.16</dep.freemarker>
<dep.dbcp>1.4</dep.dbcp>
<dep.codecs>1.6</dep.codecs>
<dep.cglib>2.2.2</dep.cglib>
<dep.mail>1.4.4</dep.mail>
<dep.xstream>1.4.2</dep.xstream>
<dep.junit>4.10</dep.junit>
<dep.freemarker>2.3.18</dep.freemarker>
<dep.servlet>2.5</dep.servlet>
<dep.postgresql>8.4-701.jdbc4</dep.postgresql>
<dep.postgresql>9.1-901.jdbc4</dep.postgresql>
</properties>