tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r667936 - in /incubator/tuscany/java/sca/modules: pom.xml runtime-tomcat/pom.xml runtime/pom.xml runtime/src/main/java/org/apache/tuscany/sca/runtime/Launcher.java
Date Sun, 15 Jun 2008 09:37:27 GMT
Author: antelder
Date: Sun Jun 15 02:37:27 2008
New Revision: 667936

URL: http://svn.apache.org/viewvc?rev=667936&view=rev
Log:
Fix up tomcat deep integration so it works again

Modified:
    incubator/tuscany/java/sca/modules/pom.xml
    incubator/tuscany/java/sca/modules/runtime-tomcat/pom.xml
    incubator/tuscany/java/sca/modules/runtime/pom.xml
    incubator/tuscany/java/sca/modules/runtime/src/main/java/org/apache/tuscany/sca/runtime/Launcher.java

Modified: incubator/tuscany/java/sca/modules/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/pom.xml?rev=667936&r1=667935&r2=667936&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/pom.xml (original)
+++ incubator/tuscany/java/sca/modules/pom.xml Sun Jun 15 02:37:27 2008
@@ -149,7 +149,7 @@
                 <module>policy-security-jsr250</module>
                 <module>policy-security-ws</module>
                 <module>policy-transaction</module>
-                <!--module>runtime</module-->
+                <module>runtime</module>
                 <module>runtime-tomcat</module>
                 <!--module>runtime-war</module-->
                 <module>sca-api</module>

Modified: incubator/tuscany/java/sca/modules/runtime-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/runtime-tomcat/pom.xml?rev=667936&r1=667935&r2=667936&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/runtime-tomcat/pom.xml (original)
+++ incubator/tuscany/java/sca/modules/runtime-tomcat/pom.xml Sun Jun 15 02:37:27 2008
@@ -57,7 +57,7 @@
             <scope>provided</scope>
         </dependency>
 
-        <!-- dependency>
+        <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-runtime</artifactId>
 	        <version>1.4-SNAPSHOT</version>
@@ -67,7 +67,7 @@
                   <artifactId>tuscany-endpoint</artifactId>
                </exclusion>
             </exclusions>
-        </dependency-->
+        </dependency>
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>

Modified: incubator/tuscany/java/sca/modules/runtime/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/runtime/pom.xml?rev=667936&r1=667935&r2=667936&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/runtime/pom.xml (original)
+++ incubator/tuscany/java/sca/modules/runtime/pom.xml Sun Jun 15 02:37:27 2008
@@ -312,21 +312,6 @@
         </dependency>
         <dependency>
             <groupId>${pom.groupId}</groupId>
