source: EDIS/tags/ed/tracking-server-vista/src/test/java/gov/va/med/edp/vistalink/MockConnectionFactoryLocator.java@ 1240

Last change on this file since 1240 was 1240, checked in by George Lilly, 13 years ago

new version from the VA

File size: 779 bytes
Line 
1package gov.va.med.edp.vistalink;
2
3import org.springframework.dao.DataAccessResourceFailureException;
4
5import javax.resource.cci.ConnectionFactory;
6import java.util.HashMap;
7import java.util.Map;
8
9import gov.va.med.edp.vistalink.ConnectionFactoryLocator;
10
11public class MockConnectionFactoryLocator extends HashMap implements ConnectionFactoryLocator, Map {
12 public ConnectionFactory getConnectionFactory(String stationNumber) throws DataAccessResourceFailureException {
13 ConnectionFactory connectionFactory = (ConnectionFactory) get(stationNumber) ;
14 if (connectionFactory == null) throw new DataAccessResourceFailureException("unable to locate connection factory for station number " + stationNumber);
15 return connectionFactory;
16 }
17}
Note: See TracBrowser for help on using the repository browser.