From: <bsc...@us...> - 2009-04-29 13:51:12
|
Revision: 4557 http://unicore.svn.sourceforge.net/unicore/?rev=4557&view=rev Author: bschuller Date: 2009-04-29 13:40:18 +0000 (Wed, 29 Apr 2009) Log Message: ----------- initial import of the service orchestrator component Added Paths: ----------- workflow/trunk/servorch/ workflow/trunk/servorch/LICENSE.FZJ workflow/trunk/servorch/pom.xml workflow/trunk/servorch/src/ workflow/trunk/servorch/src/main/ workflow/trunk/servorch/src/main/assembly/ workflow/trunk/servorch/src/main/assembly/deps.xml workflow/trunk/servorch/src/main/certs/ workflow/trunk/servorch/src/main/certs/demo-user.pem workflow/trunk/servorch/src/main/certs/demoadmin.jks workflow/trunk/servorch/src/main/certs/demoadmin.pem workflow/trunk/servorch/src/main/certs/demouser.jks workflow/trunk/servorch/src/main/certs/fakeca-cert.pem workflow/trunk/servorch/src/main/certs/server-cert.pem workflow/trunk/servorch/src/main/certs/server-keystore.p12 workflow/trunk/servorch/src/main/certs/server-truststore.jks workflow/trunk/servorch/src/main/certs/user-cert.pem workflow/trunk/servorch/src/main/certs/user-keystore.jks workflow/trunk/servorch/src/main/conf/ workflow/trunk/servorch/src/main/conf/logging.properties workflow/trunk/servorch/src/main/conf/security_policy.xml workflow/trunk/servorch/src/main/conf/uas.config workflow/trunk/servorch/src/main/conf/wsrflite.xml workflow/trunk/servorch/src/main/conf/xacml.config workflow/trunk/servorch/src/main/java/ workflow/trunk/servorch/src/main/java/org/ workflow/trunk/servorch/src/main/java/org/chemomentum/ workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/ workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/DynamicComponentUpdater.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/Initializable.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/Main.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/OrchestrationKernel.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/PropertyConstants.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/ServiceOrchestratorImpl.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/ServorchConstants.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/Startup.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/broker/ workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/broker/ConfigurableBroker.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/broker/IResourceBroker.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/broker/ResourceBrokerImpl.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/broker/strategies/ workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/broker/strategies/AttributeRequirement.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/broker/strategies/BasicBrokerStrategy.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/broker/strategies/BrokerStrategy.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/broker/strategies/CombinedStrategy.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/broker/strategies/ExecutionTimesBasedStrategy.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/broker/strategies/IBrokerStrategy.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/broker/strategies/RandomStrategy.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/broker/strategies/RoundRobinStrategy.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/broker/strategies/SimpleLoadBalanceStrategy.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/clients/ workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/exceptions/ workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/exceptions/NoMatchingResourceException.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/gris/ workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/gris/AttributeGathering.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/gris/GRISKernel.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/gris/GRISNotificationAdapter.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/gris/GRISNotificationAdapterImpl.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/gris/GRISNotificationConsumer.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/gris/GRISNotificationProducer.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/gris/GRISNotificationProducerHome.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/gris/GridResourceInformationServiceImpl.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/gris/LocalGridResourceInformationCache.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/gris/ResourceDB.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/gris/ResourceDiscovery.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/gris/StandardAttributeCollector.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/gris/attributes/ workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobexecution/ workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobexecution/ISupervisorManagement.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobexecution/JSAttributeCollector.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobexecution/SupervisorManagementImpl.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobexecution/js/ workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobexecution/js/JobSupervisor.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobexecution/js/SupervisorState.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobexecution/js/SupervisorStateChoosingResource.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobexecution/js/SupervisorStatePolling.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobexecution/js/SupervisorStateStopped.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobexecution/js/SupervisorStateStoringOutcomes.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobexecution/js/SupervisorStateSubmittingJob.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobmanage/ workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobmanage/AbstractOutcomeStorer.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobmanage/ExecutionResourceDescriptor.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobmanage/IJobManagement.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobmanage/IJobOutcomeStorer.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobmanage/Job.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobmanage/JobInformationService.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobmanage/JobManagementImpl.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobmanage/JobOutcomeStorerAccessService.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobmanage/JobOutcomeStorerDirect.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobmanage/JobStore.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/jobmanage/StoringResult.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/persistence/ workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/persistence/ExternalStorage.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/persistence/HsqldbDataStructure.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/persistence/HsqldbHashMap.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/persistence/HsqldbQueue.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/wamanage/ workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/wamanage/ILocationMapper.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/wamanage/IWAManagement.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/wamanage/LocationMapperAccessService.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/wamanage/LocationMapperDirect.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/wamanage/WAManagementImpl.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/wamanage/WAObject.java workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/wamanage/WAParser.java workflow/trunk/servorch/src/main/logs/ workflow/trunk/servorch/src/main/logs/README workflow/trunk/servorch/src/main/scripts/ workflow/trunk/servorch/src/main/scripts/start.sh workflow/trunk/servorch/src/main/scripts/stop.sh workflow/trunk/servorch/src/test/ workflow/trunk/servorch/src/test/java/ workflow/trunk/servorch/src/test/java/org/ workflow/trunk/servorch/src/test/java/org/chemomentum/ workflow/trunk/servorch/src/test/java/org/chemomentum/servorch/ workflow/trunk/servorch/src/test/java/org/chemomentum/servorch/test/ workflow/trunk/servorch/src/test/java/org/chemomentum/servorch/test/.cvsignore workflow/trunk/servorch/src/test/java/org/chemomentum/servorch/test/CallbackImpl.java workflow/trunk/servorch/src/test/java/org/chemomentum/servorch/test/CreateAllTSS.java workflow/trunk/servorch/src/test/java/org/chemomentum/servorch/test/CreateTSSOnStartup.java workflow/trunk/servorch/src/test/java/org/chemomentum/servorch/test/ServiceOrchestratorTestCase.java workflow/trunk/servorch/src/test/java/org/chemomentum/servorch/test/TestServiceOrchestrator.java workflow/trunk/servorch/src/test/java/org/chemomentum/servorch/test/broker/ workflow/trunk/servorch/src/test/java/org/chemomentum/servorch/test/broker/TestResourceBrokerImpl.java workflow/trunk/servorch/src/test/java/org/chemomentum/servorch/test/broker/TestStrategies.java workflow/trunk/servorch/src/test/java/org/chemomentum/servorch/test/functional/ workflow/trunk/servorch/src/test/java/org/chemomentum/servorch/test/functional/TestServiceOrchestratorRemote.java workflow/trunk/servorch/src/test/java/org/chemomentum/servorch/test/functional/TestServiceOrchestratorWithRemoteRegistry.java workflow/trunk/servorch/src/test/java/org/chemomentum/servorch/test/gris/ workflow/trunk/servorch/src/test/java/org/chemomentum/servorch/test/gris/TestAttributeGathering.java workflow/trunk/servorch/src/test/java/org/chemomentum/servorch/test/persistence/ workflow/trunk/servorch/src/test/java/org/chemomentum/servorch/test/persistence/TestExternalStorage.java workflow/trunk/servorch/src/test/java/org/chemomentum/servorch/test/persistence/TestHashMap.java workflow/trunk/servorch/src/test/java/org/chemomentum/servorch/test/persistence/TestQueue.java workflow/trunk/servorch/src/test/resources/ workflow/trunk/servorch/src/test/resources/certs/ workflow/trunk/servorch/src/test/resources/certs/c9mtestbed.jks workflow/trunk/servorch/src/test/resources/certs/demo-user.pem workflow/trunk/servorch/src/test/resources/certs/demoadmin.jks workflow/trunk/servorch/src/test/resources/certs/demoadmin.pem workflow/trunk/servorch/src/test/resources/certs/demouser.jks workflow/trunk/servorch/src/test/resources/certs/fakeca-cert.pem workflow/trunk/servorch/src/test/resources/certs/server-cert.pem workflow/trunk/servorch/src/test/resources/certs/server-keystore.p12 workflow/trunk/servorch/src/test/resources/certs/server-truststore.jks workflow/trunk/servorch/src/test/resources/certs/user-cert.pem workflow/trunk/servorch/src/test/resources/certs/user-keystore.jks workflow/trunk/servorch/src/test/resources/logging.properties workflow/trunk/servorch/src/test/resources/remoteUas.config workflow/trunk/servorch/src/test/resources/remoteWsrflite.xml workflow/trunk/servorch/src/test/resources/sample_policy.xml workflow/trunk/servorch/src/test/resources/simpleidb workflow/trunk/servorch/src/test/resources/test.uudb workflow/trunk/servorch/src/test/resources/uas.config workflow/trunk/servorch/src/test/resources/wsrflite.xml workflow/trunk/servorch/src/test/resources/xacml.config workflow/trunk/servorch/src/test/resources/xnjs.xml Added: workflow/trunk/servorch/LICENSE.FZJ =================================================================== --- workflow/trunk/servorch/LICENSE.FZJ (rev 0) +++ workflow/trunk/servorch/LICENSE.FZJ 2009-04-29 13:40:18 UTC (rev 4557) @@ -0,0 +1,32 @@ +/********************************************************************************* + * Copyright (c) 2006 Forschungszentrum Juelich GmbH + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * (1) Redistributions of source code must retain the above copyright notice, + * this list of conditions and the disclaimer at the end. Redistributions in + * binary form must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * DISCLAIMER + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + ********************************************************************************/ + Added: workflow/trunk/servorch/pom.xml =================================================================== --- workflow/trunk/servorch/pom.xml (rev 0) +++ workflow/trunk/servorch/pom.xml 2009-04-29 13:40:18 UTC (rev 4557) @@ -0,0 +1,173 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.chemomentum</groupId> + <artifactId>servorch</artifactId> + <packaging>jar</packaging> + <description>Development of the Service Orchestrator</description> + <inceptionYear>2006</inceptionYear> + <version>1.5.8-SNAPSHOT</version> + <name>ServiceOrchestrator</name> + +<!-- subversion configuration --> + <scm> + <connection>scm:svn:http://zam904.zam.kfa-juelich.de/svn/repo/chemomentum/servorch/trunk</connection> + <developerConnection>scm:svn:http://zam904.zam.kfa-juelich.de/svn/repo/chemomentum/servorch/trunk</developerConnection> + </scm> + + + <dependencies> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.chemomentum</groupId> + <artifactId>common</artifactId> + <version>1.5.12-SNAPSHOT</version> + </dependency> + + <dependency> + <groupId>org.chemomentum</groupId> + <artifactId>tracer</artifactId> + <version>1.5.2</version> + </dependency> + + <!-- use patched version of xmlbeans --> + <dependency> + <groupId>org.apache.xmlbeans</groupId> + <artifactId>xmlbeans</artifactId> + <version>2.4.0-concurrency-patch</version> + </dependency> + + + + <dependency> + <groupId>org.chemomentum</groupId> + <artifactId>DMClientAPI</artifactId> + <version>2.3.2</version> + <exclusions> + <exclusion> + <groupId>net.sf.saxon</groupId> + <artifactId>saxon</artifactId> + </exclusion> + <exclusion> + <groupId>net.sf.saxon</groupId> + <artifactId>saxon-dom</artifactId> + </exclusion> + <exclusion> + <groupId>net.sf.saxon</groupId> + <artifactId>saxon-xpath</artifactId> + </exclusion> + <exclusion> + <groupId>pl.edu.icm.unicore</groupId> + <artifactId>uas-vo</artifactId> + </exclusion> + </exclusions> + </dependency> + + </dependencies> + + <!-- + REPOSITORIES used + --> + + <repositories> + <repository> + <id>vsgc-public</id> + <name>VSGC public repository</name> + <url>http://zam904.zam.kfa-juelich.de/maven</url> + </repository> + </repositories> + +<distributionManagement> + <repository> + <id>vsgc-public</id> + <name>VSGC repository</name> + <url>dav:http://zam904.zam.kfa-juelich.de/maven</url> + </repository> + <snapshotRepository> + <id>vsgc-public-snapshot</id> + <name>VSGC SNAPSHOT Repository</name> + <url>dav:http://zam904.zam.kfa-juelich.de/maven</url> + </snapshotRepository> + </distributionManagement> + + <build> + <extensions> + <extension> + <groupId>org.apache.maven.wagon</groupId> + <artifactId>wagon-ssh-external</artifactId> + <version>1.0-alpha-5</version> + </extension> + </extensions> + + <plugins> + + <!-- useJava 5 --> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <descriptors> + <descriptor>src/main/assembly/deps.xml</descriptor> + </descriptors> + </configuration> + </plugin> + + <!-- attach sources in seperate jar file --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <inherited>true</inherited> + <executions> + <execution> + <id>source-plugin</id> + <phase>verify</phase> <!-- makes sure the source jar is + build + before install or compile --> + <goals> + <goal>jar</goal> + </goals> + <inherited>true</inherited> + </execution> + </executions> + <configuration> + <attach>true</attach> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <skip>true</skip> + <excludes> + <exclude>**/functional/**</exclude> + <exclude>**/*$*</exclude> + </excludes> + <forkMode>pertest</forkMode> + </configuration> + </plugin> + + <plugin> + <artifactId>maven-release-plugin</artifactId> + <version>2.0-beta-4</version> + <configuration> + <tagBase>http://zam904.zam.kfa-juelich.de/svn/repo/chemomentum/servorch/tags</tagBase> + </configuration> + </plugin> + + </plugins> + </build> + +</project> Added: workflow/trunk/servorch/src/main/assembly/deps.xml =================================================================== --- workflow/trunk/servorch/src/main/assembly/deps.xml (rev 0) +++ workflow/trunk/servorch/src/main/assembly/deps.xml 2009-04-29 13:40:18 UTC (rev 4557) @@ -0,0 +1,58 @@ +<assembly> + <id>all</id> + <formats> + <format>tar.gz</format> + </formats> + + <fileSets> + <fileSet> + <includes> + <include>README*</include> + <include>LICENSE*</include> + <include>NOTICE*</include> + <include>*.xml</include> + <include>*.conf</include> + </includes> + </fileSet> + <fileSet> + <directory>src</directory> + </fileSet> + <fileSet> + <directory>target</directory> + <outputDirectory>lib</outputDirectory> + <includes> + <include>*.jar</include> + </includes> + </fileSet> + <fileSet> + <directory>src/main/scripts</directory> + <outputDirectory>/bin</outputDirectory> + <fileMode>0744</fileMode> + </fileSet> + <fileSet> + <directory>src/main/conf</directory> + <outputDirectory>/conf</outputDirectory> + </fileSet> + <fileSet> + <directory>src/main/certs</directory> + <outputDirectory>/certs</outputDirectory> + </fileSet> + <fileSet> + <excludes> + <exclude>README</exclude> + </excludes> + <directory>src/main/logs</directory> + <outputDirectory>/logs</outputDirectory> + </fileSet> + </fileSets> + <dependencySets> + <dependencySet> + <outputDirectory>lib</outputDirectory> + <unpack>false</unpack> + <scope>runtime</scope> + <!-- <excludes> + <exclude>groupid:artifactid</exclude> + </excludes> --> + </dependencySet> + </dependencySets> +</assembly> \ No newline at end of file Added: workflow/trunk/servorch/src/main/certs/demo-user.pem =================================================================== --- workflow/trunk/servorch/src/main/certs/demo-user.pem (rev 0) +++ workflow/trunk/servorch/src/main/certs/demo-user.pem 2009-04-29 13:40:18 UTC (rev 4557) @@ -0,0 +1,3 @@ +-----BEGIN CERTIFICATE----- +MIICbDCCAdWgAwIBAgIBAzANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJERTEhMB8GA1UEAxMYRmFrZSBDQSBmb3IgdGVzdGluZyBvbmx5MRgwFgYDVQQKEw9ObyBPcmdhbmlzYXRpb24xFjAUBgNVBAsTDU5vIERlcGFydG1lbnQwHhcNMDYwNjA2MjIwMDAwWhcNMDgxMjMwMjMwMDAwWjCBlTErMCkGCSqGSIb3DQEJARYcdW5pY29yZS1zdXBwb3J0QGxpc3RzLnNmLm5ldDESMBAGA1UEAxMJRGVtbyBVc2VyMRAwDgYDVQQLEwd1bmljb3JlMQswCQYDVQQKEwJzZjESMBAGA1UEBxMJc29tZXdoZXJlMRIwEAYDVQQIEwlzb21lcGxhY2UxCzAJBgNVBAYTAkRFMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCY7TBD08jwREoBFsiHsJZ7cXXdcmDyFDbCznfO0/uJs2ItKgjLnrvueCeTN0kT1rGfpf4SApXpfSvcmc4TJBxtsLa7UPsTNepDZqZKWZ92ncG0JxSXCc4Uy/8k55RIK1Gqea5J3s1exfZkPOBitbm+PNC7eEGH9GAEC7+LBSfK2wIDAQABMA0GCSqGSIb3DQEBBAUAA4GBADkIDhueFmPgMU7sr1AwFd4q4fog9D/HhmEwpMqo0aCtnas2PAhEFBOUHC7WusfEH1DttMAvBRRVJoIXoUbfaXZjcPlHTKRY05gsMifZPEpRMRD/wtl9x7YPULyaqVxP6Cb7+nHXROP1ZFd1kmQ2y/cOLbXkWcjavZc3hLogxtHT +-----END CERTIFICATE----- Added: workflow/trunk/servorch/src/main/certs/demoadmin.jks =================================================================== (Binary files differ) Property changes on: workflow/trunk/servorch/src/main/certs/demoadmin.jks ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: workflow/trunk/servorch/src/main/certs/demoadmin.pem =================================================================== --- workflow/trunk/servorch/src/main/certs/demoadmin.pem (rev 0) +++ workflow/trunk/servorch/src/main/certs/demoadmin.pem 2009-04-29 13:40:18 UTC (rev 4557) @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIICazCCAdSgAwIBAgIBBDANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJERTEhMB8GA1UEAxMY +RmFrZSBDQSBmb3IgdGVzdGluZyBvbmx5MRgwFgYDVQQKEw9ObyBPcmdhbmlzYXRpb24xFjAUBgNV +BAsTDU5vIERlcGFydG1lbnQwHhcNMDYwNjA2MjIwMDAwWhcNMDgxMjMwMjMwMDAwWjCBlDErMCkG +CSqGSIb3DQEJARYcdW5pY29yZS1zdXBwb3J0QGxpc3RzLnNmLm5ldDETMBEGA1UEAxMKRGVtbyBB +ZG1pbjESMBAGA1UECxMJV2hlcmUub3JnMQ0wCwYDVQQKEwRTb21lMQ0wCwYDVQQHEwRDaXR5MREw +DwYDVQQIEwhXaGVyZXZlcjELMAkGA1UEBhMCREUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB +AJRHkh0zEYRD5JbUaCoH6ig8kJDtEYafwd8HgeXcMCkRaRa9vECuj4SlVZPCwszWC2yTOalPENzi +xJyPNtsvWkG9nKi/5ejGWQ7u8Rmxy5WZmhRIuBoiDpGmRhMIbrq5YRb2rdMStWaowO9CYoQ+I7wn +dEQa7hXitQTvKuNkwV71AgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAINvd7CFiAKQjFi70Rz8yBXgY +TJCQxqaasE0K1OSmEq6da7efFpx6Ijih4bxgIpMqRyYD6GKlwQDaTUxm3I1Y16DL8jOS48dfzXTU +I0M5xlHu70Ff5UeXC9dLHukirrJaZBSrEg3FzON2aPs74FTibDFvV89xCFtzJS88sFD2YLs= +-----END CERTIFICATE----- Added: workflow/trunk/servorch/src/main/certs/demouser.jks =================================================================== (Binary files differ) Property changes on: workflow/trunk/servorch/src/main/certs/demouser.jks ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: workflow/trunk/servorch/src/main/certs/fakeca-cert.pem =================================================================== --- workflow/trunk/servorch/src/main/certs/fakeca-cert.pem (rev 0) +++ workflow/trunk/servorch/src/main/certs/fakeca-cert.pem 2009-04-29 13:40:18 UTC (rev 4557) @@ -0,0 +1,16 @@ +-----BEGIN CERTIFICATE----- +MIICjjCCAfegAwIBAgIBADANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJERTEh +MB8GA1UEAxMYRmFrZSBDQSBmb3IgdGVzdGluZyBvbmx5MRgwFgYDVQQKEw9ObyBP +cmdhbmlzYXRpb24xFjAUBgNVBAsTDU5vIERlcGFydG1lbnQwHhcNMDYwNjA2MjIw +MDAwWhcNMDgxMjMwMjMwMDAwWjBiMQswCQYDVQQGEwJERTEhMB8GA1UEAxMYRmFr +ZSBDQSBmb3IgdGVzdGluZyBvbmx5MRgwFgYDVQQKEw9ObyBPcmdhbmlzYXRpb24x +FjAUBgNVBAsTDU5vIERlcGFydG1lbnQwgZ4wDQYJKoZIhvcNAQEBBQADgYwAMIGI +AoGAVkFT3o/0xDWzcZXYoSGj0CY+UhYTImX5CLhvANcVKfX7ufQyp7usPrTXN0Yd +MY0eCNyuM5PEcuWBhUOEkPLzZwqcZRxX/2TAJKpK29CEiSszbHWB532djRxFkfev +U55BdbudKUZDwsOMUSmjNbtjqXX3NPnmPXpkeand2tv8OTsCAwEAAaNVMFMwCwYD +VR0PBAQDAgG+MBEGCWCGSAGG+EIBAQQEAwIEUDAdBgNVHQ4EFgQUNMXYGYnvwwed +SoSbzjG0pLb1RAIwEgYDVR0TAQH/BAgwBgEB/wIBADANBgkqhkiG9w0BAQQFAAOB +gQA/abI6+dUJerj12AYO/JP4ovI6aAyS1xHFS8nRL9E8fSSMkqvNmq1mdtZHKZEP +kY0JzxXbn9YvJrrUbu5WdLqa3cI+FrXiYskwRr3FPisOxzmtak3UJWr49nYLVBFl ++D4BLIuwm5Q+r8TJDkXmFyz89MXnW6ZbpmYZZNheHsDO4g== +-----END CERTIFICATE----- Property changes on: workflow/trunk/servorch/src/main/certs/fakeca-cert.pem ___________________________________________________________________ Added: svn:executable + Added: workflow/trunk/servorch/src/main/certs/server-cert.pem =================================================================== (Binary files differ) Property changes on: workflow/trunk/servorch/src/main/certs/server-cert.pem ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: workflow/trunk/servorch/src/main/certs/server-keystore.p12 =================================================================== (Binary files differ) Property changes on: workflow/trunk/servorch/src/main/certs/server-keystore.p12 ___________________________________________________________________ Added: svn:executable + Added: svn:mime-type + application/octet-stream Added: workflow/trunk/servorch/src/main/certs/server-truststore.jks =================================================================== (Binary files differ) Property changes on: workflow/trunk/servorch/src/main/certs/server-truststore.jks ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: workflow/trunk/servorch/src/main/certs/user-cert.pem =================================================================== --- workflow/trunk/servorch/src/main/certs/user-cert.pem (rev 0) +++ workflow/trunk/servorch/src/main/certs/user-cert.pem 2009-04-29 13:40:18 UTC (rev 4557) @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICbDCCAdWgAwIBAgIBAzANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJERTEh +MB8GA1UEAxMYRmFrZSBDQSBmb3IgdGVzdGluZyBvbmx5MRgwFgYDVQQKEw9ObyBP +cmdhbmlzYXRpb24xFjAUBgNVBAsTDU5vIERlcGFydG1lbnQwHhcNMDYwNjA2MjIw +MDAwWhcNMDgxMjMwMjMwMDAwWjCBlTErMCkGCSqGSIb3DQEJARYcdW5pY29yZS1z +dXBwb3J0QGxpc3RzLnNmLm5ldDESMBAGA1UEAxMJRGVtbyBVc2VyMRAwDgYDVQQL +Ewd1bmljb3JlMQswCQYDVQQKEwJzZjESMBAGA1UEBxMJc29tZXdoZXJlMRIwEAYD +VQQIEwlzb21lcGxhY2UxCzAJBgNVBAYTAkRFMIGfMA0GCSqGSIb3DQEBAQUAA4GN +ADCBiQKBgQCY7TBD08jwREoBFsiHsJZ7cXXdcmDyFDbCznfO0/uJs2ItKgjLnrvu +eCeTN0kT1rGfpf4SApXpfSvcmc4TJBxtsLa7UPsTNepDZqZKWZ92ncG0JxSXCc4U +y/8k55RIK1Gqea5J3s1exfZkPOBitbm+PNC7eEGH9GAEC7+LBSfK2wIDAQABMA0G +CSqGSIb3DQEBBAUAA4GBADkIDhueFmPgMU7sr1AwFd4q4fog9D/HhmEwpMqo0aCt +nas2PAhEFBOUHC7WusfEH1DttMAvBRRVJoIXoUbfaXZjcPlHTKRY05gsMifZPEpR +MRD/wtl9x7YPULyaqVxP6Cb7+nHXROP1ZFd1kmQ2y/cOLbXkWcjavZc3hLogxtHT +-----END CERTIFICATE----- Added: workflow/trunk/servorch/src/main/certs/user-keystore.jks =================================================================== (Binary files differ) Property changes on: workflow/trunk/servorch/src/main/certs/user-keystore.jks ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: workflow/trunk/servorch/src/main/conf/logging.properties =================================================================== --- workflow/trunk/servorch/src/main/conf/logging.properties (rev 0) +++ workflow/trunk/servorch/src/main/conf/logging.properties 2009-04-29 13:40:18 UTC (rev 4557) @@ -0,0 +1,27 @@ +# Properties file which configures the operation of the log4j and Java JDK logging facilities + +# Set root logger level to WARN and its only appender to A1. +log4j.rootLogger=WARN, A1 + +# A1 is set to be a rolling file appender with default params +log4j.appender.A1=org.apache.log4j.RollingFileAppender +log4j.appender.A1.File=logs/uas.log + +# A1 uses PatternLayout. +log4j.appender.A1.layout=org.apache.log4j.PatternLayout +log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c{1] %x - %m%n + + +# +# also configure jdk logging +# + +# Global logging properties. +# ------------------------------------------ +# The set of handlers to be loaded upon startup. +# Comma-separated list of class names. +handlers=java.util.logging.ConsoleHandler + +# Default global logging level. +# Loggers and Handlers may override this level +.level=SEVERE Added: workflow/trunk/servorch/src/main/conf/security_policy.xml =================================================================== --- workflow/trunk/servorch/src/main/conf/security_policy.xml (rev 0) +++ workflow/trunk/servorch/src/main/conf/security_policy.xml 2009-04-29 13:40:18 UTC (rev 4557) @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Policy xmlns="urn:oasis:names:tc:xacml:1.0:policy" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + PolicyId="testPolicy" + RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:ordered-permit-overrides"> + + <Description> + testing + </Description> + <Target> + <Subjects> + <AnySubject/> + </Subjects> + <Resources> + <AnyResource/> + </Resources> + <Actions> + <AnyAction/> + </Actions> + </Target> + + <Rule RuleId="DenyAdminAccesForUsersRule" Effect="Deny"> +<Description> +Deny users access to the admin service +</Description> + <Target> + <Subjects> + <AnySubject/> + </Subjects> + <Resources> + <Resource> + <ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:anyURI-equal"> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">null/AdminService?res=id</AttributeValue> + <ResourceAttributeDesignator DataType="http://www.w3.org/2001/XMLSchema#anyURI" + AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id"/> + </ResourceMatch> + </Resource> + </Resources> + +<Actions> +<AnyAction/> +</Actions> +</Target> + <Condition FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> + <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-one-and-only"> + <SubjectAttributeDesignator DataType="http://www.w3.org/2001/XMLSchema#string" +AttributeId="role" /> + </Apply> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">user</AttributeValue> + </Condition> + </Rule> + + + + <Rule RuleId="AdminRule" Effect="Permit"> + + <Condition FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal"> + <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-one-and-only"> + <SubjectAttributeDesignator DataType="http://www.w3.org/2001/XMLSchema#string" + AttributeId="role" + /> + </Apply> + <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">user</AttributeValue> + </Condition> +</Rule> + + <Rule RuleId="FinalRule" Effect="Deny"/> + +</Policy> \ No newline at end of file Added: workflow/trunk/servorch/src/main/conf/uas.config =================================================================== --- workflow/trunk/servorch/src/main/conf/uas.config (rev 0) +++ workflow/trunk/servorch/src/main/conf/uas.config 2009-04-29 13:40:18 UTC (rev 4557) @@ -0,0 +1,139 @@ + +# +# switch tracing on or off +# +c9m.tracing=true + + +# +# Database root directories +# +c9m.servorch.dbdir=data/servorch +c9m.tracer.dbdir=data/tracer +c9m.gris.dbdir=data/gris + + +# +# Globally used UNICORE 6 storage that mocks a global filespace +# +c9m.globalstorage=https://zam025c01.zam.kfa-juelich.de:7700/STORAGE/services/StorageManagement?res=default_storage + +# +# Query location manager via data management access service? +# +c9m.servorch.use.dmas=true + +# +# configuration of the UAS +# + +# +# "MUST REVIEW" Section +# + +# +# WSRFlite configuration file +# +# (contains SSL settings, list of deployed services, etc) +# +uas.wsrflite.configfile=conf/wsrflite.xml + +# +# XNJS configuration file +# +# (choose between Unicore 4 TSI or embedded one) +# +#uas.targetsystemfactory.xnjs.configfile=conf/xnjs_legacy.xml +uas.targetsystemfactory.xnjs.configfile=conf/xnjs.xml + + +# +# Registry settings: +# + +# Registry settings + +#use external registry +uas.externalregistry.use=true + +#discover external registry via udp multicast? +uas.externalregistry.autodiscover=true + + +# manually specify URL of external registry, uncomment to use +#uas.externalregistry.url=http://zam025c01.zam.kfa-juelich.de:7700/REGISTRY/services/Registry?res=default_registry + +# epr: "to" address +# only used when uas.externalregistry is provided above +uas.externalregistry.epr=true +uas.externalregistry.epr.to=http://zam461.zam.kfa-juelich.de:7777/services/Registry?res=default_registry +uas.externalregistry.epr.resid=default_registry + +# +#optional: read epr from file: +# only used when uas.externalregistry is provided above +#uas.externalregistry.file=conf/registry.xml + + +# +# site name +# +uas.targetsystem.sitename=UAS-WSRFLite-XNJS + + +# +# UUDB settings +# + +#use XUUDB +uas.security.authoriser=de.fzj.unicore.uas.security.XUUDBAuthoriser + +# +# XUUDB settings +# +xuudb_http_host=https://zam025c09.zam.kfa-juelich.de +xuudb_http_port=7711 +xuudb_gcid=REGISTRY_zam025c01.zam.kfa-juelich.de_7777 + + + +# +# runnables to be executed on startup +# +#uas.onstartup=de.fzj.unicore.uas.util.DefaultOnStartup de.fzj.unicore.uas.util.CreateSMSOnStartup +# +# path for default storage server +# +defaultsms.workdir=storage + + +# +# YOU MAY WANT TO REVIEW +# + + + +# +#set to true to use just a single XNJS for all targetsystems +# +uas.use.singleton.xnjs=true + +# +# File transfer protocols +# + +# baseline +uas.filetransfer.protocol.BFT=de.fzj.unicore.uas.fts.BaselineFileTransferImpl +# byteio +uas.filetransfer.protocol.RBYTEIO=de.fzj.unicore.uas.fts.byteio.RandomByteIOImpl +uas.filetransfer.protocol.SBYTEIO=de.fzj.unicore.uas.fts.byteio.StreamableByteIOImpl + +# +# What protocols (apart from BFT) should a USPACE SMS support? +# +uas.uspace.protocols= + +# +# What protocols (apart from BFT) should a general SMS support? +# +uas.uspace.protocols=SBYTEIO RBYTEIO \ No newline at end of file Added: workflow/trunk/servorch/src/main/conf/wsrflite.xml =================================================================== --- workflow/trunk/servorch/src/main/conf/wsrflite.xml (rev 0) +++ workflow/trunk/servorch/src/main/conf/wsrflite.xml 2009-04-29 13:40:18 UTC (rev 4557) @@ -0,0 +1,118 @@ +<services> + + <!-- server setup --> + + <!-- logical address, i.e. the URL to use in EPRs--> + <!-- uncomment and edit for explicit control--> + <!-- property name="unicore.wsrflite.baseurl" value="http://zam025c01.zam.kfa-juelich.de:7778/services"/--> + + <!-- physical hostname (or IP address) and port --> + <!-- uncomment and edit for explicit control--> + <!-- property name="unicore.wsrflite.host" value="zam025c01.zam.kfa-juelich.de"/--> + <property name="unicore.wsrflite.port" value="7778"/> + + <!-- + example security configuration. + WSRFlite supports SSL, both client-authenticated and plain (through Jetty) + and WS-Security (through XFire) + --> + + <!-- SSL --> + + <property name="unicore.wsrflite.ssl" value="true"/> + + <property name="unicore.wsrflite.ssl.clientauth" value="true"/> + + <property name="unicore.wsrflite.ssl.keystore" value="certs/server-keystore.p12"/> + <property name="unicore.wsrflite.ssl.keypass" value="the!njs"/> + <property name="unicore.wsrflite.ssl.keytype" value="pkcs12"/> + + <property name="unicore.wsrflite.ssl.truststore" value="certs/server-truststore.jks"/> + <property name="unicore.wsrflite.ssl.truststorepass" value="the!njs"/> + <property name="unicore.wsrflite.ssl.truststoretype" value="JKS"/> + + <!-- WS-Security --> + + <property name="unicore.wsrflite.wss" + value="true"/> + + + + <!-- + persistence settings + --> + <!-- HSQL database--> + + <property name="unicore.wsrflite.persistence.persist" + value="de.fzj.unicore.wsrflite.persistence.HsqldbPersist"/> + + <!-- in-memory --> + <!-- + <property name="unicore.wsrflite.persistence.persist" + value="de.fzj.unicore.wsrflite.persistence.InMemory"/> + --> + + <property name="unicore.wsrflite.persistence.storagedirectory" + value="data/wsrf"/> + + <!-- + SERVICES + --> + + <service name="ServiceOrchestrator" wsrf="false"> + <interface class="org.chemomentum.common.ws.IServiceOrchestrator" /> + <implementation class="org.chemomentum.servorch.ServiceOrchestratorImpl"/> + <handler type="in" class="de.fzj.unicore.uas.security.PlainWSAuthZHandler"/> + <handler type="in" class="de.fzj.unicore.uas.security.SAMLSecurityInHandler"/> + <handler type="in" class="de.fzj.unicore.uas.security.ETDTrustDelegationInHandler"/> + </service> + + <!-- the service group entry service --> + <service name="ServiceGroupEntry" wsrf="true" persistent="true"> + <interface class="de.fzj.unicore.wsrflite.xmlbeans.sg.ServiceGroupEntry"/> + <implementation class="de.fzj.unicore.uas.impl.registry.LocalRegistryEntryHomeImpl"/> + </service> + + <!-- the registry service --> + <service name="Registry" wsrf="true" persistent="true"> + <interface class="de.fzj.unicore.uas.Registry"/> + <implementation class="de.fzj.unicore.uas.impl.registry.LocalRegistryHomeImpl"/> + </service> + + <!-- the grid resource information service --> + <service name="GridResourceInformationService" wsrf="false" persistent="false"> + <interface class="org.chemomentum.common.ws.IGridResourceInformationService" /> + <implementation class="org.chemomentum.servorch.gris.GridResourceInformationServiceImpl"/> + </service> + + <!-- Service for notifying observers of changes in the GRIS --> + <!--service name="GRISNotificationProducer" wsrf="true" persistent="true"> + <interface class="de.fzj.unicore.wsrflite.xmlbeans.wsn.WSRFNotificationProducer" /> + <implementation class="org.chemomentum.servorch.gris.GRISNotificationProducerHome"/> + </service--> + + <!-- WS resource representing a subscription to the notification service--> + <!--service name="Subscription" wsrf="true" persistent="true"> + <interface class="de.fzj.unicore.wsrflite.xmlbeans.wsn.ISubscription" /> + <implementation class="de.fzj.unicore.wsrflite.xmlbeans.wsn.impl.SubscriptionHomeImpl"/> + </service--> + + + <!-- Service for consuming GRIS notifications --> + <!--service name="GRISNotificationConsumer" wsrf="false" persistent="false"> + <interface class="de.fzj.unicore.wsrflite.xmlbeans.wsn.NotificationConsumer" /> + <implementation class="org.chemomentum.servorch.gris.GRISNotificationConsumer"/> + </service--> + + <!-- the admin service --> + + <service name="AdminService" wsrf="false"> + <interface class="de.fzj.unicore.wsrflite.admin.ContainerAdmin" /> + <implementation class="de.fzj.unicore.wsrflite.admin.AdminImpl"/> + <handler type="in" class="de.fzj.unicore.uas.security.UGSSecurityInHandler"/> + <handler type="in" class="de.fzj.unicore.uas.security.PlainWSAuthZHandler"/> + </service> + + + +</services> Added: workflow/trunk/servorch/src/main/conf/xacml.config =================================================================== --- workflow/trunk/servorch/src/main/conf/xacml.config (rev 0) +++ workflow/trunk/servorch/src/main/conf/xacml.config 2009-04-29 13:40:18 UTC (rev 4557) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<config xmlns="http://sunxacml.sourceforge.net/schema/config-0.3" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + defaultPDP="pdp" defaultAttributeFactory="attr" + defaultCombiningAlgFactory="comb" defaultFunctionFactory="func"> + <pdp name="pdp"> + <attributeFinderModule class="com.sun.xacml.finder.impl.CurrentEnvModule"/> + <attributeFinderModule class="com.sun.xacml.finder.impl.SelectorModule"/> + <policyFinderModule class="com.sun.xacml.finder.impl.FilePolicyModule"> + <list> + <string>config${FILE_SEPARATOR}security_policy.xml</string> + </list> + </policyFinderModule> + </pdp> + <attributeFactory name="attr" useStandardDatatypes="true"/> + <combiningAlgFactory name="comb" useStandardAlgorithms="true"/> + <functionFactory name="func" useStandardFunctions="true"> + </functionFactory> +</config> Added: workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/DynamicComponentUpdater.java =================================================================== --- workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/DynamicComponentUpdater.java (rev 0) +++ workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/DynamicComponentUpdater.java 2009-04-29 13:40:18 UTC (rev 4557) @@ -0,0 +1,81 @@ +/********************************************************************************* + * Copyright (c) 2006 Forschungszentrum Juelich GmbH + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * (1) Redistributions of source code must retain the above copyright notice, + * this list of conditions and the disclaimer at the end. Redistributions in + * binary form must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * DISCLAIMER + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + ********************************************************************************/ +package org.chemomentum.servorch; + +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import java.net.URI; +import java.util.HashMap; +import java.util.Map; + +import org.apache.log4j.Logger; +import org.chemomentum.common.util.Config; +import org.chemomentum.dataManagement.client.util.DMSASRegistry; +import org.chemomentum.dataManagement.client.util.SecureAccessService; + +/** + * @author demuth + * + */ +public class DynamicComponentUpdater implements PropertyChangeListener { + + protected Logger logger = Logger.getLogger(DynamicComponentUpdater.class); + public DynamicComponentUpdater() + { + registerAccessServices(); + Config.addPropertyChangeListener(Config.FOUND_ACCESS_SERVICE_EPR, this); + } + + /* (non-Javadoc) + * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent) + */ + public void propertyChange(PropertyChangeEvent evt) { + if(evt.getPropertyName().equals(Config.FOUND_ACCESS_SERVICE_EPR)) registerAccessServices(); + + } + + + protected void registerAccessServices() + { + Map<URI,SecureAccessService> oldServices = new HashMap<URI, SecureAccessService>(); + for (SecureAccessService service : DMSASRegistry.getAllDMSAS()) { + oldServices.put(service.getURI(), service); + } + + + + for (SecureAccessService service : oldServices.values()) { + DMSASRegistry.removeDMSAS(service); + } + + } +} Added: workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/Initializable.java =================================================================== --- workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/Initializable.java (rev 0) +++ workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/Initializable.java 2009-04-29 13:40:18 UTC (rev 4557) @@ -0,0 +1,42 @@ +/********************************************************************************* + * Copyright (c) 2006 Forschungszentrum Juelich GmbH + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * (1) Redistributions of source code must retain the above copyright notice, + * this list of conditions and the disclaimer at the end. Redistributions in + * binary form must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * DISCLAIMER + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + ********************************************************************************/ +package org.chemomentum.servorch; + + +/** + * @author demuth + * + */ +public interface Initializable { + public abstract void init(); + +} Added: workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/Main.java =================================================================== --- workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/Main.java (rev 0) +++ workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/Main.java 2009-04-29 13:40:18 UTC (rev 4557) @@ -0,0 +1,49 @@ +/* + * created on 29.07.2006 + *(c) Forschungszentrum Juelich GmbH + */ +package org.chemomentum.servorch; + + +import org.apache.log4j.Logger; +import org.chemomentum.common.util.Config; + +import de.fzj.unicore.uas.UAS; + + +/** + * start the service orchestrator + * @author demuth + */ +public class Main { + + protected static String my_port = "7777"; + protected static Logger logger = Logger.getLogger(Main.class); + + public void start() { + logger.info("Starting Service Orchestrator."); + + try { + if (System.getProperty(Config.CONFIGFILE) == null) { + System.setProperty(Config.CONFIGFILE, "conf/uas.config"); + } + UAS uas = new UAS(System.getProperty(Config.CONFIGFILE)); + + uas.startSynchronous(); + + } catch (Exception e) { + logger.fatal("Error while deploying services.", e); + } + + //run setup and configuration code + new Startup().run(); + + logger.info("Service Orchestrator started."); + } + + + + public static void main(String[] args) { + new Main().start(); + } +} Added: workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/OrchestrationKernel.java =================================================================== --- workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/OrchestrationKernel.java (rev 0) +++ workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/OrchestrationKernel.java 2009-04-29 13:40:18 UTC (rev 4557) @@ -0,0 +1,225 @@ +/********************************************************************************* + * Copyright (c) 2006 Forschungszentrum Juelich GmbH + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * (1) Redistributions of source code must retain the above copyright notice, + * this list of conditions and the disclaimer at the end. Redistributions in + * binary form must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * DISCLAIMER + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + ********************************************************************************/ +package org.chemomentum.servorch; + + +import org.apache.log4j.Logger; +import org.chemomentum.common.impl.gris.GridResourceInfoDownloadClient; +import org.chemomentum.common.impl.gris.GridResourceInfoUploadClient; +import org.chemomentum.common.util.Config; +import org.chemomentum.common.ws.IGridResourceInformationService; +import org.chemomentum.common.ws.IServiceOrchestrator; +import org.chemomentum.servorch.broker.IResourceBroker; +import org.chemomentum.servorch.broker.ResourceBrokerImpl; +import org.chemomentum.servorch.gris.GRISKernel; +import org.chemomentum.servorch.gris.GridResourceInformationServiceImpl; +import org.chemomentum.servorch.jobexecution.ISupervisorManagement; +import org.chemomentum.servorch.jobexecution.SupervisorManagementImpl; +import org.chemomentum.servorch.jobmanage.IJobManagement; +import org.chemomentum.servorch.jobmanage.JobManagementImpl; +import org.chemomentum.servorch.wamanage.IWAManagement; +import org.chemomentum.servorch.wamanage.WAManagementImpl; +import org.w3.x2005.x08.addressing.EndpointReferenceType; + +import de.fzj.unicore.uas.impl.registry.RegistryHandler; +import de.fzj.unicore.uas.util.AddressingUtil; +import de.fzj.unicore.wsrflite.utils.Utilities; + + +/** + * @author demuth + * + */ +public class OrchestrationKernel { + + protected static boolean initialized = false; + protected static IWAManagement waManagement; + protected static ISupervisorManagement supervisorManagement; + protected static IJobManagement jobManagement; + protected static IResourceBroker broker; + protected static GridResourceInfoDownloadClient grisDownloadClient; + protected static GridResourceInfoUploadClient grisUploadClient; + + + protected static Logger logger = Logger.getLogger( + OrchestrationKernel.class.getName()); + + public static void init() { + if (initialized) { + return; + } + + logger.debug("Initializing Service Orchestrator..."); + initGRIS(); + + jobManagement = new JobManagementImpl(); + jobManagement.init(); + supervisorManagement = new SupervisorManagementImpl(); + waManagement = new WAManagementImpl(); + waManagement.init(); + broker = new ResourceBrokerImpl(); + + if (!Config.isUnitTesting()) { + publish(); + } + initialized = true; + + + } + + + protected static void initGRIS() + { + +// if (!Config.isUnitTesting()) { +// // try to find and set up remote GRIS +// try { +// +// List<EndpointReferenceType> eprs = Config.getGRISEprs(); +// if(eprs.size() == 0) +// { +// logger.info("Could not find the GRIS notification producer."); +// } +// else { +// EndpointReferenceType epr = eprs.get(0); +// +// String address = epr.getAddress().getStringValue(); +// logger.info( +// "Found remote GRIS with URL: " + address); +// String baseurl = Kernel.getKernel().getProperty(Kernel.WSRF_BASEURL); +// // found myself in the registry? +// if(!address.toLowerCase().startsWith(baseurl.toLowerCase())) +// { +// IGridResourceInfoUpload remoteGris = (IGridResourceInfoUpload) new UASClientFactory(Config.getSecurityProperties()).createPlainWSProxy( +// IGridResourceInformationService.class, address, +// Config.getSecurityProperties()); +// +// grisUploadClient = new GridResourceInfoUploadClient( +// remoteGris); +// +// IGridResourceInfoDownload localGris = new LocalGridResourceInformationCache( +// address, epr); +// +// grisDownloadClient = new GridResourceInfoDownloadClient( +// localGris); +// grisDownloadClient.getAvailableAttributes(); +// } +// } +// +// } catch (Exception e) { +// logger.info("Could not connect to remote GRIS."); +// grisUploadClient = null; +// grisDownloadClient = null; +// +// } +// +// } + if (grisDownloadClient == null) { + logger.info("Creating local GRIS."); + // initialize GRISKernel + GRISKernel.init(); + IGridResourceInformationService privateGris = new GridResourceInformationServiceImpl(); + + grisUploadClient = new GridResourceInfoUploadClient(privateGris); + grisDownloadClient = new GridResourceInfoDownloadClient( + privateGris); + } + } + + + public static IWAManagement getWAManagement() { + return waManagement; + } + + + + public static IJobManagement getJobManagement() { + return jobManagement; + } + + + + public static ISupervisorManagement getSupervisorManagement() { + return supervisorManagement; + } + + + + public static IResourceBroker getResourceBroker() { + return broker; + } + + + + public static GridResourceInfoDownloadClient getGrisDownloadClient() { + return grisDownloadClient; + } + + + + public static void setGrisDownloadClient(GridResourceInfoDownloadClient grisClient) { + OrchestrationKernel.grisDownloadClient = grisClient; + } + + + + public static GridResourceInfoUploadClient getGrisUploadClient() { + return grisUploadClient; + } + + + + public static void setGrisUploadClient(GridResourceInfoUploadClient grisUploadClient) { + OrchestrationKernel.grisUploadClient = grisUploadClient; + } + + + + /** + * publishes web service(s) in the registry <br/> + */ + protected static void publish() { + try { + // publish Orchestrator + EndpointReferenceType epr = AddressingUtil.newEPR(); + epr.addNewAddress().setStringValue(Utilities.makeAddress(IServiceOrchestrator.ServiceName)); + AddressingUtil.addPortType(epr, IServiceOrchestrator.PORT); + RegistryHandler.getRegistryClient().addRegistryEntry(epr); + logger.info( + "Added registry entry for " + IServiceOrchestrator.ServiceName); + + } catch (Exception e) { + logger.fatal("Could not publish to registry", e); + } + } + +} Added: workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/PropertyConstants.java =================================================================== --- workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/PropertyConstants.java (rev 0) +++ workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/PropertyConstants.java 2009-04-29 13:40:18 UTC (rev 4557) @@ -0,0 +1,16 @@ +package org.chemomentum.servorch; + +public interface PropertyConstants { + + // service orchestrator related + public static String SO_DB_DIR="c9m.servorch.dbdir"; + public static String SO_USE_DMAS="c9m.servorch.use.dmas"; + public static String SO_NUM_SUPERVISORS="c9m.servorch.job.supervisors"; + public static String SO_JOB_UPDATE_INTERVAL="c9m.servorch.job.update.interval"; + + // grid resource information service related + public static String GRIS_DB_DIR="c9m.gris.dbdir"; + // interval for resource discovery and attribute gathering (in seconds) + public static String GRIS_RESOURCE_UPDATE_INTERVAL="c9m.gris.resources.update.interval"; + +} Added: workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/ServiceOrchestratorImpl.java =================================================================== --- workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/ServiceOrchestratorImpl.java (rev 0) +++ workflow/trunk/servorch/src/main/java/org/chemomentum/servorch/ServiceOrchestratorImpl.java 2009-04-29 13:40:18 UTC (rev 4557) @@ -0,0 +1,122 @@ +/********************************************************************************* + * Copyright (c) 2006 Forschungszentrum Juelich GmbH + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * (1) Redistributions of source code must retain the above copyright notice, + * this list of conditions and the disclaimer at the end. Redistributions in + * binary form must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * (2) Neither the name of Forschungszentrum Juelich GmbH nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * DISCLAIMER + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR I... [truncated message content] |