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
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
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
In my DB tier I use an interface to get the connection.
When used under Tomcat, the class that implements the connection gets
the connecton through JNDI.
I want to test these classes outside of Tomcat.
Is there a simple way to put objects in the Context,
I mean a simple way to emulate Tomcat
Maybe this files can help you.
Regards.
Manolo Ramirez T.
Leonardo Francalanci wrote:
In my DB tier I use an interface to get the connection.
When used under Tomcat, the class that implements the connection gets
the connecton through JNDI.
I want to test these classes outside of
--- Leonardo Francalanci [EMAIL PROTECTED] wrote:
In my DB tier I use an interface to get the connection.
When used under Tomcat, the class that implements the connection gets
the connecton through JNDI.
I want to test these classes outside of Tomcat.
Is there a simple way to put objects in
On 08/22/2003 04:43 PM Leonardo Francalanci wrote:
I read the JNDI tutorial, but is the worse thing I've ever read.
You've obviously never read any of my poetry.
--
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9
-
To
7 matches
Mail list logo