tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmar...@apache.org
Subject svn commit: r471450 - /incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/
Date Sun, 05 Nov 2006 15:52:37 GMT
Author: jmarino
Date: Sun Nov  5 07:52:36 2006
New Revision: 471450

URL: http://svn.apache.org/viewvc?view=rev&rev=471450
Log:
more javadoc for the data source service

Modified:
    incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/DSComponentTypeLoader.java
    incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/DataSourceImplementationLoader.java
    incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/DataSourceProvider.java
    incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/PropertyEditorNotFoundException.java
    incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/ProviderException.java
    incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/ProviderObjectFactory.java

Modified: incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/DSComponentTypeLoader.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/DSComponentTypeLoader.java?view=diff&rev=471450&r1=471449&r2=471450
==============================================================================
--- incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/DSComponentTypeLoader.java
(original)
+++ incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/DSComponentTypeLoader.java
Sun Nov  5 07:52:36 2006
@@ -33,6 +33,9 @@
 import org.apache.tuscany.spi.model.ServiceDefinition;
 
 /**
+ * Loads the component type for a DataSource component. Component type information is currently
static, although this
+ * could be changed in the future to allow for configuration parameter checking for specific
providers.
+ *
  * @version $Rev$ $Date$
  */
 public class DSComponentTypeLoader extends ComponentTypeLoaderExtension<DataSourceImplementation>
{

Modified: incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/DataSourceImplementationLoader.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/DataSourceImplementationLoader.java?view=diff&rev=471450&r1=471449&r2=471450
==============================================================================
--- incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/DataSourceImplementationLoader.java
(original)
+++ incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/DataSourceImplementationLoader.java
Sun Nov  5 07:52:36 2006
@@ -33,9 +33,27 @@
 import org.apache.tuscany.spi.model.ModelObject;
 
 /**
- * Loads a data source component type from an assembly
+ * Loads a DataSource component type from an assembly. This component implementation type
provides a
+ * <code>DataSource</code> system service in the runtime. The actual DataSource
provider is pluggable, for example,
+ * Commons DBCP could be used. DataSource components are configured as follows:
+ * <pre>
  * <p/>
- * TODO document format
+ *      <component name="MyDataSource">
+ *          <system:implementation.ds provider="org.foo.FooProvider">
+ *              <driverClassName>com.mysql.jdbc.Driver</driverClassName>
+ *              <url>jdbc:mysql://localhost:3306/mydb</url>
+ *              <login>foo</login>
+ *              <password>bar</password>
+ *          </system:implementation.ds>
+ *      </component>
+ * <p/>
+ * </pre>
+ * In the above example, <code>org.foo.FooProvider</code> is responsible for
providing the actual DataSource
+ * implementation. It may implement <code>javax.sql.DataSource</code> directly
or the {@link DataSourceProvider}
+ * interface and must have a public no-args constructor. Configuration parameters are specified
as sub-elements of
+ * <code>implementation.ds</code> and will vary by the provider. Parameter values
are generally simple types and will be
+ * instantiated using the JavaBeans <code>PropertyEditorManager</code>. Values
will be set on the provider class using
+ * JavaBeans setter methods.
  *
  * @version $Rev$ $Date$
  */

Modified: incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/DataSourceProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/DataSourceProvider.java?view=diff&rev=471450&r1=471449&r2=471450
==============================================================================
--- incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/DataSourceProvider.java
(original)
+++ incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/DataSourceProvider.java
Sun Nov  5 07:52:36 2006
@@ -28,7 +28,7 @@
 public interface DataSourceProvider {
 
     /**
-     * Signals to the provider to initialize
+     * Signals to the provider to initialize after all parameters have been set
      *
      * @throws ProviderException if an exception occurs during initialization
      */
@@ -42,7 +42,8 @@
     void close() throws ProviderException;
 
     /**
-     * Returns a new <code>DataSource</code> instance
+     * Returns a new <code>DataSource</code> instance that will be bound into
a composite system service tree. Called
+     * after initialize.
      *
      * @throws ProviderException if an error occurs creating a new instance
      */

Modified: incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/PropertyEditorNotFoundException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/PropertyEditorNotFoundException.java?view=diff&rev=471450&r1=471449&r2=471450
==============================================================================
--- incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/PropertyEditorNotFoundException.java
(original)
+++ incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/PropertyEditorNotFoundException.java
Sun Nov  5 07:52:36 2006
@@ -21,6 +21,8 @@
 import org.apache.tuscany.spi.builder.BuilderConfigException;
 
 /**
+ * Thrown when an editor is not found for a parameter type
+ *
  * @version $Rev$ $Date$
  */
 public class PropertyEditorNotFoundException extends BuilderConfigException {

Modified: incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/ProviderException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/ProviderException.java?view=diff&rev=471450&r1=471449&r2=471450
==============================================================================
--- incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/ProviderException.java
(original)
+++ incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/ProviderException.java
Sun Nov  5 07:52:36 2006
@@ -21,7 +21,7 @@
 import org.apache.tuscany.api.TuscanyException;
 
 /**
- * Denots an error during a provider callback
+ * Denotes an error during a provider callback
  *
  * @version $Rev$ $Date$
  */

Modified: incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/ProviderObjectFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/ProviderObjectFactory.java?view=diff&rev=471450&r1=471449&r2=471450
==============================================================================
--- incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/ProviderObjectFactory.java
(original)
+++ incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/ProviderObjectFactory.java
Sun Nov  5 07:52:36 2006
@@ -26,11 +26,10 @@
 import org.apache.tuscany.spi.ObjectFactory;
 
 /**
- * Responsible for instantiating a DataSource provider class. The provider class is responsible
for initializing the
- * actual <code>DataSource</code> . It must have a no-args constructor and may
optionally implement {@link
- * DataSourceProvider}. If it does not implement <code>DataSourceProvider</code>,
then the provider class must implement
- * the <code>DataSource<code> interface. A collection of {@link Injector}s is
provide to inject the provider instance
- * with configuration parameters.
+ * Responsible for instantiating a DataSource provider class and initializing the actual
<code>DataSource</code> . It
+ * must have a no-args constructor and may optionally implement {@link DataSourceProvider}.
If it does not implement
+ * <code>DataSourceProvider</code>, then the provider class must implement the
<code>DataSource<code> interface. A
+ * collection of {@link Injector}s is used to inject the provider instance with configuration
parameters.
  *
  * @version $Rev$ $Date$
  */



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message