Rev | Line | |
---|
[1240] | 1 | package gov.va.med.edp.rpc;
|
---|
| 2 |
|
---|
| 3 | import org.springframework.dao.DataAccessResourceFailureException;
|
---|
| 4 |
|
---|
| 5 | import javax.resource.cci.ConnectionFactory;
|
---|
| 6 | import java.util.HashMap;
|
---|
| 7 | import java.util.Map;
|
---|
| 8 |
|
---|
| 9 | public 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.