[jira] Commented: (TUSCANY-1636) There should not be an SCABinding created under reference if there is no target on the reference 558780

2007-09-04 Thread Yang Lei (JIRA)

[ 
https://issues.apache.org/jira/browse/TUSCANY-1636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524781
 ] 

Yang Lei commented on TUSCANY-1636:
---

As this SCABinding is created for a component reference by Tuscany, the 
bindingProvider is invoked always. Even if SCABinding provider can implement by 
checking if there is target or not and return null object, Tuscany will use the 
result of the bindingProvider invoke to inject a value to the component's 
reference.  I thought the correct logic is , if we do not declare a component 
reference, the component's implementation should be able to keep the default 
value in the component implementation for that reference, instead of getting 
the value override with a null object.

> There should not be an SCABinding created under reference if there is no 
> target on the reference 558780
> ---
>
> Key: TUSCANY-1636
> URL: https://issues.apache.org/jira/browse/TUSCANY-1636
> Project: Tuscany
>  Issue Type: Bug
>  Components: Java SCA Assembly Model
>Reporter: Yang Lei
> Fix For: Java-SCA-Next
>
>
> In CompositeBuilderImpl, we create defeault SCABinding where there is no 
> binding defined under reference. This will break the SCABinding handling if 
> the reference does not have a target, then SCABinding willl still get 
> executed so either there is a NPE as we are not expecting target is not 
> there, or there is a null object set to the reference, which will override 
> existing reference value in the component. 
> I did the following to remove the SCABinding at the end of the 
> CompositeBuilderImpl.connectComponentReferences, the else block
> if (!targets.isEmpty()) {
>   
> }else
> {
> // need to remove the SCABinding we created that did not have 
> target
> if (componentReference.getBindings().size()==1)
> {
> SCABinding binding = 
> componentReference.getBinding(SCABinding.class);
> if (binding!=null && binding.getURI()==null)
> {
> componentReference.getBindings().clear();
> }
> }
> }
> }

-- 
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] Created: (TUSCANY-1636) There should not be an SCABinding created under reference if there is no target on the reference 558780

2007-08-29 Thread Yang Lei (JIRA)
There should not be an SCABinding created under reference if there is no target 
on the reference 558780
---

 Key: TUSCANY-1636
 URL: https://issues.apache.org/jira/browse/TUSCANY-1636
 Project: Tuscany
  Issue Type: Bug
  Components: Java SCA Assembly Model
Reporter: Yang Lei


In CompositeBuilderImpl, we create defeault SCABinding where there is no 
binding defined under reference. This will break the SCABinding handling if the 
reference does not have a target, then SCABinding willl still get executed so 
either there is a NPE as we are not expecting target is not there, or there is 
a null object set to the reference, which will override existing reference 
value in the component. 

I did the following to remove the SCABinding at the end of the 
CompositeBuilderImpl.connectComponentReferences, the else block
if (!targets.isEmpty()) {
  
}else
{
// need to remove the SCABinding we created that did not have 
target
if (componentReference.getBindings().size()==1)
{
SCABinding binding = 
componentReference.getBinding(SCABinding.class);
if (binding!=null && binding.getURI()==null)
{
componentReference.getBindings().clear();
}
}
}
}


-- 
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] Created: (TUSCANY-1633) To support for SCA Binding using URI on r558780

2007-08-29 Thread Yang Lei (JIRA)
To support  for SCA Binding using URI on r558780
---

 Key: TUSCANY-1633
 URL: https://issues.apache.org/jira/browse/TUSCANY-1633
 Project: Tuscany
  Issue Type: Bug
  Components: Java SCA Assembly Model
 Environment: Windows
Reporter: Yang Lei


We assume we can use SCA binding 's URI for its target service. We see the 
following problems:
1. When there is a SCABinding element under the reference or we are trying to 
create one when there is none, the URI is not set. So added  a else block to 
the following code in CompositeBuilderImpl,matchBinding method:
if (binding instanceof WireableBinding) { 
 .
} else {
//use terget serviceBinding's URI as referece's binding 
URI
//This is to support reference target
if (cloned instanceof SCABinding && cloned.getURI() == 
null) {
cloned.setURI(serviceBinding.getURI());
}
}

