Re: [jira] Resolved: (TUSCANY-2240) Creation of SDO object out of XML (read from an JMS message) is taking too long
This seems like quite a useful fix given the problems it seemed to be causing with the JMS binding, how about an SDO 1.1.1 maintenance release? ...ant On Fri, Apr 18, 2008 at 6:56 PM, Raymond Feng (JIRA) tuscany-dev@ws.apache.org wrote: [ https://issues.apache.org/jira/browse/TUSCANY-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel] Raymond Feng resolved TUSCANY-2240. --- Resolution: Fixed Fixed in trunk under r649628 Creation of SDO object out of XML (read from an JMS message) is taking too long --- Key: TUSCANY-2240 URL: https://issues.apache.org/jira/browse/TUSCANY-2240 Project: Tuscany Issue Type: Bug Components: Java SDO Implementation Affects Versions: Java-SDO-1.0, Java-SCA-1.1 Environment: Windows XP Pro SP2, JDK 1.6_06, SCA 1.1, SDO 1.1 Reporter: Ph.Konradi Assignee: Raymond Feng After I've switched from JMS messages containing Objects to XML (migrated from Tuscany 1.0.1 to 1.1) my application needs around 7 sec to call my service. Before it reacted instantly. I've debugged into to see where the problem is and saw that receiving of the JMS message works still instantly but the processing takes pretty long. Below in the stack trace one can see that a new http connection is opened (???) and I guess that's responsible for the delay. Any explanation for this behaviour? What am I doing wrong? The service's method I'm calling has an argument of complex type. Thanks, Philipp Daemon Thread [ActiveMQ Session Task] (Suspended) PlainSocketImpl.socketConnect(InetAddress, int, int) line: not available [native method] PlainSocketImpl.doConnect(InetAddress, int, int) line: 333 PlainSocketImpl.connectToAddress(InetAddress, int, int) line: 195 PlainSocketImpl.connect(SocketAddress, int) line: 182 Socket.connect(SocketAddress, int) line: 519 Socket.connect(SocketAddress) line: 469 HttpClient(NetworkClient).doConnect(String, int) line: 157 HttpClient.openServer(String, int) line: 394 HttpClient.openServer() line: 529 HttpClient.init(URL, Proxy, int) line: 233 HttpClient.New(URL, Proxy, int, boolean) line: 306 HttpClient.New(URL, Proxy, int) line: 323 HttpURLConnection.getNewHttpClient(URL, Proxy, int) line: 788 HttpURLConnection.plainConnect() line: 729 HttpURLConnection.connect() line: 654 HttpURLConnection.getInputStream() line: 977 URIConverterImpl.createURLInputStream(URI) line: 566 URIConverterImpl.createInputStream(URI) line: 453 SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler(XMLHandler).getPackageForURI(String) line: 2294 SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler(XMLHandler).getFactoryForPrefix(String) line: 2188 SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler(XMLHandler).createObjectByType(String, String, boolean) line: 1145 SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler(XMLHandler).createTopObject(String, String) line: 1247 SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler(XMLHandler).processElement(String, String, String) line: 883 SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler(XMLHandler).startElement(String, String, String) line: 866 SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler(XMLHandler).startElement(String, String, String, Attributes) line: 627 SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.startElement(String, String, String, Attributes) line: 401 StAX2SAXAdapter.handleStartElement(XMLStreamReader, ContentHandler) line: 162 StAX2SAXAdapter.parse(XMLStreamReader, ContentHandler) line: 111 SDOXMLResourceImpl$SDOXMLLoadImpl$1.run() line: 472 AccessController.doPrivileged(PrivilegedExceptionActionT) line: not available [native method] SDOXMLResourceImpl$SDOXMLLoadImpl.load(XMLResource, XMLStreamReader, Map) line: 470 SDOXMLResourceImpl.load(XMLStreamReader, Map) line: 598 XMLDocumentImpl.load(XMLStreamReader, Map) line: 248 XMLStreamHelperImpl.loadDocument(XMLStreamReader, Map) line: 136 XMLStreamHelperImpl.loadObject(XMLStreamReader, Map) line: 98 XMLStreamHelperImpl.loadObject(XMLStreamReader) line: 102 XMLStreamReader2DataObject.transform(XMLStreamReader, TransformationContext) line: 49 XMLStreamReader2DataObject.transform(Object, TransformationContext) line: 34 DefaultTransformerExtensionPoint$LazyPullTransformer.transform(Object, TransformationContext) line: 199 MediatorImpl.mediate(Object, DataType, DataType, MapString,Object) line: 73 Input2InputTransformer.transform(Object[], TransformationContext) line: 179 Input2InputTransformer.transform(Object, TransformationContext) line: 43
[jira] Created: (TUSCANY-2245) A spelling mistake on the DomainModel class
A spelling mistake on the DomainModel class --- Key: TUSCANY-2245 URL: https://issues.apache.org/jira/browse/TUSCANY-2245 Project: Tuscany Issue Type: Bug Components: Java SCA Assembly Model Affects Versions: Java-SCA-1.2 Reporter: wangfeng Fix For: Java-SCA-Next There is a spelling mistake on the DomainModel class. The method 'setDomainLeveComposite' should be 'setDomainLevelComposite'. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Updated: (TUSCANY-2245) A spelling mistake on the DomainModel class
[ https://issues.apache.org/jira/browse/TUSCANY-2245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] wangfeng updated TUSCANY-2245: -- Attachment: 2245.patch A spelling mistake on the DomainModel class --- Key: TUSCANY-2245 URL: https://issues.apache.org/jira/browse/TUSCANY-2245 Project: Tuscany Issue Type: Bug Components: Java SCA Assembly Model Affects Versions: Java-SCA-1.2 Reporter: wangfeng Fix For: Java-SCA-Next Attachments: 2245.patch There is a spelling mistake on the DomainModel class. The method 'setDomainLeveComposite' should be 'setDomainLevelComposite'. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (TUSCANY-2239) Support for mutually-exclusive intents
[ https://issues.apache.org/jira/browse/TUSCANY-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12590695#action_12590695 ] Venkatakrishnan commented on TUSCANY-2239: -- Hi Greg, thanks many for the patch. However, I have a bit of trouble with applying the changes in the CompositeWireBuilderImpl.java. Could you please regenerate a patch for this file alone and attach here ? Thanks - Venkat Support for mutually-exclusive intents -- Key: TUSCANY-2239 URL: https://issues.apache.org/jira/browse/TUSCANY-2239 Project: Tuscany Issue Type: New Feature Components: Java SCA Core Runtime Reporter: Greg Dritschler Assignee: Venkatakrishnan Attachments: tuscany-2239.patch The SCA Policy specification does not provide a means to define intents which are mutually exclusive. This is a noticeable omission when considering the intents in the SCA Transaction specification which are mutually exclusive by nature (managedTransaction vs. noManagedTransaction, propagatesTransaction vs. suspendsTransaction). There is a need to be able to define intents which are mutually exclusive and for the exclusion to be checked by the SCA runtime to avoid the error of specifying exclusive intents on a single artifact. In addition, there should be rules defined for the handling of mutually exclusive intents which are attached at different levels of a composite or a hierarchy of composites. I have attached a patch to provide the capability to define mutually exclusive intents. This is achieved using a new @excludes attribute on the intent/ element in definitions.xml. For example: intent name=propagatesTransaction constrains=implementation excludes=suspendsTransaction/ @excludes is a list of intents which are mutually-exclusive with the named intent. In order to be effective, a reciprocal definition needs to be made as shown below. intent name=suspendsTransaction constrains=implementation excludes=propagatesTransaction/ The patch makes no assumptions about the relationship of qualified intents to the base intent. Therefore exclusive relationships between qualified intents need to be spelled out. intent name=noManagedTransaction constrains=implementation excludes=managedTransaction managedTransaction.global managedTransaction.local/ A key part of the patch is that there now are two types of intent inheritance with respect to exclusive intents. There is a default inheritance between certain hierarchical elements within a composite. For example consider this snippet from a composite: component name=C1 requires=propagatesTransaction reference name=r1/ reference name=r2/ reference name=r3 requires=suspendsTransaction/ /component In this case the first two references inherit the default intent propagatesTransaction from the component element. However the third reference does not inherit it because it specifies an exclusive intent suspendsTransaction which overrides the component-level default. The second type of inheritance is used when inheriting intents from an implementation (e.g. introspected Java code, or an implementation composite). In this case the intents of the implementation cannot be overridden. Consider this example: component name=D1 implementation.composite name=CZ1/ reference name=r1 requires=suspendsTransaction/ /component Let's assume CZ1 contains the component C1 shown earlier and that it promotes the component reference C1/r1 as r1. C1/r1 has the intent propagatesTransaction. This intent is considered a requirement of the implementation and it cannot be overridden by the using composite. Therefore D1 is in error. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [jira] Created: (TUSCANY-2239) Support for mutually-exclusive intents
Hi, With specific reference to the inheritance of intents and policysets across the SCDL-XML hierarchy i.e. the one by which child elements inherit that which is specified in the parent element I have a question as follows :- Do we need to bother about the validity of what a child element actually inherits UNLESS its a binding or implementation element ? For example how very important is it to worry about validating for Mutually exclusive intents at a 'reference' element. I am wondering if I could just about aggregate all intents and policysets upto the immediate parent of a binding or implementation element. Then at this point, when the binding or implementation is about to inherit, I would apply validations related to checks for mutually exclusive intents. I am thinking on these lines because it seems to me that the binding and implementation elements are where intents and policyset actually matter. If specified in any other levle its only for convenience so as to cover a whole bunch of child elements. Am I trying to overly simply things here missing some key point ? Thanks - Venkat On Fri, Apr 18, 2008 at 7:08 PM, Greg Dritschler [EMAIL PROTECTED] wrote: Thanks Mike. As you know I relied on these 2 JIRAs to compose a solution. With respect to POLICY-39, I didn't implement some of the features like wildcarding of qualifiers or not requiring reciprocal exclusions in the interest of getting the basics done and into the code base. These features could be added later if someone has an interest in them. On Thu, Apr 17, 2008 at 9:54 AM, Mike Edwards [EMAIL PROTECTED] wrote: Greg Dritschler (JIRA) wrote: Support for mutually-exclusive intents -- Key: TUSCANY-2239 URL: https://issues.apache.org/jira/browse/TUSCANY-2239 Project: Tuscany Issue Type: New Feature Components: Java SCA Core Runtime Reporter: Greg Dritschler The SCA Policy specification does not provide a means to define intents which are mutually exclusive. This is a noticeable omission when considering the intents in the SCA Transaction specification which are mutually exclusive by nature (managedTransaction vs. noManagedTransaction, propagatesTransaction vs. suspendsTransaction). There is a need to be able to define intents which are mutually exclusive and for the exclusion to be checked by the SCA runtime to avoid the error of specifying exclusive intents on a single artifact. In addition, there should be rules defined for the handling of mutually exclusive intents which are attached at different levels of a composite or a hierarchy of composites. I have attached a patch to provide the capability to define mutually exclusive intents. This is achieved using a new @excludes attribute on the intent/ element in definitions.xml. For example: intent name=propagatesTransaction constrains=implementation excludes=suspendsTransaction/ @excludes is a list of intents which are mutually-exclusive with the named intent. In order to be effective, a reciprocal definition needs to be made as shown below. intent name=suspendsTransaction constrains=implementation excludes=propagatesTransaction/ The patch makes no assumptions about the relationship of qualified intents to the base intent. Therefore exclusive relationships between qualified intents need to be spelled out. intent name=noManagedTransaction constrains=implementation excludes=managedTransaction managedTransaction.global managedTransaction.local/ A key part of the patch is that there now are two types of intent inheritance with respect to exclusive intents. There is a default inheritance between certain hierarchical elements within a composite. For example consider this snippet from a composite: component name=C1 requires=propagatesTransaction reference name=r1/ reference name=r2/ reference name=r3 requires=suspendsTransaction/ /component In this case the first two references inherit the default intent propagatesTransaction from the component element. However the third reference does not inherit it because it specifies an exclusive intent suspendsTransaction which overrides the component-level default. The second type of inheritance is used when inheriting intents from an implementation (e.g. introspected Java code, or an implementation composite). In this case the intents of the implementation cannot be overridden. Consider this example: component name=D1 implementation.composite name=CZ1/ reference name=r1 requires=suspendsTransaction/ /component Let's assume CZ1 contains the component C1 shown earlier and that it promotes the component reference C1/r1 as r1. C1/r1
Re: [vtest] Java API Spec - Section 2 - Policy Annotations
Hi Kevin, Yes, we do support this although there isn't extensive testing of this. There is some rudimenatary testing that I have done in itest/policy but the method that I've had to use there for verification is not a happy one i.e. verification through the calling of policy handlers. So, if you could help with some vtest for this, it will certainly be helpful. Thanks - Venkat On Fri, Apr 18, 2008 at 11:24 PM, Kevin Williams [EMAIL PROTECTED] wrote: We are moving through the Java API and Annotations specification pretty well in vTest and I am wondering if we should start on section 2 which covers policy annotations. Are we supporting this section of the specification? -- Kevin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tutorial marketplace scenario ready
Antollini, Mario wrote: Comments in-line... Mario -Original Message- From: Jean-Sebastien Delfino [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 15, 2008 6:17 AM To: tuscany-dev@ws.apache.org Subject: Re: Tutorial marketplace scenario ready Antollini, Mario wrote: I have finished coding the tutorial marketplace scenario. I have attached all the necessary files in https://issues.apache.org/jira/browse/TUSCANY-2224 Mario, that looks pretty good, I just got it working :) One minor comment: MarketCatalogImpl could be simplified a bit to call each catalog once instead of twice. OK, I can do it for sure. I did not focus on having an efficient MarketCatalog implementation. But you are right, I need to fix that. And some ideas: - We could add more catalogs to the list (a local one, the Web service ones, and the EJB catalog running on Geronimo) to really leverage the reference with multiplicity 0..n. We'd just need to change the contents of the different catalogs (for example have fruits/vegetables from different places). That raises an interesting question about the mix of bindings that can be used on a reference with multiplicity 0..n. Can different targets use different bindings or do they have to all use the same binding? I think it's worth investigating. I am glad that you brought this up. Actually, I struggled with this many hours. At first, I tried to do what you suggested (having heterogeneous bindings for the catalog reference). I wanted the Market catalog to bind to the Fruit catalog locally (an internal component) and the Vegetables one through web services. I tried very hard, but I did not manage to get it working. I tried different approaches but none worked. Therefore I decided to use bind to both the fruits and vegetables catalog through web services (this worked right away). Do you think this heterogeneous binding issue could be a Tuscany issue? I think so. It would be worth double checking with the spec but I think that the following pattern: reference target=ServiceA ServiceB ServiceC binding.ws binding.ejb binding.x binding.y ... /reference should just work and for each target pick the binding that matches the target service binding. If it doesn't it's a bug, which can be fixed :) - Use standalone wire elements in a different .composite file in a different contribution to wire the goodsCatalog reference to the catalogs. IMO this is a typical scenario where people want to add catalogs without changing the market contribution which has already been installed in the domain. I tried with the wire element as well but it did not work either. I think it's worth investigating. What error are you getting with wires? However, I did not try with different composite files. Can you give me more details about this, please? The idea is that the wires can be put in any composite (you just need to add that composite to your domain): - the composite containing the client component, this is very much like using the target attribute on its references - the composite containing the target component, more interesting as it allows that new component to be wired to an existing component reference without touching the contribution containing that existing component. - any other composite, even more interesting as it allows you to wire two components together without touching their contributions at all. - Another idea, add a Web Service binding to your StoreMarket catalog component, add a markup to the prices, and that makes it a broker :) Do you mean to expose the marketplace as a service using web services? Yes, just add a binding.ws to it. Thoughts? -- Jean-Sebastien -- Jean-Sebastien - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Implementing the tutorial's store UI as an assembly of widgets
I've added the beginning of a store-mashup module under tutorial/. It's just a starting point but I'd like to use it to illustrate how the store application can be implemented with multiple widgets assembled in a sort of mashup. Right now it just has two widgets, the original store page in one HTML iframe and a google map in another (displaying the origin of the fruits in the catalog when you click them), but in the next few days I'll try to make it more module and split the store in two parts, a catalog widget and a shopping cart widget. I've also started to look at how to use DOJO and OpenAjax in that particular scenario, I'll post an update and more thoughts about it later, probably next week. -- Jean-Sebastien - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (TUSCANY-2224) Tutorial Marketplace scenario ready
[ https://issues.apache.org/jira/browse/TUSCANY-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12590721#action_12590721 ] Mario Antollini commented on TUSCANY-2224: -- Hello, I have improved the implementation of the file services.market.MarketCatalogImpl (under tutorial/assets). This is the all the code (just copy and paste all of it) Regards, Mario /* * 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 services.market; import java.util.Vector; import org.osoa.sca.annotations.Property; import org.osoa.sca.annotations.Reference; import services.Catalog; import services.CurrencyConverter; import services.Item; public class MarketCatalogImpl implements Catalog { @Property public String currencyCode = USD; @Reference public CurrencyConverter currencyConverter; @Reference(required=false) protected Catalog[] goodsCatalog; public Item[] get() { String currencySymbol = currencyConverter.getCurrencySymbol(currencyCode); VectorItem catalog = new VectorItem(); for (int i = 0; i goodsCatalog.length; i++) { Item[] items = goodsCatalog[i].get(); for(Item item: items) { double price = Double.valueOf(item.getPrice().substring(1)); price = currencyConverter.getConversion(USD, currencyCode, price); catalog.addElement(new Item(item.getName(), currencySymbol + price)); } } Item[] catalogArray = new Item[catalog.size()]; catalog.copyInto(catalogArray); return catalogArray; } } Tutorial Marketplace scenario ready --- Key: TUSCANY-2224 URL: https://issues.apache.org/jira/browse/TUSCANY-2224 Project: Tuscany Issue Type: New Feature Components: Java SCA Tutorial Affects Versions: Java-SCA-Next Reporter: Mario Antollini Assignee: Luciano Resende Fix For: Java-SCA-Next Attachments: LaunchStoreMarketNode.zip, market.zip, store-market.zip, StoreMarketNode.zip Hello, I have finished coding the tutorial marketplace scenario. I have attached all the necessary files in here. Please, follow these steps in order to add it as another module of the tutorial: market.zip - contains the logic to obtain the MarketPlace catalog. Its content must be placed under tutorial\assets\services StoreMarketNode.zip - Its content must be placed under tutorial\domain\cloud LaunchStoreMarketNode.zip - Its content must be placed under tutorial\domain\launch store-market.zip - this is the store-market module. This file must be uncompressed under \tutorial Besides, add the following lines: 1 - Into tutorial\assets\META-INF\sca-contribution.xml: export.java package=services.market/ 2 - Into tutorial\assets\tutorial.html: h2a href=http://localhost:8105/ui/store.html;Online Store - Marketplace/a 3 - Into tutorial\domain\cloud.composite: include name=ns2:StoreMarketNode uri=http://tuscany.apache.org/cloud; xmlns:ns2=http://tuscany.apache.org/cloud/ 4 - Into tutorial\domain\domain.composite: include name=ns2:store-market uri=store-market xmlns:ns2=http://store/ 4 - Into tutorial\domain\workspace.xml: contribution location=file:../store-market/target/tutorial-store-market.jar uri=store-market/ 5 - Into tutorial\pom.xml: modulestore-market/module How to run it? 1 - Compile tutorial\domain, tutorial\store-market, tutorial\assets 2 - # cd tuscany_home\tutorial\domain 3 - # java -jar tuscany_home\modules\tuscany-node2-launcher-1.2-incubating.jar domain 4 - Open this url in your browser: http://localhost:9990/ui/cloud/ 5 - Start these Nodes in the listed order: 5.1 - CurrencyNode 5.2 - CatalogsNode 5.3 - StoreMarketNode 6 - Open tuscany_home\tutorial\assets\tutorial.html in your browser 7 - Click the link Online Store - Marketplace 8 - That is all... you should see some fruits and
[jira] Issue Comment Edited: (TUSCANY-2224) Tutorial Marketplace scenario ready
[ https://issues.apache.org/jira/browse/TUSCANY-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12590721#action_12590721 ] antollinim edited comment on TUSCANY-2224 at 4/19/08 12:27 PM: Hello, I have improved the implementation of the file services.market.MarketCatalogImpl (under tutorial/assets). It loops only once over goodsCatalog now. To add it to the tutorial, just copy and paste all the code I have copied here. Regards, Mario /* * 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 services.market; import java.util.Vector; import org.osoa.sca.annotations.Property; import org.osoa.sca.annotations.Reference; import services.Catalog; import services.CurrencyConverter; import services.Item; public class MarketCatalogImpl implements Catalog { @Property public String currencyCode = USD; @Reference public CurrencyConverter currencyConverter; @Reference(required=false) protected Catalog[] goodsCatalog; public Item[] get() { String currencySymbol = currencyConverter.getCurrencySymbol(currencyCode); VectorItem catalog = new VectorItem(); for (int i = 0; i goodsCatalog.length; i++) { Item[] items = goodsCatalog[i].get(); for(Item item: items) { double price = Double.valueOf(item.getPrice().substring(1)); price = currencyConverter.getConversion(USD, currencyCode, price); catalog.addElement(new Item(item.getName(), currencySymbol + price)); } } Item[] catalogArray = new Item[catalog.size()]; catalog.copyInto(catalogArray); return catalogArray; } } was (Author: antollinim): Hello, I have improved the implementation of the file services.market.MarketCatalogImpl (under tutorial/assets). This is the all the code (just copy and paste all of it) Regards, Mario /* * 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 services.market; import java.util.Vector; import org.osoa.sca.annotations.Property; import org.osoa.sca.annotations.Reference; import services.Catalog; import services.CurrencyConverter; import services.Item; public class MarketCatalogImpl implements Catalog { @Property public String currencyCode = USD; @Reference public CurrencyConverter currencyConverter; @Reference(required=false) protected Catalog[] goodsCatalog; public Item[] get() { String currencySymbol = currencyConverter.getCurrencySymbol(currencyCode); VectorItem catalog = new VectorItem(); for (int i = 0; i goodsCatalog.length; i++) { Item[] items = goodsCatalog[i].get(); for(Item item: items) { double price = Double.valueOf(item.getPrice().substring(1)); price = currencyConverter.getConversion(USD, currencyCode, price); catalog.addElement(new Item(item.getName(), currencySymbol + price)); } } Item[] catalogArray = new Item[catalog.size()]; catalog.copyInto(catalogArray);
[jira] Commented: (TUSCANY-2224) Tutorial Marketplace scenario ready
[ https://issues.apache.org/jira/browse/TUSCANY-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12590735#action_12590735 ] Luciano Resende commented on TUSCANY-2224: -- Latest update added. Tutorial Marketplace scenario ready --- Key: TUSCANY-2224 URL: https://issues.apache.org/jira/browse/TUSCANY-2224 Project: Tuscany Issue Type: New Feature Components: Java SCA Tutorial Affects Versions: Java-SCA-Next Reporter: Mario Antollini Assignee: Luciano Resende Fix For: Java-SCA-Next Attachments: LaunchStoreMarketNode.zip, market.zip, store-market.zip, StoreMarketNode.zip Hello, I have finished coding the tutorial marketplace scenario. I have attached all the necessary files in here. Please, follow these steps in order to add it as another module of the tutorial: market.zip - contains the logic to obtain the MarketPlace catalog. Its content must be placed under tutorial\assets\services StoreMarketNode.zip - Its content must be placed under tutorial\domain\cloud LaunchStoreMarketNode.zip - Its content must be placed under tutorial\domain\launch store-market.zip - this is the store-market module. This file must be uncompressed under \tutorial Besides, add the following lines: 1 - Into tutorial\assets\META-INF\sca-contribution.xml: export.java package=services.market/ 2 - Into tutorial\assets\tutorial.html: h2a href=http://localhost:8105/ui/store.html;Online Store - Marketplace/a 3 - Into tutorial\domain\cloud.composite: include name=ns2:StoreMarketNode uri=http://tuscany.apache.org/cloud; xmlns:ns2=http://tuscany.apache.org/cloud/ 4 - Into tutorial\domain\domain.composite: include name=ns2:store-market uri=store-market xmlns:ns2=http://store/ 4 - Into tutorial\domain\workspace.xml: contribution location=file:../store-market/target/tutorial-store-market.jar uri=store-market/ 5 - Into tutorial\pom.xml: modulestore-market/module How to run it? 1 - Compile tutorial\domain, tutorial\store-market, tutorial\assets 2 - # cd tuscany_home\tutorial\domain 3 - # java -jar tuscany_home\modules\tuscany-node2-launcher-1.2-incubating.jar domain 4 - Open this url in your browser: http://localhost:9990/ui/cloud/ 5 - Start these Nodes in the listed order: 5.1 - CurrencyNode 5.2 - CatalogsNode 5.3 - StoreMarketNode 6 - Open tuscany_home\tutorial\assets\tutorial.html in your browser 7 - Click the link Online Store - Marketplace 8 - That is all... you should see some fruits and vegetables in the catalog If there is any problem, please let me know. Thanks and regards, Mario -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Resolved: (TUSCANY-2245) A spelling mistake on the DomainModel class
[ https://issues.apache.org/jira/browse/TUSCANY-2245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Luciano Resende resolved TUSCANY-2245. -- Resolution: Fixed Patch applied. Thanks WangFeng. A spelling mistake on the DomainModel class --- Key: TUSCANY-2245 URL: https://issues.apache.org/jira/browse/TUSCANY-2245 Project: Tuscany Issue Type: Bug Components: Java SCA Assembly Model Affects Versions: Java-SCA-1.2 Reporter: wangfeng Fix For: Java-SCA-Next Attachments: 2245.patch There is a spelling mistake on the DomainModel class. The method 'setDomainLeveComposite' should be 'setDomainLevelComposite'. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]