dblevins 2005/07/09 04:51:00
Modified: modules/core/src/java/org/openejb/alt/containers/castor_cmp11
CastorCMP11_EntityContainer.java
Log:
I can't fix this Tomcat integration issue with all the silly statics.
Killing the statics. Death to the statics!
Added a class called SystemInstance, which is a singleton and hopefully the
only important static for the 1.0 codebase someday.
Changed FileUtils to get its instances from SystemInstance, then inlined all
that code.
Changed ClasspathUtils to get its Loader instance from SystemInstance and
managed to inline all the remaining code.
Revision Changes Path
1.7 +7 -6
openejb1/modules/core/src/java/org/openejb/alt/containers/castor_cmp11/CastorCMP11_EntityContainer.java
Index: CastorCMP11_EntityContainer.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb1/modules/core/src/java/org/openejb/alt/containers/castor_cmp11/CastorCMP11_EntityContainer.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- CastorCMP11_EntityContainer.java 9 Jul 2005 05:53:21 -0000 1.6
+++ CastorCMP11_EntityContainer.java 9 Jul 2005 08:51:00 -0000 1.7
@@ -75,6 +75,7 @@
import org.openejb.OpenEJBException;
import org.openejb.ProxyInfo;
import org.openejb.RpcContainer;
+import org.openejb.loader.SystemInstance;
import org.openejb.core.EnvProps;
import org.openejb.core.Operations;
import org.openejb.core.ThreadContext;
@@ -257,10 +258,10 @@
File gTxDb = null;
File lTxDb = null;
try {
- gTxDb = FileUtils.getBase().getFile( Global_TX_Database );
+ gTxDb = SystemInstance.get().getBase().getFile(
Global_TX_Database );
} catch ( Exception ignored ) {
try {
- gTxDb = FileUtils.getHome().getFile(Global_TX_Database);
+ gTxDb =
SystemInstance.get().getHome().getFile(Global_TX_Database);
} catch (Exception e) {
throw new OpenEJBException("Cannot locate the " +
EnvProps.GLOBAL_TX_DATABASE + " file. "
+ e.getMessage());
@@ -268,10 +269,10 @@
}
try {
- lTxDb = FileUtils.getBase().getFile( Local_TX_Database );
+ lTxDb = SystemInstance.get().getBase().getFile(
Local_TX_Database );
} catch ( Exception ignored ) {
try {
- lTxDb = FileUtils.getHome().getFile(Local_TX_Database);
+ lTxDb =
SystemInstance.get().getHome().getFile(Local_TX_Database);
} catch (Exception e) {
throw new OpenEJBException("Cannot locate the " +
EnvProps.LOCAL_TX_DATABASE + " file. "
+ e.getMessage());