2. When there is a SCABinding element defined on service side, URI is not set 
we need to add the else block:
// Create and configure an SCA binding for the service
if (componentService.getBindings().isEmpty()) {
SCABinding scaBinding = 
componentService.getBinding(SCABinding.class);
if (scaBinding == null) {
scaBinding = scaBindingFactory.createSCABinding();
scaBinding.setName(componentService.getName());
componentService.getBindings().add(scaBinding);
}
scaBinding.setComponent(component);
scaBinding.setURI(uri);
 }else
 {
SCABinding scaBinding = 
componentService.getBinding(SCABinding.class);
if (scaBinding != null && scaBinding.getURI()==null) {
scaBinding.setURI(uri);
}
 }

-- 
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] Created: (TUSCANY-1539) The assembly model does not contain the annotated intent information

2007-08-14 Thread Yang Lei (JIRA)
The assembly model does not contain the annotated intent information


 Key: TUSCANY-1539
 URL: https://issues.apache.org/jira/browse/TUSCANY-1539
 Project: Tuscany
  Issue Type: Improvement
  Components: Java SCA Assembly Model
 Environment: r558780
Reporter: Yang Lei


I am following JavaAnnotationsAndAPIs section 2.3.1 and 2.4 to create an sample 
with both intent annotation and SCDL file. I realize no matter I define intents 
or not in SCDL, it is alreays the SCDL version get picked up.  I use the 
following code to load the composite model:
 EmbeddedSCADomain domain= new 
EmbeddedSCADomain(this.getClass().getClassLoader(),"http://"+name);
domain.start();
ModelResolver resolver = new ModelResolverImpl(cl);
ContributionService service= 
util.getDomain(null).getContributionService();
service.contribute(contributionId, contributionLocation, 
resolver, false);
r   service.getContribution(contributionId);

I use the following code to display the composite :
 Composite composite =null;
 for (DeployedArtifact artifact : contribution.getArtifacts()) {
 if (artifact.getModel() instanceof Composite) {
 if (artifact.getURI().toString().endsWith("default.composite"))
 {
 composite = ((Composite)artifact.getModel());
 break;
 }
 }
 }
 if (composite!=null)
 {
 System.out.println("this is the artifact");
 display(composite);
 System.out.println("this is the added composite");
 domain.getDomainCompositeHelper().addComposite(composite);
 display(composite);
 System.out.println("this is the started composite");
 domain.getDomainCompositeHelper().startComposite(composite);
 display(composite);
 }

Under all 3 cases, the composite does not contain the annotated intent setting

-- 
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] Created: (TUSCANY-1343) java.io.FileNotFoundException: org.apache.tuscany.sca.interfacedef.wsdl.xml.WSDLDocumentProcessor$WSDLLocatorImpl.getImportInputSource(WSDLDocumentProcessor.java:86)

2007-06-13 Thread Yang Lei (JIRA)
java.io.FileNotFoundException: 
org.apache.tuscany.sca.interfacedef.wsdl.xml.WSDLDocumentProcessor$WSDLLocatorImpl.getImportInputSource(WSDLDocumentProcessor.java:86)
-

 Key: TUSCANY-1343
 URL: https://issues.apache.org/jira/browse/TUSCANY-1343
 Project: Tuscany
  Issue Type: Bug
  Components: Java SCA Axis Binding Extension
Affects Versions: Java-SCA-0.91
 Environment: windows XP
Reporter: Yang Lei


WSDLDocumentP <  getBaseURI Exit
 PriceQuoteService.wsdl

[6/13/07 15:20:11:293 CDT] 0016 WSDLDocumentP >  getImportInputSource Entry
 c:/PriceQuoteService.wsdl
 PriceQuoteService_schema1.xsd
