source: EDIS/tags/ed/tracking-server-core/src/test/java/gov/va/med/edp/rpc/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: 712 bytes
Line 
1package gov.va.med.edp.rpc;
2
3import org.springframework.dao.DataAccessResourceFailureException;
4
5import javax.resource.cci.ConnectionFactory;
6import java.util.HashMap;
7import java.util.Map;
8
9public class MockConnectionFactoryLocator extends HashMap implements ConnectionFactoryLocator, Map {
10 public ConnectionFactory getConnectionFactory(String stationNumber) throws DataAccessResourceFailureException {
11 ConnectionFactory connectionFactory = (ConnectionFactory) get(stationNumber) ;
12 if (connectionFactory == null) throw new DataAccessResourceFailureException("unable to locate connection factory for station number " + stationNumber);
13 return connectionFactory;
14 }
15}
Note: See TracBrowser for help on using the repository browser.