Author: asmuts
Date: Tue Aug 22 08:19:11 2006
New Revision: 433672
URL: http://svn.apache.org/viewvc?rev=433672&view=rev
Log:
Added license header to several new files.
Updated servlet dependency to 2.3.
Added a utility servlet context listener that can be used to shutdown JCS.
Added:
jakarta/jcs/trunk/src/java/org/apache/jcs/utils/servlet/JCSServletContextListener.java
Modified:
jakarta/jcs/trunk/project.xml
jakarta/jcs/trunk/src/java/org/apache/jcs/utils/struct/BoundedQueue.java
jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheListenerMockImpl.java
jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheUnitTest.java
jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteUtilsUnitTest.java
jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/TestRemoteCache.java
jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/ZombieRemoteCacheServiceUnitTest.java
jakarta/jcs/trunk/src/test/org/apache/jcs/utils/struct/BoundedQueueUnitTest.java
Modified: jakarta/jcs/trunk/project.xml
URL:
http://svn.apache.org/viewvc/jakarta/jcs/trunk/project.xml?rev=433672&r1=433671&r2=433672&view=diff
==============================================================================
--- jakarta/jcs/trunk/project.xml (original)
+++ jakarta/jcs/trunk/project.xml Tue Aug 22 08:19:11 2006
@@ -183,7 +183,7 @@
<dependency>
<id>servletapi</id>
- <version>2.2</version>
+ <version>2.3</version>
</dependency>
<dependency>
Added:
jakarta/jcs/trunk/src/java/org/apache/jcs/utils/servlet/JCSServletContextListener.java
URL:
http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/utils/servlet/JCSServletContextListener.java?rev=433672&view=auto
==============================================================================
---
jakarta/jcs/trunk/src/java/org/apache/jcs/utils/servlet/JCSServletContextListener.java
(added)
+++
jakarta/jcs/trunk/src/java/org/apache/jcs/utils/servlet/JCSServletContextListener.java
Tue Aug 22 08:19:11 2006
@@ -0,0 +1,71 @@
+package org.apache.jcs.utils.servlet;
+
+/*
+ * Copyright 2001-2004 The Apache Software Foundation. Licensed under the
Apache
+ * License, Version 2.0 (the "License") you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
+ * or agreed to in writing, software distributed under the License is
+ * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jcs.engine.control.CompositeCacheManager;
+
+/**
+ * If you add this to the context listeners section of your web.xml file, this
will shutdown JCS
+ * gracefully.
+ * <p>
+ * Add the following to the top of your web.xml file.
+ *
+ * <pre>
+ * <listener>
+ * <listener-class>
+ * org.apache.jcs.utils.servlet.JCSServletContextListener
+ * </listener-class>
+ * </listener>
+ * </pre>
+ *
+ * @author Aaron Smuts
+ */
+public class JCSServletContextListener
+ implements ServletContextListener
+{
+ private static final Log log = LogFactory.getLog(
JCSServletContextListener.class );
+
+ /**
+ * This does nothing. We don't want to initialize the cache here.
+ * <p>
+ * (non-Javadoc)
+ * @see
javax.servlet.ServletContextListener#contextInitialized(javax.servlet.ServletContextEvent)
+ */
+ public void contextInitialized( ServletContextEvent arg0 )
+ {
+ if ( log.isInfoEnabled() )
+ {
+ log.info( "contextInitialized" );
+ }
+ }
+
+ /**
+ * This gets the singleton instance of the CompositeCacheManager and calls
shutdown.
+ * <p>
+ * (non-Javadoc)
+ * @see
javax.servlet.ServletContextListener#contextDestroyed(javax.servlet.ServletContextEvent)
+ */
+ public void contextDestroyed( ServletContextEvent arg0 )
+ {
+ if ( log.isInfoEnabled() )
+ {
+ log.info( "contextDestroyed, shutting down JCS." );
+ }
+ CompositeCacheManager.getInstance().shutDown();
+ }
+
+}
Modified:
jakarta/jcs/trunk/src/java/org/apache/jcs/utils/struct/BoundedQueue.java
URL:
http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/utils/struct/BoundedQueue.java?rev=433672&r1=433671&r2=433672&view=diff
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/utils/struct/BoundedQueue.java
(original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/utils/struct/BoundedQueue.java
Tue Aug 22 08:19:11 2006
@@ -1,5 +1,16 @@
package org.apache.jcs.utils.struct;
+/*
+ * Copyright 2001-2004 The Apache Software Foundation. Licensed under the
Apache
+ * License, Version 2.0 (the "License") you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
+ * or agreed to in writing, software distributed under the License is
+ * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+
/**
* This is a bounded queue. It only allows maxSize items.
* <p>
Modified:
jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheListenerMockImpl.java
URL:
http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheListenerMockImpl.java?rev=433672&r1=433671&r2=433672&view=diff
==============================================================================
---
jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheListenerMockImpl.java
(original)
+++
jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheListenerMockImpl.java
Tue Aug 22 08:19:11 2006
@@ -1,5 +1,16 @@
package org.apache.jcs.auxiliary.remote;
+/*
+ * Copyright 2001-2004 The Apache Software Foundation. Licensed under the
Apache
+ * License, Version 2.0 (the "License") you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
+ * or agreed to in writing, software distributed under the License is
+ * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+
import java.io.IOException;
import java.io.Serializable;
Modified:
jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheUnitTest.java
URL:
http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheUnitTest.java?rev=433672&r1=433671&r2=433672&view=diff
==============================================================================
---
jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheUnitTest.java
(original)
+++
jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteCacheUnitTest.java
Tue Aug 22 08:19:11 2006
@@ -1,5 +1,16 @@
package org.apache.jcs.auxiliary.remote;
+/*
+ * Copyright 2001-2004 The Apache Software Foundation. Licensed under the
Apache
+ * License, Version 2.0 (the "License") you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
+ * or agreed to in writing, software distributed under the License is
+ * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+
import junit.framework.TestCase;
import org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheAttributes;
Modified:
jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteUtilsUnitTest.java
URL:
http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteUtilsUnitTest.java?rev=433672&r1=433671&r2=433672&view=diff
==============================================================================
---
jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteUtilsUnitTest.java
(original)
+++
jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/RemoteUtilsUnitTest.java
Tue Aug 22 08:19:11 2006
@@ -1,5 +1,16 @@
package org.apache.jcs.auxiliary.remote;
+/*
+ * Copyright 2001-2004 The Apache Software Foundation. Licensed under the
Apache
+ * License, Version 2.0 (the "License") you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
+ * or agreed to in writing, software distributed under the License is
+ * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+
import java.rmi.RemoteException;
import junit.framework.TestCase;
Modified:
jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/TestRemoteCache.java
URL:
http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/TestRemoteCache.java?rev=433672&r1=433671&r2=433672&view=diff
==============================================================================
---
jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/TestRemoteCache.java
(original)
+++
jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/TestRemoteCache.java
Tue Aug 22 08:19:11 2006
@@ -1,5 +1,16 @@
package org.apache.jcs.auxiliary.remote;
+/*
+ * Copyright 2001-2004 The Apache Software Foundation. Licensed under the
Apache
+ * License, Version 2.0 (the "License") you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
+ * or agreed to in writing, software distributed under the License is
+ * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+
import junit.framework.TestCase;
import org.apache.commons.logging.Log;
Modified:
jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/ZombieRemoteCacheServiceUnitTest.java
URL:
http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/ZombieRemoteCacheServiceUnitTest.java?rev=433672&r1=433671&r2=433672&view=diff
==============================================================================
---
jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/ZombieRemoteCacheServiceUnitTest.java
(original)
+++
jakarta/jcs/trunk/src/test/org/apache/jcs/auxiliary/remote/ZombieRemoteCacheServiceUnitTest.java
Tue Aug 22 08:19:11 2006
@@ -1,5 +1,16 @@
package org.apache.jcs.auxiliary.remote;
+/*
+ * Copyright 2001-2004 The Apache Software Foundation. Licensed under the
Apache
+ * License, Version 2.0 (the "License") you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
+ * or agreed to in writing, software distributed under the License is
+ * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+
import junit.framework.TestCase;
import org.apache.jcs.engine.CacheElement;
Modified:
jakarta/jcs/trunk/src/test/org/apache/jcs/utils/struct/BoundedQueueUnitTest.java
URL:
http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/test/org/apache/jcs/utils/struct/BoundedQueueUnitTest.java?rev=433672&r1=433671&r2=433672&view=diff
==============================================================================
---
jakarta/jcs/trunk/src/test/org/apache/jcs/utils/struct/BoundedQueueUnitTest.java
(original)
+++
jakarta/jcs/trunk/src/test/org/apache/jcs/utils/struct/BoundedQueueUnitTest.java
Tue Aug 22 08:19:11 2006
@@ -1,5 +1,16 @@
package org.apache.jcs.utils.struct;
+/*
+ * Copyright 2001-2004 The Apache Software Foundation. Licensed under the
Apache
+ * License, Version 2.0 (the "License") you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
+ * or agreed to in writing, software distributed under the License is
+ * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+
import junit.framework.TestCase;
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]