I created a PackageProcessor (FOLDER type) to place the default one. The logic 
of this processor is to be able to return certain file from a location 
different from the contribution's location. One kind of this file is WSDL file. 
Then I got the following error when the wsdl file contains :

   http://priceQuoteSession";   
schemaLocation="PriceQuoteService_schema1.xsd"/>

As the xsd file is in a different location of the wsdl file, shouldnot 
WSDLDocumentProcessor$WSDLLocatorImpl use the PackageProcessor's resolved 
artifact URL for loading xsd?

 java.io.FileNotFoundException: 
../PriceQuoteService_schema1.xsd (No such file or directory)
at java.io.FileInputStream.(FileInputStream.java:135)
at java.io.FileInputStream.(FileInputStream.java:95)
at 
sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:85)
at 
sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:176)
at java.net.URL.openStream(URL.java:1041)
at 
org.apache.tuscany.sca.interfacedef.wsdl.xml.WSDLDocumentProcessor$WSDLLocatorImpl.getImportInputSource(WSDLDocumentProcessor.java:86)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at 
org.apache.tuscany.sca.interfacedef.wsdl.xml.WSDLDocumentProcessor.read(WSDLDocumentProcessor.java:141)
at 
org.apache.tuscany.sca.interfacedef.wsdl.xml.WSDLDocumentProcessor.read(WSDLDocumentProcessor.java:52)
at 
org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor.read(ExtensibleURLArtifactProcessor.java:63)
at 
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.processReadPhase(ContributionServiceImpl.java:290)
at 
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.addContribution(ContributionServiceImpl.java:251)
at 
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.contribute(ContributionServiceImpl.java:119)
at 
org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain$DomainCompositeHelper.addContribution(EmbeddedSCADomain.java:79)


-- 
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] Created: (TUSCANY-1328) can not locate service from a component whose implementation is composite

2007-06-06 Thread Yang Lei (JIRA)
can not locate service from a component whose implementation is composite
-

 Key: TUSCANY-1328
 URL: https://issues.apache.org/jira/browse/TUSCANY-1328
 Project: Tuscany
  Issue Type: Bug
  Components: Java SCA Assembly Model
Affects Versions: Java-SCA-0.90
 Environment: Windows XP
Reporter: Yang Lei
 Fix For: Java-SCA-0.90


default.composite:

http://foo";
xmlns:foo="http://foo";
xmlns="http://www.osoa.org/xmlns/sca/1.0";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://www.osoa.org/xmlns/sca/1.0 
http://www.osoa.org/xmlns/sca/1.0 ">
   

   


MySimpleService.composite:

http://foo";
xmlns:foo="http://foo";
xmlns="http://www.osoa.org/xmlns/sca/1.0";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://www.osoa.org/xmlns/sca/1.0 
http://www.osoa.org/xmlns/sca/1.0 ">
  
   
  
   
 
   


MyServiceImpl

@Service(interfaces={MyService.class, MyServiceByDate.class, 
MyListService.class, MyListServiceByYear.class})

public class MyServiceImpl implements MyService, MyServiceByDate, 
MyListService, MyListServiceByYear{
...
}

When I try to locateService of  "MySimpleServiceInRecursive/MyServiceOrig1", 
got the following exception

org.osoa.sca.ServiceRuntimeException: Service not found: 
MySimpleServiceInRecursive/MyServiceOrig1 at 
org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain.getService(EmbeddedSCADomain.java:230)
 at 
org.apache.tuscany.sca.host.embedded.impl.SimpleCompositeContextImpl.locateService(SimpleCompositeContextImpl.java:80)
 at test.sca.tests.MySimpleServiceInRecursiveTest.setUp(Unknown Source) at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
sun.reflect.NativeMethodAccessorImpl.invoke

Thanks.

-- 
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] Created: (TUSCANY-1318) can not get include Composite's services, components...

2007-05-31 Thread Yang Lei (JIRA)
can not get include Composite's services, components...
---

 Key: TUSCANY-1318
 URL: https://issues.apache.org/jira/browse/TUSCANY-1318
 Project: Tuscany
  Issue Type: Bug
  Components: Java SCA Assembly Model
