R: [OT] JNDI datasource lookup to test classes

2003-08-23 Thread Leonardo Francalanci
The most common solution to this problem is using a Factory Method to return the correct implementation of the interface. Your classes should never know which implementation is in use because they will all ask the Factory Method for the object. You just need to change the one line in the

Re: R: [OT] JNDI datasource lookup to test classes

2003-08-23 Thread James CE Johnson
The most common solution to this problem is using a Factory Method to return the correct implementation of the interface. Your classes should never know which implementation is in use because they will all ask the Factory Method for the object. You just need to change the one line in

Re: R: [OT] JNDI datasource lookup to test classes

2003-08-23 Thread James Harman
Alternatively, If you are worried about test code in production, you could extend from ConnectionHandlerFactory with a TestConnectionHandlerFactor and override the getConnectionHandler() method to return the connectionHandler for testing. James James CE Johnson wrote: The most common