asmuts 02/01/19 17:47:56
Modified: src/java/org/apache/stratum/jcs/auxiliary/remote/server/group
RemoteGroupCacheServerFactory.java
src/conf remote.cache2.ccf remote.cache.ccf cache.policy
src/java/org/apache/stratum/jcs/auxiliary/remote/behavior
IRemoteCacheConstants.java
Log:
Removed jetty since no one has the jar.
Replaced with tomcat wich is way too much. Can't get it to work yet. I'm geting a
'sealing exception' -- http://w4.metronet.com/~wjm/tomcat/2000/Nov/msg00329.html
Uncommented the rmic from the build. This is crucial.
Turned off embedded server feature in remote.cache.ccf file.
Will try to get tomcat working later.
Revision Changes Path
1.4 +18 -16
jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/auxiliary/remote/server/group/RemoteGroupCacheServerFactory.java
Index: RemoteGroupCacheServerFactory.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/auxiliary/remote/server/group/RemoteGroupCacheServerFactory.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- RemoteGroupCacheServerFactory.java 15 Jan 2002 21:33:33 -0000 1.3
+++ RemoteGroupCacheServerFactory.java 20 Jan 2002 01:47:56 -0000 1.4
@@ -11,8 +11,7 @@
import java.util.Properties;
-import com.mortbay.Jetty.Server;
-import com.mortbay.Util.Code;
+import org.apache.tomcat.startup.Tomcat;
import org.apache.stratum.jcs.auxiliary.remote.RemoteUtils;
import org.apache.stratum.jcs.auxiliary.remote.behavior.IRemoteCacheConstants;
@@ -44,7 +43,9 @@
/**
* Constructor for the RemoteGroupCacheServerFactory object
*/
- private RemoteGroupCacheServerFactory() { }
+ private RemoteGroupCacheServerFactory()
+ {
+ }
/////////////////////// Statup/shutdown methods. //////////////////
@@ -95,13 +96,13 @@
}
}
- // Start up jetty inside remote cache, useful for monitoring
- boolean jettyOn = Boolean.valueOf( prop.getProperty( JETTY_ON, "true"
).trim() ).booleanValue();
- p( "jettyOn = " + jettyOn );
- if ( jettyOn )
+ // Start up tomcat inside remote cache, useful for monitoring
+ boolean tomcatOn = Boolean.valueOf( prop.getProperty( TOMCAT_ON, "true"
).trim() ).booleanValue();
+ p( "tomcatOn = " + tomcatOn );
+ if ( tomcatOn )
{
- String jettyXml = prop.getProperty( JETTY_XML,
"C:/dev/jakarta-turbine-stratum/props/myjetty.xml" ).trim();
- startupJetty( new String[]{jettyXml} );
+ String tomcatXml = prop.getProperty( TOMCAT_XML,
"C:/dev/jakarta-turbine-stratum/props/remote.tomcat.xml" ).trim();
+ startupTomcat( new String[]{"-config", tomcatXml} );
}
}
///////////
@@ -112,13 +113,13 @@
*
*@param arg Description of the Parameter
*/
- private static void startupJetty( String[] arg )
+ private static void startupTomcat( String[] arg )
{
- String[] dftConfig = {"C:/dev/jakarta-turbine-stratum/props/myjetty.xml"};
+ String[] dftConfig = {"-config",
"C:/dev/jakarta-turbine-stratum/bin/conf/remote.tomcat.xml"};
if ( arg.length == 0 )
{
- System.err.println( "Using default configuration: etc/demo.xml" );
+ System.err.println( "Using default configuration:
bin/conf/remote.tomcat.xml" );
arg = dftConfig;
}
@@ -126,12 +127,12 @@
{
try
{
- new Server( arg[i] ).start();
- p( "started jetty" );
+ Tomcat.main( arg );
+ p( "started tomcat" );
}
catch ( Exception e )
{
- Code.warning( e );
+ log.error( e );
}
}
}
@@ -181,7 +182,8 @@
Thread.currentThread().sleep( 2000 );
}
catch ( InterruptedException ex )
- {}
+ {
+ }
System.exit( 0 );
}
}
1.3 +3 -1 jakarta-turbine-stratum/src/conf/remote.cache2.ccf
Index: remote.cache2.ccf
===================================================================
RCS file: /home/cvs/jakarta-turbine-stratum/src/conf/remote.cache2.ccf,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- remote.cache2.ccf 15 Jan 2002 17:59:03 -0000 1.2
+++ remote.cache2.ccf 20 Jan 2002 01:47:56 -0000 1.3
@@ -6,7 +6,9 @@
#remote.cache.service.name=RemoteCache
# call back port to local caches.
remote.cache.service.port=1101
-
+# tomcat config
+remote.tomcat.on=false
+remote.tomcat.xml=@project_home_f@bin/conf/remote.tomcat.xml
##############################################################
################## DEFAULT CACHE REGION #####################
1.4 +3 -3 jakarta-turbine-stratum/src/conf/remote.cache.ccf
Index: remote.cache.ccf
===================================================================
RCS file: /home/cvs/jakarta-turbine-stratum/src/conf/remote.cache.ccf,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- remote.cache.ccf 15 Jan 2002 23:02:12 -0000 1.3
+++ remote.cache.ccf 20 Jan 2002 01:47:56 -0000 1.4
@@ -6,9 +6,9 @@
# remote.cache.service.name=RemoteCache
# call back port to local caches.
remote.cache.service.port=1101
-# jetty config
-remote.jetty.on=true
-remote.jetty.xml=@project_home_f@bin/conf/myjetty.xml
+# tomcat config
+remote.tomcat.on=false
+remote.tomcat.xml=@project_home_f@bin/conf/remote.tomcat.xml
##############################################################
1.5 +4 -0 jakarta-turbine-stratum/src/conf/cache.policy
Index: cache.policy
===================================================================
RCS file: /home/cvs/jakarta-turbine-stratum/src/conf/cache.policy,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- cache.policy 16 Jan 2002 02:18:56 -0000 1.4
+++ cache.policy 20 Jan 2002 01:47:56 -0000 1.5
@@ -2,6 +2,10 @@
permission java.security.AllPermission;
};
+grant codeBase "file:/@project_home_f@bin/*" {
+ permission java.security.AllPermission;
+};
+
grant codeBase "file:[EMAIL PROTECTED]@*" {
permission java.security.AllPermission;
};
1.4 +2 -2
jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/auxiliary/remote/behavior/IRemoteCacheConstants.java
Index: IRemoteCacheConstants.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/auxiliary/remote/behavior/IRemoteCacheConstants.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- IRemoteCacheConstants.java 15 Jan 2002 21:33:32 -0000 1.3
+++ IRemoteCacheConstants.java 20 Jan 2002 01:47:56 -0000 1.4
@@ -20,11 +20,11 @@
/**
* Description of the Field
*/
- public final static String JETTY_XML = "remote.jetty.xml";
+ public final static String TOMCAT_XML = "remote.tomcat.xml";
/**
* Description of the Field
*/
- public final static String JETTY_ON = "remote.jetty.on";
+ public final static String TOMCAT_ON = "remote.tomcat.on";
/**
* Description of the Field
*/
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>