Affects Versions: Java-SCA-0.90
 Environment: Windows XP
Reporter: Yang Lei
 Fix For: Java-SCA-0.90


Add two lines to ReadAllTestCase.testReadComposite()

Composite include = composite.getIncludes().get(0);
assertEquals(include.getName(), new QName("http://calc";, 
"TestAllDivide"));
// the following is the added lines
assertEquals(1,include.getComponents().size());
assertEquals(1,include.getServices().size(), 1);

And got 0 components and 0 services.

Tried to get other attribute on the include as PolicySet and Intents, are are 
also empty. 

-- 
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] Created: (TUSCANY-1316) WriteAllTestCase: java.lang.IllegalStateException: writeNamespace() can only be called following writeStartElement() or writeEmptyElement

2007-05-31 Thread Yang Lei (JIRA)
WriteAllTestCase: java.lang.IllegalStateException: writeNamespace() can only be 
called following writeStartElement() or writeEmptyElement
-

 Key: TUSCANY-1316
 URL: https://issues.apache.org/jira/browse/TUSCANY-1316
 Project: Tuscany
  Issue Type: Bug
  Components: Java SCA Assembly Model
Affects Versions: Java-SCA-0.90
 Environment: Windows XP
Reporter: Yang Lei


on r540027

java.lang.IllegalStateException: writeNamespace() can only be called following 
writeStartElement() or writeEmptyElement().
at 
com.ibm.xml.xlxp.api.stax.msg.StAXMessageProvider.throwIllegalStateException(StAXMessageProvider.java:45)
at 
com.ibm.xml.xlxp.api.stax.XMLStreamWriterBase.writeNamespace(XMLStreamWriterBase.java:512)
at 
com.ibm.xml.xlxp.api.stax.XMLOutputFactoryImpl$XMLStreamWriterProxy.writeNamespace(XMLOutputFactoryImpl.java:149)
at 
org.apache.tuscany.sca.assembly.xml.XAttr.writeQNameValue(XAttr.java:98)
at org.apache.tuscany.sca.assembly.xml.XAttr.write(XAttr.java:110)
at 
org.apache.tuscany.sca.assembly.xml.BaseArtifactProcessor.writeAttributes(BaseArtifactProcessor.java:498)
at 
org.apache.tuscany.sca.assembly.xml.BaseArtifactProcessor.writeStart(BaseArtifactProcessor.java:456)
at 
org.apache.tuscany.sca.assembly.xml.BaseArtifactProcessor.writeStartDocument(BaseArtifactProcessor.java:476)
at 
org.apache.tuscany.sca.assembly.xml.CompositeProcessor.write(CompositeProcessor.java:320)
at 
org.apache.tuscany.sca.assembly.xml.CompositeProcessor.write(CompositeProcessor.java:1)
at 
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor.write(ExtensibleStAXArtifactProcessor.java:87)
at 
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor.write(ExtensibleStAXArtifactProcessor.java:163)
at 
org.apache.tuscany.sca.assembly.xml.WriteAllTestCase.testReadWriteComposite(WriteAllTestCase.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:481)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:347)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)




-- 
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-913) no validation on @Reference(required=true)

2007-01-09 Thread Yang Lei (JIRA)

[ 
https://issues.apache.org/jira/browse/TUSCANY-913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463417
 ] 

Yang Lei commented on TUSCANY-913:
--

I declared a reference as required=true. I assume it means whoever is defining 
a component has to override the reference by wiring it to some other value. 
However, I can still define a component w/o wiring the reference when I define 
component


> no validation on @Reference(required=true)
> --
>
> Key: TUSCANY-913
> URL: https://issues.apache.org/jira/browse/TUSCANY-913
> Project: Tuscany
>  Issue Type: Improvement
>  Components: Java SCA POJO Container
>Affects Versions: Java-M2
> Environment: windows xp
>Reporter: Yang Lei
>
>  @Reference(required=true) or by default  @Reference
> I can define a component without giving reference. The code still works.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (TUSCANY-911) default value of property( anntated with @Property) is set to null by default.

