First off, I know what this problem is. Yes, the class trying to grab the DataSource is running on a different JVM (aka stand alone client). Yes, my classpath is set properly.
My question is if there is anyway to grab a DataSource object from WAS from a stand alone client.
Basically I have a Session bean that relies on a helper class for all it's logic. I then have jUnit tests that directly test this helper class (I do it this way so I can perform more specific low-level checking, rathering than performing tests using high level operations). The problem is the helper class uses a Data Access class that utilizes the App Server's JDBCDataSource (in production this class will reside in the Application's JVM so normally its fine). So when the Data Access class is being initialized (doing the JNDI lookup) it fails because it is getting back a javax.naming.Refernce rahter than a DataSource objct.
So, is it possible in WAS 5.1.x to directly grab a DataSource from a class running in a seperate JVM? My guess is no and it seems IBM also has documentation that says this is not possible:
Anyways, I guess i'm looking for options or some kind of input. Another reason this bothers me is the same jUnit test runs absolutely fine against Weblogic8.1 . Why can't WAS be as forgiving as Weblogic?? It's always something with WAS.