You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polygene.apache.org by ni...@apache.org on 2017/02/26 14:22:48 UTC

[1/3] polygene-java git commit: Added a bit of documentation for Configuration

Repository: polygene-java
Updated Branches:
  refs/heads/develop 9bae5065e -> d13c322e0


Added a bit of documentation for Configuration


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/d13c322e
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/d13c322e
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/d13c322e

Branch: refs/heads/develop
Commit: d13c322e0e6a12f3ddf882df6a7b34ab57f1ee2c
Parents: dde2cc3
Author: niclas <ni...@spicter.com>
Authored: Sun Feb 26 22:18:56 2017 +0800
Committer: niclas <ni...@spicter.com>
Committed: Sun Feb 26 22:22:44 2017 +0800

----------------------------------------------------------------------
 core/api/src/docs/configuration.txt | 28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/d13c322e/core/api/src/docs/configuration.txt
----------------------------------------------------------------------
diff --git a/core/api/src/docs/configuration.txt b/core/api/src/docs/configuration.txt
index 6a6d1e5..2d9281e 100644
--- a/core/api/src/docs/configuration.txt
+++ b/core/api/src/docs/configuration.txt
@@ -21,9 +21,16 @@ The Configuration system itself will handle all the details with interfacing wit
 The normal UnitOfWork management is used, but handled internally by the configuration system.
 
 In Polygene, Configuration are strongly typed and refactoring-friendly. Configuration is read from the entity store, but if
-it can not be found, then it will try to bootstrap it from a properties file, with the same name as the
+it can not be found, then it will try to bootstrap it from the file system, with the same name as the
 ServiceDescriptor.identifiedBy(), which is set during <<core-bootstrap-assembly>> and defaults to the fully qualified
-classname of the <<core-api-service>> type.
+classname of the <<core-api-service>> type, followed by an extension dependent on the file type.
+
+The following file types for default configuration is supported (listed in read priority order);
+
+1. Java Properties
+2. JSON
+3. YAML
+4. XML
 
 == Defining a Configuration Type ==
 The Configuration type is simply listing the properties that are available. The standard rules on @UseDefaults and
@@ -36,6 +43,23 @@ source=core/api/src/test/java/org/apache/polygene/api/configuration/MailServiceC
 tag=configuration
 --------------
 
+== Default Configuration formats ==
+The default configuration read will happen if the Entity Store backing the Configuration system does not contain the
+identifiable configuration. That will trigger the reading attempts of the supported configuration formats. Once the
+configuration is parsed from the file system it is written to the Entity Store, and if the Entity Store is not
+ephemeral, then on the next start, any changes to the configuration will NOT be detected, and will simply be ignored.
+
+To be able to read JSON, YAML and XML configuration, you must configure a ValueSerialization system that supports
+the configuration format that you want to use.
+
+* extension/valueserialization-jackson supports JSON
+* extension/valueserialization-stax supports XML
+
+== Support for Complex Types ==
+Since the regular Value Serialization platform is used, for JSON, YAML and XML, the configuration can contain
+arbitrary composite types. This is not true for the Java properties file format.
+
+
 == Using a Configuration Type ==
 It is important to remember that Configuration is not static values that are set prior to application start-up and
 therefor applications should not cache the values retrieved forever, but consciously know when the configuration should


Re: [2/3] polygene-java git commit: Updated the devstatus for the Cassandra ES.

Posted by Niclas Hedhman <ni...@hedhman.org>.
Ok, good to know for next time.

On Mon, Feb 27, 2017 at 7:22 AM, Paul Merlin <pa...@apache.org> wrote:

> Le 2017-02-27 00:07, Niclas Hedhman a écrit :
>
>> I thought all needed was good, and the thing I didn't get right was the
>> @ClassRule, but otherwise I think it is good to go. Or?
>>
>
> After your change https://github.com/apache/polygene-java/commit/36cef00a,
> adding the DockerRule junit @ClassRule, the cassandra image is run in a
> docker container around tests.
>
> But the Cassandra ES was still trying the default host and port, failing
> here because I'm not running it locally. The only thing missing was to get
> the host and port allocated to the docker service and set them to the
> Cassandra ES config: https://github.com/apache/poly
> gene-java/commit/30c5ff23
>
>
>


-- 
Niclas Hedhman, Software Developer
http://polygene.apache.org <http://zest.apache.org> - New Energy for Java

Re: [2/3] polygene-java git commit: Updated the devstatus for the Cassandra ES.

Posted by Paul Merlin <pa...@apache.org>.
Le 2017-02-27 00:07, Niclas Hedhman a �crit�:
> I thought all needed was good, and the thing I didn't get right was the
> @ClassRule, but otherwise I think it is good to go. Or?

After your change 
https://github.com/apache/polygene-java/commit/36cef00a, adding the 
DockerRule junit @ClassRule, the cassandra image is run in a docker 
container around tests.

But the Cassandra ES was still trying the default host and port, failing 
here because I'm not running it locally. The only thing missing was to 
get the host and port allocated to the docker service and set them to 
the Cassandra ES config: 
https://github.com/apache/polygene-java/commit/30c5ff23



Re: [2/3] polygene-java git commit: Updated the devstatus for the Cassandra ES.

Posted by Niclas Hedhman <ni...@hedhman.org>.
I thought all needed was good, and the thing I didn't get right was the
@ClassRule, but otherwise I think it is good to go. Or?