2007-01-09 Thread Yang Lei (JIRA)

[ 
https://issues.apache.org/jira/browse/TUSCANY-911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463412
 ] 

Yang Lei commented on TUSCANY-911:
--

The property defined:

@Property(name="location")
protected String location = "RTP";

@Property(name="year")
protected String year = "2006";

The scdl






The test case

public void testDefaultProperty()
{
assertEquals("RTP",myService.getLocation());
assertEquals("2006",myService.getYear());

}
 myService = context.locateService(MyService.class, "MyService");


The test result:

testDefaultProperty(mysca.test.myservice.ComponentTest)  Time elapsed: 0 sec  
<<< FAILURE!
junit.framework.ComparisonFailure: expected: but was:
at junit.framework.Assert.assertEquals(Assert.java:81)
at junit.framework.Assert.assertEquals(Assert.java:87)
at 
mysca.test.myservice.ComponentTest.testDefaultProperty(ComponentTest.java:26)


The code is commited as part of the test cases.

> default value of property( anntated with @Property) is set to null by default.
> --
>
> Key: TUSCANY-911
> URL: https://issues.apache.org/jira/browse/TUSCANY-911
> Project: Tuscany
>  Issue Type: Bug
>Reporter: Yang Lei
> Assigned To: Raymond Feng
>
> I [EMAIL PROTECTED] on the attribute. I give the property a default value in 
> java class. However I noticed when I define Component with the 
> implemenation.java, even though I did not override the property value, the 
> value is always set to null. Is the behavior expected?  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (TUSCANY-994) validation on override

2006-12-14 Thread Yang Lei (JIRA)
validation on override
--

 Key: TUSCANY-994
 URL: http://issues.apache.org/jira/browse/TUSCANY-994
 Project: Tuscany
  Issue Type: Improvement
  Components: Java SCA Core
 Environment: windows XP
Reporter: Yang Lei


1.service : 

override=must , I can still define a using composite without defining a 
composite level service wire to the embedded component(composite 
implementation)'s serive
override=no, I can still define a using composite with defining a composite 
level service wire to the embedded component(composite implementation) 's 
service

2. reference: 
override=no, I can still define in using composite the component(composite 
implementation) 's reference wired to a new service value

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (TUSCANY-926) Create test cases related to SCA composite, annotation and spec interface

2006-11-13 Thread Yang Lei (JIRA)
 [ http://issues.apache.org/jira/browse/TUSCANY-926?page=all ]

Yang Lei updated TUSCANY-926:
-

Attachment: TuscanyTest.compositeTest.zip

> Create test cases related to SCA composite, annotation and spec interface
> -
>
> Key: TUSCANY-926
> URL: http://issues.apache.org/jira/browse/TUSCANY-926
> Project: Tuscany
>  Issue Type: Test
>  Components: Java Spec APIs
>Affects Versions: Java-M2
> Environment: windows xp
>Reporter: Yang Lei
> Attachments: TuscanyTest.compositeTest.zip
>
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (TUSCANY-926) Create test cases related to SCA composite, annotation and spec interface

2006-11-13 Thread Yang Lei (JIRA)
Create test cases related to SCA composite, annotation and spec interface
-

 Key: TUSCANY-926
 URL: http://issues.apache.org/jira/browse/TUSCANY-926
 Project: Tuscany
  Issue Type: Test
  Components: Java Spec APIs
Affects Versions: Java-M2
 Environment: windows xp
Reporter: Yang Lei




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (TUSCANY-914) duplicated component name in include overwrite the using one.

2006-11-08 Thread Yang Lei (JIRA)
duplicated component name in include overwrite the using one.
-

 Key: TUSCANY-914
 URL: http://issues.apache.org/jira/browse/TUSCANY-914
 Project: Tuscany
  Issue Type: Improvement
  Components: Java Spec APIs
Affects Versions: Java-M2
Reporter: Yang Lei


duplicated component name in include overwrite the using one. It may be better 
to throw duplication error.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (TUSCANY-913) no validation on @Reference(required=true)

2006-11-08 Thread Yang Lei (JIRA)
no validation on @Reference(required=true)
--

 Key: TUSCANY-913
 URL: http://issues.apache.org/jira/browse/TUSCANY-913
 Project: Tuscany
  Issue Type: Improvement
  Components: Java Spec APIs
Affects Versions: Java-M2
 Environment: windows xp
Reporter: Yang Lei


 @Reference(required=true) or by default  @Reference
I can define a component without giving reference. The code still works.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (TUSCANY-912) Can not define reference in component with multiple value(List or Array)

2006-11-08 Thread Yang Lei (JIRA)
Can not define reference in component with multiple value(List or Array)


 Key: TUSCANY-912
 URL: http://issues.apache.org/jira/browse/TUSCANY-912
 Project: Tuscany
  Issue Type: Bug
  Components: Java Spec APIs
Affects Versions: Java-M2
 Environment: Windows XP
Reporter: Yang Lei


I tryied both List and MyService []



MyNCService/MyListService
MyListServiceFor2006/MyListService
2007


Both throw exception on type mis match:

Caused by: org.apache.tuscany.spi.wire.IncompatibleServiceContractException: 
The remotable settings don't match [Service
Contract[MyListService;],ServiceContract[MyListService]]
at 
org.apache.tuscany.spi.wire.WireServiceExtension.checkCompatibility(WireServiceExtension.java:60)
at 
org.apache.tuscany.core.builder.ConnectorImpl.checkIfWireable(ConnectorImpl.java:444)
... 25 more


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (TUSCANY-911) default value of property( anntated with @Property) is set to null by default.

