weaver 2004/04/19 14:08:01
Modified: components/cm/src/java/org/apache/jetspeed/components Tag:
NANOCONTAINER_DEPLOYER ContainerManagement.java
ComponentManager.java InterceptorAdapter.java
components/jetspeed Tag: NANOCONTAINER_DEPLOYER project.xml
project.properties
components/cm/src/java/org/apache/jetspeed/components/util
Tag: NANOCONTAINER_DEPLOYER NanoQuickAssembler.java
Added: components/cm/src/java/org/apache/jetspeed/components Tag:
NANOCONTAINER_DEPLOYER
MultiStartPicoContainerWrapper.java
NanoDeployerBasedTestSuite.java
Log:
starting new branch for using nano deployer
Revision Changes Path
No revision
No revision
1.2.2.1 +3 -1
jakarta-jetspeed-2/components/cm/src/java/org/apache/jetspeed/components/ContainerManagement.java
Index: ContainerManagement.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/components/cm/src/java/org/apache/jetspeed/components/ContainerManagement.java,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- ContainerManagement.java 8 Mar 2004 00:42:51 -0000 1.2
+++ ContainerManagement.java 19 Apr 2004 21:08:01 -0000 1.2.2.1
@@ -34,6 +34,8 @@
Collection getContainers();
+ void killContainer();
+
// void addContainer(String containerName, MutablePicoContainer container);
// void removeContainer(String containerName);
1.4.2.1 +13 -38
jakarta-jetspeed-2/components/cm/src/java/org/apache/jetspeed/components/ComponentManager.java
Index: ComponentManager.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/components/cm/src/java/org/apache/jetspeed/components/ComponentManager.java,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- ComponentManager.java 8 Mar 2004 00:42:51 -0000 1.4
+++ ComponentManager.java 19 Apr 2004 21:08:01 -0000 1.4.2.1
@@ -43,30 +43,18 @@
{
private MutablePicoContainer rootContainer;
+ protected ScriptedContainerBuilder containerBuilder;
- /**
- * @param arg0
- * @param arg1
- * @param arg2
- * @throws java.io.IOException
- * @throws java.lang.ClassNotFoundException
- */
- public ComponentManager(File arg0, PicoContainer arg1, ClassLoader arg2) throws
IOException, ClassNotFoundException
- {
- super(arg0, arg1, arg2);
- }
-
- /**
- * @param arg0
- * @param arg1
- * @throws java.io.IOException
- * @throws java.lang.ClassNotFoundException
+ /* (non-Javadoc)
+ * @see org.apache.jetspeed.components.ContainerManagement#killContainer()
*/
- public ComponentManager(File arg0, PicoContainer arg1) throws IOException,
ClassNotFoundException
+ public void killContainer()
{
- super(arg0, arg1);
+ ObjectReference ref = new SimpleReference();
+ ref.set(rootContainer);
+ containerBuilder.killContainer(ref);
}
-
+
/**
* @param arg0
* @throws java.io.IOException
@@ -85,7 +73,7 @@
*/
public ComponentManager(Reader arg0, String arg1, ClassLoader arg2) throws
ClassNotFoundException
{
- super(arg0, arg1, arg2);
+ super(arg0, arg1.startsWith(".")?getBuilderClassName(arg1):arg1, arg2);
}
/**
@@ -95,20 +83,7 @@
*/
public ComponentManager(Reader arg0, String arg1) throws ClassNotFoundException
{
- super(arg0, arg1);
- }
-
- /**
- * @param arg0
- * @param arg1
- * @param arg2
- * @param arg3
- * @throws java.lang.ClassNotFoundException
- */
- public ComponentManager(Reader arg0, String arg1, PicoContainer arg2,
ClassLoader arg3) throws ClassNotFoundException
- {
- super(arg0, arg1, arg2, arg3);
-
+ super(arg0, arg1.startsWith(".")?getBuilderClassName(arg1):arg1);
}
/**
@@ -125,8 +100,8 @@
if(rootContainer == null)
{
ObjectReference containerRef = new SimpleReference();
- ScriptedContainerBuilder scb = this.getContainerBuilder();
- scb.buildContainer(containerRef, null, "jetspeed");
+ containerBuilder = this.getContainerBuilder();
+ containerBuilder.buildContainer(containerRef, null, "jetspeed");
rootContainer = (MutablePicoContainer) containerRef.get();
}
1.3.2.1 +12 -11
jakarta-jetspeed-2/components/cm/src/java/org/apache/jetspeed/components/InterceptorAdapter.java
Index: InterceptorAdapter.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/components/cm/src/java/org/apache/jetspeed/components/InterceptorAdapter.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- InterceptorAdapter.java 25 Mar 2004 21:40:23 -0000 1.3
+++ InterceptorAdapter.java 19 Apr 2004 21:08:01 -0000 1.3.2.1
@@ -15,19 +15,19 @@
*/
package org.apache.jetspeed.components;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+
import org.picocontainer.ComponentAdapter;
import org.picocontainer.PicoInitializationException;
import org.picocontainer.PicoIntrospectionException;
import org.picocontainer.defaults.AssignabilityRegistrationException;
+import org.picocontainer.defaults.ClassHierarchyIntrospector;
import org.picocontainer.defaults.ImplementationHidingComponentAdapter;
-import org.picocontainer.defaults.InterfaceFinder;
import org.picocontainer.defaults.NotConcreteRegistrationException;
import org.picocontainer.defaults.Swappable;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-
/**
* InterceptorAdaptor
*
@@ -40,7 +40,7 @@
{
super(delegate);
}
- private final InterfaceFinder interfaceFinder = new InterfaceFinder();
+
public Object getComponentInstance()
throws
PicoInitializationException,
@@ -58,7 +58,7 @@
else
{
interfaces =
- interfaceFinder.getInterfaces(
+ ClassHierarchyIntrospector.getAllInterfaces(
getDelegate().getComponentImplementation());
}
Class[] swappableAugmentedInterfaces = new Class[interfaces.length + 1];
@@ -103,7 +103,7 @@
Class declaringClass = method.getDeclaringClass();
if (declaringClass.equals(Object.class))
{
- if (method.equals(InterfaceFinder.hashCode))
+ if (method.equals(ClassHierarchyIntrospector.hashCode))
{
// Return the hashCode of ourself, as Proxy.newProxyInstance()
may
// return cached proxies. We want a unique hashCode for each
created proxy!
@@ -111,7 +111,8 @@
System.identityHashCode(
DelegatingInvocationHandler.this));
}
- if (method.equals(InterfaceFinder.equals))
+ if (method.equals(ClassHierarchyIntrospector.equals))
+
{
return new Boolean(proxy == args[0]);
}
@@ -132,7 +133,7 @@
return method.invoke(delegatedInstance, args);
}
}
- public Object __hotSwap(Object newSubject)
+ public Object hotswap(Object newSubject)
{
Object result = delegatedInstance;
delegatedInstance = newSubject;
No revision
Index: InterceptorAdapter.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/components/cm/src/java/org/apache/jetspeed/components/InterceptorAdapter.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- InterceptorAdapter.java 25 Mar 2004 21:40:23 -0000 1.3
+++ InterceptorAdapter.java 19 Apr 2004 21:08:01 -0000 1.3.2.1
@@ -15,19 +15,19 @@
*/
package org.apache.jetspeed.components;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+
import org.picocontainer.ComponentAdapter;
import org.picocontainer.PicoInitializationException;
import org.picocontainer.PicoIntrospectionException;
import org.picocontainer.defaults.AssignabilityRegistrationException;
+import org.picocontainer.defaults.ClassHierarchyIntrospector;
import org.picocontainer.defaults.ImplementationHidingComponentAdapter;
-import org.picocontainer.defaults.InterfaceFinder;
import org.picocontainer.defaults.NotConcreteRegistrationException;
import org.picocontainer.defaults.Swappable;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-
/**
* InterceptorAdaptor
*
@@ -40,7 +40,7 @@
{
super(delegate);
}
- private final InterfaceFinder interfaceFinder = new InterfaceFinder();
+
public Object getComponentInstance()
throws
PicoInitializationException,
@@ -58,7 +58,7 @@
else
{
interfaces =
- interfaceFinder.getInterfaces(
+ ClassHierarchyIntrospector.getAllInterfaces(
getDelegate().getComponentImplementation());
}
Class[] swappableAugmentedInterfaces = new Class[interfaces.length + 1];
@@ -103,7 +103,7 @@
Class declaringClass = method.getDeclaringClass();
if (declaringClass.equals(Object.class))
{
- if (method.equals(InterfaceFinder.hashCode))
+ if (method.equals(ClassHierarchyIntrospector.hashCode))
{
// Return the hashCode of ourself, as Proxy.newProxyInstance()
may
// return cached proxies. We want a unique hashCode for each
created proxy!
@@ -111,7 +111,8 @@
System.identityHashCode(
DelegatingInvocationHandler.this));
}
- if (method.equals(InterfaceFinder.equals))
+ if (method.equals(ClassHierarchyIntrospector.equals))
+
{
return new Boolean(proxy == args[0]);
}
@@ -132,7 +133,7 @@
return method.invoke(delegatedInstance, args);
}
}
- public Object __hotSwap(Object newSubject)
+ public Object hotswap(Object newSubject)
{
Object result = delegatedInstance;
delegatedInstance = newSubject;
No revision
Index: InterceptorAdapter.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/components/cm/src/java/org/apache/jetspeed/components/InterceptorAdapter.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- InterceptorAdapter.java 25 Mar 2004 21:40:23 -0000 1.3
+++ InterceptorAdapter.java 19 Apr 2004 21:08:01 -0000 1.3.2.1
@@ -15,19 +15,19 @@
*/
package org.apache.jetspeed.components;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+
import org.picocontainer.ComponentAdapter;
import org.picocontainer.PicoInitializationException;
import org.picocontainer.PicoIntrospectionException;
import org.picocontainer.defaults.AssignabilityRegistrationException;
+import org.picocontainer.defaults.ClassHierarchyIntrospector;
import org.picocontainer.defaults.ImplementationHidingComponentAdapter;
-import org.picocontainer.defaults.InterfaceFinder;
import org.picocontainer.defaults.NotConcreteRegistrationException;
import org.picocontainer.defaults.Swappable;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-
/**
* InterceptorAdaptor
*
@@ -40,7 +40,7 @@
{
super(delegate);
}
- private final InterfaceFinder interfaceFinder = new InterfaceFinder();
+
public Object getComponentInstance()
throws
PicoInitializationException,
@@ -58,7 +58,7 @@
else
{
interfaces =
- interfaceFinder.getInterfaces(
+ ClassHierarchyIntrospector.getAllInterfaces(
getDelegate().getComponentImplementation());
}
Class[] swappableAugmentedInterfaces = new Class[interfaces.length + 1];
@@ -103,7 +103,7 @@
Class declaringClass = method.getDeclaringClass();
if (declaringClass.equals(Object.class))
{
- if (method.equals(InterfaceFinder.hashCode))
+ if (method.equals(ClassHierarchyIntrospector.hashCode))
{
// Return the hashCode of ourself, as Proxy.newProxyInstance()
may
// return cached proxies. We want a unique hashCode for each
created proxy!
@@ -111,7 +111,8 @@
System.identityHashCode(
DelegatingInvocationHandler.this));
}
- if (method.equals(InterfaceFinder.equals))
+ if (method.equals(ClassHierarchyIntrospector.equals))
+
{
return new Boolean(proxy == args[0]);
}
@@ -132,7 +133,7 @@
return method.invoke(delegatedInstance, args);
}
}
- public Object __hotSwap(Object newSubject)
+ public Object hotswap(Object newSubject)
{
Object result = delegatedInstance;
delegatedInstance = newSubject;
1.1.2.1 +242 -0
jakarta-jetspeed-2/components/cm/src/java/org/apache/jetspeed/components/Attic/MultiStartPicoContainerWrapper.java
1.1.2.1 +179 -0
jakarta-jetspeed-2/components/cm/src/java/org/apache/jetspeed/components/Attic/NanoDeployerBasedTestSuite.java
No revision
No revision
1.5.2.1 +2 -2 jakarta-jetspeed-2/components/jetspeed/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/jakarta-jetspeed-2/components/jetspeed/project.xml,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -r1.5 -r1.5.2.1
--- project.xml 31 Mar 2004 22:31:55 -0000 1.5
+++ project.xml 19 Apr 2004 21:08:01 -0000 1.5.2.1
@@ -64,7 +64,7 @@
</dependency>
<dependency>
<id>picocontainer</id>
- <version>1.0-beta-5-SNAPSHOT</version>
+ <version>1.0-RC-1-SNAPSHOT</version>
<properties>
<war.bundle.jar>true</war.bundle.jar>
</properties>
@@ -75,7 +75,7 @@
<properties>
<war.bundle.jar>true</war.bundle.jar>
</properties>
- </dependency>
+ </dependency>
<dependency>
<id>asm</id>
<version>1.4.1</version>
1.4.2.1 +1 -1 jakarta-jetspeed-2/components/jetspeed/project.properties
Index: project.properties
===================================================================
RCS file: /home/cvs/jakarta-jetspeed-2/components/jetspeed/project.properties,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- project.properties 29 Mar 2004 04:53:32 -0000 1.4
+++ project.properties 19 Apr 2004 21:08:01 -0000 1.4.2.1
@@ -13,7 +13,7 @@
# limitations under the License.
# Remote repos
-maven.repo.remote = http://www.bluesunrise.com/maven/, http://www.ibiblio.org/maven/
+maven.repo.remote = http://www.bluesunrise.com/maven/,
http://www.ibiblio.org/maven/, http://dist.codehaus.org
# Display the date on the Maven web site
maven.xdoc.date = left
No revision
No revision
1.1.2.1 +11 -10
jakarta-jetspeed-2/components/cm/src/java/org/apache/jetspeed/components/util/NanoQuickAssembler.java
Index: NanoQuickAssembler.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/components/cm/src/java/org/apache/jetspeed/components/util/NanoQuickAssembler.java,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- NanoQuickAssembler.java 9 Mar 2004 16:11:52 -0000 1.1
+++ NanoQuickAssembler.java 19 Apr 2004 21:08:01 -0000 1.1.2.1
@@ -1,17 +1,17 @@
/*
* Copyright 2000-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
+ * 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
+ * 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.
+ * 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.
*/
package org.apache.jetspeed.components.util;
@@ -61,7 +61,8 @@
Reader scriptReader = new
InputStreamReader(cl.getResourceAsStream(scriptName));
ObjectReference parentRef = new SimpleReference();
ObjectReference containerRef = new SimpleReference();
- NanoContainer nano = new NanoContainer(scriptReader, NanoContainer.GROOVY
,parent, cl);
+ NanoContainer nano = new NanoContainer(scriptReader,
NanoContainer.getBuilderClassName(NanoContainer.GROOVY) , cl);
+ parentRef.set(parent);
nano.getContainerBuilder().buildContainer(containerRef, parentRef, scope);
return (MutablePicoContainer) containerRef.get();
}
@@ -87,4 +88,4 @@
return assemble(cl, scriptName, parent, "jetspeed");
}
-}
+}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]