Hi Patnachai,

Is there any specific reason that you have hardcoded the Factory class name
in JCRComponentRegistry.java class rather reading it from a properties file
so that we can use any JCR implementation.

Ex: if we are using Jackrabbit we simply need to change the factory class in
properties file to org.apache.jackrabbit.rmi.repository.RmiRepositoryFactory
or if we are using wso2 registry should change
to org.wso2.carbon.registry.jcr.RegistryRepositoryFactory.

Regards
Lahiru
On Thu, Sep 1, 2011 at 2:18 PM, <[email protected]> wrote:

> Author: patanachai
> Date: Thu Sep  1 18:18:11 2011
> New Revision: 1164196
>
> URL: http://svn.apache.org/viewvc?rev=1164196&view=rev
> Log:
> Add JCRRegistry support to XBaya
>
> Added:
>
>  
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/gui/JCRRegistryWindow.java
>
>  
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/JCRComponentReference.java
>
>  
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/JCRComponentRegistry.java
> Modified:
>    incubator/airavata/trunk/modules/xbaya-gui/pom.xml
>
>  
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/gui/ComponentMenu.java
>
>  
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/NotificationSender.java
>
>  
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/lead/NotificationHandler.java
>
>  
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/MonitorTestCase.java
>
>  
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/ResourceNotifierTestCase.java
>
>  
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/WorkflowModificationTestCase.java
>
>  
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/ServiceNotificationSender.java
>
> Modified: incubator/airavata/trunk/modules/xbaya-gui/pom.xml
> URL:
> http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/pom.xml?rev=1164196&r1=1164195&r2=1164196&view=diff
>
> ==============================================================================
> --- incubator/airavata/trunk/modules/xbaya-gui/pom.xml (original)
> +++ incubator/airavata/trunk/modules/xbaya-gui/pom.xml Thu Sep  1 18:18:11
> 2011
> @@ -385,5 +385,51 @@
>             <artifactId>airavata-workflowtracking</artifactId>
>             <version>${airavata.version}</version>
>         </dependency>
> +
> +        <!-- JCR Support -->
> +        <!-- TODO need clean up -->
> +        <dependency>
> +            <groupId>commons-logging</groupId>
> +            <artifactId>commons-logging</artifactId>
> +            <version>1.0.4</version>
> +        </dependency>
> +        <dependency>
> +            <groupId>org.slf4j</groupId>
> +            <artifactId>slf4j-api</artifactId>
> +            <version>1.6.1</version>
> +        </dependency>
> +        <dependency>
> +            <groupId>org.slf4j</groupId>
> +            <artifactId>jcl-over-slf4j</artifactId>
> +            <version>1.6.1</version>
> +            <scope>runtime</scope>
> +        </dependency>
> +        <dependency>
> +            <groupId>org.slf4j</groupId>
> +            <artifactId>slf4j-log4j12</artifactId>
> +            <version>1.6.1</version>
> +            <scope>runtime</scope>
> +        </dependency>
> +        <dependency>
> +            <groupId>log4j</groupId>
> +            <artifactId>log4j</artifactId>
> +            <version>1.2.16</version>
> +            <scope>runtime</scope>
> +        </dependency>
> +        <dependency>
> +            <groupId>javax.jcr</groupId>
> +            <artifactId>jcr</artifactId>
> +            <version>2.0</version>
> +        </dependency>
> +        <dependency>
> +            <groupId>org.apache.jackrabbit</groupId>
> +            <artifactId>jackrabbit-core</artifactId>
> +            <version>2.2.7</version>
> +        </dependency>
> +        <dependency>
> +            <groupId>org.apache.jackrabbit</groupId>
> +            <artifactId>jackrabbit-jcr-rmi</artifactId>
> +            <version>2.2.7</version>
> +        </dependency>
>        </dependencies>
>  </project>
>
> Modified:
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/gui/ComponentMenu.java
> URL:
> http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/gui/ComponentMenu.java?rev=1164196&r1=1164195&r2=1164196&view=diff
>
> ==============================================================================
> ---
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/gui/ComponentMenu.java
> (original)
> +++
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/gui/ComponentMenu.java
> Thu Sep  1 18:18:11 2011
> @@ -68,6 +68,8 @@ public class ComponentMenu {
>     private JMenuItem streamSourceItem;
>
>     private JMenuItem workflowItem;
> +
> +    private JMenuItem jcrRegistryItem;
>
>     /**
>      * Constructs a ComponentMenu.
> @@ -89,6 +91,7 @@ public class ComponentMenu {
>
>     private void createComponentMenu() {
>         this.fileRegistryItem = createFileRegistryMenuItem();
> +        this.jcrRegistryItem = createJCRRegistryItem();
>         this.xregistryItem = createXRegistryItem();
>         this.webItem = createWebRegistryItem();
>         this.urlItem = createURLRegistryItem();
> @@ -102,6 +105,7 @@ public class ComponentMenu {
>         this.componentMenu.setMnemonic(KeyEvent.VK_C);
>         this.componentMenu.add(this.fileRegistryItem);
>         this.componentMenu.add(this.xregistryItem);
> +        this.componentMenu.add(this.jcrRegistryItem);
>         this.componentMenu.add(this.webItem);
>         this.componentMenu.add(this.urlItem);
>         this.componentMenu.add(this.workflowItem);
> @@ -284,6 +288,22 @@ public class ComponentMenu {
>         });
>         return item;
>     }
> +
> +    private JMenuItem createJCRRegistryItem() {
> +        JMenuItem item = new JMenuItem("Add JCR Registry");
> +        item.setMnemonic(KeyEvent.VK_J);
> +        item.addActionListener(new AbstractAction() {
> +            private JCRRegistryWindow window;
> +
> +            public void actionPerformed(ActionEvent e) {
> +                if (this.window == null) {
> +                    this.window = new
> JCRRegistryWindow(ComponentMenu.this.engine);
> +                }
> +                this.window.show();
> +            }
> +        });
> +        return item;
> +    }
>
>     private JMenuItem createFileRegistryMenuItem() {
>         JMenuItem item = new JMenuItem("Add Local Directory");
>
> Added:
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/gui/JCRRegistryWindow.java
> URL:
> http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/gui/JCRRegistryWindow.java?rev=1164196&view=auto
>
> ==============================================================================
> ---
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/gui/JCRRegistryWindow.java
> (added)
> +++
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/gui/JCRRegistryWindow.java
> Thu Sep  1 18:18:11 2011
> @@ -0,0 +1,142 @@
> +/*
> + *
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements.  See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership.  The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License.  You may obtain a copy of the License at
> + *
> + *   http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied.  See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + *
> + */
> +
> +package org.apache.airavata.xbaya.component.gui;
> +
> +import java.awt.event.ActionEvent;
> +import java.net.URI;
> +import java.net.URISyntaxException;
> +
> +import javax.swing.AbstractAction;
> +import javax.swing.JButton;
> +import javax.swing.JPanel;
> +
> +import org.apache.airavata.xbaya.XBayaEngine;
> +import
> org.apache.airavata.xbaya.component.registry.ComponentRegistryLoader;
> +import org.apache.airavata.xbaya.component.registry.JCRComponentRegistry;
> +import org.apache.airavata.xbaya.component.registry.URLComponentRegistry;
> +import org.apache.airavata.xbaya.gui.ErrorMessages;
> +import org.apache.airavata.xbaya.gui.GridPanel;
> +import org.apache.airavata.xbaya.gui.XBayaDialog;
> +import org.apache.airavata.xbaya.gui.XBayaLabel;
> +import org.apache.airavata.xbaya.gui.XBayaTextField;
> +
> +public class JCRRegistryWindow {
> +
> +    private XBayaEngine engine;
> +
> +    private ComponentRegistryLoader loader;
> +
> +    private XBayaDialog dialog;
> +
> +    private XBayaTextField urlTextField;
> +
> +    private XBayaTextField usernameTextField;
> +
> +    private XBayaTextField passwordTextField;
> +
> +    /**
> +     * @param engine
> +     */
> +    public JCRRegistryWindow(XBayaEngine engine) {
> +        this.engine = engine;
> +        this.loader = new ComponentRegistryLoader(engine);
> +        initGUI();
> +    }
> +
> +    /**
> +     * Displays the dialog.
> +     */
> +    public void show() {
> +        this.dialog.show();
> +    }
> +
> +    private void hide() {
> +        this.dialog.hide();
> +    }
> +
> +    private void ok() {
> +        String urlString = this.urlTextField.getText();
> +        String username = this.usernameTextField.getText();
> +        String password = this.passwordTextField.getText();
> +
> +        if (urlString.length() == 0) {
> +            this.engine.getErrorWindow().error(ErrorMessages.URL_EMPTY);
> +            return;
> +        }
> +        URI url;
> +        try {
> +            url = new URI(urlString);
> +        } catch (URISyntaxException e) {
> +            this.engine.getErrorWindow().error(ErrorMessages.URL_WRONG,
> e);
> +            return;
> +        }
> +
> +        JCRComponentRegistry registry = new JCRComponentRegistry(url,
> username, password);
> +
> +        hide();
> +
> +        this.loader.load(registry);
> +    }
> +
> +    /**
> +     * Initializes the GUI.
> +     */
> +    private void initGUI() {
> +        this.urlTextField = new XBayaTextField();
> +        this.usernameTextField = new XBayaTextField();
> +        this.passwordTextField = new XBayaTextField();
> +        XBayaLabel urlLabel = new XBayaLabel("URL", this.urlTextField);
> +        XBayaLabel nameLabel = new XBayaLabel("Username",
> this.usernameTextField);
> +        XBayaLabel passLabel = new XBayaLabel("Password",
> this.usernameTextField);
> +
> +
> +        GridPanel infoPanel = new GridPanel();
> +        infoPanel.add(urlLabel);
> +        infoPanel.add(this.urlTextField);
> +        infoPanel.add(nameLabel);
> +        infoPanel.add(this.usernameTextField);
> +        infoPanel.add(passLabel);
> +        infoPanel.add(this.passwordTextField);
> +        infoPanel.layout(3, 2, GridPanel.WEIGHT_NONE, 1);
> +
> +        JButton okButton = new JButton("OK");
> +        okButton.addActionListener(new AbstractAction() {
> +            public void actionPerformed(ActionEvent e) {
> +                ok();
> +            }
> +        });
> +
> +        JButton cancelButton = new JButton("Cancel");
> +        cancelButton.addActionListener(new AbstractAction() {
> +            public void actionPerformed(ActionEvent e) {
> +                hide();
> +            }
> +        });
> +
> +        JPanel buttonPanel = new JPanel();
> +        buttonPanel.add(okButton);
> +        buttonPanel.add(cancelButton);
> +
> +        this.dialog = new XBayaDialog(this.engine, "JCR Registry",
> infoPanel, buttonPanel);
> +        this.dialog.setDefaultButton(okButton);
> +    }
> +}
> \ No newline at end of file
>
> Added:
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/JCRComponentReference.java
> URL:
> http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/JCRComponentReference.java?rev=1164196&view=auto
>
> ==============================================================================
> ---
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/JCRComponentReference.java
> (added)
> +++
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/JCRComponentReference.java
> Thu Sep  1 18:18:11 2011
> @@ -0,0 +1,63 @@
> +/*
> + *
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements.  See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership.  The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License.  You may obtain a copy of the License at
> + *
> + *   http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied.  See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + *
> + */
> +
> +package org.apache.airavata.xbaya.component.registry;
> +
> +import java.util.List;
> +
> +import org.apache.airavata.xbaya.component.Component;
> +import org.apache.airavata.xbaya.component.ComponentException;
> +import org.apache.airavata.xbaya.component.ws.WSComponent;
> +import org.apache.airavata.xbaya.component.ws.WSComponentFactory;
> +
> +public class JCRComponentReference extends ComponentReference {
> +
> +    private String wsdl;
> +
> +    private List<WSComponent> components;
> +
> +    public JCRComponentReference(String name, String wsdl) {
> +        super(name);
> +        this.wsdl = wsdl;
> +    }
> +
> +    /**
> +     * @throws ComponentException
> +     * @throws ComponentRegistryException
> +     * @see
> org.apache.airavata.xbaya.component.registry.ComponentReference#getComponent()
> +     */
> +    @Override
> +    @Deprecated
> +    public Component getComponent() throws ComponentException,
> ComponentRegistryException {
> +        return getComponents().get(0);
> +    }
> +
> +    /**
> +     * @see
> org.apache.airavata.xbaya.component.registry.ComponentReference#getComponents()
> +     */
> +    @Override
> +    public List<WSComponent> getComponents() throws
> ComponentRegistryException, ComponentException {
> +        if (this.components == null) {
> +            this.components = WSComponentFactory.createComponents(wsdl);
> +        }
> +        return this.components;
> +    }
> +}
> \ No newline at end of file
>
> Added:
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/JCRComponentRegistry.java
> URL:
> http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/JCRComponentRegistry.java?rev=1164196&view=auto
>
> ==============================================================================
> ---
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/JCRComponentRegistry.java
> (added)
> +++
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/JCRComponentRegistry.java
> Thu Sep  1 18:18:11 2011
> @@ -0,0 +1,69 @@
> +/*
> + *
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements.  See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership.  The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License.  You may obtain a copy of the License at
> + *
> + *   http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied.  See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + *
> + */
> +
> +package org.apache.airavata.xbaya.component.registry;
> +
> +import java.net.URI;
> +import java.util.HashMap;
> +import java.util.List;
> +
> +import org.apache.airavata.core.gfac.api.impl.JCRRegistry;
> +import org.apache.airavata.core.gfac.type.ServiceDescription;
> +import org.apache.airavata.xbaya.component.gui.ComponentTreeNode;
> +
> +public class JCRComponentRegistry extends ComponentRegistry {
> +
> +    private static final String NAME = "JCR Components";
> +
> +    private JCRRegistry registry;
> +
> +    public JCRComponentRegistry(URI url, String username, String password)
> {
> +        HashMap<String, String> map = new HashMap<String, String>();
> +        map.put("org.apache.jackrabbit.repository.uri", url.toString());
> +        this.registry = new
> JCRRegistry("org.apache.jackrabbit.rmi.repository.RmiRepositoryFactory",
> username,
> +                password, map);
> +    }
> +
> +    /**
> +     * @see
> org.apache.airavata.xbaya.component.registry.ComponentRegistry#getComponentTree()
> +     */
> +    @Override
> +    public ComponentTreeNode getComponentTree() {
> +        ComponentTreeNode tree = new ComponentTreeNode(this);
> +        List<ServiceDescription> services =
> this.registry.searchServiceDescription("");
> +        for (ServiceDescription serviceDescription : services) {
> +            String serviceName = serviceDescription.getName();
> +            JCRComponentReference jcr = new
> JCRComponentReference(serviceName, registry.getWSDL(serviceName));
> +            tree.add(new ComponentTreeNode(jcr));
> +        }
> +
> +        return tree;
> +    }
> +
> +    /**
> +     * @see
> org.apache.airavata.xbaya.component.registry.ComponentRegistry#getName()
> +     */
> +    @Override
> +    public String getName() {
> +        return NAME;
> +    }
> +
> +}
> \ No newline at end of file
>
> Modified:
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/NotificationSender.java
> URL:
> http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/NotificationSender.java?rev=1164196&r1=1164195&r2=1164196&view=diff
>
> ==============================================================================
> ---
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/NotificationSender.java
> (original)
> +++
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/NotificationSender.java
> Thu Sep  1 18:18:11 2011
> @@ -89,7 +89,7 @@ public class NotificationSender {
>         URI initiatorServiceID =
> URI.create(StringUtil.convertToJavaIdentifier(topic));
>         String initiatorWorkflowNodeID = null;
>         Integer initiatorWorkflowTimeStep = null;
> -        this.context =
> this.notifier.createTrackingContext(props,eventSink,initiatorWorkflowID,
> +        this.context =
> this.notifier.createTrackingContext(props,brokerURL,initiatorWorkflowID,
>
> initiatorServiceID,initiatorWorkflowNodeID,initiatorWorkflowTimeStep);
>         this.context.setTopic(topic);
>         this.initiator = this.notifier.createEntity(initiatorWorkflowID,
> initiatorServiceID, initiatorWorkflowNodeID,
>
> Modified:
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/lead/NotificationHandler.java
> URL:
> http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/lead/NotificationHandler.java?rev=1164196&r1=1164195&r2=1164196&view=diff
>
> ==============================================================================
> ---
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/lead/NotificationHandler.java
> (original)
> +++
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/lead/NotificationHandler.java
> Thu Sep  1 18:18:11 2011
> @@ -89,7 +89,7 @@ public class NotificationHandler extends
>         Integer myTimestep = null;
>         EndpointReference epr = new
> EndpointReference(leadContext.getEventSink().getAddress().toString());
>         this.invocationEntity = this.notifier.createEntity(myWorkflowID,
> myServiceID, myNodeID, myTimestep);
> -        this.context = this.notifier.createTrackingContext(new
> Properties(),epr,myWorkflowID,
> +        this.context = this.notifier.createTrackingContext(new
> Properties(),epr.toString(),myWorkflowID,
>                 myServiceID,myNodeID,myTimestep);
>     }
>
>
> Modified:
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/MonitorTestCase.java
> URL:
> http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/MonitorTestCase.java?rev=1164196&r1=1164195&r2=1164196&view=diff
>
> ==============================================================================
> ---
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/MonitorTestCase.java
> (original)
> +++
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/MonitorTestCase.java
> Thu Sep  1 18:18:11 2011
> @@ -47,7 +47,7 @@ public class MonitorTestCase extends XBa
>
>         Notifier notifier = NotifierFactory.createNotifier();
>
> -        WorkflowTrackingContext context =
> notifier.createTrackingContext(new Properties(), brokerEPR,
> +        WorkflowTrackingContext context =
> notifier.createTrackingContext(new Properties(), brokerEPR.toString(),
>                 URI.create("workflowID"), URI.create("serviceID"),
> "workflowNodeID", new Integer(1));
>         notifier.publishURL(context, "title", "http://www.google.com";,
> "descriptionAndAnnotation");
>
>
> Modified:
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/ResourceNotifierTestCase.java
> URL:
> http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/ResourceNotifierTestCase.java?rev=1164196&r1=1164195&r2=1164196&view=diff
>
> ==============================================================================
> ---
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/ResourceNotifierTestCase.java
> (original)
> +++
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/ResourceNotifierTestCase.java
> Thu Sep  1 18:18:11 2011
> @@ -46,14 +46,14 @@ public class ResourceNotifierTestCase ex
>         URI initiatorServiceID = URI.create("Adder_add");
>         String initiatorWorkflowNodeID1 = "Adder_add";
>         Integer workflowTimeStep = new Integer(0);
> -        WorkflowTrackingContext context =
> notifier.createTrackingContext(new Properties(),brokerEPR,
> +        WorkflowTrackingContext context =
> notifier.createTrackingContext(new Properties(),brokerEPR.toString(),
>
> initiatorWorkflowID,initiatorServiceID,initiatorWorkflowNodeID1,workflowTimeStep);
>         notifier.resourceMapping(context, "resource1.example.com",
> 1,null);
>         notifier.resourceMapping(context, "resource2.example.com", 2);
>         notifier.resourceMapping(context, "resource3.example.com", 3);
>
>         String initiatorWorkflowNodeID2 = "Adder_add_2";
> -        context = notifier.createTrackingContext(new
> Properties(),brokerEPR,
> +        context = notifier.createTrackingContext(new
> Properties(),brokerEPR.toString(),
>
> initiatorWorkflowID,initiatorServiceID,initiatorWorkflowNodeID2,workflowTimeStep);
>         notifier.resourceMapping(context, "resource.example.com", 0);
>     }
>
> Modified:
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/WorkflowModificationTestCase.java
> URL:
> http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/WorkflowModificationTestCase.java?rev=1164196&r1=1164195&r2=1164196&view=diff
>
> ==============================================================================
> ---
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/WorkflowModificationTestCase.java
> (original)
> +++
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/WorkflowModificationTestCase.java
> Thu Sep  1 18:18:11 2011
> @@ -295,7 +295,7 @@ public class WorkflowModificationTestCas
>         InvocationEntity serviceEntity =
> notifier.createEntity(serviceWorkflowID, serviceServiceID, serviceNodeID,
>                 serviceTimestep);
>         EndpointReference epr = new
> EndpointReference(this.configuration.getBrokerURL().toASCIIString());
> -        WorkflowTrackingContext workflowContext =
> notifier.createTrackingContext(new
> Properties(),epr,myWorkflowID,myServiceID,myNodeID,myTimestep);
> +        WorkflowTrackingContext workflowContext =
> notifier.createTrackingContext(new
> Properties(),this.configuration.getBrokerURL().toASCIIString(),myWorkflowID,myServiceID,myNodeID,myTimestep);
>
>         XmlElement inputBody = (XmlElement) ((XmlElement)
> inputMessage).getParent();
>         XmlObject inputBodyObject =
> XBeansUtil.xmlElementToXmlObject(inputBody);
>
> Modified:
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/ServiceNotificationSender.java
> URL:
> http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/ServiceNotificationSender.java?rev=1164196&r1=1164195&r2=1164196&view=diff
>
> ==============================================================================
> ---
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/ServiceNotificationSender.java
> (original)
> +++
> incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/ServiceNotificationSender.java
> Thu Sep  1 18:18:11 2011
> @@ -122,7 +122,7 @@ public class ServiceNotificationSender {
>         this.initiator = this.notifier.createEntity(workflowID, serviceID,
> nodeID, timeStep);
>         this.receiver = this.notifier.createEntity(workflowID, serviceID,
> nodeID, timeStep);
>         EndpointReference epr = new
> EndpointReference(leadContext.getEventSink().getAddress().toString());
> -        this.context = this.notifier.createTrackingContext(new
> Properties(),epr,workflowID,serviceID,nodeID,timeStep);
> +        this.context = this.notifier.createTrackingContext(new
> Properties(),epr.toString(),workflowID,serviceID,nodeID,timeStep);
>     }
>
>     /**
>
>
>


-- 
System Analyst Programmer
PTI Lab
Indiana University

Reply via email to