2006-11-08 Thread Yang Lei (JIRA)
default value of property( anntated with @Property) is set to null by default.
--

 Key: TUSCANY-911
 URL: http://issues.apache.org/jira/browse/TUSCANY-911
 Project: Tuscany
  Issue Type: Bug
Reporter: Yang Lei


I [EMAIL PROTECTED] on the attribute. I give the property a default value in 
java class. However I noticed when I define Component with the 
implemenation.java, even though I did not override the property value, the 
value is always set to null. Is the behavior expected?  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (TUSCANY-910) CurrentCompositeContext.getContext() returns CompositeContext with null attributes

2006-11-08 Thread Yang Lei (JIRA)
CurrentCompositeContext.getContext() returns CompositeContext with null 
attributes
--

 Key: TUSCANY-910
 URL: http://issues.apache.org/jira/browse/TUSCANY-910
 Project: Tuscany
  Issue Type: Bug
  Components: Java Spec APIs
 Environment: Windows XP
Reporter: Yang Lei


I noticed, that if I call CurrentCompositeContext.getContext(); to get 
CompositeContext, then the values of most of the api return null:

composite name:null
composite URI:null
Request context:null


I defined attributes in the java class(service impl class)  with annotation 
@Context and @ComponentName . They also return null.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (TUSCANY-909) Current Tuscany driver Spec API inconsistence with Spec 0.95

2006-11-08 Thread Yang Lei (JIRA)
Current Tuscany driver Spec API  inconsistence with Spec 0.95
-

 Key: TUSCANY-909
 URL: http://issues.apache.org/jira/browse/TUSCANY-909
 Project: Tuscany
  Issue Type: Bug
  Components: Java SCA Core
Affects Versions: Java-M2
 Environment: WIndows XP
Reporter: Yang Lei


1.API(annotation) differences between the current driver and 0.95 spec

CompositeContext:

0.95 Spec v.s. current Tuscany driver (incubator-M2)
getName --> getCompositeName
getURI --> getCompositeURI
getMetaData --> none

Annotation difference: 
there is no annotation @ComponentMetadata.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (TUSCANY-593) Need a extendable way to register SCDL loaders

2006-08-03 Thread Yang Lei (JIRA)
Need a extendable way to register SCDL loaders
--

 Key: TUSCANY-593
 URL: http://issues.apache.org/jira/browse/TUSCANY-593
 Project: Tuscany
  Issue Type: Improvement
  Components: Java SCA Core
