Author: kylem
Date: Fri Apr 1 10:57:07 2005
New Revision: 159717
URL: http://svn.apache.org/viewcvs?view=rev&rev=159717
Log:
Reenabled low-level SPI for control instantiation, allowing other bean-oriented
frameworks (such as HiveMind or Spring) to be plugged in to instantiate,
configure, and add services for Controls. I'll be working on creating a couple
of sample provider implementations plus a sample app that uses them.
This created a new dependency for Controls on Commons Discovery, which provides
the SPI discovery mechanism. Since there are now dependencies on Discovery
from WSM, NetUI, and Controls, it has been moved to lib/commons in the
distribution, along with Commons Logging (upon which Discovery depends).
Added:
incubator/beehive/trunk/external/commons/commons-logging-1.0.4.jar (with
props)
Modified:
incubator/beehive/trunk/ant/axis-import.xml
incubator/beehive/trunk/beehive-imports.xml
incubator/beehive/trunk/controls/src/api/org/apache/beehive/controls/api/bean/Controls.java
incubator/beehive/trunk/controls/test/dist-test/common/controls-test-imports.xml
incubator/beehive/trunk/distribution.xml
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_building.xml
incubator/beehive/trunk/wsm/drt/build.xml
Modified: incubator/beehive/trunk/ant/axis-import.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/ant/axis-import.xml?view=diff&r1=159716&r2=159717
==============================================================================
--- incubator/beehive/trunk/ant/axis-import.xml (original)
+++ incubator/beehive/trunk/ant/axis-import.xml Fri Apr 1 10:57:07 2005
@@ -9,11 +9,11 @@
<include name="wsdl4j.jar"/>
<include name="saaj.jar"/>
<include name="jaxrpc.jar"/>
- <include name="commons-logging.jar"/>
- <include name="commons-discovery.jar"/>
<include name="axis-ant.jar"/>
<include name="axis.jar"/>
</fileset>
+ <path refid="commons-discovery.dependency.path"/>
+ <path refid="commons-logging.dependency.path"/>
</path>
<macrodef name="deploy-webservice-runtime">
@@ -21,8 +21,10 @@
<sequential>
<copy todir="@{appdir}" failOnError="true">
<fileset refid="webservice.jars"/>
+ <fileset refid="commons-discovery.fileset"/>
+ <fileset refid="commons-logging.fileset"/>
</copy>
</sequential>
</macrodef>
-</project>
\ No newline at end of file
+</project>
Modified: incubator/beehive/trunk/beehive-imports.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/beehive-imports.xml?view=diff&r1=159716&r2=159717
==============================================================================
--- incubator/beehive/trunk/beehive-imports.xml (original)
+++ incubator/beehive/trunk/beehive-imports.xml Fri Apr 1 10:57:07 2005
@@ -52,6 +52,9 @@
<fileset id="commons-discovery.fileset"
file="${beehive.home}/external/commons/commons-discovery-0.2.jar"/>
+ <fileset id="commons-logging.fileset"
+ file="${beehive.home}/external/commons/commons-logging-1.0.4.jar"/>
+
<fileset id="log4j.fileset"
file="${beehive.home}/external/log4j/log4j-1.2.8.jar"/>
<fileset id="xbean.fileset"
file="${beehive.home}/external/xmlbeans/apache-xbean.jar"/>
@@ -81,6 +84,10 @@
<path id="commons-discovery.dependency.path">
<fileset refid="commons-discovery.fileset"/>
+ </path>
+
+ <path id="commons-logging.dependency.path">
+ <fileset refid="commons-logging.fileset"/>
</path>
<path id="log4j.dependency.path">
Modified:
incubator/beehive/trunk/controls/src/api/org/apache/beehive/controls/api/bean/Controls.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/controls/src/api/org/apache/beehive/controls/api/bean/Controls.java?view=diff&r1=159716&r2=159717
==============================================================================
---
incubator/beehive/trunk/controls/src/api/org/apache/beehive/controls/api/bean/Controls.java
(original)
+++
incubator/beehive/trunk/controls/src/api/org/apache/beehive/controls/api/bean/Controls.java
Fri Apr 1 10:57:07 2005
@@ -25,7 +25,7 @@
import org.apache.beehive.controls.spi.bean.ControlFactory;
import org.apache.beehive.controls.spi.bean.JavaControlFactory;
-// import org.apache.commons.discovery.tools.DiscoverClass;
+import org.apache.commons.discovery.tools.DiscoverClass;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
@@ -36,7 +36,7 @@
*/
public class Controls
{
- final private static Class DEFAULT_FACTORY_CLASS =
JavaControlFactory.class;
+ final private static String DEFAULT_FACTORY_CLASS =
JavaControlFactory.class.getName();
/**
* Factory method for instantiating controls. Controls instantiated using
this method will be associated with the
@@ -97,8 +97,8 @@
{
try
{
- // DiscoverClass discoverer = new DiscoverClass();
- Class factoryClass = DEFAULT_FACTORY_CLASS;
+ DiscoverClass discoverer = new DiscoverClass();
+ Class factoryClass = discoverer.find( ControlFactory.class,
DEFAULT_FACTORY_CLASS );
ControlFactory factory =
(ControlFactory)factoryClass.newInstance();
return factory.instantiate( beanClass, props, context, id );
}
Modified:
incubator/beehive/trunk/controls/test/dist-test/common/controls-test-imports.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/controls/test/dist-test/common/controls-test-imports.xml?view=diff&r1=159716&r2=159717
==============================================================================
---
incubator/beehive/trunk/controls/test/dist-test/common/controls-test-imports.xml
(original)
+++
incubator/beehive/trunk/controls/test/dist-test/common/controls-test-imports.xml
Fri Apr 1 10:57:07 2005
@@ -50,10 +50,12 @@
<include name="wsdl4j.jar"/>
<include name="saaj.jar"/>
<include name="jaxrpc.jar"/>
- <include name="commons-logging.jar"/>
- <include name="commons-discovery.jar"/>
<include name="axis-ant.jar"/>
<include name="axis.jar"/>
+ </fileset>
+ <fileset id="webservice.common.jars" dir="${dist.home}/lib/commmon">
+ <include name="commons-discovery-0.2.jar"/>
+ <include name="commons-logging.jar"/>
</fileset>
</path>
Modified: incubator/beehive/trunk/distribution.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/distribution.xml?view=diff&r1=159716&r2=159717
==============================================================================
--- incubator/beehive/trunk/distribution.xml (original)
+++ incubator/beehive/trunk/distribution.xml Fri Apr 1 10:57:07 2005
@@ -251,6 +251,8 @@
<target name="build.lib">
<copy todir="${lib.dir}/common" failOnError="true">
<fileset refid="commons-codec.fileset"/>
+ <fileset refid="commons-discovery.fileset"/>
+ <fileset refid="commons-logging.fileset"/>
<fileset refid="log4j.fileset"/>
<fileset refid="xbean.fileset"/>
<fileset refid="jsr173.fileset"/>
@@ -263,7 +265,12 @@
<!-- todo: this needs to be cleaned up; axis shouldn't be in the
Beehive distribution -->
<copy todir="${lib.dir}/wsm" failOnError="true">
- <fileset dir="${beehive.home}/wsm/external" includes="**/*.jar"/>
+ <fileset dir="${beehive.home}/wsm/external">
+ <include name="**/*.jar"/>
+ <exclude name="commons-codec.jar"/>
+ <exclude name="commons-discovery.jar"/>
+ <exclude name="commons-logging.jar"/>
+ </fileset>
<fileset dir="${beehive.home}/wsm/lib" includes="**/*.jar"/>
<fileset dir="${beehive.home}/wsm/build/jars" includes="**/*.jar"/>
</copy>
@@ -274,7 +281,9 @@
</fileset>
<fileset dir="${beehive.home}/netui/build/dist/webapp">
<include name="WEB-INF/lib/*.jar"/>
- <exclude name="WEB-INF/lib/commons-codec-1.3.jar"/>
+ <exclude name="WEB-INF/lib/commons-codec-2.3.jar"/>
+ <exclude name="WEB-INF/lib/commons-discovery-0.2.jar"/>
+ <exclude name="WEB-INF/lib/commons-logging.jar"/>
<exclude name="WEB-INF/lib/apache-xbean.jar"/>
<exclude name="WEB-INF/lib/controls.jar"/>
<exclude name="WEB-INF/lib/jsr173*.jar"/>
Modified:
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_building.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_building.xml?view=diff&r1=159716&r2=159717
==============================================================================
---
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_building.xml
(original)
+++
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_building.xml
Fri Apr 1 10:57:07 2005
@@ -172,11 +172,6 @@
<td>0.2</td>
</tr>
<tr>
- <td>Jakarta Commons Discovery</td>
- <td>commons-discovery.jar</td>
- <td>0.2-dev</td>
- </tr>
- <tr>
<td>Jakarta Commons EL</td>
<td>commons-el.jar</td>
<td>1.0</td>
Added: incubator/beehive/trunk/external/commons/commons-logging-1.0.4.jar
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/external/commons/commons-logging-1.0.4.jar?view=auto&rev=159717
==============================================================================
Binary file - no diff available.
Propchange: incubator/beehive/trunk/external/commons/commons-logging-1.0.4.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: incubator/beehive/trunk/wsm/drt/build.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/build.xml?view=diff&r1=159716&r2=159717
==============================================================================
--- incubator/beehive/trunk/wsm/drt/build.xml (original)
+++ incubator/beehive/trunk/wsm/drt/build.xml Fri Apr 1 10:57:07 2005
@@ -27,7 +27,6 @@
<include name="saaj.jar"/>
<include name="jaxrpc.jar"/>
<include name="commons-logging.jar"/>
- <include name="commons-discovery.jar"/>
<include name="axis-ant.jar"/>
<include name="axis.jar"/>
</fileset>
@@ -39,6 +38,7 @@
<path refid="junit.dependency.path"/>
<path refid="tools.dependency.path"/>
<path refid="commons-codec.dependency.path"/>
+ <path refid="commons-discovery.dependency.path"/>
<pathelement location="${lib.dir}/wsdltypes.jar"/>
<pathelement location="${lib.dir}/schematypes.jar"/>