-            <artifactId>tuscany-node</artifactId>
-            <version>${pom.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>${pom.groupId}</groupId>
-            <artifactId>tuscany-node-api</artifactId>
-            <version>${pom.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>${pom.groupId}</groupId>
-            <artifactId>tuscany-node-impl</artifactId>
-            <version>${pom.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>${pom.groupId}</groupId>
             <artifactId>tuscany-policy</artifactId>
             <version>${pom.version}</version>
         </dependency>

Modified: incubator/tuscany/java/sca/modules/runtime/src/main/java/org/apache/tuscany/sca/runtime/Launcher.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/runtime/src/main/java/org/apache/tuscany/sca/runtime/Launcher.java?rev=667936&r1=667935&r2=667936&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/runtime/src/main/java/org/apache/tuscany/sca/runtime/Launcher.java
(original)
+++ incubator/tuscany/java/sca/modules/runtime/src/main/java/org/apache/tuscany/sca/runtime/Launcher.java
Sun Jun 15 02:37:27 2008
@@ -34,9 +34,9 @@
 
 import javax.xml.namespace.QName;
 
-import org.apache.tuscany.sca.node.NodeException;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+//import org.apache.tuscany.sca.node.NodeException;
+//import org.apache.tuscany.sca.node.SCANode;
+//import org.apache.tuscany.sca.node.SCANodeFactory;
 
 /**
  * A Launcher using a multiple nodes part as part of a domain
@@ -46,8 +46,8 @@
 public class Launcher {
     private static final Logger logger = Logger.getLogger(Launcher.class.getName());
 
-    protected SCANodeFactory scaNodeFactory;
-    protected List<SCANode> scaNodes;
+//    protected SCANodeFactory scaNodeFactory;
+//    protected List<SCANode> scaNodes;
     protected String domainName;
     protected File repository;
 
@@ -69,16 +69,16 @@
         logger.info("repository: " + repository.getAbsolutePath());
         logger.info("domain: " + ((domainName != null) ? domainName : "STANDALONE"));
         
-        scaNodeFactory = SCANodeFactory.newInstance();
-        scaNodes = new ArrayList<SCANode>();
+//        scaNodeFactory = SCANodeFactory.newInstance();
+//        scaNodes = new ArrayList<SCANode>();
         
         if (repository != null && repository.exists()) {
-            if (isExplodedContribution(repository)) {
-                addContributionFolder(repository);
-            } else {
-                addTopLevelJARs(repository);
-                addSubFolders(repository);
-            }
+//            if (isExplodedContribution(repository)) {
+//                addContributionFolder(repository);
+//            } else {
+//                addTopLevelJARs(repository);
+//                addSubFolders(repository);
+//            }
         }
     }
     
@@ -86,116 +86,116 @@
         return getJARsInFolder(folder).length < 1 && containsCompositeFile(folder);
     }
 
-    protected void addContributionFolder(File folder) {
-        SCANode repoNode;
-        try {
-            repoNode = createNode(cp);
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-        
-        try {
-            repoNode.addContribution(folder.toURL().toString(), folder.toURL());
-            logger.info("added contribution folder: " + folder.toURL());
-        } catch (Exception e) {
-            e.printStackTrace();
-            logger.log(Level.WARNING, "exception adding contribution folder: " + folder,
e);
-        }
-    }
-
-    protected URL[] addTopLevelJARs(File repository) {
-        SCANode repoNode;
-        try {
-            repoNode = createNode(cp);
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-        
-        URL[] jars = getJARsInFolder(repository);
-        for (URL jarURL : jars) {
-            try {
-                repoNode.addContribution(jarURL.toString(), jarURL);
-                logger.info("added contribution: " + jarURL);
-            } catch (NodeException e) {
-                e.printStackTrace();
-                logger.log(Level.WARNING, "exception adding contribution: " + jarURL, e);
-            }
-        }
-        
-        return jars;
-    }
-
-    protected URL[] addSubFolders(File repository) {
-        URL[] folders = getSubFolders(repository);
-        for (URL folderURL : folders) {
-            try {
-                SCANode scaNode = createNode(cp + "/" + folderURL);
-                scaNode.addContribution(folderURL.toString(), folderURL);
-                logger.info("added contribution: " + folderURL);
-            } catch (Exception e) {
-                e.printStackTrace();
-                logger.log(Level.WARNING, "exception adding contribution: " + folderURL,
e);
-            }
-        }
-        return folders;
-    }
-
-    public void addContribution(URL contributionURL) throws NodeException {
-        SCANode scaNode = createNode(cp + "/" + contributionURL);
-
-        if (started && domainName == null) {
-            scaNode.stop();
-        }
-        
-        scaNode.addContribution(contributionURL.toString(), contributionURL);
-        logger.info("added contribution: " + contributionURL);
-        
-        if (started) {
-            if (domainName == null) {
-                scaNode.addToDomainLevelComposite((QName)null);
-                scaNode.start();
-            } else {
-                scaNode.addToDomainLevelComposite((QName)null);
-                scaNode.start();
-            }
-        }
-    }
-
-    public void start() {
-        try {
-
-            for (SCANode scaNode : scaNodes) {
-                scaNode.addToDomainLevelComposite((QName)null);
-                scaNode.start();
-            }
-
-        } catch (NodeException e) {
-            throw new RuntimeException(e);
-        }
-        started = true;
-    }
-
-    public void stop() {
-        try {
-            for (SCANode scaNode : scaNodes) {
-                scaNode.stop();
-            }
-        } catch (NodeException e) {
-            throw new RuntimeException(e);
-        }
-        started = false;
-    }
-
-    public void destroy() {
-        try {
-            stop();
-            for (SCANode scaNode : scaNodes) {
-                scaNode.destroy();
-            }
-        } catch (NodeException e) {
-            throw new RuntimeException(e);
-        }
-    }
+//    protected void addContributionFolder(File folder) {
+//        SCANode repoNode;
+//        try {
+//            repoNode = createNode(cp);
+//        } catch (Exception e) {
+//            throw new RuntimeException(e);
+//        }
+//        
+//        try {
+//            repoNode.addContribution(folder.toURL().toString(), folder.toURL());
+//            logger.info("added contribution folder: " + folder.toURL());
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//            logger.log(Level.WARNING, "exception adding contribution folder: " + folder,
e);
+//        }
+//    }
+//
+//    protected URL[] addTopLevelJARs(File repository) {
+//        SCANode repoNode;
+//        try {
+//            repoNode = createNode(cp);
+//        } catch (Exception e) {
+//            throw new RuntimeException(e);
+//        }
+//        
+//        URL[] jars = getJARsInFolder(repository);
+//        for (URL jarURL : jars) {
+//            try {
+//                repoNode.addContribution(jarURL.toString(), jarURL);
+//                logger.info("added contribution: " + jarURL);
+//            } catch (NodeException e) {
+//                e.printStackTrace();
+//                logger.log(Level.WARNING, "exception adding contribution: " + jarURL, e);
+//            }
+//        }
+//        
+//        return jars;
+//    }
+//
+//    protected URL[] addSubFolders(File repository) {
+//        URL[] folders = getSubFolders(repository);
+//        for (URL folderURL : folders) {
+//            try {
+//                SCANode scaNode = createNode(cp + "/" + folderURL);
+//                scaNode.addContribution(folderURL.toString(), folderURL);
+//                logger.info("added contribution: " + folderURL);
+//            } catch (Exception e) {
+//                e.printStackTrace();
+//                logger.log(Level.WARNING, "exception adding contribution: " + folderURL,
e);
+//            }
+//        }
+//        return folders;
+//    }
+//
+//    public void addContribution(URL contributionURL) throws NodeException {
+//        SCANode scaNode = createNode(cp + "/" + contributionURL);
+//
+//        if (started && domainName == null) {
+//            scaNode.stop();
+//        }
+//        
+//        scaNode.addContribution(contributionURL.toString(), contributionURL);
+//        logger.info("added contribution: " + contributionURL);
+//        
+//        if (started) {
+//            if (domainName == null) {
+//                scaNode.addToDomainLevelComposite((QName)null);
+//                scaNode.start();
+//            } else {
+//                scaNode.addToDomainLevelComposite((QName)null);
+//                scaNode.start();
+//            }
+//        }
+//    }
+//
+//    public void start() {
+//        try {
+//
+//            for (SCANode scaNode : scaNodes) {
+//                scaNode.addToDomainLevelComposite((QName)null);
+//                scaNode.start();
+//            }
+//
+//        } catch (NodeException e) {
+//            throw new RuntimeException(e);
+//        }
+//        started = true;
+//    }
+//
+//    public void stop() {
+//        try {
+//            for (SCANode scaNode : scaNodes) {
+//                scaNode.stop();
+//            }
+//        } catch (NodeException e) {
+//            throw new RuntimeException(e);
+//        }
+//        started = false;
+//    }
+//
+//    public void destroy() {
+//        try {
+//            stop();
+//            for (SCANode scaNode : scaNodes) {
+//                scaNode.destroy();
+//            }
+//        } catch (NodeException e) {
+//            throw new RuntimeException(e);
+//        }
+//    }
 
     protected URL[] getJARsInFolder(File repository) {
 
@@ -270,23 +270,23 @@
      * Creates a new SCA Node unless running as a standalone node in 
      * which case just a single node is used to run for all contributions
      */
-    protected SCANode createNode(String nodeName) throws NodeException {
-        SCANode scaNode;
-
-        if (domainName == null || domainName.length() < 1) {
-            if (scaNodes.size() < 1) {
-                scaNode = scaNodeFactory.createSCANode(nodeName, null);
-                scaNodes.add(scaNode);
-            } else {
-                scaNode = scaNodes.get(0);
-            }
-        } else {
-            scaNode = scaNodeFactory.createSCANode(nodeName, null);
-            scaNodes.add(scaNode);
-        }
-
-        return scaNode;
-    }
+//    protected SCANode createNode(String nodeName) throws NodeException {
+//        SCANode scaNode;
+//
+//        if (domainName == null || domainName.length() < 1) {
+//            if (scaNodes.size() < 1) {
+//                scaNode = scaNodeFactory.createSCANode(nodeName, null);
+//                scaNodes.add(scaNode);
+//            } else {
+//                scaNode = scaNodes.get(0);
+//            }
+//        } else {
+//            scaNode = scaNodeFactory.createSCANode(nodeName, null);
+//            scaNodes.add(scaNode);
+//        }
+//
+//        return scaNode;
+//    }
 
     protected void initFromPropertyFile() {
         File file = new File(repository, "tuscany.properties");



Mime
View raw message