Affects Versions: Java-M1
 Environment: windows XP
Reporter: Yang Lei


Please let me know if Tuscany offers extendable way to register SCDL loaders , 
so we can always use the root of the loader such as ModuleLoader to load a SCDL 
without manually register each individual loader. The problem with this 
approach is if some one add an extension to the SCDL, we also needs to know the 
new loader...

Appreciate your help.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (TUSCANY-586) NullPointerException during registerModelObject(AbstractCompositeContext.java:446)

2006-07-28 Thread Yang Lei (JIRA)
NullPointerException during 
registerModelObject(AbstractCompositeContext.java:446) 
---

 Key: TUSCANY-586
 URL: http://issues.apache.org/jira/browse/TUSCANY-586
 Project: Tuscany
  Issue Type: Bug
  Components: Java SCA Core
Affects Versions: Java-M1
 Environment: Windows XP
Reporter: Yang Lei


The scenario is:

My sca.module file is in different location than the classpath location, so I 
use binaryClassLoader to indicate where to load binaries, use muduleURI to 
indicate the sca.module location.

The code causing problem is like the following: 

 ResourceLoader resourceLoader = new 
ResourceLoaderImpl(binaryClassLoader);
...
AssemblyContext modelContext = new 
AssemblyContextImpl(modelFactory, modelLoader, resourceLoader);
ModuleComponentConfigurationLoader loader = 
BootstrapHelper.getConfigurationLoader(systemContext, modelContext);
ModuleComponent moduleComponent = 
loader.loadModuleComponent(name,configURI, new URL(moduleURI));
rootContext.registerModelObject(moduleComponent);

The exception is: 

Stack Dump = java.lang.NullPointerException
at 
org.apache.tuscany.core.context.impl.AbstractCompositeContext.wireSource(AbstractCompositeContext.java:636)
at 
org.apache.tuscany.core.context.impl.AbstractCompositeContext.start(AbstractCompositeContext.java:185)
at 
org.apache.tuscany.core.context.scope.CompositeScopeContext.registerFactory(CompositeScopeContext.java:95)
at 
org.apache.tuscany.core.context.impl.AbstractCompositeContext.registerConfiguration(AbstractCompositeContext.java:499)
at 
org.apache.tuscany.core.context.impl.AbstractCompositeContext.registerModelObject(AbstractCompositeContext.java:446)

Appreciate the fix.

Yang

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Created: (TUSCANY-398) Ability to save sca assembly model object to XML

2006-05-17 Thread Yang Lei (JIRA)
Ability to save sca assembly model object to XML


 Key: TUSCANY-398
 URL: http://issues.apache.org/jira/browse/TUSCANY-398
 Project: Tuscany
Type: New Feature

  Components: Java SCA Core  
 Environment: Win2000
Reporter: Yang Lei


Current Tuscany contains the Loader framework to load sca assembly model from 
XML . Need a reverse operation to store the assembly model back to XML.
Thanks.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Created: (TUSCANY-337) Can I create two Tuscany runtime?

2006-05-08 Thread Yang Lei (JIRA)
Can I create two Tuscany runtime?
-

 Key: TUSCANY-337
 URL: http://issues.apache.org/jira/browse/TUSCANY-337
 Project: Tuscany
Type: Improvement

  Components: Java SCA Core  
 Environment: Win2000
Reporter: Yang Lei


When I create two Tuscany runtime. There is no way for me to access the first 
runtime and locate service from there. This may just be a product limitation. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Created: (TUSCANY-336) After comonent is stopped, can still locateService

2006-05-08 Thread Yang Lei (JIRA)
After comonent is stopped, can still locateService
--

 Key: TUSCANY-336
 URL: http://issues.apache.org/jira/browse/TUSCANY-336
 Project: Tuscany
Type: Bug

 Environment: Win2000
Reporter: Yang Lei


I was using the following code to stop a context ( component)