On Mon, Feb 27, 2017 at 12:27 AM, Paul Merlin <pa...@apache.org> wrote:

> Le 2017-02-26 15:22, niclas@apache.org a écrit :
>
>> Updated the devstatus for the Cassandra ES.
>>
>>          <!-- none, brief, good, complete -->
>> -        <documentation>none</documentation>
>> +        <documentation>good</documentation>
>>
>>          <!-- none, some, good, complete -->
>> -        <unittests>none</unittests>
>> +        <unittests>good</unittests>
>>
>
> Now that we have the infrastructure to do integration testing, we should
> not flag tests as 'good' when they are not run by the test suite.
> We need a docker based test of the new Cassandra ES.
>
> Here are the steps involved:
> - declare which docker image to use in ~/dependencies.gradle (at the
> bottom of the file)
> - add internals/testsupport-internal/src/main/docker/cassandra/Dockerfile
> (see the other Dockerfiles for inspiration)
> - depend on polygene.internals.testsupport instead of
> polygene.core.testsupport, this provides our JUnit DockerRule
> - add the DockerRule and host/port settings to the test (see other docker
> based tests for inspiration)
>
> I'm pushing this also for me not to be the only one knowing how to do this
> :)
>
> Cheers
>
> /Paul
>
>


-- 
Niclas Hedhman, Software Developer
http://polygene.apache.org <http://zest.apache.org> - New Energy for Java

Re: [2/3] polygene-java git commit: Updated the devstatus for the Cassandra ES.

Posted by Paul Merlin <pa...@apache.org>.
Le 2017-02-26 15:22, niclas@apache.org a �crit�:
> Updated the devstatus for the Cassandra ES.
> 
>          <!-- none, brief, good, complete -->
> -        <documentation>none</documentation>
> +        <documentation>good</documentation>
> 
>          <!-- none, some, good, complete -->
> -        <unittests>none</unittests>
> +        <unittests>good</unittests>

Now that we have the infrastructure to do integration testing, we should 
not flag tests as 'good' when they are not run by the test suite.
We need a docker based test of the new Cassandra ES.

Here are the steps involved:
- declare which docker image to use in ~/dependencies.gradle (at the 
bottom of the file)
- add 
internals/testsupport-internal/src/main/docker/cassandra/Dockerfile (see 
the other Dockerfiles for inspiration)
- depend on polygene.internals.testsupport instead of 
polygene.core.testsupport, this provides our JUnit DockerRule
- add the DockerRule and host/port settings to the test (see other 
docker based tests for inspiration)

I'm pushing this also for me not to be the only one knowing how to do 
this :)

Cheers

/Paul


[2/3] polygene-java git commit: Updated the devstatus for the Cassandra ES.

Posted by ni...@apache.org.
Updated the devstatus for the Cassandra ES.


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/dde2cc37
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/dde2cc37
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/dde2cc37

Branch: refs/heads/develop
Commit: dde2cc376d5b09f2fad2315a4f629580bb970f3d
Parents: 4252d3d
Author: niclas <ni...@spicter.com>
Authored: Sun Feb 26 22:16:12 2017 +0800
Committer: niclas <ni...@spicter.com>
Committed: Sun Feb 26 22:22:44 2017 +0800

----------------------------------------------------------------------
 extensions/entitystore-cassandra/dev-status.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/dde2cc37/extensions/entitystore-cassandra/dev-status.xml
----------------------------------------------------------------------
diff --git a/extensions/entitystore-cassandra/dev-status.xml b/extensions/entitystore-cassandra/dev-status.xml
index aac41cc..c0ac593 100644
--- a/extensions/entitystore-cassandra/dev-status.xml
+++ b/extensions/entitystore-cassandra/dev-status.xml
@@ -27,10 +27,10 @@
         <codebase>early</codebase>
 
         <!-- none, brief, good, complete -->
-        <documentation>none</documentation>
+        <documentation>good</documentation>
 
         <!-- none, some, good, complete -->
-        <unittests>none</unittests>
+        <unittests>good</unittests>
     </status>
     <licenses>
         <license>ALv2</license>


[3/3] polygene-java git commit: Superfluous "public abstract" removed

Posted by ni...@apache.org.
Superfluous "public abstract" removed


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/4252d3dd
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/4252d3dd
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/4252d3dd

Branch: refs/heads/develop
Commit: 4252d3ddaa44055559f979b4abd900bff0882b9b
Parents: 9bae506
Author: niclas <ni...@spicter.com>
Authored: Sun Feb 26 22:14:42 2017 +0800
Committer: niclas <ni...@spicter.com>
Committed: Sun Feb 26 22:22:44 2017 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/polygene/api/injection/scope/State.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/4252d3dd/core/api/src/main/java/org/apache/polygene/api/injection/scope/State.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/injection/scope/State.java b/core/api/src/main/java/org/apache/polygene/api/injection/scope/State.java
index ab60507..e326969 100644
--- a/core/api/src/main/java/org/apache/polygene/api/injection/scope/State.java
+++ b/core/api/src/main/java/org/apache/polygene/api/injection/scope/State.java
@@ -50,5 +50,5 @@ public @interface State
      *
      * @return the name
      */
-    public abstract String value() default "";
+    String value() default "";
 }
\ No newline at end of file