public void stopModule(String name) {
System.out.println("action stop module");
Context context = getContext(name);
display(context);
if (context!=null)
{
if (context.getLifecycleState() == context.STOPPED)
System.out.println("The module has already 
stopped.");
else
{
System.out.println("Stopping module...");
context.stop();

}
}else
{
System.out.println("The module is not available...");
}

display(context);
}

I can still locate the service after the context (component) is stopped:

my service starting
The next holiday is: Mon May 29 00:00:00 EDT 2006
...Stop MyService in Client1
action stop module
Context [MyServiceComponent] in state [RUNNING]
Stopping module...
Context [MyServiceComponent] in state [STOPPED]
The next holiday is: Mon May 29 00:00:00 EDT 2006



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Created: (TUSCANY-335) java.lang.IndexOutOfBoundsException when not definting references in the sca.module

2006-05-08 Thread Yang Lei (JIRA)
java.lang.IndexOutOfBoundsException when not definting references in the 
sca.module
---

 Key: TUSCANY-335
 URL: http://issues.apache.org/jira/browse/TUSCANY-335
 Project: Tuscany
Type: Bug

Reporter: Yang Lei


When remove the references defintion from sca.module: e.g.



MyServiceComponent



Got the following exception.

Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at 
org.apache.tuscany.container.java.builder.JavaContextFactoryBuilder.createInjector(JavaContextFactoryBuilder.java:393)
at 
org.apache.tuscany.container.java.builder.JavaContextFactoryBuilder.createReferenceInjector(JavaContextFactoryBuilder.java:343)
at 
org.apache.tuscany.container.java.builder.JavaContextFactoryBuilder.build(JavaContextFactoryBuilder.java:247)
at 
org.apache.tuscany.core.builder.impl.AssemblyVisitorImpl.visit(AssemblyVisitorImpl.java:52)
at 
org.apache.tuscany.model.assembly.impl.AssemblyObjectImpl.accept(AssemblyObjectImpl.java:39)
at 
org.apache.tuscany.model.assembly.impl.ExtensibleImpl.accept(ExtensibleImpl.java:66)
at 
org.apache.tuscany.model.assembly.impl.ComponentImpl.accept(ComponentImpl.java:201)
at 
org.apache.tuscany.model.assembly.impl.AssemblyObjectImpl.accept(AssemblyObjectImpl.java:51)
at 
org.apache.tuscany.model.assembly.impl.CompositeImpl.accept(CompositeImpl.java:329)
at 
org.apache.tuscany.model.assembly.impl.ModuleImpl.accept(ModuleImpl.java:96)
at 
org.apache.tuscany.model.assembly.impl.ComponentImpl.accept(ComponentImpl.java:211)
at 
org.apache.tuscany.core.builder.impl.AssemblyVisitorImpl.start(AssemblyVisitorImpl.java:44)
at 
org.apache.tuscany.core.runtime.RuntimeContextImpl.build(RuntimeContextImpl.java:160)
at 
org.apache.tuscany.core.context.impl.AbstractCompositeContext.registerModelObject(AbstractCompositeContext.java:259)
at 
org.apache.tuscany.core.client.BootstrapHelper.registerModule(BootstrapHelper.java:133)
at 
org.apache.tuscany.core.client.TuscanyRuntime.(TuscanyRuntime.java:104)
at 
mysca.test.client.testcase.MyServiceClientTestCase.start(MyServiceClientTestCase.java:94)
at 
mysca.test.client.testcase.MyServiceClientTestCase.testTwoClient(MyServiceClientTestCase.java:39)
at 
mysca.test.client.testcase.MyServiceClientTestCase.main(MyServiceClientTestCase.java:29)


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Created: (TUSCANY-334) @SessionId is not injected

2006-05-08 Thread Yang Lei (JIRA)
@SessionId is not injected
--

 Key: TUSCANY-334
 URL: http://issues.apache.org/jira/browse/TUSCANY-334
 Project: Tuscany
Type: Bug

  Components: Java SCA Core  
 Environment: Win2000
Reporter: Yang Lei


Declared a  field with annotation of @SessionID , the field value is not 
injected during runtime.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira