Re: [NOTICE] Welcome Jean-Sebastien Delfino as new Tuscany PMC Chair

2013-05-28 Thread Raymond Feng
Kudos to both Jean-Sebastien and Luciano!

Thanks,
Raymond
 
On May 27, 2013, at 6:33 PM, Jean-Sebastien Delfino jsdelf...@gmail.com wrote:

 Thanks, and Many Thanks to Luciano for his chairmanship over the past year!!
 
 - Jean-Sebastien
 
 On Thu, May 23, 2013 at 7:33 PM, Nirmal Fernando nirmal070...@gmail.com 
 wrote:
 Congratulations Jean-Sebastien !! IMO this is well deserved! :-)
 
 
 On Wed, May 22, 2013 at 11:46 PM, Simon Nash n...@apache.org wrote:
 Luciano Resende wrote:
 The Tuscany PMC has voted and the Board has confirmed Jean-Sebastien
 Delfino as the new Tuscany PMC Chair.
 
 Congratulations !!!
 
 --
 Luciano Resende
 http://people.apache.org/~lresende
 http://twitter.com/lresende1975
 http://lresende.blogspot.com/
 
 Congratulations and welcome, Sebastien!
 
   Simon
 
 
 
 
 -- 
 Best Regards,
 Nirmal
 
 C.S.Nirmal J. Fernando
 Senior Software Engineer,
 WSO2 Inc.
 
 Blog: http://nirmalfdo.blogspot.com/
 



Re: [NOTICE] Welcome Sebastian Millies as new committer

2013-04-08 Thread Raymond Feng
Congratulations and welcome on board!

Raymond

On Apr 8, 2013, at 7:29 AM, Luciano Resende luckbr1...@gmail.com wrote:

 The Tuscany PMC have voted to make Sebastian Millies a Tuscany committer.
 
 Congratulations and welcome Sebastian!
 
 -- 
 Luciano Resende
 http://people.apache.org/~lresende
 http://twitter.com/lresende1975
 http://lresende.blogspot.com/



Re: [VOTE] Accept Apache Nuvem as a Tuscany sub-project

2012-11-12 Thread Raymond Feng
+1 from me.

Sent from my iPad

On Nov 12, 2012, at 10:05 PM, Luciano Resende luckbr1...@gmail.com wrote:

 
 On Mon, Nov 12, 2012 at 10:04 PM, Luciano Resende luckbr1...@gmail.com 
 wrote:
 Apache Nuvem will define an open application programming interface for 
 common cloud application services, allowing applications to be easily ported 
 across the most popular cloud platforms. It is currently composed of 
 multiple cloud SCA components (Data, Queue, Chat), and supports multiple 
 cloud platforms such as AWS, GAE, etc as well as standalone deployment. 
 Nuvem was accepted for Incubation on June, 2010, and several of the active 
 committers are already part of the Tuscany PMC.
 
 Nuvem was accepted for Incubation on June 2010, and is currently a small 
 community, where the contributions are 100% done by volunteers in their own 
 free time, which makes the level of activity
 low, compared to what is required for graduating it as a TLP.
 
 Having said that, Nuvem has a great synergy with Apache Tuscany, and I'd 
 like to call a community vote to accept Nuvem as a sub-project of Apache 
 Tuscany (it could become Tuscany Cloud Components, or something like that).
 
 Please cast your vote.
 
 
 Here is my +1 to accept Nuvem as a Tuscany sub-project.
 
 -- 
 Luciano Resende
 http://people.apache.org/~lresende
 http://twitter.com/lresende1975
 http://lresende.blogspot.com/


FYI: Slides for my JavaOne 2012 talk: Building a Web API Platform with Open Source oAuth 2.0, REST, and NoSQL

2012-10-06 Thread Raymond Feng
Here is the link:

http://www.slideshare.net/rfeng/con6946-feng

Thanks,
Raymond






Re: in ubuntu, when i use the following binding, i just get the 127.0.0.1 in deployeduri, how can i change this ip to eth0?

2012-09-20 Thread Raymond Feng
Hi,

There is no way to get the hostname/ip address automatically for a multi-homed 
machine. The url you see is informational. You can customize it by specifying 
the baseURIs in node.xml or the NodeConfiguration API. For example,

?xml version=1.0 encoding=UTF-8?
node xmlns:sca=http://docs.oasis-open.org/ns/opencsa/sca/200912; 
xmlns=http://tuscany.apache.org/xmlns/sca/1.1;
xmlns:tuscany=http://tuscany.apache.org/xmlns/sca/1.1; uri=mynode 
domainRegistry=vm:default
domain=default

!-- Configure the base URIs for a given binding --
!-- Each base URI is for a protocol supported by the binding --
binding name=sca:binding.ws baseURIs=http://localhost; /
binding name=tuscany:binding.http baseURIs=http://localhost; /
binding name=tuscany:binding.rest baseURIs=http://localhost; /
binding name=tuscany:binding.jsonrpc baseURIs=http://localhost; /

/node

On Sep 20, 2012, at 5:33 AM, rgc wrote:

 for example, i write the binding uri in my composite file like this:
 
 service name=DBService  
   tuscany:binding.jsonrpc uri=/DBComponent/DBService /
 /service
 
 after i have launched the app, i will print the endpoint as the following:
 
 Endpoint:  URI = DBComponent#service-binding(DBService/DBService):
   component=DBComponent
   service=DBService
   isRemote=false
   isAsyncInvocation=false
   requiredIntents=[]
   policySets=[]
   
 binding=org.apache.tuscany.sca.binding.jsonrpc.impl.JSONRPCBindingImpl@176eeb9
   
 deployedUri=http://127.0.1.1:8080/cn.edu.nju.moon.version-consistency/DBComponent/DBService/
 
 
 what should i do to change 127.0.1.1 to my eth0 ip address if i do not change 
 binding uri in my composite file?
 
 in windows, when i launch my app, i can get my ethernet ip in deployedUri, 
 like this:
  
 deployedUri=http://114.212.84.235:8080/cn.edu.nju.moon.version-consistency/DBComponent/DBService/
 
 114.212.84.235 is my ethernet ip address in windows, i want get this ip in 
 ubuntu also, not 127.0.0.1
 
 yours.



Re: About EJB binding with tuscany.

2012-09-11 Thread Raymond Feng
We support the corbaname URL.

Thanks,
Raymond

On Sep 11, 2012, at 2:42 PM, merci wrote:

 Hi I saw your post with the question of how to bind Tuscany sca service to an 
 ejb in a remote application server. Please tell me how do you accomplish 
 that. I have the same problem.
 How do you configure the ejb.binding uri?
  
 Greetings



Re: HOW TO: Hot deploy SCA service withou restart app server

2012-09-11 Thread Raymond Feng
At this point, a restart is required even the change only happens in the 
composite file as the start/stop is tied to web app context listener or servlet 
filter. Programmatically, you can start/stop a Tuscany node though. So you can 
potentially make the lifecycle of a composite application more dynamic. We did 
that for the OSGi enterprise services implementation based on Tuscany/SCA.

Thanks,
Raymond

On Sep 11, 2012, at 8:51 PM, Makiet wrote:

 Hi,
  
 I have some interfaces and java classes, and a composite file to expose a 
 part of those interfaces as services.
 One day, I want to expose one more service based on an existing interface. I 
 mean no code change needed, only modify the composite file (I guessed).
 How can I achieve that without restart my app server?
  
 Best regards
 Binh, Nguyen Thanh



Re: [VOTE] Release Tuscany SCA 2.0 RC2

2012-06-24 Thread Raymond Feng
+1 from me.

Raymond Feng
Sent from my iPhone

On Jun 24, 2012, at 2:43 AM, ant elder ant.el...@gmail.com wrote:

 Well +1 from me anyway, would anyone else have a vote?
 
   ...ant
 
 On Tue, Jun 19, 2012 at 10:02 AM, ant elder ant.el...@gmail.com wrote:
 Here's the 2.0 RC2 release artifacts, please review and vote.
 
 The distributions and staging maven repo are at:
 http://people.apache.org/~antelder/tuscany/2.0-RC2/
 
 The SVN tag: 
 https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/tags/2.0-RC2/
 
   ...ant


Re: Tuscany Board Report is due

2012-05-08 Thread Raymond Feng
It looks good.

Thanks,
Raymond

On May 8, 2012, at 10:53 AM, Luciano Resende wrote:

 Looking into this quarter board report, and I see couple things to report
 
 - Tuscany 2.0 Beta4 release was approved, and the community is working
 on the RC2 of the official 2.0 release.
 - Tuscany community engaged with students as part of GSoC 2012, but
 the candidate had proposed ideas for multiple Apache projects and the
 Tuscany one was not selected.
 - The Tuscany PMC voted on a new policy on election and rotation of
 Project Chairs, and also recommended a new project Chair which got
 approved by the Board last month.
 
 Anything else that should be mentioned ?
 
 -- 
 Luciano Resende
 http://people.apache.org/~lresende
 http://twitter.com/lresende1975
 http://lresende.blogspot.com/



Re: [VOTE] Release Tuscany SCA 2.0 RC1

2012-04-19 Thread Raymond Feng
I'll review it.

Raymond Feng
Sent from my iPhone

On Apr 19, 2012, at 6:12 AM, ant elder ant.el...@gmail.com wrote:

 Still need a couple of votes...
 
   ...ant
 
 On Mon, Apr 16, 2012 at 3:17 PM, Simon Laws simonsl...@googlemail.com wrote:
 On Mon, Apr 16, 2012 at 8:15 AM, ant elder ant.el...@gmail.com wrote:
 Looks ok to me so +1.
 
   ...ant
 
 On Thu, Apr 12, 2012 at 6:04 PM, ant elder ant.el...@gmail.com wrote:
 I've spun the artifacts for the 2.0 release, they're available at:
 http://people.apache.org/~antelder/tuscany/2.0-RC1/
 
 Please review and cast your vote on releasing.
 
 Many thanks,
 
   ...ant
 
 Hi Ant
 
 Have been a bit busy with something else so haven't got to this yet.
 Sorry. It's on my list;-)
 
 Simon
 
 
 --
 Apache Tuscany committer: tuscany.apache.org
 Co-author of a book about Tuscany and SCA: tuscanyinaction.com


Re: [jira] [Commented] (TUSCANY-4023) Develop a distributed domain registry using Apache ZooKeeper, Redis, or Memcache

2012-03-26 Thread Raymond Feng
Hi, Yogesh.

Thank you for your interest. We already have discussions with another student 
on the mailing list. Can you check at 
http://mail-archives.apache.org/mod_mbox/tuscany-dev/201203.mbox/browser? It's 
under the title:

GSoC 2012 Idea : TUSCANY-4023

BTW, I'm open to have multiple students implementing the different backend, for 
example, one based on ZooKeeper while the other one for Redis.

Thanks,
Raymond

On Mar 26, 2012, at 2:16 PM, yogesh kumar jha (Commented) (JIRA) wrote:

 
[ 
 https://issues.apache.org/jira/browse/TUSCANY-4023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13238847#comment-13238847
  ] 
 
 yogesh kumar jha commented on TUSCANY-4023:
 ---
 
 Hi,
 
 I am interested in taking up this project under GSoC.
 
 I have experience in developing reliable configuration repository based on 
 Zookeeper.
 I have a good understanding of Zookeeper internals and distributed systems 
 principles in general. 
 
 I would like to know some more details regarding the project.
 
 Thank you
 
 
 
 Develop a distributed domain registry using Apache ZooKeeper, Redis, or 
 Memcache
 
 
Key: TUSCANY-4023
URL: https://issues.apache.org/jira/browse/TUSCANY-4023
Project: Tuscany
 Issue Type: Improvement
 Components: SCA Java Runtime
   Reporter: Raymond Feng
 Labels: GSOC, GSoC2012
 
 There are a few distributed data services such as Apache ZooKeeper, Redis, 
 or Memcache. I would like to leverage the popular infrastructure to support 
 distributed SCA domain registry. We had a old prototype.
 
 --
 This message is automatically generated by JIRA.
 If you think it was sent incorrectly, please contact your JIRA 
 administrators: 
 https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
 For more information on JIRA, see: http://www.atlassian.com/software/jira
 
 



Re: svn commit: r1303591 - /tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java

2012-03-22 Thread Raymond Feng
Ant, please STOP playing the veto game here.

1. Your change broke most if not all the binding invokers that make
outbound connections using the binding uri even though the failures were
not directly exposed due to lack of test coverage which we should improve.

2. The Endpoint concept was introduced later in the cycle. As a result,
most of the reference binding invokers still depend on the behavior that
the reference binding is set with the deployed service endpoint uri. We can
argue if it's good or bad but we need to fix them before another bug fix
regressed the code so much. I will try to fix the binding invokers but it
will take a bit time.

3. I have the same veto right too. The only thing is that my revert didn't
completely roll back all your changes including the failing compliance test
if it's added recently. I explained in the e-mail why I need to revert your
change. Maybe I should say -1 or veto your change too to make it clear.

4. Please don't abuse/stain the Apache hat when/if you try to push for some
'private' agenda.

Sorry for being harsh here but otherwise we'll be painted as anti-Apache if
we have technical disagreement.

Thanks,
Raymond

On Thu, Mar 22, 2012 at 7:50 AM, ant elder ant.el...@gmail.com wrote:

 On Thu, Mar 22, 2012 at 2:46 PM, Luciano Resende luckbr1...@gmail.com
 wrote:
 
 
  On Thursday, March 22, 2012, ant elder ant.el...@gmail.com wrote:
  On Wed, Mar 21, 2012 at 9:49 PM,  rf...@apache.org wrote:
  Author: rfeng
  Date: Wed Mar 21 21:49:52 2012
  New Revision: 1303591
 
  URL: http://svn.apache.org/viewvc?rev=1303591view=rev
  Log:
  Revert the change based on the comment from
  https://issues.apache.org/jira/browse/TUSCANY-4029
 
  Modified:
 
 
  
 tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
 
  Modified:
 
 tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
  URL:
 
 http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java?rev=1303591r1=1303590r2=1303591view=diff
 
 
 ==
  ---
 
 tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
  (original)
  +++
 
 tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
  Wed Mar 21 21:49:52 2012
  @@ -338,6 +338,11 @@ public class EndpointReferenceBinderImpl
 
  }
 
  +// [rfeng] Setup the target endpoint if the reference uses an
  explicit binding
  +if (endpointReference.getTargetEndpoint().getBinding() ==
 null)
  {
  +
 
  
 endpointReference.getTargetEndpoint().setBinding(endpointReference.getBinding());
  +}
  +
  // Now the endpoint reference is resolved check that the
 binding
  interfaces contract
  // and the reference contract are compatible
  try {
  @@ -500,12 +505,16 @@ public class EndpointReferenceBinderImpl
  } else {
  endpointReference.setTargetEndpoint(matchedEndpoint);
  Binding binding = matchedEndpoint.getBinding();
  +// Reverted the change, see
  https://issues.apache.org/jira/browse/TUSCANY-4029
  +/*
  try {
 endpointReference.setBinding((Binding)
  binding.clone());
 } catch (CloneNotSupportedException e) {
 // shouldn't happen
 throw new RuntimeException(e);
 }
  +  */
  +endpointReference.setBinding(binding);
  // TUSCANY-3873 - add policy from the service
  //we don't care about intents at this stage
 
 
 endpointReference.getPolicySets().addAll(matchedEndpoint.getPolicySets());
  @@ -528,6 +537,7 @@ public class EndpointReferenceBinderImpl
 
 
 endpointReference.setStatus(EndpointReference.Status.WIRED_TARGET_FOUND_AND_MATCHED);
   Raymond, as discussed in TUSCANY-4029 and on the IM chat we
 had
  yesterday i'm -1 on your commit. It doesn't fix the problem which
  TUSCANY-4029 addresses and it also breaks the OASIS compliance tests.
 
  If there are any issues with the approach suggested in TUSCANY-4029
  then lets discuss it here or you're welcome to IM ping me to more
  quickly find a solution that works for everyone.
 
...ant
 
 
  Please, let's keep these technical discussions on the mailing list.
 
  BTW, how come it breakes the compliance test ? It has been like this
 forever
  and the tests were passing fine.
 
  In the same way, your fix seems to break other stuff as well as
 commented on
  the other thread, which I'm -1 on having all that broken.
 

 Can you provide more details 

Re: svn commit: r1303591 - /tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java

2012-03-22 Thread Raymond Feng
I'm making one final clarification before wasting more time:

As I pointed out, the break you introduced applied to most if not all reference 
binding invokers. Please don't try to hint it's only RESTBindingInvoker.

Now I'll go to fix ALL reference binding invokers.

Raymond Feng
Sent from my iPhone

On Mar 22, 2012, at 10:11 AM, ant elder ant.el...@gmail.com wrote:

 Come on Raymond if anyone is playing games it is you by reverting
 changes, comments inline below:
 
   ...ant
 
 On Thu, Mar 22, 2012 at 4:38 PM, Raymond Feng enjoyj...@gmail.com wrote:
 Ant, please STOP playing the veto game here.
 
 1. Your change broke most if not all the binding invokers that make outbound
 connections using the binding uri even though the failures were not directly
 exposed due to lack of test coverage which we should improve.
 
 
 The change did not break the Tuscany build, or any tests. If you have
 a particular use case that is not part of that you should add some
 tests to Tuscany for it. At the very least you should be less upset
 when a trunk change impacts your non-tested use cases while you don't
 have tests for them in the build.
 
 2. The Endpoint concept was introduced later in the cycle. As a result, most
 of the reference binding invokers still depend on the behavior that the
 reference binding is set with the deployed service endpoint uri. We can
 argue if it's good or bad but we need to fix them before another bug fix
 regressed the code so much. I will try to fix the binding invokers but it
 will take a bit time.
 
 
 Ok finally that gives a hint at what your issue is - so are you
 agreeing now that the Rest invoker just hasn't kept up with trunk dev
 and now has a bug that needs fixing along the lines of what i've
 suggested in TUSCANY-4029?
 
 3. I have the same veto right too. The only thing is that my revert didn't
 completely roll back all your changes including the failing compliance test
 if it's added recently. I explained in the e-mail why I need to revert your
 change. Maybe I should say -1 or veto your change too to make it clear.
 
 
 Yes you could, but you need a technical reason to support it and then
 you leave the actual reverting to be done by the person you're
 vetoing. And the technical reason for this objection here is seeming
 very hard to get you or Luciano to actually give precise details on.
 And BTW, the compliance test thats now broken is not a new one its
 been there for ages, even if it was new thats shouldn't make a
 difference - trunk is where we do new development.
 
 4. Please don't abuse/stain the Apache hat when/if you try to push for some
 'private' agenda.
 
 Sorry for being harsh here but otherwise we'll be painted as anti-Apache if
 we have technical disagreement.
 
 
 I don't know about anti-Apache but it doesn't feel particularly
 community spirited with this aggressive over reaction that i'm getting
 from you and Luciano for a change that didn't even break anything
 within Tuscany. If we're ever going to encourage others to come
 participate in development here, especially as volunteers in their own
 time, we need to have a more friendly approach when you don't like or
 understand something.
 
   ...ant


Re: svn commit: r1304128 - in /tuscany/sca-java-2.x/trunk/modules: assembly/src/main/java/org/apache/tuscany/sca/assembly/ assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ binding-atom-run

2012-03-22 Thread Raymond Feng
This should conclude the argument that Ant was having with us. His change is 
now added back with all the fixes to the binding invokers made by the 
to-be-nicer guy.

Thanks,
Raymond

On Mar 22, 2012, at 4:19 PM, rf...@apache.org wrote:

 Author: rfeng
 Date: Thu Mar 22 23:19:17 2012
 New Revision: 1304128
 
 URL: http://svn.apache.org/viewvc?rev=1304128view=rev
 Log:
 Fix the binding invokers to use endpoint reference's deployed URI (i.e., the 
 target service endpoint address)
 
 Added:

 tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCReferenceTargetTestCase.java
(with props)

 tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/RESTReferenceTestCase.java
(with props)

 tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/echo/jaxrs/

 tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/echo/jaxrs/Echo.java
(with props)

 tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/echo/jaxrs/EchoClientImpl.java
(with props)

 tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/echo/jaxrs/EchoImpl.java
(with props)

 tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/rest-reference.composite
  - copied, changed from r1303591, 
 tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/test/resources/JSONRPCBinding.composite
 Modified:

 tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EndpointReference.java

 tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointReferenceImpl.java

 tuscany/sca-java-2.x/trunk/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomReferenceBindingProvider.java

 tuscany/sca-java-2.x/trunk/modules/binding-jsonp-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonp/runtime/JSONPInvoker.java

 tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JsonRpcInvoker.java

 tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/test/resources/JSONRPCBinding.composite

 tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/test/resources/JSONRPCReference.composite

 tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/META-INF/MANIFEST.MF

 tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTBindingInvoker.java

 tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTReferenceBindingProvider.java

 tuscany/sca-java-2.x/trunk/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIReferenceBindingProvider.java

 tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java

 tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
 
 Modified: 
 tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EndpointReference.java
 URL: 
 http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EndpointReference.java?rev=1304128r1=1304127r2=1304128view=diff
 ==
 --- 
 tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EndpointReference.java
  (original)
 +++ 
 tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EndpointReference.java
  Thu Mar 22 23:19:17 2012
 @@ -123,6 +123,17 @@ public interface EndpointReference exten
  * @param endpoint the target endpoint
  */
 void setTargetEndpoint(Endpoint targetEndpoint);
 +
 +/**
 + * Get the deployed URI of the corresponding service endpoint
 + * @return The deployed URI
 + */
 +String getDeployedURI();
 +/**
 + * Set the deployed URI
 + * @param deployedURI
 + */
 +void setDeployedURI(String deployedURI);
 
 /**
  * Returns the interface contract defining the interface
 
 Modified: 
 tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointReferenceImpl.java
 URL: 
 http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointReferenceImpl.java?rev=1304128r1=1304127r2=1304128view=diff
 ==
 --- 
 

Re: svn commit: r1302317 - /tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java

2012-03-21 Thread Raymond Feng
Hi,

This change breaks the case where we use @target in the reference element to 
wire components using non-SCA bindings. For example, the RESTBindingInvoker 
uses the binding.uri to find out the target address. Since now it's a clone, 
the value won't be updated when the service binding set the deployed URI.

A better fix is to retrieve the deployed URI from the target endpoint.

Thanks,
Raymond

On Mar 19, 2012, at 1:09 AM, antel...@apache.org wrote:

 Author: antelder
 Date: Mon Mar 19 08:09:04 2012
 New Revision: 1302317
 
 URL: http://svn.apache.org/viewvc?rev=1302317view=rev
 Log:
 TUSCANY-4029: Clone the binding when setting it on the EndpointReference to 
 ensure its not the same instance as that used by the Endpoint.
 
 Modified:

 tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
 
 Modified: 
 tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
 URL: 
 http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java?rev=1302317r1=1302316r2=1302317view=diff
 ==
 --- 
 tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
  (original)
 +++ 
 tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
  Mon Mar 19 08:09:04 2012
 @@ -42,7 +42,6 @@ import org.apache.tuscany.sca.assembly.b
 import org.apache.tuscany.sca.assembly.builder.BuilderExtensionPoint;
 import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
 import org.apache.tuscany.sca.assembly.builder.PolicyBuilder;
 -import org.apache.tuscany.sca.assembly.xml.Messages;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.core.FactoryExtensionPoint;
 import org.apache.tuscany.sca.core.UtilityExtensionPoint;
 @@ -501,7 +500,12 @@ public class EndpointReferenceBinderImpl
 } else {
 endpointReference.setTargetEndpoint(matchedEndpoint);
 Binding binding = matchedEndpoint.getBinding();
 -endpointReference.setBinding(binding);
 +try {
 + endpointReference.setBinding((Binding) 
 binding.clone());
 + } catch (CloneNotSupportedException e) {
 + // shouldn't happen
 + throw new RuntimeException(e);
 + }
 // TUSCANY-3873 - add policy from the service
 //we don't care about intents at this stage
 
 endpointReference.getPolicySets().addAll(matchedEndpoint.getPolicySets());
 
 



[jira] [Commented] (TUSCANY-4029) Binding object inadvertently shared across Endpoint and EndpointReference causes errors

2012-03-21 Thread Raymond Feng (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/TUSCANY-4029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13235027#comment-13235027
 ] 

Raymond Feng commented on TUSCANY-4029:
---

Hi, are you affected by the fact that the reference gets the same instance of 
binding from the service side?

This change breaks the case where we use @target in the reference element to 
wire components using non-SCA bindings. For example, the RESTBindingInvoker 
uses the binding.uri to find out the target address. Since now it's a clone, 
the value won't be updated when the service binding set the deployed URI.

 Binding object inadvertently shared across Endpoint and EndpointReference 
 causes errors
 ---

 Key: TUSCANY-4029
 URL: https://issues.apache.org/jira/browse/TUSCANY-4029
 Project: Tuscany
  Issue Type: Bug
Reporter: ant elder

 The Binding object stored in the EndpointReference is the same object as 
 stored in the Endpoint which can cause obscure errors when setting attributes 
 on the service also effects the reference and vica versa. 

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




Re: svn commit: r1302317 - /tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java

2012-03-21 Thread Raymond Feng
Hi,

The change had a huge impact on all the binding invokers that rely on the 
service binding to resolve the deployed URIs when the endpoint reference is 
resolved to a target endpoint. 

BTW, the use case applies to something like the following:

component name=A
service name=S1
tuscany:binding.rest uri=/a/b/
/service
/component

component name=B
reference name=r1 target=A/S1/
/component

The r1 reference is now have /a/b as the uri instead of the deployed URI. 
Ideally, the binding invoker should ask for the target endpoint's deployed URI. 
But it involves quite a bit changes.

I'll revert the change for now until we find a consistent solution.

Thanks,
Raymond

On Mar 21, 2012, at 2:01 PM, Raymond Feng wrote:

 Hi,
 
 This change breaks the case where we use @target in the reference element 
 to wire components using non-SCA bindings. For example, the 
 RESTBindingInvoker uses the binding.uri to find out the target address. Since 
 now it's a clone, the value won't be updated when the service binding set the 
 deployed URI.
 
 A better fix is to retrieve the deployed URI from the target endpoint.
 
 Thanks,
 Raymond
 
 On Mar 19, 2012, at 1:09 AM, antel...@apache.org wrote:
 
 Author: antelder
 Date: Mon Mar 19 08:09:04 2012
 New Revision: 1302317
 
 URL: http://svn.apache.org/viewvc?rev=1302317view=rev
 Log:
 TUSCANY-4029: Clone the binding when setting it on the EndpointReference to 
 ensure its not the same instance as that used by the Endpoint.
 
 Modified:
   
 tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
 
 Modified: 
 tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
 URL: 
 http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java?rev=1302317r1=1302316r2=1302317view=diff
 ==
 --- 
 tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
  (original)
 +++ 
 tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
  Mon Mar 19 08:09:04 2012
 @@ -42,7 +42,6 @@ import org.apache.tuscany.sca.assembly.b
 import org.apache.tuscany.sca.assembly.builder.BuilderExtensionPoint;
 import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
 import org.apache.tuscany.sca.assembly.builder.PolicyBuilder;
 -import org.apache.tuscany.sca.assembly.xml.Messages;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.core.FactoryExtensionPoint;
 import org.apache.tuscany.sca.core.UtilityExtensionPoint;
 @@ -501,7 +500,12 @@ public class EndpointReferenceBinderImpl
} else {
endpointReference.setTargetEndpoint(matchedEndpoint);
Binding binding = matchedEndpoint.getBinding();
 -endpointReference.setBinding(binding);
 +try {
 +endpointReference.setBinding((Binding) 
 binding.clone());
 +} catch (CloneNotSupportedException e) {
 +// shouldn't happen
 +throw new RuntimeException(e);
 +}
// TUSCANY-3873 - add policy from the service
//we don't care about intents at this stage

 endpointReference.getPolicySets().addAll(matchedEndpoint.getPolicySets());
 
 
 



Re: [VOTE] Release 2.0-Beta4 RC1

2012-03-15 Thread Raymond Feng
+1 from me.

Thanks,
Raymond

On Mar 8, 2012, at 1:48 AM, ant elder wrote:

 Here's the release vote for RC1 of the 2.0-Beta4 artifacts, please
 review and vote.
 
 You can find the staged artifacts at:
 http://people.apache.org/~antelder/tuscany/2.0-Beta4-RC1/
 
 and the SVN tag for the release at:
 https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/tags/2.0-Beta4-RC1/
 
   ...ant



Re: [VOTE] Release 2.0-Beta4 RC1

2012-03-14 Thread Raymond Feng
I'll review it today.

Raymond Feng
Sent from my iPhone

On Mar 14, 2012, at 1:32 AM, ant elder ant.el...@gmail.com wrote:

 Still looking for votes on this, one more is needed to release...anyone?
 
   ...ant
 
 On Mon, Mar 12, 2012 at 8:40 AM, ant elder ant.el...@gmail.com wrote:
 On Mon, Mar 12, 2012 at 3:28 AM, Nirmal Fernando nirmal070...@gmail.com 
 wrote:
 Also shouldn't Release note be changed?
 http://people.apache.org/~antelder/tuscany/2.0-Beta4-RC1/RELEASE_NOTES
 
 
 Yes. Searching through the release it looks like that is the only
 place that hasn't been changed, the CHANGES file for example has been
 updated. Seems a shame to have to respin to change a single occurrence
 of a 3 character to be a 4 so lets wait and see if any issues come up
 or if it gets another +1 as is.
 
   ..ant


Re: GSoC 2012 Idea : TUSCANY-4023

2012-03-14 Thread Raymond Feng
Hi, Dishara.

It's glad to see you did some homework :-).

The scope is the project is to use Apache ZooKeeper to publish and receive 
descriptions of service endpoints, such as the component URI, the binding type, 
associated policies and the endpoint address. For example, we run two 
components (Component A  B) on two hosts (Host A and B), Component A has a 
reference to Component B. When Tuscany starts on Host A, we publish the 
information about component A to the ZooKeeper and receive the description of 
Component B. The endpoint description of Component B will be used by Host A to 
resolve the target (the logical SCA address) of an SCA reference.  ZooKeeper 
also maintains the group of Tuscany nodes in the same domain. It keeps the 
consistent state about all the participating SCA components. In a simplified 
view, we can treat ZooKeeper as a distributed map.

Thanks,
Raymond

On Mar 13, 2012, at 12:21 PM, Dishara Wijewardana wrote:

 Hi Raymond,
 
 On Mon, Mar 12, 2012 at 10:03 PM, Raymond Feng cyberf...@gmail.com wrote:
 Hi, Dishara.
 
 Thank you for the interest. I'll elaborate more on the idea.
 
 Thank you very much for the detailed description. 
 
 I went through the tuscany distributed runtime wiki once and got an 
 understanding(may be have to go through again ;) ). Seems it got a good 
 architecture to distribute the existing domain registry. 
   
 
 There is a SCA domain concept in Tuscany, which is a service registry of 
 metadata about all the components and policies. A composite application can 
 have components running on different machines and they can be wired to each 
 other using remote bindings within the SCA domain. From the runtime 
 perspective, Tuscany uses the domain registry to resolve the wirings between 
 components.
 
 Tuscany has two types of implementation of the domain registry at this point:
 
 1) Local registry (which only knows the local endpoints). It can be extended 
 to use local files to describe remote endpoints in the node.xml.
 2) Multicast based registry on top of Tomcat Tribes or Hazelcast.
 
 
  So we probably not going to use either any of above two domain registry 
 implementations, but the centralized registry. (which I assumed as another 
 registry impl).  
  
 In a typical enterprise environment, the multicast doesn't work well due to 
 networking constraints. A more useful infrastructure is that we have 
 centralized registry with HA configurations (such as master/slave). Apache 
 ZooKeeper and Redis can be used for these purposes. The project will  be 
 mostly implement the DomainRegistry SPI [2].
 
 
 As far as I understand, we'll be using a suitable domain registry 
 implementation to distribute among ZooKeeper nodes. And as the wiki stands, 
 Tuscany will not go for JVM clustering, but a higher level clustering 
 solution.
 
 This project will have following main targets.
 - Identify/implement how nodes (in the distributed environment) should be 
 modeled to form a SCA component.
 - Integrate the nodes to meet the above requirement through a distributed 
 platform (ZooKeeper). 
  (And integration of nodes should be done by tuscany SCA bindings on top of 
 Apache ZooKeeper nodes)
  At the end of the day this will create a bridge between ZooKeeper nodes and 
 SCA components.
   
 Also  +1 for Apache ZooKeeper. 
 
 Please correct me if I have misunderstood the requirement or any feedback 
 will be great full. This is a really interesting project. 
 But I am not quite aware of the scope of this exactly in details . 
  
 [1] https://cwiki.apache.org/TUSCANYWIKI/distributed-runtime.html
 [2] 
 https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistry.java
 
 Thanks,
 Raymond
 
 On Mar 11, 2012, at 10:13 AM, Dishara Wijewardana wrote:
 
  Hi all,
  This is regarding the project idea Develop a distributed domain registry 
  using Apache ZooKeeper, Redis, or Memcache.
 
  I am interested in applying for this SoC program and I saw the JIRA[1] 
  project idea for Apache Tuscany. I have played with Tuscany and already
  had hands on experience with creating Tuscany SCA components in webapps and 
  using the callback method and etc (the framework is very helpful
  when communicating between front end and back end).
 
  I would like to work on the project Develop a distributed domain registry 
  using Apache ZooKeeper, Redis, or Memcache .
  These days I started looking in to Apache ZooKeeper and get familiar with 
  it.
 
  It will be nice if I can get to know some details(what is the expected 
  scope, what things need to be looked before hand, and etc) of this project 
  idea, so that I can prepare well for the project.
 
 
  Thanks
  /Dishara
 
  
 Thanks
 /Dishara



Re: GSoC 2012 Idea : TUSCANY-4023

2012-03-12 Thread Raymond Feng
Hi, Dishara.

Thank you for the interest. I'll elaborate more on the idea.

There is a SCA domain concept in Tuscany, which is a service registry of 
metadata about all the components and policies. A composite application can 
have components running on different machines and they can be wired to each 
other using remote bindings within the SCA domain. From the runtime 
perspective, Tuscany uses the domain registry to resolve the wirings between 
components.

Tuscany has two types of implementation of the domain registry at this point:

1) Local registry (which only knows the local endpoints). It can be extended to 
use local files to describe remote endpoints in the node.xml.
2) Multicast based registry on top of Tomcat Tribes or Hazelcast. 

In a typical enterprise environment, the multicast doesn't work well due to 
networking constraints. A more useful infrastructure is that we have 
centralized registry with HA configurations (such as master/slave). Apache 
ZooKeeper and Redis can be used for these purposes. The project will  be mostly 
implement the DomainRegistry SPI [2].

[1] https://cwiki.apache.org/TUSCANYWIKI/distributed-runtime.html
[2] 
https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistry.java

Thanks,
Raymond

On Mar 11, 2012, at 10:13 AM, Dishara Wijewardana wrote:

 Hi all,
 This is regarding the project idea Develop a distributed domain registry 
 using Apache ZooKeeper, Redis, or Memcache.
 
 I am interested in applying for this SoC program and I saw the JIRA[1] 
 project idea for Apache Tuscany. I have played with Tuscany and already 
 had hands on experience with creating Tuscany SCA components in webapps and 
 using the callback method and etc (the framework is very helpful 
 when communicating between front end and back end). 
 
 I would like to work on the project Develop a distributed domain registry 
 using Apache ZooKeeper, Redis, or Memcache .
 These days I started looking in to Apache ZooKeeper and get familiar with it. 
 
 It will be nice if I can get to know some details(what is the expected scope, 
 what things need to be looked before hand, and etc) of this project idea, so 
 that I can prepare well for the project. 
  
 
 Thanks
 /Dishara



[jira] [Created] (TUSCANY-4023) Develop a distributed domain registry using Apache ZooKeeper, Redis, or Memcache

2012-03-06 Thread Raymond Feng (Created) (JIRA)
Develop a distributed domain registry using Apache ZooKeeper, Redis, or Memcache


 Key: TUSCANY-4023
 URL: https://issues.apache.org/jira/browse/TUSCANY-4023
 Project: Tuscany
  Issue Type: Improvement
  Components: SCA Java Runtime
Reporter: Raymond Feng


There are a few distributed data services such as Apache ZooKeeper, Redis, or 
Memcache. I would like to leverage the popular infrastructure to support 
distributed SCA domain registry. We had a old prototype.

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




Re: GSoC 2012

2012-03-05 Thread Raymond Feng
Great, I'll draft a few ideas.

Thanks,
Raymond

On Mar 4, 2012, at 9:42 PM, Luciano Resende wrote:

 It's that time again for us to build a list of project ideas and start
 attracting students for GSoC. If you have specific ideas, please go
 ahead and create a JIRA with the appropriate tag.
 
 
 -- Forwarded message --
 From: Ulrich Stärk u...@apache.org
 Date: Sun, Mar 4, 2012 at 9:01 AM
 Subject: Google Summer of Code 2012 upcoming
 To: p...@apache.org
 Cc: d...@community.apache.org
 
 
 Hello PMCs,
 
 Google Summer of Code is the ideal opportunity for you to attract new
 contributors to your projects.
 
 If you want to participate with your project you NOW need to
 
 - understand what it means to be a mentor [1]
 - propose your project ideas. Just label your issues with gsoc2012 in JIRA and
 they will show up at [2]. See also [1].
 - subscribe to code-awa...@apache.org (restricted to potential
 mentors, meant to be used
 as a private list - general discussions on the public
 d...@community.apache.org list as much as possible please)
 
 The ASF will apply as a participating organization with GSoC, your project
 doesn't need to do that. See [3] for more information. Note that the ASF isn't
 accepted yet, nevertheless you *really* should start recording your ideas now.
 
 Last year we had 38 students completing GSoC successfully, some of which are
 now active contributors to the projects they worked on. Let's make this a
 success again this year!
 
 On behalf of the GSoC 2012 admins,
 
 Uli
 
 [1] http://community.apache.org/guide-to-being-a-mentor.html
 [2] http://s.apache.org/gsoc2012tasks
 [3] http://community.apache.org/gsoc.html
 
 
 -- 
 Luciano Resende
 http://people.apache.org/~lresende
 http://twitter.com/lresende1975
 http://lresende.blogspot.com/



Re: Overriding remotable

2012-02-18 Thread Raymond Feng
Hi,

At that time, I was questioning the merit to introduce remotable
attribute in the composite to override the Java interface. Really, to make
the service remotable, the interface design has to take that into
consideration upfront, especially the data model (for example, DTO instead
of an Object).

Thanks,
Raymond

On Sat, Feb 18, 2012 at 9:15 AM, Simon Laws simonsl...@googlemail.comwrote:

 On Fri, Feb 17, 2012 at 6:08 PM, Luciano Resende luckbr1...@gmail.com
 wrote:
  On Fri, Feb 17, 2012 at 8:02 AM, Simon Laws simonsl...@googlemail.com
 wrote:
  In the OASIS spec you can override the remotable status of an
  interface using the remotable flag on the interface element:
 
 component name=HelloworldComponent
 implementation.java class=sample.HelloworldImpl/
 service name=HelloworldImpl
interface.java interface=sample.Helloworld
 remotable=true/
binding.ws/
 /service
 /component
 
  The idea is that when Helloworld looks like
 
  public interface Helloworld {
 String sayHello(String name);
  }
 
  You can use the flag to set the interface remotable. When Helloworld
 looks like
 
  @Remotable
  public interface Helloworld {
 String sayHello(String name);
  }
 
  Then you can't use the flag to unset it.
 
  There is a JIRA about this not working properly [1]. I've just been
  looking at it. The problem is that we don't actually set remotable
  based on this flag. This is a relatively straighforward thing to fix
  but it leads to a question. In some of the databinding code there are
  tests for remotable which prevents further processing if an interface
  is not remotable. For example, DataBindingjavaInterfaceProcessor has
 
 public void visitInterface(JavaInterface javaInterface) throws
  InvalidInterfaceException {
 if (!javaInterface.isRemotable()) {
 return;
 }
 ListOperation operations = javaInterface.getOperations();
 processInterface(javaInterface, operations);
 }
 
  This will run during introspection which is before we get to the
  stage, in the builders, where the component and component type
  interfaces are compared and where it would be sensible to apply the
  override. I can make it work if I let this databinding processing
  happen for non-remote interfaces just in case someone decides to
  override them. Can anyone see a downside other than the extra
  processing time it takes to calculate the interface types?
 
 
  [1] https://issues.apache.org/jira/browse/TUSCANY-3459
 
  Simon
  --
  Apache Tuscany committer: tuscany.apache.org
  Co-author of a book about Tuscany and SCA: tuscanyinaction.com
 
  It seems that there were some more issues around this (see [1])...
  I'll try to dig out some more and see if I can remember little more
  from when I was working on this in the past.
 
  [1] http://tuscany.markmail.org/thread/nfzvrtrgrkdhqfkp
 
  --
  Luciano Resende
  http://people.apache.org/~lresende
  http://twitter.com/lresende1975
  http://lresende.blogspot.com/

 Ok, that's interesting Luciano. So I don't loose it I added a patch to
 (https://issues.apache.org/jira/browse/TUSCANY-3459) with the changes
 required to make the infrastructure apply the remotable override. It
 passes all the tests we have active at the moment.

 I don't really understand Raymond's comment It seems to me that we
 pretty much don't differentiate local and remote interfaces any more
 with such changes from the thread you linked to. It's not clear
 whether this is a comment about the aesthetics of having a flag with
 which to affect the remotable status of an interface or a comment
 suggesting that the infrastructure relies on there being no
 databinding set for local interfaces. I can have a look at some local
 tests to see if there is any spurious databinding processing going on.

 Simon
 --
 Apache Tuscany committer: tuscany.apache.org
 Co-author of a book about Tuscany and SCA: tuscanyinaction.com



[jira] [Commented] (TUSCANY-3924) Inherited fields in service impl classes are treated as Properties

2012-02-08 Thread Raymond Feng (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/TUSCANY-3924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13203979#comment-13203979
 ] 

Raymond Feng commented on TUSCANY-3924:
---

The changes seem to cause a regression where the base class has SCA annotated 
fields as references or properties.

 Inherited fields in service impl classes are treated as Properties
 --

 Key: TUSCANY-3924
 URL: https://issues.apache.org/jira/browse/TUSCANY-3924
 Project: Tuscany
  Issue Type: Bug
  Components: Java SCA Assembly Model
Affects Versions: Java-SCA-2.x
Reporter: Vijai Kalathur
Assignee: Simon Laws
 Fix For: Java-SCA-2.x


 In the scenario where the Service impl class extends a class which has no SCA 
 annotations in it, protected fields in the base class are interpreted like 
 Properties.
 Ideally, only the fields in the impl class should be introspected for 
 References/Properties.  The fields in the base class should not be 
 interpreted as References/Properties if there are no SCA annotations. 

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




Re: [NOTICE] Jennifer Thompson voted as a Tuscany Committer

2012-02-03 Thread Raymond Feng
Welcome on board, Jennifer!

Raymond

On Feb 3, 2012, at 1:30 AM, ant elder wrote:

 The Tuscany PMC have voted to make Jennifer a Tuscany committer in
 recognition of all the patches submitted, particularly for the JMS
 binding.
 
 Congratulations and welcome Jennifer!
 
  ...ant



Re: replacing (or removing) Tuscany service provider files

2011-12-09 Thread Raymond Feng
We already support the ranking attribute for all service provider declarations. 
If one provider is expected, the highest one will be used.

Raymond Feng
Sent from my iPhone

On Dec 9, 2011, at 7:29 AM, Greg Dritschler greg.dritsch...@gmail.com wrote:

 I'm trying to replace some of Tuscany's service provider files, or in some 
 cases remove them.  I've been struggling with this for a while and thought 
 I'd toss it out for discussion.  Here are examples.
 
 1) I want to replace the RequestContextFactory provider.  Tuscany finds a 
 provider file using ServiceDiscoverer.getServiceDeclaration().  As far as I 
 can tell, when there are multiple provider files, both 
 EquinoxServiceDiscoverer and ContextClassLoaderServiceDiscoverer pick the 
 first one found and there's no way to control which one that will be.  I 
 think there needs to be some way to control order.  Perhaps the service 
 declaration should have a weight attribute and getServiceDeclaration() should 
 pick the one with the highest weight.
 
 2) I want to replace an implementation type in one of Tuscany's definitions 
 file.  Tuscany finds Definitions providers using 
 ServiceDiscoverer.getServiceDeclarations().  Again, there's no way to control 
 order, so here too a weight attribute might be useful.  (PullTransformer 
 already uses a weight attribute for a different purpose so it might have to 
 be called something else.)  The other problem is that Tuscany issues a 
 warning when there are duplicate definitions.  I think there would need to be 
 some way to suppress that but I'm not sure how.  I wouldn't want to lose the 
 warning altogether because in some cases it might be useful.  Also I wouldn't 
 want application definitions to be able to replace system definitions, which 
 could happen if we're not careful about this.
 
 3) I want to eliminate certain Tuscany policy providers, for example 
 JaasAuthenticationPolicyProviderFactory and 
 JMSTokenAuthenticationPolicyProviderFactory, either because I have 
 alternative providers or I don't want to support the function.  However these 
 providers are bundled with other classes I do need.  I think in this case the 
 simplest thing to do is to separate the policy functionality into another 
 Tuscany bundle.
 
 Greg


Re: Happy Birthday Tuscany

2011-12-07 Thread Raymond Feng
Wow, six years!

Raymond Feng
Sent from my iPhone

On Dec 7, 2011, at 2:30 PM, ant elder ant.el...@gmail.com wrote:

 Its six years today since Tuscany started as an incubator project at
 the ASF [1].
 
   ...ant
 
 [1] http://apache.markmail.org/message/sc4h3eyfo46tlbfp


Re: writing namespace prefixes

2011-10-14 Thread Raymond Feng
Maybe there is a bug in Tuscany code to read/write the QName value of intents. 
Please note the SOAP_v1_2 should be under the oasis opencsa namespace. 

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Software Foundation Member
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Oct 14, 2011, at 10:09 AM, Simon Laws wrote:

 I've come across a problem that I'm sure we've seen before but I can't
 put my finger on it.
 
 Write a composite without wstx-asl on the classpath...
 
 zdef2107778102:composite xmlns=
xmlns:zdef2107778102=http://docs.oasis-open.org/ns/opencsa/sca/200912;
target Namespace=http://tuscany.apache.org/xmlns/sca/1.1; name=endpoint
zdef2107778 1 :component xmlns=
xmlns:ns2=http://www.tuscany.apache.org/itests/interface/match;
name=DistributedServiceComponent uri=DistributedServiceComponent
 XXrequires=SOAP.v1_2 clientAuthentication.transport
policySets=ns2:BasicAuthenticationPolicySet
zdef2107778102:service xmlns=
name=ServiceComponent requires=clientAuthentication
zdef2107778102:interface.java
 
 interface=org.apache.tuscany.sca.itest.interfaces.ServiceComponent
remotable=true
 
 callbackInterface=org.apache.tuscany.sca.itest.interfaces.CallbackInterface
/zdef2107778102:interface.java
zdef2107778102:binding.ws
requires=zdef2107778102:SOAP.v1_2 policy
Sets=ns2:BasicAuthenticationPolicySet
 name=ServiceComponent
 
 uri=http://localhost:8081/DistributedServiceComponent/ServiceComponent;
/zdef2107778102:binding.ws
callback
 
 xmlns=http://docs.oasis-open.org/ns/opencsa/sca/200912;
binding.ws requires=SOAP.v1_2
policySets=ns2:BasicAuthenticationPolicySet
name=ServiceComponent
/binding.ws
/callback
/zdef2107778102:service
/zdef2107778102:component
 /zdef2107778102:composite
 
 Write a composite withwstx-asl on the classpath...
 
 composite xmlns=http://docs.oasis-open.org/ns/opencsa/sca/200912;
targetNamespace=http://tuscany.apache.org/xmlns/sca/1.1; name=endpoint
component name=DistributedServiceComponent
 uri=DistributedServiceComponent
 XXrequires=SOAP.v1_2 clientAuthentication.transport
xmlns:ns2=http://www.tuscany.apache.org/itests/interface/match;
policySets=ns2:BasicAuthenticationPolicySet
service name=ServiceComponent requires=clientAuthentication
interface.java
 
 interface=org.apache.tuscany.sca.itest.interfaces.ServiceComponent
remotable=true
 
 callbackInterface=org.apache.tuscany.sca.itest.interfaces.CallbackInterface
 /
binding.ws requires=SOAP.v1_2
policySets=ns2:BasicAuthenticationPolicySet
 name=ServiceComponent
 
 uri=http://localhost:8081/DistributedServiceComponent/ServiceComponent;
 /
callback
binding.ws requires=SOAP.v1_2
policySets=ns2:BasicAuthenticationPolicySet
name=ServiceComponent /
/callback
/service
/component
 /composite
 
 I've marked line XX as an example of the problem. We have code in the
 stream writer that tries to retrieve the prefix from a QName URI when
 no prefix is provided. Without wstx this fails and you're left with
 attribute values in the wrong namespace (note the non-wstx version
 uses a prefix for the oasis namespace and the wstx version doesn't).
 
 Ring any bells for anyone?
 
 Simon
 
 -- 
 Apache Tuscany committer: tuscany.apache.org
 Co-author of a book about Tuscany and SCA: tuscanyinaction.com



Re: svn commit: r1180780 - in /tuscany/sca-java-2.x/trunk: distribution/all/src/main/release/bin/ modules/binding-jsonrpc-runtime/ modules/binding-jsonrpc-runtime/META-INF/ modules/binding-jsonrpc-run

2011-10-10 Thread Raymond Feng
Hi,

Before the changes, we use jabsorb as the jsonrpc 1.0 implementation. I decided 
to use a home grown for number of reasons:

1) The jsonrpc protocol is simple enough. I'm trying to avoid the dependency to 
a non-active 3rd party project
2) I'm trying to leverage Jackson to improve performance
3) I want to use JSONRPC 2.0 at some point for binding.sca remoting
4) I want to try gzip encoding for some situations

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Software Foundation Member
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Oct 10, 2011, at 1:28 AM, Simon Laws wrote:

 On Mon, Oct 10, 2011 at 6:01 AM,  rf...@apache.org wrote:
 Author: rfeng
 Date: Mon Oct 10 05:01:04 2011
 New Revision: 1180780
 
 URL: http://svn.apache.org/viewvc?rev=1180780view=rev
 Log:
 Use home-grown JSONRPC implementation
 
 ...snip
 
 Hi Raymond
 
 Just interested. What made you build a home grown version? Was is 2.0
 support that tipped the balance?
 
 Regards
 
 Simon
 
 -- 
 Apache Tuscany committer: tuscany.apache.org
 Co-author of a book about Tuscany and SCA: tuscanyinaction.com



Re: JSON-RPC 2.0 Support, was Re: svn commit: r1180780 - in /tuscany/sca-java-2.x/trunk: distribution/all/src/main/release/bin/ modules/binding-jsonrpc-runtime/ modules/binding-jsonrpc-runtime/META-IN

2011-10-10 Thread Raymond Feng
I'll fix the 2.0 response. 
 
Raymond Feng
rf...@apache.org
Apache Software Foundation Member
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Oct 10, 2011, at 11:51 AM, Luciano Resende wrote:

 On Mon, Oct 10, 2011 at 10:37 AM, Raymond Feng enjoyj...@gmail.com wrote:
 Hi,
 Before the changes, we use jabsorb as the jsonrpc 1.0 implementation. I
 decided to use a home grown for number of reasons:
 1) The jsonrpc protocol is simple enough. I'm trying to avoid the dependency
 to a non-active 3rd party project
 2) I'm trying to leverage Jackson to improve performance
 3) I want to use JSONRPC 2.0 at some point for binding.sca remoting
 4) I want to try gzip encoding for some situations
 
 Great, let me pickup the compression support.
 
 Also, I noticed that there seems to be some issues with the current
 response, which seems to always send error ? Per the 2.0 spec, error
 should only be sent if there is an error. I'll investigate this issue
 as well. Below is what I see while running the JSON-RPC tests.
 
 Response as null:{id:1,result:echo: Hello JSON-RPC,error:null}
 
 
 
 [1] http://jsonrpc.org/spec.html
 
 
 
 
 -- 
 Luciano Resende
 http://people.apache.org/~lresende
 http://twitter.com/lresende1975
 http://lresende.blogspot.com/



Re: WADL and Google APIs discovery service for REST Binding

2011-10-06 Thread Raymond Feng
Nice. For google API discovery, there is a java library available that we can 
use to produce the service document:

http://code.google.com/p/google-api-java-client/wiki/APIs#APIs_Discovery_Service

Thanks,
Raymond

Sent from my iPad

On Oct 6, 2011, at 7:24 PM, Luciano Resende luckbr1...@gmail.com wrote:

 I have added support for generating WADL for resources exposed with
 the rest binding, this follows the same pattern of the wsdl generation
 and any resource can add a ?wadl to the root of the resource.
 
 e.g.: http://localhost/Catalog?wadl
 
 I'm also going to look into adding something similar to generate a
 resource description document to enable live testing of resources via
 Google APIs Discovery Service [1]
 
 [1] http://code.google.com/apis/discovery/
 
 -- 
 Luciano Resende
 http://people.apache.org/~lresende
 http://twitter.com/lresende1975
 http://lresende.blogspot.com/


We'll speak at JavaOne 2011 SF next Monday

2011-09-29 Thread Raymond Feng
Hi,

I'll present with Luciano at JavaOne 2011 next Monday. If you are coming to 
JavaOne, you are welcome to our session.

Title: Building Flexible APIs for Web 2.x/Cloud Applications (25208)
Time: Monday, 12:30 PM, Hilton San Francisco - Imperial Ballroom B

Abstract: Using an open and simple API is a great way to build a developer 
ecosystem and grow a user base dramatically for Web 2.x (social/cloud/mobile) 
applications. But building flexible APIs can be a challenge. This session 
covers how to build a nice Web API from scratch, using open source stacks.

It starts with data modeling with a DSL tool and generates POJOs that can be 
transformed in JSON/XML and persisted with JPA/NoSQL. After defining the 
service interface, it expands the API experience with REST, JSON-RPC, and other 
cloud-friendly protocols without application coding. The presentation gets the 
API running immediately and tests it with a browser. In addition, it addresses 
how to realize common patterns such as pagination and hypermedia.
Track: Enterprise Service Architectures and the Cloud
Optional Track: Emerging Languages, Tools, and Techniques
Experience Level: Advanced

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com




Re: svn commit: r1172881 - in /tuscany/sca-java-2.x/trunk/modules: core-spi/src/main/java/org/apache/tuscany/sca/invocation/ node-api/src/main/java/org/apache/tuscany/sca/node/ node-api/src/main/java/

2011-09-20 Thread Raymond Feng
OK. I didn't know that. Please go ahead to swap back.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Sep 20, 2011, at 3:40 AM, Simon Laws wrote:

 On Mon, Sep 19, 2011 at 11:55 PM,  rf...@apache.org wrote:
 Author: rfeng
 Date: Mon Sep 19 22:55:37 2011
 New Revision: 1172881
 
 URL: http://svn.apache.org/viewvc?rev=1172881view=rev
 Log:
 Add the ablity to load the contributions/composite for a given node 
 configuration without starting the node
 
 Modified:

 tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/Message.java

 tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java

 tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/extensibility/NodeExtension.java

 tuscany/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java

 tuscany/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
 
 Modified: 
 tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/Message.java
 URL: 
 http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/Message.java?rev=1172881r1=1172880r2=1172881view=diff
 ==
 --- 
 tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/Message.java
  (original)
 +++ 
 tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/Message.java
  Mon Sep 19 22:55:37 2011
 @@ -18,7 +18,6 @@
  */
  package org.apache.tuscany.sca.invocation;
 
 -import java.util.List;
  import java.util.Map;
 
  import org.apache.tuscany.sca.assembly.Endpoint;
 
 Modified: 
 tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java
 URL: 
 http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java?rev=1172881r1=1172880r2=1172881view=diff
 ==
 --- 
 tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java
  (original)
 +++ 
 tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java
  Mon Sep 19 22:55:37 2011
 @@ -39,9 +39,11 @@ import java.util.List;
  import java.util.Map;
  import java.util.Properties;
 
 +import org.apache.tuscany.sca.core.ExtensionPointRegistry;
  import 
 org.apache.tuscany.sca.node.configuration.DefaultNodeConfigurationFactory;
  import org.apache.tuscany.sca.node.configuration.NodeConfiguration;
  import org.apache.tuscany.sca.node.configuration.NodeConfigurationFactory;
 +import org.apache.tuscany.sca.node.extensibility.NodeExtension;
  import org.oasisopen.sca.ServiceReference;
  import org.oasisopen.sca.ServiceRuntimeException;
 
 @@ -633,10 +635,27 @@ public abstract class NodeFactory extend
  */
 public abstract NodeConfiguration loadConfiguration(InputStream xml, URL 
 base);
 
 -public abstract T T getExtensionPointRegistry();
 +/**
 + * Get the ExtensionPointRegistry
 + * @return
 + */
 +public abstract ExtensionPointRegistry getExtensionPointRegistry();
 
 +/**
 + * Initialize the factory
 + */
 public abstract void init();
 
 -public void setAutoDestroy(boolean b) {
 -}
 +/**
 + * Set auto destroy flag when all nodes are stopped
 + * @param b
 + */
 +public abstract void setAutoDestroy(boolean b);
 +
 +/**
 + * Create and load the node for the purpose of metadata introspection
 + * @param configuration
 + * @return The extended Node
 + */
 +public abstract NodeExtension loadNode(NodeConfiguration configuration);
  }
 
 Modified: 
 tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/extensibility/NodeExtension.java
 URL: 
 http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/extensibility/NodeExtension.java?rev=1172881r1=1172880r2=1172881view=diff
 ==
 --- 
 tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/extensibility/NodeExtension.java
  (original)
 +++ 
 tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/extensibility/NodeExtension.java
  Mon Sep 19 22:55:37 2011
 @@ -24,15 +24,39 @@ import

IllegalArgumentException for remote binding.sca

2011-09-15 Thread Raymond Feng
Hi,

I ran into the following issue for binding.sca (mapped to binding.ws). Any 
clue? It seems that the generated WSDL is problematic.

 Sep 15, 2011 1:46:43 PM 
 org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl [] 
 (StartException)
 SEVERE: Exception during start processing
 java.lang.IllegalArgumentException: Prefix cannot be null
 at 
 com.sun.xml.stream.buffer.stax.StreamReaderBufferProcessor$InternalNamespaceContext.getNamespaceURI(StreamReaderBufferProcessor.java:871)
 at 
 com.sun.xml.stream.buffer.stax.StreamReaderBufferProcessor.getNamespaceURI(StreamReaderBufferProcessor.java:525)
 at com.sun.xml.ws.wsdl.parser.ParserUtil.getQName(ParserUtil.java:72)
 at 
 com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parseMessage(RuntimeWSDLParser.java:780)
 at 
 com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parseWSDL(RuntimeWSDLParser.java:317)
 at 
 com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:227)
 at 
 com.sun.xml.ws.server.EndpointFactory.getWSDLPort(EndpointFactory.java:509)
 at 
 com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:174)
 at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467)
 at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:486)
 at 
 com.sun.xml.ws.transport.http.server.EndpointImpl.createEndpoint(EndpointImpl.java:222)
 at 
 com.sun.xml.ws.transport.http.server.EndpointImpl.publish(EndpointImpl.java:152)
 at 
 org.apache.tuscany.sca.binding.ws.jaxws.ri.JAXWSServiceBindingProvider.start(JAXWSServiceBindingProvider.java:125)
 at 
 org.apache.tuscany.sca.binding.sca.provider.DelegatingSCAServiceBindingProvider.start(DelegatingSCAServiceBindingProvider.java:95)
 at 
 org.apache.tuscany.sca.binding.sca.provider.RuntimeSCAServiceBindingProvider.start(RuntimeSCAServiceBindingProvider.java:86)
 at 
 org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl$2.run(CompositeActivatorImpl.java:566)
 at java.security.AccessController.doPrivileged(Native Method)
 at 
 org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.startEndpoint(CompositeActivatorImpl.java:564)
 at 
 org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.start(CompositeActivatorImpl.java:422)
at 
org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.start(CompositeActivatorImpl.java:345)

 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com




Re: Databinding question

2011-09-13 Thread Raymond Feng
If I remember correctly, we set the databinding to be java:complexType or 
java:simpleType. For some of the transformations, we treat them as JAXB, for 
example POJO -- XML or POJO -- JSON.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Sep 13, 2011, at 7:51 AM, Simon Laws wrote:

 On Tue, Sep 13, 2011 at 11:18 AM, Simon Laws simonsl...@googlemail.com 
 wrote:
 How should the databinding be configured for a non-JAXB Java bean?
 
 Currently in 2.x I'm seeing that the data type that gets generated
 does have a databinding set to java:complexType but the logical type
 is set to the default XMLType, i.e. it has a null element name and a
 null XSD type. In the DefaultDataBindingExtensionPoint I seem the
 following code and comment:
 
public boolean introspectType(DataType dataType, Operation operation) {
loadDataBindings();
for (DataBinding binding : databindings) {
// don't introspect for JavaBeansDatabinding as all javatypes will
// anyways match to its basetype
// which is java.lang.Object. Default to this only if no 
 databinding
// results
if (!binding.getName().equals(JavaBeansDataBinding.NAME)) {
if (binding.introspect(dataType, operation)) {
return true;
}
}
}
 
 It's not clear what the default databinding should be set to in the
 case of a Java bean. xsd:any? This is currently causes the properties
 itest to fail a it complains about missing types in the model. I'll
 take a look and see what we did in 1.x as I believe the properties
 test ran clean there but if anyone knows then that would be useful
 
 Regards
 
 Simon
 
 --
 Apache Tuscany committer: tuscany.apache.org
 Co-author of a book about Tuscany and SCA: tuscanyinaction.com
 
 
 Well in 1.x we didn't set a type either but we seemingly didn't check
 for it so it doesn't get raised as an error. The OASIS code is a bot
 more particular.
 
 It seems we don't try to fluff up and XSD type for plain Java beans.
 Not even a default JAXB mapping. It seems that this is by design. Is
 anyone able to explain before I change anything?
 
 Simon
 
 -- 
 Apache Tuscany committer: tuscany.apache.org
 Co-author of a book about Tuscany and SCA: tuscanyinaction.com



Re: Single quote issues in the message properties

2011-09-03 Thread Raymond Feng
Never mind. I was looking into the wrong place otest/newlayout (should we 
remove the folder?). 

Now I fixed all the messages in testing/compliance-test. 

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Sep 2, 2011, at 9:21 PM, Raymond Feng wrote:

 Hi,
 
 I recently discovered and fixed the single quote issue in the Tuscany message 
 property files. For example, we used to have something like:
 
 can't 
 
 During the logging message formatting, the single quote is removed (sometimes 
 it leads to missing parameters if the {} is followed). As a side effort, some 
 of the compliance tests use the wrong message to compare, for example, using 
 cant instead of can't. I fixed the ones owned by Tuscany, but there are 
 two from OASIS. I'm attaching the patches here. Can somebody from OASIS fix 
 them?
 
 Thanks,
 Raymond
 1.diff
 2.diff
  
 Raymond Feng
 rf...@apache.org
 Apache Tuscany PMC member and committer: tuscany.apache.org
 Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
 Personal Web Site: www.enjoyjava.com
 
 



Single quote issues in the message properties

2011-09-02 Thread Raymond Feng
Hi,I recently discovered and fixed the single quote issue in the Tuscany message property files. For example, we used to have something like:can't During the logging message formatting, the single quote is removed (sometimes it leads to missing parameters if the {} is followed). As a side effort, some of the compliance tests use the wrong message to compare, for example, using "cant" instead of "can't". I fixed the ones owned by Tuscany, but there are two from OASIS. I'm attaching the patches here. Can somebody from OASIS fix them?Thanks,Raymond

1.diff
Description: Binary data


2.diff
Description: Binary data

Raymond Fengrf...@apache.orgApache Tuscany PMC member and committer: tuscany.apache.orgCo-author of Tuscany SCA In Action book: www.tuscanyinaction.comPersonal Web Site: www.enjoyjava.com



Re: [GSoC-2011] Final Evaluations Passed - Appreciation

2011-08-26 Thread Raymond Feng
Congratulations!

I look forward to using the simple tutorial to play around :-). Can you give us 
a pointer?

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Aug 26, 2011, at 1:20 PM, Nirmal Fernando wrote:

 Hi devs,
 
 I am happy to inform you that I have successfully passed GSoC final 
 evaluations.
 
 I think this is a right time for me to thank all who helped me in my
 journey as a newbie in Tuscany.
 
 First of all I (again) like to thank Jean-Sebastien, my mentor, who
 helped me through out the project with his valuable ideas, more
 importantly I appreciate the freedom given and guidance provided by
 him. Your trust on me and the encouraging words helped me a lot in
 successfully finishing the project.
 
 Secondly I like to thank Raymond Feng who helped me mostly in the
 application period by reviewing my proposal and providing me his
 feedback. I strongly believe your comments helped me to pull up a
 compelling proposal.
 
 Ant Elder, helped me enormously through his ideas. Thank you Ant, I
 highly appreciate the support extended by you.
 
 Luciano Resende, Simon Laws, Mike Edwards, Florian Moga and Simon Nash
 also helped me by replying to my emails in the mailing list, thank
 you!
 
 I sincerely hope all of you find Tuscany Composite Diagram Generator useful! 
 :)
 
 Finally, I had an awesome time throughout the summer with Tuscany, and
 I am hoping to contribute to Tuscany in future as well!
 
 Thanks.
 
 --
 Best Regards,
 Nirmal
 
 C.S.Nirmal J. Fernando
 Department of Computer Science  Engineering,
 Faculty of Engineering,
 University of Moratuwa,
 Sri Lanka.
 Blog: http://nirmalfdo.blogspot.com/
 LinkedIn: http://www.linkedin.com/profile/view?id=54105394trk=tab_pro



Re: JMX capabilities for tuscany

2011-08-20 Thread Raymond Feng
Hi, Amindri.

Test cases are usually self-contained. They will be run as part of the maven
build to verify certain functions are working. In your case, we can use the
Tuscany API to start Tuscany runtime and a composite application. You can
mimic the following test case:

https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/testing/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java

Please note the @BeforeClass annotated method will bootstrap Tuscany
(starting a node). You can add any test methods (@Test)  to talk to JMX to
verify the features.

Thanks,
Raymond

On Sat, Aug 20, 2011 at 8:16 AM, Amindri Udugala
amindriudug...@gmail.comwrote:

 And aabout the test case. The jmx module activator needs tuscany to run
 continuously. So I will write the test case assuming that tuscany is already
 bootstrapped.

 On 20 August 2011 17:43, Amindri Udugala amindriudug...@gmail.com wrote:

 Hi Raymond,

 Now everything is up and running. Bellow I have listed the artifacts I'm
 monitoring. Is there any thing that I have missed out?

 1. Composites
 2. Components
 3. ComponentServices
 4. Endpoints
 5. EndpointReferences
 6. RuntimeWireProcessors
 7. ProviderFactoryExtensionPoint
 8. DefaultWirePeocessorExtensionPoint




 --
 Thanks

 Amindri Udugala
 University of Colombo School of Computing,
 Sri Lanka.




Re: JMX capabilities for tuscany

2011-08-20 Thread Raymond Feng
That's great.

There are more things that we would like to monitor:

1) Application artifacts: ComponentReferences, Bindings, Interfaces,
Policies.
2) Runtime artifacts

Here is a list of extension points I find in Tuscany today:

./assembly/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.BuilderExtensionPoint
./assembly-xml/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.DefinitionsExtensionPoint
./binding-jms-runtime-activemq/src/main/resources/META-INF/services/org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactoryExtensionPoint
./contribution/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint
./contribution/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessorExtensionPoint
./contribution/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint
./contribution/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint
./contribution/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint
./contribution/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.scanner.ContributionScannerExtensionPoint
./core/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.invocation.ProxyFactoryExtensionPoint
./core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.context.ContextFactoryExtensionPoint
./core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.
*ProviderFactoryExtensionPoint*
./core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.DomainRegistryFactoryExtensionPoint
./core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.RuntimeWireProcessorExtensionPoint
./databinding/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.
*DataBindingExtensionPoint*
./databinding/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.
*TransformerExtensionPoint*
./databinding-jaxb/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.jaxb.XMLAdapterExtensionPoint
./extensibility/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.FactoryExtensionPoint
./extensibility/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.
*ModuleActivatorExtensionPoint*
./extensibility/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.
*UtilityExtensionPoint*
./host-corba/src/main/resources/META-INF/services/org.apache.tuscany.sca.host.corba.CorbaHostExtensionPoint
./host-http/src/main/resources/META-INF/services/org.apache.tuscany.sca.host.http.ServletHostExtensionPoint
./host-rmi/src/main/resources/META-INF/services/org.apache.tuscany.sca.host.rmi.RMIHostExtensionPoint
./implementation-web-client/src/main/resources/META-INF/services/org.apache.tuscany.sca.implementation.web.runtime.ClientExtensionPoint
./node-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.extensibility.
*NodeActivatorExtensionPoint*
./web-javascript/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.ComponentJavaScriptGeneratorExtensionPoint
./web-javascript/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.JavascriptProxyFactoryExtensionPoint


The ones that are bold seem to be good additions. But we can always go step
by step.

Thanks,
Raymond

On Sat, Aug 20, 2011 at 5:13 AM, Amindri Udugala
amindriudug...@gmail.comwrote:

 Hi Raymond,

 Now everything is up and running. Bellow I have listed the artifacts I'm
 monitoring. Is there any thing that I have missed out?

 1. Composites
 2. Components
 3. ComponentServices
 4. Endpoints
 5. EndpointReferences
 6. RuntimeWireProcessors
 7. ProviderFactoryExtensionPoint
 8. DefaultWirePeocessorExtensionPoint



Re: Providing a User Guide for Composite Diagram Generator Tool

2011-08-18 Thread Raymond Feng
Tuscany wiki can be a good place.

Raymond Feng
Sent from my iPhone

On Aug 18, 2011, at 3:54 PM, Nirmal Fernando nirmal070...@gmail.com wrote:

 Hi All,
 
 I would like to provide a small user guide to help users get started with 
 Composite Diagram Generator Tool.
 
 Any thoughts on how should I proceed with it?
 
 Thanks.
 
 -- 
 Best Regards,
 Nirmal
 
 C.S.Nirmal J. Fernando
 Department of Computer Science  Engineering,
 Faculty of Engineering,
 University of Moratuwa,
 Sri Lanka.
 
 Blog: http://nirmalfdo.blogspot.com/
 


Re: Interface matching question

2011-08-17 Thread Raymond Feng
It's difficult to tell if a string is a plain text, XML or JSON without 
additional information such as the JAX-RS consumes/produces annotations which 
provide the media type behind the java type. It's also true for some generic 
java types such as InputStream or OutputStream. I have been thinking of 
enhancing the databinding framework to take these info into consideration 
(similar as JAX-RS MessageBodyReader or MessageBodyWriter), but I don't have 
enough time to work on it :-(

Raymond Feng
Sent from my iPhone

On Aug 17, 2011, at 4:09 AM, Simon Laws simonsl...@googlemail.com wrote:

 I'm (still) looking at the various JIRA related to enabling support
 for interface matching across the domain. I wrote a simple test [1] to
 compare obviously (to me) miss-matching interfaces. To my surprise it
 was the local variant that failed. Now the service interface here is
 @Remoteable. and differs in the type of the input parametner.
 
 String foo(String str);
 vs
 String foo(ParameterObject po);
 
 The test fails because our InterfaceContractMapper thinks that these
 are compatible. It does this because when comparing the XMLType that
 is the logical type of each it finds that one has a type (string) and
 one is set to null. It seems that this happens because databinding
 can't guess at an XML type for ParameterObject and the default java
 Object is compatible with string. I note that the databinding string
 is set differently. One to java.lang.String and one to
 java.ComplexType.
 
 If the interface is WSDL you get different results. Presumably because
 the XML type is easy to determine in that case.
 
 It seems that there are some inconsistencies inside the databinding
 model that I hadn't considered. Can anyone tell my how the model is
 intended to work in this respect and what problem cases exist.
 
 Regards
 
 Simon
 
 [1] 
 http://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/testing/itest/interface-matching/
 
 -- 
 Apache Tuscany committer: tuscany.apache.org
 Co-author of a book about Tuscany and SCA: tuscanyinaction.com


Re: [GSoC] Adding jmx capabilities to tuscany

2011-08-15 Thread Raymond Feng
Hi, Amindri.

Please follow the steps below:

1) cd modules
2) add the dependencies to base-runtime/pom.xml

dependency
groupIdorg.apache.tuscany.sca/groupId
artifactIdtuscany-jmx/artifactId
version${project.version}/version
/dependency

dependency
groupIdorg.apache.tuscany.sca/groupId
artifactIdtuscany-jmx-activator/artifactId
version${project.version}/version
/dependency

3) mvn clean install -fn (under modules)
4) Go to samples/running-tuscany/jse
5) run mvn clean install 

I'm seeing started the module jmx activator..

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Aug 3, 2011, at 10:25 AM, Amindri Udugala wrote:

 Hi,
 
 Thanks for the response
 
 I'm trying to understand the project setting for the code you use to test the 
 JMX integration. Do you have your own maven module or do you reuse an 
 existing sample module? 
 
 Are you trying to run 
 samples/running-tuscany/jse/src/main/java/launcher/LaunchCalculatorContribution
  to see if the JMX is activated? 
  
Yes I'm using 
 samples/running-tuscany/jse/src/main/java/launcher/LaunchCalculatorContribution
  to test JMX integration. 
 
 If so, that pom has the following dependency:
 
 dependency
 groupIdorg.apache.tuscany.sca/groupId
 artifactIdtuscany-base-runtime/artifactId
 version2.0-SNAPSHOT/version
 /dependency
 
 If you have the jmx modules added to the base-runtime pom, they should be 
 picked up. You can run mvn dependency:tree under 
 samples/running-tuscany/jse to confirm.
 
  I added the tuscany-base-runtime dependency to  
 samples/running-tuscany/pom.xml. Built the project (but stopped half way 
 through due to the permgen error)
 Then executed mvn dependency:tree, and this is the result I get
 
 [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ jse ---
 [INFO] org.apache.tuscany.sca.samples:jse:jar:2.0-SNAPSHOT
 [INFO] +- org.apache.tuscany.sca:tuscany-base-runtime:jar:2.0-SNAPSHOT:compile
 [INFO] |  +- cglib:cglib:jar:2.2:compile
 [INFO] |  +- org.apache.ws.commons.schema:XmlSchema:jar:1.4.3:compile
 [INFO] |  +- asm:asm:jar:3.1:compile
 [INFO] |  \- wsdl4j:wsdl4j:jar:1.6.2:compile
 [INFO] \- junit:junit:jar:4.8.1:test
 
 seems like the two jmx modules are not picked  up. (I have added the two jmx 
 modules to the modules/base-runtime/pom.xml)
 
 
 Back to the build issue, can you do the following:
 
 1) Send us the error message
 2) Use mvn clean install -fae -Dmaven.test.skip=true for the purpose of 
 compilation and archive.
 
   I still get the permgen error even if I ignore errors using mvn clean 
 install -fae. Following is  end of the log.
  
 [INFO] 
 
 [INFO] Building Apache Tuscany SCA iTest WS Contribution WSDL First 
 2.0-SNAPSHOT
 [INFO] 
 
 [INFO] 
 [INFO] --- maven-clean-plugin:2.4:clean (default-clean) @ 
 itest-ws-contribution-wsdl-first ---
 [INFO] Deleting 
 /home/amindri/tuscany/trunk/testing/itest/ws/contribution-wsdl-first/target
 [INFO] 
 [INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-plugin-versions) @ 
 itest-ws-contribution-wsdl-first ---
 [INFO] The requirePluginVersions rule is currently not compatible with Maven3.
 [INFO] 
 [INFO] --- build-helper-maven-plugin:1.0:add-test-source (add-source) @ 
 itest-ws-contribution-wsdl-first ---
 [INFO] Test Source directory: 
 /home/amindri/tuscany/trunk/testing/itest/ws/contribution-wsdl-first/target/jaxws-source
  added.
 [INFO] 
 [INFO] --- maven-remote-resources-plugin:1.1:process (default) @ 
 itest-ws-contribution-wsdl-first ---
 [INFO] 
 [INFO] --- maven-resources-plugin:2.4.2:resources (default-resources) @ 
 itest-ws-contribution-wsdl-first ---
 [INFO] Using 'UTF-8' encoding to copy filtered resources.
 [INFO] Copying 7 resources
 [INFO] Copying 0 resource
 [INFO] Copying 3 resources
 [INFO] 
 [INFO] --- jaxws-maven-plugin:1.10:wsimport (wsimport2) @ 
 itest-ws-contribution-wsdl-first ---
 [INFO] Processing: 
 /home/amindri/tuscany/trunk/testing/itest/ws/contribution-wsdl-first/target/classes/helloworld-external-service.wsdl
 [INFO] jaxws:wsimport args: [-s, 
 /home/amindri/tuscany/trunk/testing/itest/ws/contribution-wsdl-first/target/jaxws-source,
  -d, 
 /home/amindri/tuscany/trunk/testing/itest/ws/contribution-wsdl-first/target/classes,
  -verbose, -p, 
 org.apache.tuscany.sca.binding.ws.jaxws.external.service.iface, -target, 2.1, 
 -Xnocompile, 
 /home/amindri/tuscany/trunk/testing/itest/ws/contribution-wsdl-first

Re: [GSoC] Adding jmx capabilities to tuscany

2011-08-03 Thread Raymond Feng
Hi,

I'm trying to understand the project setting for the code you use to test the 
JMX integration. Do you have your own maven module or do you reuse an existing 
sample module? 

Are you trying to run 
samples/running-tuscany/jse/src/main/java/launcher/LaunchCalculatorContribution 
to see if the JMX is activated? 

If so, that pom has the following dependency:

dependency
groupIdorg.apache.tuscany.sca/groupId
artifactIdtuscany-base-runtime/artifactId
version2.0-SNAPSHOT/version
/dependency

If you have the jmx modules added to the base-runtime pom, they should be 
picked up. You can run mvn dependency:tree under samples/running-tuscany/jse 
to confirm.

Back to the build issue, can you do the following:

1) Send us the error message
2) Use mvn clean install -fae -Dmaven.test.skip=true for the purpose of 
compilation and archive.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Aug 3, 2011, at 7:03 AM, Amindri Udugala wrote:

 Hi Raymond,
 
 I quite didn't understand what u asked for. Can you please explain what you 
 exactly meant.
 I'm running the LaunchCalculatorContribution class in the sample module to 
 bootstrap tuscany.
 
 
 
 On 2 August 2011 23:16, Raymond Feng enjoyj...@gmail.com wrote:
 Can you point out which sample from svn are you trying to pick up your 
 modules?
 
 Thanks,
 Raymond
  
 Raymond Feng
 rf...@apache.org
 Apache Tuscany PMC member and committer: tuscany.apache.org
 Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
 Personal Web Site: www.enjoyjava.com
 
 
 On Aug 2, 2011, at 9:12 AM, Amindri Udugala wrote:
 
 Hi,
 
 I tried that out but still could not resolve the memory issue, changed the 
 surefire plugin in trunk/pom.xml as follows
 configuration
 argLine-ea -Xmx1024m -Xms756m -XX:MaxPermSize=512m/argLine
 /configuration
  
 I added dependencies to  features/all/pom.xml and 
 modules/base-runtime/pom.xml and still the modules are not included to the 
 class path. Is it because I was not able to build the project?
 
 On 25 July 2011 19:24, Amindri Udugala amindriudug...@gmail.com wrote:
 Thanx Raymond I'll try that out.
 
 
 On 26 July 2011 11:24, Raymond Feng enjoyj...@gmail.com wrote:
 Hi, Amindri.
 
 Can you try to add your modules to features/all/pom.xml and 
 modules/base-runtime/pom.xml? It seems that the sample uses base-runtime as 
 the dependency to create the class path.
 
 For the memory issue, can you try to change memory setting for the surefire 
 plugin? It is configured in the pom.xml under the plugin element whose 
 artifactid is maven-surefire-plugin.
 
 Sent from my iPad
 
 On Jul 24, 2011, at 8:11 PM, Amindri Udugala amindriudug...@gmail.com 
 wrote:
 
 Hi,
  Herewith I have listed down the artifacts that I have exposed to JMX 
 connection and the attributes of the artifacts I have exposed. Also I have 
 exposed some of the operations of these artifacts as well to the JMX 
 connection.  Please comment if I have missed anything out. Have attached 
 the latest patch with all the latest changes. 
 
 With this I think I have done with most of my work, but the problem which 
 I'm facing is that I still couldn't get the jmx-activator module activated 
 when Tuscany is bootstrapped. I'm using LaunchCalculatorContribution in the 
 sample module to bootstrap tuscany. I found out that jmx-activator module 
 is not included in the classpath when I'm running the 
 LaunchCalculatorContribution. 
 
 I guess the reason for this is, that I was never able to build the whole 
 trunk at once, due to lack of perm space. I executed MAVEN_OPTS=-Xmx1024m 
 -Xms512m -XX:MaxPermSize=384m before building the trunk, but still the 
 problem remains.  
 
 If I can get a solution for this problem, I'll be able to verify the 
 correctness of the code...
 Component 
 Attributes
 getComponents - Lists all runtime Components with following 
 attributes - Name, URI, AutoWire, Implementation 
 
 Operations
 getComponent(String name) - Lists all the attributes of the 
 specified component- Name, URI, AutoWire, Implementation, ExtensionType,

 AttributeExtensions, Services, References, Properties, RequiredIntents, 
 PolicySets, Extensions
 setComponentURI(String currURI, String newURI) 
 setComponentName(String uri, String newName)
 setComponentAutoWire(String uri, boolean autoWire)
 setComponentUnresolved(String uri, boolean unresolved

Re: [GSoC] Adding jmx capabilities to tuscany

2011-08-02 Thread Raymond Feng
Can you point out which sample from svn are you trying to pick up your modules?

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Aug 2, 2011, at 9:12 AM, Amindri Udugala wrote:

 Hi,
 
 I tried that out but still could not resolve the memory issue, changed the 
 surefire plugin in trunk/pom.xml as follows
 configuration
 argLine-ea -Xmx1024m -Xms756m -XX:MaxPermSize=512m/argLine
 /configuration
  
 I added dependencies to  features/all/pom.xml and 
 modules/base-runtime/pom.xml and still the modules are not included to the 
 class path. Is it because I was not able to build the project?
 
 On 25 July 2011 19:24, Amindri Udugala amindriudug...@gmail.com wrote:
 Thanx Raymond I'll try that out.
 
 
 On 26 July 2011 11:24, Raymond Feng enjoyj...@gmail.com wrote:
 Hi, Amindri.
 
 Can you try to add your modules to features/all/pom.xml and 
 modules/base-runtime/pom.xml? It seems that the sample uses base-runtime as 
 the dependency to create the class path.
 
 For the memory issue, can you try to change memory setting for the surefire 
 plugin? It is configured in the pom.xml under the plugin element whose 
 artifactid is maven-surefire-plugin.
 
 Sent from my iPad
 
 On Jul 24, 2011, at 8:11 PM, Amindri Udugala amindriudug...@gmail.com wrote:
 
 Hi,
  Herewith I have listed down the artifacts that I have exposed to JMX 
 connection and the attributes of the artifacts I have exposed. Also I have 
 exposed some of the operations of these artifacts as well to the JMX 
 connection.  Please comment if I have missed anything out. Have attached the 
 latest patch with all the latest changes. 
 
 With this I think I have done with most of my work, but the problem which 
 I'm facing is that I still couldn't get the jmx-activator module activated 
 when Tuscany is bootstrapped. I'm using LaunchCalculatorContribution in the 
 sample module to bootstrap tuscany. I found out that jmx-activator module is 
 not included in the classpath when I'm running the 
 LaunchCalculatorContribution. 
 
 I guess the reason for this is, that I was never able to build the whole 
 trunk at once, due to lack of perm space. I executed MAVEN_OPTS=-Xmx1024m 
 -Xms512m -XX:MaxPermSize=384m before building the trunk, but still the 
 problem remains.  
 
 If I can get a solution for this problem, I'll be able to verify the 
 correctness of the code...
 Component 
 Attributes
 getComponents - Lists all runtime Components with following 
 attributes - Name, URI, AutoWire, Implementation 
 
 Operations
 getComponent(String name) - Lists all the attributes of the 
 specified component- Name, URI, AutoWire, Implementation, ExtensionType, 
   
 AttributeExtensions, Services, References, Properties, RequiredIntents, 
 PolicySets, Extensions
 setComponentURI(String currURI, String newURI) 
 setComponentName(String uri, String newName)
 setComponentAutoWire(String uri, boolean autoWire)
 setComponentUnresolved(String uri, boolean unresolved)
 
 ComponentService  
  Attributes 
  getComponentServices - Lists all runtime ComponentServices with 
 following attributes - Name, CallBackReference, Service
 
  Operations   
  getComponentService(String name) - Lists all attributes of the 
 specified ComponentService - Name, CallBackReference, Service,   
   
 InterfaceContract, Bindings, AttributeExtensions, Endpoints, 
 RequiredIntents, PolicySets ,
 Extensions
  setComponentServiceUnresolved(String name, boolean unresolved)
  setComponentServiceForCallback(String name, boolean forCallBack)
  setComponentServiceName(String currName, String newName)
 
 Composite  
  Attributes
   getComposites() - Lists all runtime Composites with following 
 attributes - Name, URI, ExtensionType, ContributionURI, SpecVersion, Local
   
  Operations  
   getComposite(String uri) - Lists all attributes of the specified 
 ComponentService - Name, URI, ExtensionType, ContributionURI, SpecVersion ,  
  Local, IsAutoWire, Unresolved, 
 Components, Includes, FusedIncludes, RequiredIntents, Services, references , 
 Operations, Wires, 
 Properties, PolicySets, Extensions, AttributeExtensions
   setCompositeContributionURI(String uri

Re: parsing parameters to the init method

2011-07-30 Thread Raymond Feng
Can you model them as SCA properties? We support constructor based injection.

Or do you want to keep some states for the component?

Raymond Feng
Sent from my iPhone

On Jul 30, 2011, at 9:57 AM, Eranda Sooriyabandara 0704...@gmail.com wrote:

 Hi devs,
 I have some problems which I like to get help from you.
 
 How can I parse parameters to the init method (annotated by @init)?
 Can I call init method and parse parameters from another service?
 After parsing that can I use it(that instance) as an independent service?
 
 thanks
 -- 
 Eranda Sooriyabandara
 Blog: http://www.emsooriyabandara.blogspot.com/
 LInkedIn: http://lk.linkedin.com/in/erandasooriyabandara


Re: svn commit: r1151669 - in /tuscany/sca-java-2.x/trunk: samples/getting-started/helloworld-jsonp/pom.xml samples/getting-started/helloworld-jsonrpc/pom.xml samples/getting-started/helloworld-webser

2011-07-28 Thread Raymond Feng
Maven 3 complains (warns) about the missing/wrong relativePath too :-(. 

Do we really expect folks to only check out samples from trunk and build them 
without the rest?

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Jul 28, 2011, at 12:15 AM, ant elder wrote:

 Is there a reason you want to include an explicit relative path? The
 issue with doing so means that you then can't do a checkout and build
 of individual samples with Maven v3 as it fails if the relative path
 points at a non-existent place.
 
   ...ant
 
 On Thu, Jul 28, 2011 at 12:33 AM,  rf...@apache.org wrote:
 Author: rfeng
 Date: Wed Jul 27 23:33:07 2011
 New Revision: 1151669
 
 URL: http://svn.apache.org/viewvc?rev=1151669view=rev
 Log:
 Fix the relative path in pom.xml
 
 Modified:

 tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonp/pom.xml

 tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonrpc/pom.xml

 tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-webservice/pom.xml
tuscany/sca-java-2.x/trunk/testing/itest/data-copy/service/pom.xml
 
 Modified: 
 tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonp/pom.xml
 URL: 
 http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonp/pom.xml?rev=1151669r1=1151668r2=1151669view=diff
 ==
 --- 
 tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonp/pom.xml 
 (original)
 +++ 
 tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonp/pom.xml 
 Wed Jul 27 23:33:07 2011
 @@ -25,7 +25,7 @@
   groupIdorg.apache.tuscany.sca.samples/groupId
   artifactIdtuscany-samples/artifactId
   version2.0-SNAPSHOT/version
 -  relativePath/
 +  relativePath../../pom.xml/relativePath
/parent
 
artifactIdhelloworld-jsonp/artifactId
 
 Modified: 
 tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonrpc/pom.xml
 URL: 
 http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonrpc/pom.xml?rev=1151669r1=1151668r2=1151669view=diff
 ==
 --- 
 tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonrpc/pom.xml
  (original)
 +++ 
 tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonrpc/pom.xml
  Wed Jul 27 23:33:07 2011
 @@ -25,7 +25,7 @@
   groupIdorg.apache.tuscany.sca.samples/groupId
   artifactIdtuscany-samples/artifactId
   version2.0-SNAPSHOT/version
 -  relativePath/
 +  relativePath../../pom.xml/relativePath
/parent
 
artifactIdhelloworld-jsonrpc/artifactId
 
 Modified: 
 tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-webservice/pom.xml
 URL: 
 http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-webservice/pom.xml?rev=1151669r1=1151668r2=1151669view=diff
 ==
 --- 
 tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-webservice/pom.xml
  (original)
 +++ 
 tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-webservice/pom.xml
  Wed Jul 27 23:33:07 2011
 @@ -25,7 +25,7 @@
   groupIdorg.apache.tuscany.sca.samples/groupId
   artifactIdtuscany-samples/artifactId
   version2.0-SNAPSHOT/version
 -  relativePath/
 +  relativePath../../pom.xml/relativePath
/parent
 
artifactIdhelloworld-webservice/artifactId
 
 Modified: tuscany/sca-java-2.x/trunk/testing/itest/data-copy/service/pom.xml
 URL: 
 http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/data-copy/service/pom.xml?rev=1151669r1=1151668r2=1151669view=diff
 ==
 --- tuscany/sca-java-2.x/trunk/testing/itest/data-copy/service/pom.xml 
 (original)
 +++ tuscany/sca-java-2.x/trunk/testing/itest/data-copy/service/pom.xml Wed 
 Jul 27 23:33:07 2011
 @@ -14,7 +14,7 @@
 modelVersion4.0.0/modelVersion
 parent
 groupIdorg.apache.tuscany.sca/groupId
 -artifactIditest-nodes/artifactId
 +artifactIditest-data-copy/artifactId
 version2.0-SNAPSHOT/version
 relativePath../pom.xml/relativePath
 /parent
 
 
 



Re: [jira] [Commented] (TUSCANY-3894) Binding.sca local behavior: copy vs. mediate, same-databinding assumption

2011-07-27 Thread Raymond Feng
Hi,

Thanks for sending out the note.

In addition to the concern that I raised against your commit log, can you 
explain why we need to do transformation for local sca binding? I assume that's 
for distributed sca binding.

Raymond Feng
Sent from my iPhone

On Jul 27, 2011, at 7:51 PM, Scott Kurz (JIRA) dev@tuscany.apache.org wrote:

 
[ 
 https://issues.apache.org/jira/browse/TUSCANY-3894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13072148#comment-13072148
  ] 
 
 Scott Kurz commented on TUSCANY-3894:
 -
 
 I checked in some more changes here, so let me explain.
 
 From the runtime side, in r1151632,  I refactored the local part of 
 sca-binding-runtime so that the exact details of the data transform are 
 extensible.
 I'm creating a new interface, BindingSCATransformer which I'll implement to 
 handle the transform details.
 
 My thought is that the base portion of the binding  will do things like 
 calculate whether to do the pass-by-reference optimization and establish 
 other aspects of the invoker/interceptor chain.  This will be handled in 
 DefaultLocalSCAReferenceBindingProvider, which will also compute the WSDL 
 contract, in case the transform needs it, as well as return the 
 ComponentTypeRefIC to disable the DataTransformationInterceptor.So we're 
 always initiating data transform from the binding, not via 
 DataTransformationInterceptor on the wire, just to reiterate.
 
 In my scheme, the BindingProviderFactory impl will create a ref binding 
 provider which will potentially extend the base 
 DefaultLocalSCAReferenceBindingProvider by providing its own 
 BindingSCATransformer (and possibly a different databinding then the DOM 
 default one I'm using).
 
 There are now two provider factories, each resulting in a different 
 BindingSCATransformer being used.
 
 The first, the default, maintains the current behavior we're used to.   
 Notably, it:
 - uses Mediator.copyXXX rather than Mediator.mediateXXX, which notably does 
 not use the JAX-WS wrappers
 - has RMI-like referential integrity for parameters (see earlier comments)
 - for POJOs, preferes Java serialization (if java.io.Serializable), then 
 JAXB/XML serialization
 
 The second is an XML-centric databinding.  Some notes:
 - It's built via pointing to XMLWFLocalSCABindingProviderFactory in the 
 extension point, which builds the XMLWFBindingSCATransformer.
 - relies on building a WSDL InterfaceContract to be used along with 
 Mediator.mediateXXX
 - uses a DOM databinding (since there's been a move to avoid AXIOM if 
 possible), but this could easily be switched in another impl with little code
 - The XMLWFLocalSCAReferenceBindingProvider actually extends the 
 DefaultLocalSCAReferenceBindingProvider, the provider in the first, default 
 impl.
 
 I would like to add a weighting to the various binding provider factories, 
 and ideally polish things up a bit.  However, there are a couple more JIRAs I 
 need to open after noticing some side effects, and it seemed easiest to have 
 something concrete in the trunk to refer to.   
 
 So by committing this code I have: 
 - enabled the use of separate databindings across client/service 
 - allowed extension with reuse of the PBR calculation.
 
 Scott
 
 Binding.sca local behavior:  copy vs. mediate, same-databinding assumption
 --
 
Key: TUSCANY-3894
URL: https://issues.apache.org/jira/browse/TUSCANY-3894
Project: Tuscany
 Issue Type: Improvement
 Components: SCA Java Runtime
   Affects Versions: Java-SCA-2.x
   Reporter: Scott Kurz
   Assignee: Scott Kurz
   Priority: Minor
Fix For: Java-SCA-2.0
 
Attachments: 3894.patch, 3894.tests.patch
 
 
 As discussed in: https://issues.apache.org/jira/browse/TUSCANY-3884
 the binding-sca-runtime code seems to assume that the reference/service 
 sides share a common databinding, which might not be a desirable limitation. 
  
 Also the object reference graph of copy vs. mediate seems to be different, 
 which might not be preferable either.
 Just working on some tests now before commenting further, however I wanted 
 to open this up to move the discussion out of the 3884 JIRA, to avoid 
 confusion as this is a separate issue from simply adding the ability to 
 delegate.
 
 --
 This message is automatically generated by JIRA.
 For more information on JIRA, see: http://www.atlassian.com/software/jira
 
 


Re: Question on a implementation.java child element of a component

2011-07-26 Thread Raymond Feng
Hi,

It's the implementation class that dictates all the services it provide. The 
service element is used in the composite to further configure the service and 
the @name has to match what's introspected from the impl (in SCA term, the 
componentType). If no further configuration is needed, you don't have the list 
the service in the composite.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Jul 26, 2011, at 2:26 AM, Nirmal Fernando wrote:

 Hi All,
 
 If a service element present for a component, could I neglect 'class' 
 attribute value of implementation.java element, for the composite diagram 
 purposes?
 
 
 eg:
 
 * 
 component name=SubtractServiceComponent
 implementation.java class=calculator.SubtractServiceImpl/
  /component
 
 For this, I'll add a service to SubtractServiceComponent, since there are 
 no 'service' elements.
 
 *
 component name=Catalog
 implementation.java class=services.FruitsCatalogImpl/ 
 property name=currencyCodeUSD/property
 service name=Catalog
 t:binding.jsonrpc/
/service
 reference name=currencyConverter target=CurrencyConverter/
 /component 
 
 For this Catalog component Catalog is the only service, that I'll be 
 added.
 
 _
 
 Highly appreciate your thoughts!
 
 Thanks.
 
 -- 
 Best Regards,
 Nirmal
 
 C.S.Nirmal J. Fernando
 Department of Computer Science  Engineering,
 Faculty of Engineering,
 University of Moratuwa,
 Sri Lanka.
 
 Blog: http://nirmalfdo.blogspot.com/
 



Re: Problem I faced with converting the datastore to a SCA component

2011-07-25 Thread Raymond Feng
Hi,

Do you want to have the following methods support JSON value (i.e. the value is 
a JSON string)?

 void addEntry(String key, String value) throws DuplicateEntryException;
 void updateEntry(String key, String value) throws EntryNotFoundException;

We have the JSON data binding. Maybe you can use org.json.JSONObject as the 
argument type so that the JSON data binding can introspect them as the JSON 
data binding.

Thanks,
Raymond

 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Jul 25, 2011, at 11:35 AM, Eranda Sooriyabandara wrote:

 Hi devs,
 I am creating a NoSQL datastore component for some NoSQL databases.
 Here I used my own API to generalize all the databases. In my datastore there 
 are 4 interfaces as follows(with method signatures),
 1. SessionFactory - Manage sessions
 
 2. Session - Manage Databases
 Database createDatabase(String databaseName) throws SessionException;
 Database getDatabase(String databaseName) throws SessionException;
 void deleteDatabase(String databaseName) throws DatabaseNotFoundException, 
 SessionException;
 3. Database - Manage Groups
 Group createGroup(String groupId);
 Group getGroup(String groupId);
 void deleteGroup(String groupId) throws GroupNotFoundException;
 4. Group - Manage entries (Actual data to be stored)
 void addEntry(String key, String value) throws DuplicateEntryException;
 void updateEntry(String key, String value) throws EntryNotFoundException;
 void deleteEntry(String key) throws EntryNotFoundException;
 String getEntry(String key) throws EntryNotFoundException;
 In the implementation each instance call others constructor. That means, 
 createDatabase call the Database Implementations constructor.
 
 Here I want to create a component which used json as the data representation. 
 I am bit confused with building the relationship between the above four 
 interfaces since each interface use to get an object of the other class. If 
 you can help me with some ideas to make this a SCA component that would be 
 great.
 
 You can find my works on [1].
 
 thanks
 
 -- 
 Eranda Sooriyabandara
 Blog: http://www.emsooriyabandara.blogspot.com/
 LInkedIn: http://lk.linkedin.com/in/erandasooriyabandara
 
 [1]. https://svn.apache.org/repos/asf/tuscany/collaboration/GSoC-2011-Eranda/
 



Re: Problem I faced with converting the datastore to a SCA component

2011-07-25 Thread Raymond Feng
You can make these env settings as a list of properties that can be configured 
in the composite. The values will be injected into the component implementation 
class.

Raymond Feng
Sent from my iPhone

On Jul 25, 2011, at 7:00 PM, Eranda Sooriyabandara 0704...@gmail.com wrote:

  Hi Raymond,
  
 Do you want to have the following methods support JSON value (i.e. the value 
 is a JSON string)?
 
 void addEntry(String key, String value) throws DuplicateEntryException;
 void updateEntry(String key, String value) throws EntryNotFoundException;
 
 
 I want to support those methods also and I want to put the data in the 
 specific Group in the Specific Database how can I manage to specify it 
 from the front end. Do I want to implement another layer which use to create 
 Database/Group when name(String) of it given?
 
 thanks
 Eranda


Re: [GSoC] Adding jmx capabilities to tuscany

2011-07-24 Thread Raymond Feng
Hi, Amindri.

Can you try to add your modules to features/all/pom.xml and 
modules/base-runtime/pom.xml? It seems that the sample uses base-runtime as the 
dependency to create the class path.

For the memory issue, can you try to change memory setting for the surefire 
plugin? It is configured in the pom.xml under the plugin element whose 
artifactid is maven-surefire-plugin.

Sent from my iPad

On Jul 24, 2011, at 8:11 PM, Amindri Udugala amindriudug...@gmail.com wrote:

 Hi,
  Herewith I have listed down the artifacts that I have exposed to JMX 
 connection and the attributes of the artifacts I have exposed. Also I have 
 exposed some of the operations of these artifacts as well to the JMX 
 connection.  Please comment if I have missed anything out. Have attached the 
 latest patch with all the latest changes. 
 
 With this I think I have done with most of my work, but the problem which I'm 
 facing is that I still couldn't get the jmx-activator module activated when 
 Tuscany is bootstrapped. I'm using LaunchCalculatorContribution in the sample 
 module to bootstrap tuscany. I found out that jmx-activator module is not 
 included in the classpath when I'm running the LaunchCalculatorContribution. 
 
 I guess the reason for this is, that I was never able to build the whole 
 trunk at once, due to lack of perm space. I executed MAVEN_OPTS=-Xmx1024m 
 -Xms512m -XX:MaxPermSize=384m before building the trunk, but still the 
 problem remains.  
 
 If I can get a solution for this problem, I'll be able to verify the 
 correctness of the code...
 Component 
 Attributes
 getComponents - Lists all runtime Components with following 
 attributes - Name, URI, AutoWire, Implementation 
 
 Operations
 getComponent(String name) - Lists all the attributes of the 
 specified component- Name, URI, AutoWire, Implementation, ExtensionType,  
  AttributeExtensions, 
 Services, References, Properties, RequiredIntents, PolicySets, Extensions
 setComponentURI(String currURI, String newURI) 
 setComponentName(String uri, String newName)
 setComponentAutoWire(String uri, boolean autoWire)
 setComponentUnresolved(String uri, boolean unresolved)
 
 ComponentService  
  Attributes 
  getComponentServices - Lists all runtime ComponentServices with 
 following attributes - Name, CallBackReference, Service
 
  Operations   
  getComponentService(String name) - Lists all attributes of the 
 specified ComponentService - Name, CallBackReference, Service,
  
 InterfaceContract, Bindings, AttributeExtensions, Endpoints, RequiredIntents, 
 PolicySets ,  
   Extensions
  setComponentServiceUnresolved(String name, boolean unresolved)
  setComponentServiceForCallback(String name, boolean forCallBack)
  setComponentServiceName(String currName, String newName)
 
 Composite  
  Attributes
   getComposites() - Lists all runtime Composites with following 
 attributes - Name, URI, ExtensionType, ContributionURI, SpecVersion, Local
   
  Operations  
   getComposite(String uri) - Lists all attributes of the specified 
 ComponentService - Name, URI, ExtensionType, ContributionURI, SpecVersion ,   
 Local, IsAutoWire, Unresolved, 
 Components, Includes, FusedIncludes, RequiredIntents, Services, references ,  
Operations, Wires, Properties, 
 PolicySets, Extensions, AttributeExtensions
   setCompositeContributionURI(String uri, String contributionURI)
   setCompositeURI(String currURI, String newURI)
   setCompositeSpecVersion(String uri, String specVersion)
   setCompositeLocal(String uri, boolean local)
   setCompositeAutoWire(String uri, boolean autoWire)
   setCompositeUnresolved(String uri, boolean unresolved)
 
 Endpoint   
  Attributes
  getEndpointView() - Lists all runtime Endpoints with following 
 attributes - URI, DeployedURI, ExtensionType, Service, Component, Binding ,   
 
 ComponentServiceInterfaceContract, 
   
  Operations
getEndpoint(String uri) - Lists  attributes of the specified 
 Endpoint -  URI, DeployedURI, ExtensionType, Service, Component, Binding ,
ComponentServiceInterfaceContract, 
 AsyncInvocation, Remote, Unresolved, PolicySets, EndpointReferences,  
RequiredIntents
setEndpointUnresolved(String epURI, boolean 

Re: what does this exception mean? Unable to create SCA binding invoker for local target CalculatorServiceComponent reference

2011-07-20 Thread Raymond Feng
Hi,

Can you show us the composite file?

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Jul 20, 2011, at 3:09 PM, Yao Dong wrote:

 Exception in thread main org.osoa.sca.ServiceUnavailableException: Unable 
 to create SCA binding invoker for local target CalculatorServiceComponent 
 reference $self$.CalculateService 
 (bindingURI=/CalculatorServiceComponent/CalculateService operation=add)
 at 
 org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.createInvoker(RuntimeSCAReferenceBindingProvider.java:215)
 at 
 org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.addReferenceBindingInterceptor(RuntimeWireImpl.java:323)
  



Re: HelloWorld REST service

2011-07-19 Thread Raymond Feng
Hi, 

You can take a look at the HelloWorld interface for the Jax-rs annotations, 
especially @Path and @GET. This way, you can use the browser to try a GET.

Raymond Feng
Sent from my iPhone

On Jul 19, 2011, at 8:41 PM, Eranda Sooriyabandara 0704...@gmail.com wrote:

 Hi devs,
 I tested a sample HelloWorld REST service and need to ask some questions 
 related to it.
 
 When I start the service I got the following warning.
 WARNING: The application Config Location property was not defined.
 But I think it works properly because I cannot see 404 in 
 http://localhost:8085/HelloWorld.
 
 I want to see whether this sample works or not how can I do that? You can see 
 my helloworld.composite below.
 
 thanks
 Eranda
 
 helloworld.composite
 ?xml version=1.0 encoding=UTF-8?
 composite xmlns=http://docs.oasis-open.org/ns/opencsa/sca/200912;
xmlns:tuscany=http://tuscany.apache.org/xmlns/sca/1.1;
targetNamespace=http://sample;
name=helloworld-contribution  
   component name=HelloWorldComponent
   implementation.java class=org.eranda.sca.HelloWorldImpl/
   service name=HelloWorld
   tuscany:binding.rest 
 uri=http://localhost:8085/HelloWorld;
 tuscany:wireFormat.json /
 tuscany:operationSelector.jaxrs /
 /tuscany:binding.rest
   /service
 /component   
 /composite


Re: [2.x] Problems and Proposed changes for the OASIS Java Client API - OASIS Issue raised, with Proposal

2011-07-18 Thread Raymond Feng
Mike, can I raise another issue?

For the following API:

org.oasisopen.sca.client.SCAClientFactory.getService(ClassT, String)

Can we add an option for allowsPassByReference? The latest SCA spec requires 
that both reference and service impl to allow pass-by-reference to avoid 
copying data over remotable interfaces. Without an option for the client API, 
we always need to pay the penalty.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Jul 18, 2011, at 3:55 AM, Mike Edwards wrote:

 Folks,
 
 An OASIS Java TC issue has been raised for these problems:
 
 http://www.osoa.org/jira/browse/JAVA-243
 
 along with the proposed updates, which can be seen in Section B.1.3 of this 
 updated spec:
 
 
 http://www.oasis-open.org/apps/org/workgroup/sca-j/download.php/42910/sca-javacaa-1.1-spec-wd052.pdf
 http://www.oasis-open.org/apps/org/workgroup/sca-j/download.php/42909/sca-javacaa-1.1-spec-wd052.doc
 
 
 Yours,  Mike.



Re: Invocation/Application Context (again)

2011-07-15 Thread Raymond Feng
I prefer to have strongly-typed context extensions. JAX-RS has the similar 
mechanism to allow custom context to be injected via @Context. The context can 
be resolved via:

http://jsr311.java.net/nonav/javadoc/javax/ws/rs/ext/ContextResolver.html

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Jul 15, 2011, at 5:38 AM, Simon Laws wrote:

 On Fri, Jul 15, 2011 at 12:42 PM, Mike Edwards
 mike.edwards.inglen...@gmail.com wrote:
 On 15/07/2011 12:08, Simon Laws wrote:
 
 Commenting on the last two posts. Generally I prefer the strong typing
 of context and the ability to have that type injected into an
 implementation. I do though accept that there is no API alternative to
 injection for anything other than RequestContext or derivatives. In
 the derivative case the app writer would be still be expected to cast
 to TuscanyRequestContext which isn't so elegant but will work.
 
 Well, I suppose we could envisage an annotation like @TuscanyRequestContext
 that would signal injection of a TuscanyRequestContext which would then not
 need any cast - but of course my concern is that any such code would only
 work with Tuscany and would not work with any other SCA runtime, which is
 the flip side of the concern.
 
 I was thinking more of allowing the following as a Tuscany specific
 extension. Of course you need to be in Tuscany to use
 TuscanyRequestContex but that's true of a cast also.
 
 @Context
 TuscanyRequestContext myRequestContext.
 
 
 In terms of strong typing of context I would be concerned about a scheme
 in which each potential atom of context was separately injected - this would
 get out of hand very quickly I think.  I suppose one scheme is to treat
 context like a set of Properties to be injected, where the property names
 are simple strings (of the type I'm advocating for getContext()), with the
 implication that each field/setter would be annotated like
  @TuscanyRequestContext( foo ) - and with the assumption that the type of
 the field/method had better match the implied type of that context property
 (which must be defined by the runtime, not by the application).
 
 I'm slightly uneasy about that as it requires the Tuscany specific
 annotations. I have considered the following but maybe that's just as
 complex. WDYT?
 
 @Context
 RequestContext requestContext;
 
 @Context
 TuscanyRequestContext requestContext;
 
 @Context
 MyContextUnrelatedToRequestContext myContextReference1;
 
 public void someServiceOperation(){
ContextValue value1 =  myContextReference1.getSomeValueFromTheContext();
ContextValue value2 =
 requestContext.getExtendedContext(MyContextUnrelatedToRequestContext.class.getName()).getSomeValueFromTheContext();
 
// I would expect value1 and value2 to be the same object.
 }
 
 
 I agree that the best we get for the set of names for context atoms is
 simply documentation - what would be good is a catalog that aims to promote
 the maximum amount of commonality, especially between Bindings, where I hope
 that header fields, for example, could use the same names and types for a
 wide range of binding types.  This is really a matter of trying to get
 developers of binding implementations to use common context fields as far as
 possible.
 
 Of course, once you head down the headers road, then there could be a desire
 to reflect any and all headers into the application - something I don't
 think is a great idea - if it matters that much to the application it should
 be part of the service signature in 99.99% of cases.
 
 +1
 
 
 
 Yours,  Mike.
 
 
 Simon
 
 -- 
 Apache Tuscany committer: tuscany.apache.org
 Co-author of a book about Tuscany and SCA: tuscanyinaction.com



Re: Invocation/Application Context (again)

2011-07-15 Thread Raymond Feng
IMO, the @Context annotation allows an SCA Java component to receive injection 
of some contexts which cannot be modeled as a regular @Reference.  In my use 
cases, I would like to be able to do something like:

@Context
private ServletContext servletContext; // My component is running as part of 
the web application

@Context
private ApplicationContext appContext; // My component needs to access some 
Spring information

@Context
private JAXBContext jaxbContext; // My component needs to do JAXB marshaling

The strong-typed context is clearly better than weakly-typed one from Java 
programming perspective. It also make the runtime easily to understand the 
requirements for specific context injection and implement context providers to 
support it.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Jul 15, 2011, at 11:45 AM, Mike Edwards wrote:

 Raymond,
 
 Can you explain why you prefer strobgly types context extensions?
 
 Why is this JAX-RS mechanism a good thing?
 
 Can you paint a picture of what this would look like:
 
 a) for the application components
 b) for the runtime/binding components
 
 
 Yours,  Mike.
 
 On 15/07/2011 17:35, Raymond Feng wrote:
 I prefer to have strongly-typed context extensions. JAX-RS has the similar 
 mechanism to allow custom
 context to be injected via @Context. The context can be resolved via:
 
 *http://jsr311.java.net/nonav/javadoc/javax/ws/rs/ext/ContextResolver.html*
 *
 *
 *Thanks,*
 *Raymond
 *
 



Re: Invocation/Application Context (again)

2011-07-12 Thread Raymond Feng
Good summary :-).

I like the context driven approach. In addition to what you listed, I propose a 
few more:

* TUSCANY_CONTEXT: The context for the whole Tuscany runtime in the JVM (can be 
seen as the replacement for NodeFactory). It provides accesses to the 
ExtensionPointRegistry (in turn Extension Points and Extensions). 
* NODE_CONTEXT: The context for a given Tuscany node (can be seen as the 
replacement for CompositeContext)

On the application side, we could have things like:

* DOMAIN_CONTEXT (to access the domain registry)
* COMPONENT_CONTEXT (as well as BINDING_CONTEXT, IMPLEMENTATION_CONTEXT?)
* REQUEST_CONTEXT (to access the security context, thread, MESSAGE)

Also there should be a hierarchy of the context objects, for example, the 
NODE_CONTEXT should have a pointer to the TUSCANY_CONTEXT.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Jul 12, 2011, at 9:31 AM, Simon Laws wrote:

 I'm looking to do something about TUSCANY-3855 [1] and the associated
 conversation [2]. Looking through the extensive posts I draw these
 conclusions.
 
 The current situation
 
 
 An attempt to describe what context is available to various parts of
 the infrastructure. Accessible context is noted in CAPITALS.
 
 Service Binding
  Binding Wire
 Binding Interceptor
 SERVICE MESSAGE (headers and binding context)
  Operation Wire
 Operation Interceptor
 SERVICE MESSAGE (headers and binding context)
 Component Service
 Component Implementation
 @Context RequestContext
  REQUEST CONTEXT (security + service info from service message)
 Component Reference
  JDKInvocationHandler
  Operation Wire
  Operation Interceptor
  REFERENCE MESSAGE (headers and binding context)
  Binding Wire
   Binding Interceptor
  REFERENCE MESSAGE (headers and binding context)
 Reference Binding
 
 Context is passed on the thread using ThreadMessageContext which takes
 a Message object. It's set to the incoming message in the following
 places
 
 NonBlockingInterceptor
 RuntimeInvoker
 JDIInvocationHandler
 
 There are two main drawbacks of the current solution
 
 1/ There is no way that the application can access (selected) context
 information from the incoming request, e.g. information that a policy,
 or other, interceptor wishes the implementation to have access to.
 Other than that information that is prescribed by the RequestContext.
 2/ The service message context is not available in the reference
 chain. The headers are copied from the service message context to the
 reference message context but any other context is not available
 downstream.
 
 An aggregation of the proposed improvements
 ===
 1/ Application context
 -
 
 From the various conversations [2] it seems that it would be useful to
 present context in two categories:
 
 A/ Context that the application should have access to
 B/ Context that the infrastructure should have access to
 
 Where A is a subset of B.
 
 B itself is a mixture of information.
 
 i)  information that is/should be part of the protocol message
 ii)  information pertinent to the configuration/operation of the
 interceptor chain
 
 All context is currently carried by the Tuscany message structure.
 Beside the body itself we store context in two places in the Message
 structure
 
MapString, Object getHeaders();  // Stores Bi + possibly a bit of Bii
T T getBindingContext(); // Stores Bii
 
 We could massage this so that
 
 Headers - is just Bi)
 Context - is just Bii) and supports  interceptor specific context objects
 ApplicationContext - is just A
 
 Infrastructure would then add objects to Context or ApplicationContext
 depending on whether the application should be able to see it or not.
 My concern here is how to define the interface so there isn't a huge
 amount of searching and casting going on.
 
 We could then add some extensibility to allow @Context to be
 associated with arbitrary types that the interceptor chain has added
 to ApplicationContext..
 
 2/ Passing context through component
 
 
 Haven't looked at the details here still but the suggestion is to move
 the context switch to later in the chain. My initial thought is that
 I'm tempted to suggest adding a Context item that points to the
 reference message instead as the switch seems to be somewhat either/or
 
 [1] https://issues.apache.org/jira/browse/TUSCANY-3855
 [2] http://www.mail-archive.com/dev@tuscany.apache.org/msg15581.html
 
 Simon
 
 -- 
 Apache Tuscany committer: tuscany.apache.org
 Co-author of a book about Tuscany and SCA

Re: Distro build fail with org.opensaml:openws:jar:1.2.2 is not available

2011-07-12 Thread Raymond Feng
I'm seeing the same issue. Can we just upgrade the opensaml dependency?

dependency
 groupIdorg.opensaml/groupId
 artifactIdopensaml/artifactId
-version2.2.3/version
+version2.4.1/version
 exclusions
exclusion
groupIdorg.slf4j/groupId
artifactIdslf4j-jdk14/artifactId
/exclusion   

Moving to 2.4.1 seems to be working fine.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Jul 12, 2011, at 7:15 AM, ant elder wrote:

 I still see the fail with a fresh svn checkout and starting from an
 empty local repo.  I'll try a new Hudson one and see what that does
 (the nightly Hudson builds work in a slightly different way so may not
 be seeing it)
 
   ...ant
 
 On Tue, Jul 12, 2011 at 2:16 PM, Simon Laws simonsl...@googlemail.com wrote:
 On Tue, Jul 12, 2011 at 2:02 PM, ant elder antel...@apache.org wrote:
 I was just using clean install but i've tried that too and get the
 same. I'll go try a fresh checkout and local repo and see what that
 does ...
 
   ...ant
 
 
 K, let me know if you need me to try anything.
 
 Simon
 
 --
 Apache Tuscany committer: tuscany.apache.org
 Co-author of a book about Tuscany and SCA: tuscanyinaction.com
 



Re: Rename binding-ws-runtime-axis2 to binding-ws-runtime

2011-07-12 Thread Raymond Feng
Don't we prefer to use a JAX-WS based implementation as the default 
binding-ws-runtime?

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Jul 12, 2011, at 1:11 PM, ant elder wrote:

 I'd like to rename the binding-ws-runtime-axis2 module to
 binding-ws-runtime so that it matches the naming used by the other
 extension which makes it more obvious for users. And also to move the
 other binding-ws-runtime-* modules to contrib as they've fallen behind
 and no one seem to be working on them.
 
 I'll do this in a couple of days unless anyone has an good reason not to.
 
   ...ant



Re: [jira] [Updated] (TUSCANY-3518) *!* Add JMX management capabilities to Apache Tuscany

2011-07-12 Thread Raymond Feng
Hi, Amindri.

I was on vacation last week. I'm slowly catching up your patches.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Jul 9, 2011, at 9:42 PM, Amindri Udugala (JIRA) wrote:

 
 [ 
 https://issues.apache.org/jira/browse/TUSCANY-3518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
  ]
 
 Amindri Udugala updated TUSCANY-3518:
 -
 
Attachment: revised.patch
 
 *!* Add JMX management capabilities to Apache Tuscany
 ---
 
Key: TUSCANY-3518
URL: https://issues.apache.org/jira/browse/TUSCANY-3518
Project: Tuscany
 Issue Type: New Feature
 Components: Java SCA Community Ideas
   Reporter: ant elder
   Assignee: Amindri Udugala
 Labels: gsoc, gsoc2010, gsoc2011, mentor
Attachments: modules.zip, revised.patch, tuscany_jmx.patch
 
 
 The goal of this project is to add JMX management and monitoring 
 capabilities to the Apache Tuscany runtime. You'd start with adding some 
 basic monitoring to view running Tuscany nodes from a JMX agent and then 
 incrementally enhance the support to include management and monitoring of 
 more and more of the runtime parts such as contributions, components and 
 endpoints.
 Feel free to email if you want more information: ant.el...@gmail.com
 
 --
 This message is automatically generated by JIRA.
 For more information on JIRA, see: http://www.atlassian.com/software/jira
 
 



Re: [adding JMX capabilities to tuscany] Problem in boot strapping Tuscany

2011-07-12 Thread Raymond Feng
Hi, Amindri.

The JmxModuleActivator should receive the injected ExtensionPointRegistry from 
Tuscany runtime instead of instantiating its own instance. To do so, you need 
to create a constructor of JmxModuleActivator that takes the 
ExtensionPointRegistry argument and uses it for the start/stop methods.

For example, 
public class JmxModuleActivator implements ModuleActivator {
private ExtensionPointRegistry registry;

public JmxModuleActivator(ExtensionPointRegistry registry) {
this.registry = registry;
...
}

public void start() {
// Do something with registry
}

...
}

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Jul 11, 2011, at 6:35 PM, Amindri Udugala wrote:

 
 
 On 10 July 2011 15:09, Luciano Resende luckbr1...@gmail.com wrote:
 On Sat, Jul 9, 2011 at 9:53 PM, Amindri Udugala
 amindriudug...@gmail.com wrote:
  Hi,
 
 
  After going through the Tuscany code carefully I decided that the best way
  to access runtime artifacts like Endpoints, Components, Composites and
  Services was to access the DomainRegistryFactoryExtension
  Point. Bellow is code snippet where I access these objects.
 
  for (DomainRegistryFactory factory : factories.getDomainRegistryFactories())
  {
  CollectionDomainRegistry domainRegistries =
  factory.getEndpointRegistries();
 
  for (DomainRegistry domainRegistry : domainRegistries) {
 
  compositeManagement.register(domainRegistry.getDomainComposite());
  ListComponent componentList =
  domainRegistry.getDomainComposite().getComponents();
 
  for (Component component : componentList) {
  componentManagement.register(component);
 
  ListComponentService componentServiceList =
  component.getServices();
  for (ComponentService componentService :
  componentServiceList) {
 
  componentServiceManagement.register(componentService);
  }
  }
 
  CollectionEndpoint endpointCollection =
  domainRegistry.getEndpoints();
  for (Endpoint ep : endpointCollection) {
  endpointManagement.registerEndpoints(ep);
  }
  }
  }
 
 
  The problem is that when I run the code there it doesn't receive any data.
  (I have attached an image of the Jconsole -nodata.png) . But the
  PolicyProviderfactories in ProviderfactoryExtensionPoint are shown (have
  attached an image of that too).
 
  What I did to bootstrap tuscany was, executing LaunchCalculatorContribution
  with a Thread.sleep(1) right after invoking node.getService(.). I
  found it a bit tedious to run the tuscany shell. Is it because the way I
  have bootstrp tuscany that I don't get nay data to rest of the beans? Is
  there a better way of accessing runtime artifacts?
 
  Also I have a problem with the jmx-activator module. This module should be
  invoked when Tuscany is boot strapped as it implements the ModuleActivator
  interface, also I have taken other necessary actions as mentioned in the
  development guide. But it is not invoked, so just for testing purpose i
  created an object of JmxModuleActivator in the LaunchCalculatorContribution
  and called the start method in it.
 
  Hope you can give me some advice on these issues. Also I will attach the
  revised patch to JIRA.
 
 hi thanx for the feedback..
 Without knowing all the details, this seems like missing dependency
 issues.
 But I have added all the dependencies in relevent pom files. Is it 
 something to do with the MANIFESTs? But I included all package imports and 
 exports to the manifests as well, and still the jmx-activator module is not 
 activated when tuscany is boot strapped.   
  
 The Tuscany runtime use the service discover pattern to
 register extensions and to activate the module activators. Maybe this
 can give you a clue for further investigating the problem.
 
To access the runtime objects Have created a new object of 
 ExtensionPointRegistry
ExtensionPointRegistry extensionPoints = new 
 DefaultExtensionPointRegistry();
 
Then the  Domain's Composites, Components Endpoints are accessed by 
 DomainRegistryFactoryExtensionPoint
  DomainRegistryFactoryExtensionPoint factories = 
 extensionPoints.getExtensionPoint(DomainRegistryFactoryExtensionPoint.class);
 
 And I have posted the code snippet how I'm accessing these objects
 
for (DomainRegistryFactory factory : 
 factories.getDomainRegistryFactories()) {
 CollectionDomainRegistry domainRegistries = 
 factory.getEndpointRegistries

Re: Jenkins build became unstable: Tuscany-2x » Apache Tuscany SCA iTest Distribution Legal Checks #282

2011-07-12 Thread Raymond Feng
It seems that the opensaml 2.4.1 introduces additional dependencies:

[INFO] +- org.opensaml:opensaml:jar:2.4.1:compile
[INFO] |  +- org.opensaml:openws:jar:1.4.1:compile
[INFO] |  |  \- org.opensaml:xmltooling:jar:1.3.1:compile
[INFO] |  | +- org.slf4j:jul-to-slf4j:jar:1.6.1:compile
[INFO] |  | +- org.bouncycastle:bcprov-jdk15:jar:1.45:compile
[INFO] |  | \- ca.juliusdavies:not-yet-commons-ssl:jar:0.3.9:compile
[INFO] |  +- xerces:xercesImpl:jar:2.9.1:runtime
[INFO] |  |  \- xml-apis:xml-apis:jar:1.3.04:runtime
[INFO] |  \- xml-resolver:xml-resolver:jar:1.2:runtime

Do we need them? If so, we need to update the LICENSE file.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Jul 12, 2011, at 6:02 PM, Apache Jenkins Server wrote:

 See 
 https://builds.apache.org/job/Tuscany-2x/org.apache.tuscany.sca$itest-distribution-legal-checks/282/
 
 



Re: [adding JMX capabilities to tuscaany] Problem in boot strapping Tuscany

2011-06-28 Thread Raymond Feng
Hi,

I'll look into your patch.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Jun 28, 2011, at 9:01 AM, Amindri Udugala wrote:

 Hi ,
 
  I have created two modules tuscany-jmx-activator and tuscany-jmx. 
 The core-spi module should have a dependency on the tuscany-jmx module. I 
 have included this dependency in the pom file of core-spi as following
 
 dependencies
 dependency
 groupIdorg.apache.tuscany.sca/groupId
 artifactIdtuscany-jmx/artifactId
 version2.0-SNAPSHOT/version
 /dependency
 /dependencies
 
 
 And this is how the content of the, tuscany-jmx pom looks like
 
 project
 modelVersion4.0.0/modelVersion
 parent
 groupIdorg.apache.tuscany.sca/groupId
 artifactIdtuscany-modules/artifactId
 version2.0-SNAPSHOT/version
 relativePath../pom.xml/relativePath
 /parent
 artifactIdtuscany-jmx/artifactId
 nameApache Tuscany SCA JMX integration/name
 /project
 
 I'm using a test case to bootstrap tuscany 
 https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/samples/running-tuscany/junit/src/test/java/launcher/LaunchCalculatorContributionTestCase.java,
  to check the consistency of the MXbeans I have created via the jconsole.
 
 The test case worked fine till I added the dependency. I wonder whether I did 
 anything wrong in creating the pom of tuscany-jmx and adding the dependency 
 to core-spi. Any suggestions are wellcome. (I have attached a path to JIRA)
 
 -- 
 Thanks
 
 Amindri Udugala
 University of Colombo School of Computing, 
 Sri Lanka.
 



Re: [VOTE] Release Tuscany Bundle Plugin 1.0.8 RC1

2011-06-27 Thread Raymond Feng
+1 from me.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Jun 20, 2011, at 11:47 PM, ant elder wrote:

 Please vote on releasing the Tuscany Bundle Plugin module 1.0.8 (RC1).
 
 The change over the 1.0.7 release is to rename the module from
 maven-bundle-plugin to tuscany-bundle-plugin, see TUSCANY-3861.
 
 The tag for the release is:
 https://svn.apache.org/repos/asf/tuscany/maven-plugins/tags/tuscany-bundle-plugin-1.0.8
 
 The Maven staging repository is:
 http://people.apache.org/~antelder/tuscany/tuscany-bundle-plugin-1.0.8-RC1
 
 +1 from me.
 
  ...ant



Re: [VOTE] Release Tuscany Bundle Plugin 1.0.8 RC1

2011-06-27 Thread Raymond Feng
Hi,

The tuscany-bundle-plugin/target/classes/META-INF/maven/plugin.xml usually 
gives you the list of build goals and parameters. We could add a bit more 
documents to describe what each goal does.

Ant, I don't think it's a good idea to switch back a binary distribution 
without OSGi support. If so, do we discard the OSGi enablement for Tuscany? We 
spent a lot of efforts to make it happen and I think the OASIS compliance tests 
run with the OSGi mode.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Jun 27, 2011, at 4:57 AM, ant elder wrote:

 That seems an odd position to me Mike given that we know Tuscany will
 become unbuildable unless we do this release. The source code is there
 in SVN if you really want to see what it does and write doc from that.
 
 I've never been that fond of the bundle plugin approach so instead of
 spending more time on it I'm going to go look at creating a new
 Tuscany binary distribution which doesn't use the bundle plugin so
 that if we haven't got this plugin release out by the time the build
 breaks we can switch to having the new distribution be the default.
 
   ...ant
 
 On Mon, Jun 27, 2011 at 11:14 AM, Mike Edwards
 mike.edwards.inglen...@gmail.com wrote:
 Ant,
 
 The lack of documentation is the reason I will not vote in favour of this.
 
 Having done releases without documentation before is no justification in my
 opinion. How is anyone supposed to learn how to use something if there is no
 documentation?
 
 I'll be happy to help create documentation, but since I am not an expert in
 this plugin, I don't know what to write.
 
 
 Yours, Mike.
 
 
 On 27/06/2011 10:58, ant elder wrote:
 
 No i couldn't because i don't think there is any, and i don't
 particularly want to have to go write any, does anyone else want to
 volunteer? We've done half a dozen releases of the plugin before and
 haven't had to have doc so why should that block this release now
 especially when we know if we don't do this release its going to end
 up breaking the Tuscany build.
 
...ant
 
 On Mon, Jun 27, 2011 at 10:44 AM, Florian Mogamoga@gmail.com  wrote:
 
 Some documentation would definitely help me. Could you point me some
 resources? Thanks.
 
 On Mon, Jun 27, 2011 at 12:31 PM, ant elderant.el...@gmail.com  wrote:
 
 Any votes? Tuscany will become unbuildable if we don't release this to
 fix the naming issue in TUSCANY-3861. Is there anything we can do to
 help get votes for releasing this?
 
   ...ant
 
 On Tue, Jun 21, 2011 at 7:47 AM, ant elderant.el...@gmail.com  wrote:
 
 Please vote on releasing the Tuscany Bundle Plugin module 1.0.8 (RC1).
 
 The change over the 1.0.7 release is to rename the module from
 maven-bundle-plugin to tuscany-bundle-plugin, see TUSCANY-3861.
 
 The tag for the release is:
 
 
 https://svn.apache.org/repos/asf/tuscany/maven-plugins/tags/tuscany-bundle-plugin-1.0.8
 
 The Maven staging repository is:
 
 
 http://people.apache.org/~antelder/tuscany/tuscany-bundle-plugin-1.0.8-RC1
 
 +1 from me.
 
  ...ant
 
 
 
 
 
 



Re: Issue with policy intents and shared implementations

2011-06-15 Thread Raymond Feng
I ran into the same issue too. In addition to the model, we don't honor the 
appliesTo (in this case, it only applies to certain implementation types).

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Jun 15, 2011, at 6:42 AM, Simon Laws wrote:

 
 As a follow up I just noticed that when the implementation policy
 interceptors are added to the wire in
 RuntimeEndpointImpl.addImplementationInterceptor() it does the
 following.
 
// TODO - EPR - don't we need to get the policy from the right
 level in the
//  model rather than the leafmost level
ListPolicyProvider pps =
 ((RuntimeComponent)component).getPolicyProviders();
if (pps != null) {
for (PolicyProvider p : pps) {
Interceptor interceptor = p.createInterceptor(operation);
if (interceptor != null) {
chain.addInterceptor(interceptor);
}
}
}
 
 I'm pretty sure though that the code earlier on in the processing
 isn't promoting implementation policy to the component correctly.
 Maybe I'm just looking in the wrong place. A test case is called for.
 
 Simon
 
 --
 Apache Tuscany committer: tuscany.apache.org
 Co-author of a book about Tuscany and SCA: tuscanyinaction.com
 
 
 I added some implementation policy to a test I'm writing and sure
 enough it doesn't work properly. I've created TUSCANY-3876 to track.
 
 Simon
 
 -- 
 Apache Tuscany committer: tuscany.apache.org
 Co-author of a book about Tuscany and SCA: tuscanyinaction.com



Re: Adding JMX capabilities to Tuscany (patch)

2011-05-31 Thread Raymond Feng
Hi, Amindri.

Thanks for the patch. I have a few comments:

1) It seems that you are trying to add the getView() into the model such as 
Endpoint. This approach is a bit invasive. Can we achieve the same function 
using a different way?

* Define a ManagementProviderExtensionPoint which collects all management 
providers for given managed entities in Tuscany runtime.
* Define an ManagementProvider SPI like:

package org.apache.tuscany.sca.management.jmx;

public interface ManagementProviderM {
ClassM getModelType(); // The type of the model to be managed
V V getView(M model); // The view of the given model
}

* For managed entities in Tuscany runtime, create an implementation of 
ManagementProvider and register it using
META-INF/services/org.apache.tuscany.sca.management.jmx.ManagementProvider

2) Can the MXBeans be hierarchical in addition to the flat list? Typically in 
Tuscany, the managed entities are part of a tree. For example, 
ExtensionPointRegistry -- ExtensionPoint -- Extension, or SCA Domain -- 
Composite -- Component -- Services. Maybe the hierarchy can be represented 
using the ObjectName conventions.

3) To access the managed entities, take a look at 
org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl and 
org.apache.tuscany.sca.core.DefaultExtensionPointRegistry. We might need to 
expose some of the information to JMX.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On May 27, 2011, at 11:55 PM, Amindri Udugala wrote:

 
 
 -- Forwarded message --
 From: Amindri Udugala amindriudug...@gmail.com
 Date: 27 May 2011 09:32
 Subject: Adding JMX capabilities to Tuscany (patch)
 To: Raymond Feng enjoyj...@gmail.com
 
 
 Hi Raymond,
 I have attached a zip file of the jmx module I created and the core-spi 
 module (in there I have created a package mgt : path 
 modules/core-spi/src/main/java/org/apache/tuscany/sca/mgt). 
 I have fully implemented the management class only for the EndpointReference 
 interface so I added a new method to it named getView(), and have 
 implemented the method in EndpointReferenceImpl.  I'm hoping to add similar 
 methods to other classes which needs to be monitored.. (hope that approach is 
 ok)
 
 Also I have a problem in accessing all the runtime objects. Please have a 
 look at the JmxModuleActivator class in the jmx module. In 
 getMBeanObjects() method I need to access all objects which are created and 
 assign them to Maps. Can you please help me in doing this?
 
 I'm using IntelliJIDEA as the editor, and when I open up certain classes , it 
 shows many dependency errors. Also when I imported certain classes, the 
 editor warned me of adding circular dependencies (I ignored these warnings)
 
 Please have a look at this and let me know if I should change my 
 implementation design :)
 
  
 
 -- 
 Thanks
 
 Amindri Udugala
 University of Colombo School of Computing, 
 Sri Lanka.
 
 
 
 
 -- 
 Thanks
 
 Amindri Udugala
 University of Colombo School of Computing, 
 Sri Lanka.
 
 modules.zip



Re: Adding JMX Capabilities for tuscany

2011-05-15 Thread Raymond Feng
Hi, Amindri.

Thanks for the update. Would you please create a patch and attach it to a JIRA 
so that we can review and apply. Instead of big changes, incremental progress 
is preferred. 

For the endpoint references and endpoints, they can be identified by the  
structural uris. For example, 
componentName/serviceName#service-binding(bindingName).

Raymond Feng
Sent from my iPhone

On May 15, 2011, at 1:27 AM, Amindri Udugala amindriudug...@gmail.com wrote:

 Hello,
 
 Here is an update of my work so far,
 
 I created a new jmx module in the modules folder. There I created MXBean 
 interfaces for some runtime components,  
 Here are the runtime components,
 EndpointReference
 Message
 ProviderfactoryextensionPointRuntimeComponentreference
 RuntimeComponentReference
 RuntimeComponentService
 RuntimeWireProcessorExtensionPoint
 RuntimeWireProcessor 
 and all other interfaces implementing ProviderFactory interface
 
 (please mention if I need to add more runtime components)
 
 
 These MXBean interfaces are implemented in classes , in mgt sub package 
 which I created in  tuscany-spi-core,
  I've got few more questions before proceeding
 
 When I was going through the Message interface, I understood that neither of 
 two implementation classes set the messegeID 
 
 
  public Object getMessageID() {
 return null;
 }
 
 public void setMessageID(Object messageId) {
 throw new UnsupportedOperationException();
 }
 
 
 Since many messages can be generated I think it is important to identify 
 message uniquely. When implementing the JMX management console I propose to 
 use JSON messages for communication (Wink can be used for this).  If a user 
 needs to change, set or view the message body, of a particular message how to 
 uniquely identify  the message?
 
 The same problem exists with other interfaces (eg EndpointReference) as well 
 (No way to uniquely identify objects). This would not be a  problem if only 
 one object is created from each runtime components. Or may be that I 
 misunderstood the whole procedure. Please correct me if I'm wrong   
 
 
 -- 
 Thanks
 
 Amindri Udugala
 University of Colombo School of Computing, 
 Sri Lanka.
 


Re: Adding JMX Capabilities for tuscany

2011-05-15 Thread Raymond Feng
Btw, I don't think we need to manage the Message objects which are created for 
each requests to contain context and payload.

Sent from my iPad

On May 15, 2011, at 1:27 AM, Amindri Udugala amindriudug...@gmail.com wrote:

 Hello,
 
 Here is an update of my work so far,
 
 I created a new jmx module in the modules folder. There I created MXBean 
 interfaces for some runtime components,  
 Here are the runtime components,
 EndpointReference
 Message
 ProviderfactoryextensionPointRuntimeComponentreference
 RuntimeComponentReference
 RuntimeComponentService
 RuntimeWireProcessorExtensionPoint
 RuntimeWireProcessor 
 and all other interfaces implementing ProviderFactory interface
 
 (please mention if I need to add more runtime components)
 
 
 These MXBean interfaces are implemented in classes , in mgt sub package 
 which I created in  tuscany-spi-core,
  I've got few more questions before proceeding
 
 When I was going through the Message interface, I understood that neither of 
 two implementation classes set the messegeID 
 
 
  public Object getMessageID() {
 return null;
 }
 
 public void setMessageID(Object messageId) {
 throw new UnsupportedOperationException();
 }
 
 
 Since many messages can be generated I think it is important to identify 
 message uniquely. When implementing the JMX management console I propose to 
 use JSON messages for communication (Wink can be used for this).  If a user 
 needs to change, set or view the message body, of a particular message how to 
 uniquely identify  the message?
 
 The same problem exists with other interfaces (eg EndpointReference) as well 
 (No way to uniquely identify objects). This would not be a  problem if only 
 one object is created from each runtime components. Or may be that I 
 misunderstood the whole procedure. Please correct me if I'm wrong   
 
 
 -- 
 Thanks
 
 Amindri Udugala
 University of Colombo School of Computing, 
 Sri Lanka.
 


Re: OOM fails running the Java CAA compliance tests

2011-05-09 Thread Raymond Feng
The maven option won't help as surefire plugin forks the jvm. Try to configure 
the surefire plugin.

Raymond Feng
Sent from my iPhone

On May 9, 2011, at 4:41 AM, ant elder antel...@apache.org wrote:

 On Mon, May 9, 2011 at 11:51 AM, Simon Laws simonsl...@googlemail.com wrote:
 On Mon, May 9, 2011 at 11:47 AM, ant elder ant.el...@gmail.com wrote:
 Another issue i have getting the build running on a new machine is
 that the Java CAA compliance test suite always fails with an
 OutOfMemoryError. It doesn't matter how I run that, in a full build
 the suite on its own, or what memory setting i use it always ends up
 getting the following exception in most of the tests:
 
 java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:640)
at java.util.Timer.init(Timer.java:154)
at java.util.Timer.init(Timer.java:122)
at 
 org.mortbay.jetty.servlet.HashSessionManager.doStart(HashSessionManager.java:71)
at 
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
 org.mortbay.jetty.servlet.SessionHandler.doStart(SessionHandler.java:115)
at 
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
 org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at 
 org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:537)
at 
 org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at 
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
 org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at 
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
 org.apache.tuscany.sca.http.jetty.JettyServer.addServletMapping(JettyServer.java:297)
at 
 org.apache.tuscany.sca.http.jetty.JettyServer.addServletMapping(JettyServer.java:225)
at 
 org.apache.tuscany.sca.host.http.DefaultServletHostExtensionPoint$LazyServletHost.addServletMapping(DefaultServletHostExte
 nsionPoint.java:124)
at 
 org.apache.tuscany.sca.binding.ws.axis2.provider.Axis2ServiceBindingProvider.start(Axis2ServiceBindingProvider.java:191)
at 
 org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl$2.run(CompositeActivatorImpl.java:552)
at java.security.AccessController.doPrivileged(Native Method)
at 
 org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.startEndpoint(CompositeActivatorImpl.java:550)
at 
 org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.start(CompositeActivatorImpl.java:422)
at 
 org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl.start(CompositeActivatorImpl.java:345)
at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:162)
at 
 org.apache.tuscany.sca.otest.TuscanyRuntimeBridge.startContribution(TuscanyRuntimeBridge.java:80)
at 
 client.BaseJAXWSTestRunner.startContribution(BaseJAXWSTestRunner.java:235)
at client.BaseJAXWSTestRunner.setUp(BaseJAXWSTestRunner.java:144)
at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at 
 org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at 
 org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at 
 org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at 
 org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at 
 org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
at 
 org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
 
 Does anyone have any ideas on how to fix that?
 
 I have this in MAVEN_OPTs: -Xmx1024m -Xms1024m -XX:MaxPermSize=512m
 
 For now I've stopped trying to run in and taken the test suite out of
 my local build
 
   ...ant
 
 
   ...ant
 
 
 Any differences between the new and old machine that might affect this?
 
 
 Yes lots - 64 bit vs 32 bit, newer OS, newer Maven, newer Java, etc,
 etc - so its hard to know where to start.
 
   ...ant


Re: [GSoC] Artifacts of SCA

2011-04-29 Thread Raymond Feng
Hi,

For references/services, there are one or more bindings and one interface. Node 
is not an SCA concept, it's Tuscany way to control the unit of work for the 
runtime.

BTW, for the graphing, you can also look at a popular tool 
http://www.graphviz.org/. It supports multiple layout algorithms and the .dot 
file is a very simple text file that describes the graph (vertex, edge). The 
Graphviz tool can export the .dot into most of the image formats. One option 
for you is to generate the .dot from the composite. 

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Apr 29, 2011, at 8:24 AM, Florian Moga wrote:

 Hi Nirmal,
 
 Looking at the SCA plugin for Eclipse, I can see they also have 
   * Includes
   * Intents / Policies
 
 Other concepts which it would be good to consider are
   * SCA Domain
   * SCA Node
 
 There is also an eventing spec that Tuscany doesn't support yet which defines 
 producers, consumers and channels. I don't think it's necessary to support 
 these now but you should probably consider an extensible design which will 
 allow adding them later.
 
 Florian
 
 
 On Fri, Apr 29, 2011 at 5:05 PM, Nirmal Fernando nirmal070...@gmail.com 
 wrote:
 Hi,
 
 Under my project Develop a simple tool that can be used to generate
 composite diagrams https://issues.apache.org/jira/browse/TUSCANY-3496
 I need to identify all the possible artifacts that can be occurred in
 a composite.xml file.
 
 I already recognized following:
 
 * Composite
 * Component
 * Property
 * Reference
 * Service
 
 Is there any other artifacts I should consider? (other than the wire (link))
 
 Thanks.
 
 --
 Best Regards,
 Nirmal
 
 C.S.Nirmal J. Fernando
 Department of Computer Science  Engineering,
 Faculty of Engineering,
 University of Moratuwa,
 Sri Lanka.
 Blog: http://nirmalfdo.blogspot.com/
 



Re: What version? 1.x or 2.x

2011-04-29 Thread Raymond Feng
+1. For all of the 2011 GSoC projects for Tuscany, we should work on Tuscany 
2.x.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Apr 29, 2011, at 8:15 AM, Florian Moga wrote:

 Hi Guilherme,
 
 Most of the development happens in the 2.x area so the extension will target 
 Tuscany 2.x to begin with.
 
 Florian
 
 
 On Thu, Apr 28, 2011 at 10:27 PM, Guilherme Armigliatto 
 guilhermearmiglia...@gmail.com wrote:
 Hi,
 
 The extension will be in which version, 1.x or 2.x ?
 
 
 Thanks,
 Guilherme.
 
 ---
 Guilherme Moraes Armigliatto
 Master Degree Student
 Reasoning for Complex Data (RECOD)
 Institute of Computing (IC), University of Campinas (UNICAMP)
 Campinas, SP, Brazil
 
 



Tuscany JMX integration

2011-04-29 Thread Raymond Feng
For now, you can just build sca-java-2.x/modules. It contains all of the 
modules for Tuscany runtime.

I'll find some time to add a skeleton project for you such as tuscany-jmx. This 
way, we can have a base for patching. 

Tuscany runtime comes with an extensibility and pluggability layer based on the 
simple JDK service provider pattern. You can find more information at:

http://tuscany.apache.org/sca-java-extension-development-guide.html 

The JMX module can register a ModuleActivator which gives it access to the 
runtime ExtensionPointRegistry. It can also provide an implementation of 
org.apache.tuscany.sca.node.extensibility.NodeActivator to gain access Tuscany 
nodes which in turn provides the SCA composite information.
 
Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Apr 29, 2011, at 8:38 AM, Amindri Udugala wrote:

 Hi
 
 Thanks Florian, will checkout the code from 2.x branch.
 
 



Re: [GSoC] Artifacts of SCA

2011-04-29 Thread Raymond Feng
I'm not suggesting you to use the source code from the Graphviz project. We can 
just generate the .dot file from Java. 

EPL is a compatible binary license for ASL, i.e, we can have binary 
dependencies on EPL artifacts.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Apr 29, 2011, at 9:31 AM, Nirmal Fernando wrote:

 Hi,
 
 On Fri, Apr 29, 2011 at 9:53 PM, Raymond Feng enjoyj...@gmail.com wrote:
 Hi,
 For references/services, there are one or more bindings and one interface.
 Node is not an SCA concept, it's Tuscany way to control the unit of work for
 the runtime.
 BTW, for the graphing, you can also look at a popular
 tool http://www.graphviz.org/. It supports multiple layout algorithms and
 the .dot file is a very simple text file that describes the graph (vertex,
 edge). The Graphviz tool can export the .dot into most of the image formats.
 One option for you is to generate the .dot from the composite.
 
 Is Eclipse Public License - v 1.0 compatible with Apache License?
 
 Thanks.
 Thanks,
 Raymond
 
 Raymond Feng
 rf...@apache.org
 Apache Tuscany PMC member and committer: tuscany.apache.org
 Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
 Personal Web Site: www.enjoyjava.com
 
 On Apr 29, 2011, at 8:24 AM, Florian Moga wrote:
 
 Hi Nirmal,
 Looking at the SCA plugin for Eclipse, I can see they also have
   * Includes
   * Intents / Policies
 Other concepts which it would be good to consider are
   * SCA Domain
   * SCA Node
 There is also an eventing spec that Tuscany doesn't support yet which
 defines producers, consumers and channels. I don't think it's necessary to
 support these now but you should probably consider an extensible design
 which will allow adding them later.
 Florian
 
 On Fri, Apr 29, 2011 at 5:05 PM, Nirmal Fernando nirmal070...@gmail.com
 wrote:
 
 Hi,
 
 Under my project Develop a simple tool that can be used to generate
 composite diagrams https://issues.apache.org/jira/browse/TUSCANY-3496
 I need to identify all the possible artifacts that can be occurred in
 a composite.xml file.
 
 I already recognized following:
 
 * Composite
 * Component
 * Property
 * Reference
 * Service
 
 Is there any other artifacts I should consider? (other than the wire
 (link))
 
 Thanks.
 
 --
 Best Regards,
 Nirmal
 
 C.S.Nirmal J. Fernando
 Department of Computer Science  Engineering,
 Faculty of Engineering,
 University of Moratuwa,
 Sri Lanka.
 Blog: http://nirmalfdo.blogspot.com/
 
 
 
 
 
 
 -- 
 Best Regards,
 Nirmal
 
 C.S.Nirmal J. Fernando
 Department of Computer Science  Engineering,
 Faculty of Engineering,
 University of Moratuwa,
 Sri Lanka.
 Blog: http://nirmalfdo.blogspot.com/



Re: Build failed in Jenkins: Tuscany-2x #178

2011-04-29 Thread Raymond Feng
I'm sorry that I'm too much cutting-edge here. Wink 1.1.3-incubating hasn't 
been officially released yet. :-(

I'll revert the change for now.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Apr 28, 2011, at 5:34 PM, Apache Jenkins Server wrote:

 See https://builds.apache.org/hudson/job/Tuscany-2x/178/changes
 
 Changes:
 
 [rfeng] Update to jackson 1.8.0 and wink 1.1.3-incubating
 
 --
 [...truncated 19203 lines...]
 Apr 28, 2011 5:33:58 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
 INFO: Started SslSocketConnector@127.0.0.1:8085
 Apr 28, 2011 5:33:58 PM org.apache.tuscany.sca.http.jetty.JettyServer 
 addServletMapping
 INFO: Added Servlet mapping: https://127.0.0.1:8085/foo
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
 INFO: Stopped SslSocketConnector@127.0.0.1:8085
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
 INFO: jetty-6.1.26
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
 INFO: Started SelectChannelConnector@127.0.0.1:8085
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyServer 
 addServletMapping
 INFO: Added Servlet mapping: http://127.0.0.1:8085/
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
 INFO: jetty-6.1.26
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
 INFO: Started SelectChannelConnector@127.0.0.1:8086
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyServer 
 addServletMapping
 INFO: Added Servlet mapping: http://127.0.0.1:8086/
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
 INFO: Stopped SelectChannelConnector@127.0.0.1:8085
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
 INFO: Stopped SelectChannelConnector@127.0.0.1:8086
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
 INFO: jetty-6.1.26
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
 INFO: Started SelectChannelConnector@127.0.0.1:8085
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyServer 
 addServletMapping
 INFO: Added Servlet mapping: http://127.0.0.1:8085/foo
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyServer 
 removeServletMapping
 INFO: Removed Servlet mapping: /foo
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
 INFO: Stopped SelectChannelConnector@127.0.0.1:8085
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
 INFO: jetty-6.1.26
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
 INFO: Started SelectChannelConnector@127.0.0.1:8085
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyServer 
 addServletMapping
 INFO: Added Servlet mapping: http://127.0.0.1:8085/
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
 INFO: Stopped SelectChannelConnector@127.0.0.1:8085
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
 INFO: jetty-6.1.26
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
 INFO: Started SelectChannelConnector@127.0.0.1:8085
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyServer 
 addServletMapping
 INFO: Added Servlet mapping: http://127.0.0.1:8085/webcontent/*
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
 INFO: Stopped SelectChannelConnector@127.0.0.1:8085
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
 INFO: jetty-6.1.26
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
 INFO: Started SelectChannelConnector@127.0.0.1:8085
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyServer 
 addServletMapping
 INFO: Added Servlet mapping: http://127.0.0.1:8085/webcontent/*
 Apr 28, 2011 5:33:59 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
 INFO: Stopped SelectChannelConnector@127.0.0.1:8085
 Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.879 sec
 
 Results :
 
 Tests run: 11, Failures: 0, Errors: 0, Skipped: 0
 
 [JENKINS] Recording test results
 [INFO] [jar:jar {execution: default-jar}]
 [INFO] Building jar: 
 https://builds.apache.org/hudson/job/Tuscany-2x/ws/sca-2x/modules/host-jetty/target/tuscany-host-jetty-2.0-SNAPSHOT.jar
 [INFO] [source:jar-no-fork {execution: attach-sources}]
 [INFO] Building jar: 
 https://builds.apache.org/hudson/job/Tuscany-2x/ws/sca-2x/modules/host-jetty/target/tuscany-host-jetty-2.0-SNAPSHOT-sources.jar
 [INFO] [install:install {execution: default-install}]
 [INFO] Installing 
 https://builds.apache.org/hudson/job/Tuscany

Re: Domain testing

2011-04-26 Thread Raymond Feng
Hi,

Setting the HTTP port is just the degenerated case to configure base binding 
URIs. There are a lot of use cases:

1) Allow the embedded HTTP server (Tomcat/Jetty) to use a specific HTTP port 
2) For multi-homed machine, configure which IP addresses the HTTP server should 
listen
3) For virtual hosts, we need to set the base URI to use the virtual host name
4) For a cluster environment, we need to set the base URI to use the cluster 
name

As we know, some of the knowledge cannot be acquired by runtime to look up the 
hostname/IP. They need to be configured/customized. 

IMO, we should generalize the plugin here to introduce something like a 
BindingURIResolver so that it can:

* Configure the base binding URIs based on the binding and protocol
* Resolve the uri of a binding to a deployed URI (in some cases, maybe even 
more than one deployed URIs)

On the client side, now we have Node.getEndpointAddress() which provides a 
reliable way to look up the deployed URIs without hard-coding. I would like to 
see something symmetric on the side side to handle the deployed URI.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Apr 26, 2011, at 1:08 AM, Simon Laws wrote:

 On Thu, Apr 21, 2011 at 9:09 AM, ant elder antel...@apache.org wrote:
 On Wed, Apr 20, 2011 at 3:28 PM, Simon Laws simonsl...@googlemail.com 
 wrote:
 
 What is it needed for? If its just for tests to set the http port to
 default to 8085 instead of 8080 then there is a static field on the
 http server class which tests can set.
 
   ...ant
 
 
 So here's a scenario. One the same machine start two Tuscany nodes to
 run two composites from the same domain that have components that talk
 to each other over the default binding remoted using web services.
 
 
 I can't see why that scenario shouldn't work ok with whats there now.
 Anyway, like i said earlier i didn't implement anything for the base
 URIs but it shouldn't be hard to do. It doesn't seem like the best
 approach to me though and i don't remember any scenarios being given
 in the past that explained why its necessary.
 
   ...ant
 
 
 I think we first need to agree (or not) whether we need to be able to
 set HTTP port numbers. Only then can we establish what a suitable
 mechanism is. Otherwise the two points become confused.
 
 Based on previous (and current based on the Allow the lookup of
 endpoint address by component/service/binding name from the Node API
 thread) experience I'm first asserting that we need to be able to set
 HTTP port numbers in order that the user of the runtime is able to set
 values other than the defaults chosen by Tuscany. I'm not saying how
 these values should be set by the user.
 
 Simon
 
 -- 
 Apache Tuscany committer: tuscany.apache.org
 Co-author of a book about Tuscany and SCA: tuscanyinaction.com



Re: [GSoC 2011] Appreciation for acceptance

2011-04-25 Thread Raymond Feng
Congratulations! 

We look forward to working out the feature so that we can see nice SCA assembly 
diagrams soon :-)
 
Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Apr 25, 2011, at 1:03 PM, Nirmal Fernando wrote:

 Hi All in the Tuscany Community,
 
 I am really happy to inform you that I have been selected to GSoC-2011
 under Apache Tuscany for the project Develop a simple tool that can
 be used to generate composite diagrams
 (https://issues.apache.org/jira/browse/TUSCANY-3496).
 
 It is a privilege to me to get the opportunity to work with such an
 active, helpful community and also with a such a great project. It is
 really amazing how you helped me in clarifying the problems I had
 regarding the idea.
 
 Especially I would like to thank Jean-Sebastien Delfino, my mentor,
 Raymond Feng who reported the idea and all the other Tuscany
 developers who helped me in various aspects. Special thanks to Florian
 Moga, for personally giving me feedback on my proposal.
 
 I promise you to keep your trust on me.
 
 Thank you very much.
 
 
 --
 Best Regards,
 Nirmal
 
 C.S.Nirmal J. Fernando
 Department of Computer Science  Engineering,
 Faculty of Engineering,
 University of Moratuwa,
 Sri Lanka.
 Blog: http://nirmalfdo.blogspot.com/



Re: Allow the lookup of endpoint address by component/service/binding name from the Node API, Re: svn commit: r1095537

2011-04-21 Thread Raymond Feng
Any stacktrace?

Raymond Feng
Sent from my iPhone

On Apr 21, 2011, at 8:01 AM, ant elder ant.el...@gmail.com wrote:

 I'm getting some build fails after this change and it looks like
 Hudson builds too, is it possible there's some files not committed or
 something?
 
   ...ant
 
 On Thu, Apr 21, 2011 at 5:03 AM, Raymond Feng enjoyj...@gmail.com wrote:
 Hi,
 I added an API to Node to look up the endpoint address for given component
 service endpoint. For example,
 String uri =
 node.getEndpointAddress(componentName/serviceName/bindingName)
 This is particularly useful for the test clients of bindings. No need to
 hard code the port numbers any more :-).
 Thanks,
 Raymond
 
 Raymond Feng
 rf...@apache.org
 Apache Tuscany PMC member and committer: tuscany.apache.org
 Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
 Personal Web Site: www.enjoyjava.com
 
 On Apr 20, 2011, at 3:34 PM, rf...@apache.org wrote:
 
 Author: rfeng
 Date: Wed Apr 20 22:34:51 2011
 New Revision: 1095537
 
 URL: http://svn.apache.org/viewvc?rev=1095537view=rev
 Log:
 Allow the look up of endpoint address by component/service/binding name from
 the Node API
 
 Modified:

 tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Endpoint.java

 tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointImpl.java

 tuscany/sca-java-2.x/trunk/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomServiceBindingProvider.java

 tuscany/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/CometServiceBindingProvider.java

 tuscany/sca-java-2.x/trunk/modules/binding-comet-runtime/src/main/java/org/apache/tuscany/sca/binding/comet/runtime/ServletFactory.java

 tuscany/sca-java-2.x/trunk/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/provider/CorbaServiceBindingProvider.java

 tuscany/sca-java-2.x/trunk/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestRuntimeWire.java

 tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPServiceBindingProvider.java

 tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceBindingProvider.java

 tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/provider/RESTServiceBindingProvider.java

 tuscany/sca-java-2.x/trunk/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIServiceBindingProvider.java

 tuscany/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/DelegatingSCAServiceBindingProvider.java

 tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ServiceBindingProvider.java

 tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws-ri/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/ri/JAXWSServiceBindingProvider.java

 tuscany/sca-java-2.x/trunk/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/extensibility/HttpPortAllocator.java

 tuscany/sca-java-2.x/trunk/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/extensibility/impl/DefaultHttpPortAllocatorImpl.java

 tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/Node.java

 tuscany/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java

 tuscany/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java

 tuscany/sca-java-2.x/trunk/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java
 
 Modified:
 tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Endpoint.java
 URL:
 http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Endpoint.java?rev=1095537r1=1095536r2=1095537view=diff
 ==
 ---
 tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Endpoint.java
 (original)
 +++
 tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Endpoint.java
 Wed Apr 20 22:34:51 2011
 @@ -46,6 +46,17 @@ public interface Endpoint extends Base,
  * or lt;componentURIgt;#service(serviceName)
  */
 void setURI(String uri);
 +
 +/**
 + * Get the deployed URI
 + * @return The deployed URI

[jira] [Assigned] (TUSCANY-3862) maven-dependency-plugin : MavenProject artifact.getFile() returns directory when dependency is part of aggregator pom build

2011-04-20 Thread Raymond Feng (JIRA)

 [ 
https://issues.apache.org/jira/browse/TUSCANY-3862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Raymond Feng reassigned TUSCANY-3862:
-

Assignee: Raymond Feng

 maven-dependency-plugin : MavenProject artifact.getFile() returns directory 
 when dependency is part of aggregator pom build
 ---

 Key: TUSCANY-3862
 URL: https://issues.apache.org/jira/browse/TUSCANY-3862
 Project: Tuscany
  Issue Type: Bug
  Components: Maven Plugins
 Environment: ALL
Reporter: Nitya Doraisamy
Assignee: Raymond Feng
Priority: Minor
 Attachments: patchDetector.patch


 maven-dependency-plugin : 
 https://svn.apache.org/repos/asf/tuscany/maven-plugins/trunk/maven-dependency-plugin/
 While building using an aggregator pom, if a dependency project is part of 
 the aggregator, it is possible MavenProject artifact.getFile() to return a 
 directory
 Happens when the build lifecycle is stopped before it reaches the package or 
 install phase
 With artifacts from project.getArtifacts()
 artifact = junit:junit:jar:4.8.1:test
 artifact.getFile() = 
 /Users/ndoraisamy/.m2/repository/junit/junit/4.8.1/junit-4.8.1.jar
 artifact = com.company.application:utility:jar:1.0.0:compile
 artifact.getFile() = /target/classes

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Resolved] (TUSCANY-3862) maven-dependency-plugin : MavenProject artifact.getFile() returns directory when dependency is part of aggregator pom build

2011-04-20 Thread Raymond Feng (JIRA)

 [ 
https://issues.apache.org/jira/browse/TUSCANY-3862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Raymond Feng resolved TUSCANY-3862.
---

Resolution: Fixed

Patch applied to trunk. Thanks!

 maven-dependency-plugin : MavenProject artifact.getFile() returns directory 
 when dependency is part of aggregator pom build
 ---

 Key: TUSCANY-3862
 URL: https://issues.apache.org/jira/browse/TUSCANY-3862
 Project: Tuscany
  Issue Type: Bug
  Components: Maven Plugins
 Environment: ALL
Reporter: Nitya Doraisamy
Assignee: Raymond Feng
Priority: Minor
 Attachments: patchDetector.patch


 maven-dependency-plugin : 
 https://svn.apache.org/repos/asf/tuscany/maven-plugins/trunk/maven-dependency-plugin/
 While building using an aggregator pom, if a dependency project is part of 
 the aggregator, it is possible MavenProject artifact.getFile() to return a 
 directory
 Happens when the build lifecycle is stopped before it reaches the package or 
 install phase
 With artifacts from project.getArtifacts()
 artifact = junit:junit:jar:4.8.1:test
 artifact.getFile() = 
 /Users/ndoraisamy/.m2/repository/junit/junit/4.8.1/junit-4.8.1.jar
 artifact = com.company.application:utility:jar:1.0.0:compile
 artifact.getFile() = /target/classes

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Re: GSoc: Add JMX management capabilities to Apache Tuscany need a mentor

2011-04-16 Thread Raymond Feng
Hi, Amindri.

Thank you for the interest. I'm willing to help you on the idea.

Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Apr 7, 2011, at 8:18 PM, Amindri Udugala wrote:

 Hi all
 
 I have submitted my project proposal. Please have a look at it
 http://www.google-melange.com/gsoc/proposal/review/google/gsoc2011/amindriu/1
 
 I'm still looking forward to for some one to mentor this project
 
 thanks
 Amindri
 



Re: Problem when copying 1.6.2 maven artifacts to m2-ibiblio-incubating-repository

2011-04-13 Thread Raymond Feng
Maven sometimes need to resolve the artifact to a range of versions or the 
LATEST. I think the versions in the XML will help in such cases.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Apr 13, 2011, at 2:48 AM, Simon Nash wrote:

 Raymond Feng wrote:
 If you do mvn deploy from your workspace directly into the repo, it will add 
 the current version into the existing maven-metadata.xml. But if you can 
 just copy the ones from the staged repo, only 1.6.2 can be seen. I don't 
 think it will impact the maven resolution of older versions but it might 
 change the discovery. 
 Thanks for the tip.  This suggestion should be added to the Making Releases
 page.  If I do this now, will it regenerate the maven-metadata.xml files and
 add the older versions?
 
 Can you explain more about what it means to change the discovery?  I'm still
 not sure if this is a problem that I need to fix.
 
  Simon
 
 Thanks,
 Raymond
 / Raymond 
 Feng
 rf...@apache.org mailto:rf...@apache.org
 /Apache Tuscany PMC member and committer: tuscany.apache.org
 Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
 Personal Web Site: www.enjoyjava.com
 /
 /
 On Apr 12, 2011, at 1:03 PM, Simon Nash wrote:
 I copied the 1.6.2 maven staging artifacts to m2-ibiblio-rsync-repository
 using the instructions in [1].  Specifically, I did the following:
 
  Or, instead of using the Maven stage plugin just manually copy the 
  artifacts there:
 
  cp -p -v -R  sca/  
  /x1/www/people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/tuscany/sca
 
 This overwrote all the maven-metadata.xml files under the target sca/
 directory with new files of the form:
 
 ?xml version=1.0 encoding=UTF-8 ?
 metadata
 groupIdorg.apache.tuscany.sca/groupId
 artifactIdtuscany-assembly/artifactId
 version1.6.2/version
 versioning
   versions
 version1.6.2/version
   /versions
   lastUpdated20110406144922/lastUpdated
 /versioning
 /metadata
 
 These files refer only to the 1.6.2 version, and don't mention all
 the other Tuscany versions in m2-ibiblio-rsync-repository.
 
 Is this a problem?  If so, how can I fix it?
 
 Simon
 
 [1] http://tuscany.apache.org/making-releases.html
 
 



Re: Problem when copying 1.6.2 maven artifacts to m2-ibiblio-incubating-repository

2011-04-12 Thread Raymond Feng
If you do mvn deploy from your workspace directly into the repo, it will add 
the current version into the existing maven-metadata.xml. But if you can just 
copy the ones from the staged repo, only 1.6.2 can be seen. I don't think it 
will impact the maven resolution of older versions but it might change the 
discovery. 

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Apr 12, 2011, at 1:03 PM, Simon Nash wrote:

 I copied the 1.6.2 maven staging artifacts to m2-ibiblio-rsync-repository
 using the instructions in [1].  Specifically, I did the following:
 
  Or, instead of using the Maven stage plugin just manually copy the 
  artifacts there:
 
  cp -p -v -R  sca/  
  /x1/www/people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/tuscany/sca
 
 This overwrote all the maven-metadata.xml files under the target sca/
 directory with new files of the form:
 
 ?xml version=1.0 encoding=UTF-8 ?
 metadata
  groupIdorg.apache.tuscany.sca/groupId
  artifactIdtuscany-assembly/artifactId
  version1.6.2/version
  versioning
versions
  version1.6.2/version
/versions
lastUpdated20110406144922/lastUpdated
  /versioning
 /metadata
 
 These files refer only to the 1.6.2 version, and don't mention all
 the other Tuscany versions in m2-ibiblio-rsync-repository.
 
 Is this a problem?  If so, how can I fix it?
 
  Simon
 
 [1] http://tuscany.apache.org/making-releases.html
 



Re: [jira] [Commented] (TUSCANY-3496) Develop a simple tool that can be used to generate composite diagrams from the xml files

2011-04-08 Thread Raymond Feng
Sebastien, thank you for volunteering to mentor Nirmal. Your expertise in this 
area can definitely makes Nirmal easier :-).

Nirmal, I have a few other student proposals to mentor. Can you change your 
mentor to be Sebastien? We can always work together on the mailing list.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Apr 8, 2011, at 10:51 AM, Jean-Sebastien Delfino wrote:

 Hi Nirmal,
 
 Your proposal looks very good!
 
 I have two minor comments:
 
 - It'd be good to mention how you're going to handle recursive
 composition, there could be a few interesting options here, ranging
 from (from simple to more complex) just opening a composite component
 in a new page, zooming into it / expanding it to show his contents, up
 to -- if you're up to it -- 3D fly through :)
 
 - Your test phase could perhaps mention that you're going to include
 some of the composites from the OASIS SCA compliance test suite in
 your tests. Also, (this is more a question as I'm really not sure how
 to handle this) how are you going to automate the tests of the SVG
 user interface? Are you going to just verify that the output looks
 good, visually? or actually verify that the generated SVG matches some
 expected content?
 
 I'll be happy to mentor you with this project if you like.
 --
 Jean-Sebastien
 
 On Fri, Apr 8, 2011 at 7:29 AM, C.S. Nirmal J. Fernando (JIRA)
 dev@tuscany.apache.org wrote:
 
[ 
 https://issues.apache.org/jira/browse/TUSCANY-3496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13017471#comment-13017471
  ]
 
 C.S. Nirmal J. Fernando commented on TUSCANY-3496:
 --
 
 I have submitted my proposal to Google 
 http://socghop.appspot.com/gsoc/proposal/review/google/gsoc2011/nirmal070125/1
 
 Really exciting to work on this project and contribute to Apache Tuscany!
 
 Develop a simple tool that can be used to generate composite diagrams from 
 the xml files
 
 
 Key: TUSCANY-3496
 URL: https://issues.apache.org/jira/browse/TUSCANY-3496
 Project: Tuscany
  Issue Type: Wish
  Components: Java SCA Community Ideas
Affects Versions: Java-SCA-1.x
Reporter: Raymond Feng
  Labels: gsoc, gsoc2010, gsoc2011, mentor
 Attachments: proposed_design_1.jpg
 
   Original Estimate: 1m
  Remaining Estimate: 1m
 
 I'm looking a simple tool (web based or command) that can generate the 
 composite diagrams from a list of composite files. One technology we can 
 try is the Apache Batik project.
 http://xmlgraphics.apache.org/batik/
 This tool can serve multiple purposes:
 1) Help document our tutorials and samples
 2) Be integrated with the SCA domain manager to visualize the SCA domain 
 (contributions, composites, nodes etc)
 
 --
 This message is automatically generated by JIRA.
 For more information on JIRA, see: http://www.atlassian.com/software/jira
 
 
 
 
 -- 
 Jean-Sebastien



Re: [DISCUSS] Minimum standards for released samples

2011-04-05 Thread Raymond Feng
+1. I'm all for this approach.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Apr 5, 2011, at 9:45 AM, Simon Nash wrote:

 Following on from the discussion in [1], I'd like to establish
 whether or not the Tuscany developer community agrees that we
 should have some minimum standards for a sample to be part of trunk
 and be delivered in a released binary distribution.
 
 If there's agreement that we should establish this principle and
 have some minimum standards, I'll start another discussion thread
 on what those minimum standards should be.
 
 I am +1 that we should have some minimum standards for a sample to be
 in trunk and to be released as part of the binary distribution.
 
  Simon
 
 [1] 
 http://mail-archives.apache.org/mod_mbox/tuscany-dev/201104.mbox/%3c4d9b41c8.50...@apache.org%3E
 



Re: 2.0 Beta2 samples (was: [VOTE] Release Tuscany SCA 2.0 Beta2 RC2)

2011-04-04 Thread Raymond Feng
I like the commit then review approach much better. When we add samples into 
trunk, we have the responsibility to keep them working (in the right way). 

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Apr 4, 2011, at 9:04 AM, Simon Nash wrote:

 ant elder wrote:
 On Mon, Apr 4, 2011 at 2:14 PM, Simon Nash n...@apache.org wrote:
 Also in [1], I said that a new sample that doesn't yet meet the mandatory
 release requirements should go in unreleased/ initially.  AFAICT, the store
 sample does meet the mandatory release requirements, so I'm not sure why
 it was moved to unreleased/.
 
 Because without asking first there is no way of know if there is
 consensus with everyone to include something in trunk. I give up on
 this new approach to the samples, it is sucking away way to much time.
 Please from now on lets go back to trunk/samples working just the same
 as any other part of tuscany svn.
   ...ant
 I think the process should work the other way round, i.e., that if
 a sample is committed to trunk and it doesn't meet the mandatory
 requirements (which we can discuss and hopefully agree), then it should
 be moved to unreleased/ until it does meet the mandatory requirements.
 Is this a workable approach?
 
  Simon
 



Re: [1.6.2] Using new aggregated repository for Apache snapshots

2011-04-03 Thread Raymond Feng
Having the single facade repo is better. +1.

Raymond Feng
Sent from my iPhone

On Apr 3, 2011, at 11:12 AM, Simon Nash n...@apache.org wrote:

 I updated the top-level pom in the 1.6.2 branch and tag to change
 the repository and pluginRepository URLs for Apache snapshots.
 
 The pom was previously using both
 http://people.apache.org/repo/m2-snapshot-repository
 and
 https://repository.apache.org/content/groups/snapshots
 
 These have been replaced by a single aggregrated repository
 http://repository.apache.org/snapshots
 which proxies the previous repositories, so I changed the
 pom to refer to this new repository.
 
 I left the snapshotRepository URL under distributionManagement
 unchanged as
 scp://people.apache.org/www/people.apache.org/repo/m2-snapshot-repository
 
 I'll apply this change to the 1.x trunk unless anyone has any concerns.
 
  Simon
 


Re: [1.6.2] Problem with ws.zones.apache.org

2011-04-02 Thread Raymond Feng
Can you try to remove the repos to see if we still need them?

Raymond Feng
Sent from my iPhone

On Apr 2, 2011, at 2:39 AM, Simon Nash n...@apache.org wrote:

 When building the 1.6.2 branch, I see warnings like the following:
 
 [INFO] snapshot org.apache.tuscany.sca:tuscany-core:1.6.2-SNAPSHOT: checking 
 for
 updates from apache.ws
 [WARNING] repository metadata for: 'snapshot 
 org.apache.tuscany.sca:tuscany-core
 :1.6.2-SNAPSHOT' could not be retrieved from repository: apache.ws due to an 
 err
 or: Error transferring file
 [INFO] Repository 'apache.ws' will be blacklisted
 
 The problem seems to be that the repositories at 
 ws.zones.apache.org/repository
 and ws.zones.apache.org/repository2 are currently unavailable.
 
 Does anyone know whether this is a temporary issue, or a permanent removal of
 these repositories?
 
  Simon
 


Re: 2.0 Beta2 samples (was: [VOTE] Release Tuscany SCA 2.0 Beta2 RC2)

2011-04-02 Thread Raymond Feng
IMO, we shouldn't even try to use one consistent way to launch Tuscany in the 
samples. I don't like the magic plugin approach. The whole idea of Tuscany/SCA 
is to adapt to whatever technology/container people use instead of reinventing 
the wheels. Think about Spring, there is no mandatory way to use it. 

Sent from my iPad

On Apr 2, 2011, at 1:59 PM, ant elder antel...@apache.org wrote:

 On Fri, Apr 1, 2011 at 5:57 PM, Luciano Resende luckbr1...@gmail.com wrote:
 On Fri, Apr 1, 2011 at 5:32 AM, ant elder antel...@apache.org wrote:
 
 Replying to that now quite old email...
 
 As you asked about this i had a go at adding support to the Tuscany
 plugin to support that and there is now some initial code that seems
 to work. So if you add the pom.xml of a webapp project :
 
 plugin
groupIdorg.apache.tuscany.maven.plugins/groupId
artifactIdmaven-tuscany-plugin/artifactId
version${tuscany.version}/version
 /plugin
 
 then when doing mvn tuscany:run it will see that the packaging type
 is war and launch an embeded Tomcat to run the webapp project.
 
 In a similar vein, i've also added support for having the plugin run a
 classes main method instead of launching Tuscany, so if you have:
 
 plugin
groupIdorg.apache.tuscany.maven.plugins/groupId
artifactIdmaven-tuscany-plugin/artifactId
version${tuscany.version}/version
configuration
  mainClasssample.HelloworldSCAClient/mainClass
/configuration
 /plugin
 
 then when doing mvn tuscany:run the main method of that class gets 
 called.
 
 So using those if we add the tuscany plugin definition to the samples
 then you'll be able to run any sample by doing just mvn tuscany:run
 instead of having different ways for different samples depending on
 what type of sample it is.
 
   ...ant
 
 
 I've updated all the samples in unreleased to demonstrate this, if
 we're happy with the approach i'll add it to the samples in trunk.
 
 https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/unreleased/samples/getting-started/
 
   ...ant
 
 
 It would be great if we could summarize the requirements we have for
 the samples on the page Florian created [1].
 
 There is some stuff there already and i expect we'll add more as we
 work things out. Everyone has access to update the page so ...
 
 The information provided
 above as how to instrument the sample is also very good to be on that
 page,
 
 Sure ok i'll add that if we use it, i am waiting to see if there are
 any comments for or against - if we're happy with the approach i'll
 add it to the samples
 
 I'd add the expectations and/or user experience when running the
 samples, as it seems that we are droping support for ant completely
 (which to me is ok, as I mostly use maven), but I'm not sure if users
 are ok with that.
 
 
 At least Mike and Simon L have said in this thread they prefer Ant
 builds to Maven for the samples. Ant is harder because of all the
 dependencies and where to find the dependencies. There has been things
 suggested in this thread, and there are the previous attempts, and
 we've all the manifest jars gen'd for each extension now in the binary
 distribution, but it all seems a bit complicated and hard to find
 something that looks very elegant so i decided not to worry about Ant
 builds for now and focus on Maven (which is hard enough to find
 something everyone likes on its own), if someone else wants to look at
 Ant now that would be great by me.
 
 Also, we should clarify what we mean by consistent build, particular
 regarding base + extension, if we are using the base pom, fine, if
 we are using the base jar, sorry, but I believe couple of us don't
 agree with mandating that. And, reviewing the getting-started sample,
 it seems that you are forcing to use the base jar.
 
 
 Firstly, nothing is being unilaterally mandated or forced to be used.
 We've been discussing how to do the samples for months now, trying to
 work out consensuses and compromises and I've been updating the
 helloworld samples in the unreleased folder as we go and I've asked a
 bunch of times for feedback and comments on the approach they use and
 no one ever mentioned or complained about them using the base jar, so
 thats how they are when moved back into trunk and the samples wiki
 page was updated based on what they did.
 
 I don't really like using the base pom type dependency, unless there
 are good reasons it seems better to me to provide a single jar for
 groupings we know are useful than to have pom type dependencies. We've
 talked about this before, eg one from me is:
 http://apache.markmail.org/message/qttcn6ngmllptaq2. What don't you
 like about the base jar?
 
 So what shall we do about this, how can we find consensus on an approach?
 
 We could avoid it for the contribution samples by not including a test
 that starts tuscany so they just need the sca-api dependency, eg as
 

Re: 2.0 Beta2 samples (was: [VOTE] Release Tuscany SCA 2.0 Beta2 RC2)

2011-04-02 Thread Raymond Feng
Hi, Luciano.

Thank you for the clarification. Yes, that's what I meant to say. 

In the real world, we use Tuscany in many different environments, such as 
command line, Eclipse, JUnit, OSGi, Web applications (application-scoped or 
servlet scoped). Having the samples to represent some of the typical usages is 
better than a fixed way. As we can see from the discussions, developers find 
their needs to launch Tuscany in different ways.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Apr 2, 2011, at 10:12 PM, Luciano Resende wrote:

 On Sat, Apr 2, 2011 at 3:12 PM, ant elder ant.el...@gmail.com wrote:
 On Sat, Apr 2, 2011 at 10:29 PM, Raymond Feng enjoyj...@gmail.com wrote:
 IMO, we shouldn't even try to use one consistent way to launch Tuscany in 
 the samples. I don't like the magic plugin approach. The whole idea of 
 Tuscany/SCA is to adapt to whatever technology/container people use instead 
 of reinventing the wheels. Think about Spring, there is no mandatory way to 
 use it.
 
 
 Last time i looked Spring did have a single consistent set of jars to
 use, and no pom type ones. Surely it will be easier for our users if
 there are a single set of jars we document that they should use?
 
   ...ant
 
 
 I believe Raymond's remarks were not related to a single consistent
 set of jars or pom, but that Spring would allow you to launch Spring
 based applications in multiple ways based on ways that users are using
 these apps in real deployments, and that it does not provide a spring
 specific way to run these applications.
 
 -- 
 Luciano Resende
 http://people.apache.org/~lresende
 http://twitter.com/lresende1975
 http://lresende.blogspot.com/



Re: [GSoC-2011] Proposal

2011-03-31 Thread Raymond Feng
It sounds good to me.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Mar 30, 2011, at 8:57 PM, Nirmal Fernando wrote:

 Hi All,
 
 I have written a draft of my proposal for the idea Develop a simple
 tool that can be used to generate composite diagrams from the xml
 files (Tuscany 3496:
 https://issues.apache.org/jira/browse/TUSCANY-3496) at Tuscany wiki :
 https://cwiki.apache.org/confluence/display/TUSCANYWIKI/Develop+a+simple+tool+that+can+be+used+to+generate+composite+diagrams
 
 I appreciate the valuable comments of the community! I think those
 will help me to submit a compelling proposal!
 
 Thanks.
 
 --
 Best Regards,
 Nirmal
 
 C.S.Nirmal J. Fernando
 Department of Computer Science  Engineering,
 Faculty of Engineering,
 University of Moratuwa,
 Sri Lanka.
 Blog: http://nirmalfdo.blogspot.com/



Re: Next 2.x release

2011-03-30 Thread Raymond Feng
IIRC, the unreleased folder was created for the in-progress code that is not 
ready for the release. We agreed on the following:

1) Developers have freedom to add code into unreleased
2) Developers have freedom to move code from unreleased into trunk if they 
think it's ready
3) When we propose to retire/move code from trunk into unreleased, we need to 
have consensus. 

I'm pretty keen on 3). I recently found it's pretty changeling to find where 
some code lives now :-(.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Mar 29, 2011, at 11:51 PM, ant elder wrote:

 On Wed, Mar 30, 2011 at 7:24 AM, Luciano Resende luckbr1...@gmail.com wrote:
 On Tue, Mar 29, 2011 at 3:05 PM, ant elder antel...@apache.org wrote:
 Ok i've now added three getting started samples -
 https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/samples/getting-started/
 
 Is that enough now to get three people to +1 a release? Or if not what
 else is needed?
 
   ...ant
 
 
 I've added the store app back, and did some minimal test from a
 distribution which seems to work. It would be good to have that as
 part of the release as well.
 
 
 I've moved that to the unreleased folder so it can go through the
 review process that we're using for all samples before adding them to
 trunk. If you want it included then please first start a discussion to
 see if is something we want to include and what needs to be done to
 get it into shape.
 
   ...ant



Re: Next 2.x release

2011-03-26 Thread Raymond Feng
A release without samples is strange. 

Raymond Feng
Sent from my iPhone

On Mar 26, 2011, at 10:00 AM, Luciano Resende luckbr1...@gmail.com wrote:

 On Sat, Mar 26, 2011 at 1:39 AM, ant elder ant.el...@gmail.com wrote:
 On Wed, Mar 23, 2011 at 7:49 AM, ant elder ant.el...@gmail.com wrote:
 I've made some progress on getting the distributed domain and sca
 client going again and would like to do another release to get those
 out. If i started the release process next week would that fit in ok
 with others plans?
 
   ...ant
 
 
 Ok no one says they want to hold this till they finish something so
 I'll plan on doing it. Presently the samples have been moved out of
 trunk so as it is a build of the binary distribution wont include
 them. Do you mind about that? If that bothers you enough so that you
 wouldn't vote +1 to a release please say so now so we can make changes
 as necessary.
 
   ...ant
 
 
 Does this means no sample at al ? Can't we have at least the store app
 and calculator.
 
 -- 
 Luciano Resende
 http://people.apache.org/~lresende
 http://twitter.com/lresende1975
 http://lresende.blogspot.com/


Re: GSoC Project Proposal : Develop a 'NoSQL' Datastore component for Apache Cassandra, CouchDB, Hadoop/Hbase

2011-03-25 Thread Raymond Feng
FYI: There is a similar project at Spring:

http://www.springsource.org/spring-data

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Mar 25, 2011, at 10:58 AM, Eranda Sooriyabandara wrote:

 Hi all,
 I competed the implementation plan of the project proposal of the project 
 Develop a 'NoSQL' Datastore component for Apache Cassandra, CouchDB, 
 Hadoop/Hbase, you can find at [1]. Please let me know your precious ideas 
 regarding it.
 
 thanks
 Eranda
 
 [1]. 
 https://cwiki.apache.org/confluence/display/TUSCANYWIKI/Develop+a+NoSQL+Datastore+component



Re: Tuscany/Spring MVC integration

2011-03-23 Thread Raymond Feng
It's strange. After I saw your responses, I downloaded and installed Tomcat 
6.0.32 freshly. Then I copied helloworld-spring.war into webapps, started 
Tomcat, pointed the browser to:

http://localhost:8080/helloworld-spring/mvc/

It just works without any issues!

BTW, if you run mvn clean install for the webapp, we actually do the 
integration test to verify all the endpoints are working.

Can you show a list of jars in the WEB-INF/lib?

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Mar 23, 2011, at 2:09 AM, Florian Moga wrote:

 Same here but without the ClassCastException...
 
 On Wed, Mar 23, 2011 at 9:44 AM, ant elder ant.el...@gmail.com wrote:
 I gave it a try, deploying the built war to Tomcat it looks like it
 starts up ok but then i couldn't see what url to use to actually run
 anything. Running it with mvn jetty:run it fails with:
 
 Caused by: org.springframework.beans.factory.BeanCreationException:
 Error creating bean with name 'GreetingServiceBean' defined in U
 RL 
 [file:/C:/Tuscany/SVN/rayspring/helloworld-spring-webapp/src/main/webapp/WEB-INF/sca/sca-context.xml]:
 Cannot resolve reference t
 o bean 'MessageServiceBean' while setting bean property
 'messageService'; nested exception is
 org.springframework.beans.factory.NoSu
 chBeanDefinitionException: No bean named 'MessageServiceBean' is defined
 
 and with mvn tomcat:run it fails with:
 
 SEVERE: Exception starting filter tuscany
 java.lang.ClassCastException:
 org.apache.tuscany.sca.host.webapp.TuscanyServletFilter cannot be cast
 to javax.servlet.Filter
 
   ...ant
 
 On Tue, Mar 22, 2011 at 9:42 PM, Raymond Feng enjoyj...@gmail.com wrote:
  I made one more change to exclude servlet/el/jsp jars from being packaged
  into the WAR and upgrade to jstl 1.2. Now the standalone WAR can be deployed
  to Tomcat.
  Make sure you rebuild Tuscany. I don't see
  the org.springframework.beans.factory.NoSuchBeanDefinitionException.
  Thanks,
  Raymond
  
  Raymond Feng
  rf...@apache.org
  Apache Tuscany PMC member and committer: tuscany.apache.org
  Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
  Personal Web Site: www.enjoyjava.com
  
  On Mar 22, 2011, at 12:26 PM, Florian Moga wrote:
 
  It looks like now it is finding the spring file but I'm
  seeing org.springframework.beans.factory.NoSuchBeanDefinitionException: No
  bean named 'MessageServiceBean' is defined
  The bean is defined in servlet-context.xml. Are the spring files loaded in
  some order? It looks like sca-context.xml is loaded before
  servlet-context.xml and doesn't find the bean.
 
  On Tue, Mar 22, 2011 at 6:56 PM, Raymond Feng enjoyj...@gmail.com wrote:
 
  I made one more change in web.xml to use classpath: for Spring config
  location. Can you try again?
  Thanks,
  Raymond
  
  Raymond Feng
  rf...@apache.org
  Apache Tuscany PMC member and committer: tuscany.apache.org
  Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
  Personal Web Site: www.enjoyjava.com
  
  On Mar 22, 2011, at 9:47 AM, Raymond Feng wrote:
 
  Hi,
  sample-implementation-spring-helloworld-contribution.jar is copied into
  the WAR as a jar. That's probably why you didn't see the
  WEB-INF/classes/helloworld-context.xml. Can you try to unzip the jar into
  WEB-INF/classes to see if it helps? We also need to figure out a way to
  resolve Spring application context files on the classpath.
  Thanks,
  Raymond
  
  Raymond Feng
  rf...@apache.org
  Apache Tuscany PMC member and committer: tuscany.apache.org
  Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
  Personal Web Site: www.enjoyjava.com
  
  On Mar 22, 2011, at 9:32 AM, Florian Moga wrote:
 
  Hey Raymond,
  Yes, I tried deploying sample-implementation-spring-helloworld-webapp.war
  to both Tomcat and Jetty. When I saw the exceptions in logs, I tried 
  copying
  sample-implementation-spring-helloworld-contribution.jar to the lib/ folder
  of Tomcat and removing the provided scope but none didn't
  fix FileNotFoundException: Could not open ServletContext resource
  [/WEB-INF/classes/helloworld-context.xml].
  Florian
 
 
  On Tue, Mar 22, 2011 at 5:51 PM, Raymond Feng enjoyj...@gmail.com wrote:
 
  Hi, Florian.
  Thank you for the feedback. Did you try to deploy the hello-spring.war
  into Tomcat/Jetty?
  You are right

Re: Tuscany/Spring MVC integration

2011-03-23 Thread Raymond Feng
There are no differences in the list of JARs. I'll try to rebuild Tuscany to 
see if anything has changed.

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Mar 23, 2011, at 9:28 AM, Florian Moga wrote:

 Integration test works fine (no errors in logs). Here's what I'm seeing in 
 WEB-INF/lib:
 
 aopalliance-1.0.jar
 app-1.2.0-v20090520-1800.jar
 asm-3.1.jar
 axiom-api-1.2.10.jar
 axiom-impl-1.2.10.jar
 cglib-2.2.jar
 common-3.5.0-v20090520-1800.jar
 commons-beanutils-1.7.0.jar
 commons-cli-1.2.jar
 commons-codec-1.3.jar
 commons-collections-3.2.jar
 commons-digester-1.8.jar
 commons-discovery-0.4.jar
 commons-logging-1.1.1.jar
 contenttype-3.3.0-v20080604-1400.jar
 geronimo-javamail_1.4_spec-1.6.jar
 httpclient-4.0.3.jar
 httpcore-4.0.1.jar
 jabsorb-1.3.1.jar
 jackson-core-asl-1.7.1.jar
 jackson-mapper-asl-1.7.1.jar
 jackson-xc-1.7.1.jar
 jaxen-1.1.1.jar
 jettison-1.2.jar
 jobs-3.4.0-v20080512.jar
 jstl-1.2.jar
 myfaces-api-1.2.2.jar
 myfaces-impl-1.2.2.jar
 osgi-3.5.0-v20090520.jar
 preferences-3.2.300-v20090520-1800.jar
 registry-3.4.100-v20090520-1800.jar
 runtime-3.4.0-v20080512.jar
 sample-implementation-spring-helloworld-contribution-2.0-SNAPSHOT.jar
 servlet-api-2.5.jar
 slf4j-api-1.6.1.jar
 slf4j-jdk14-1.6.1.jar
 spring-aop-3.0.5.RELEASE.jar
 spring-asm-3.0.5.RELEASE.jar
 spring-beans-3.0.5.RELEASE.jar
 spring-context-3.0.5.RELEASE.jar
 spring-context-support-3.0.5.RELEASE.jar
 spring-core-3.0.5.RELEASE.jar
 spring-expression-3.0.5.RELEASE.jar
 spring-web-3.0.5.RELEASE.jar
 spring-webmvc-3.0.5.RELEASE.jar
 stripes-1.5.2.jar
 tuscany-assembly-2.0-SNAPSHOT.jar
 tuscany-assembly-xml-2.0-SNAPSHOT.jar
 tuscany-assembly-xsd-2.0-SNAPSHOT.jar
 tuscany-binding-http-2.0-SNAPSHOT.jar
 tuscany-binding-jsonp-2.0-SNAPSHOT.jar
 tuscany-binding-jsonp-runtime-2.0-SNAPSHOT.jar
 tuscany-binding-jsonrpc-2.0-SNAPSHOT.jar
 tuscany-binding-jsonrpc-runtime-2.0-SNAPSHOT.jar
 tuscany-binding-sca-runtime-2.0-SNAPSHOT.jar
 tuscany-binding-ws-2.0-SNAPSHOT.jar
 tuscany-builder-2.0-SNAPSHOT.jar
 tuscany-common-http-2.0-SNAPSHOT.jar
 tuscany-common-java-2.0-SNAPSHOT.jar
 tuscany-common-xml-2.0-SNAPSHOT.jar
 tuscany-contribution-2.0-SNAPSHOT.jar
 tuscany-core-2.0-SNAPSHOT.jar
 tuscany-core-databinding-2.0-SNAPSHOT.jar
 tuscany-core-spi-2.0-SNAPSHOT.jar
 tuscany-data-api-2.0-SNAPSHOT.jar
 tuscany-databinding-2.0-SNAPSHOT.jar
 tuscany-databinding-jaxb-2.0-SNAPSHOT.jar
 tuscany-databinding-json-2.0-SNAPSHOT.jar
 tuscany-deployment-2.0-SNAPSHOT.jar
 tuscany-domain-node-2.0-SNAPSHOT.jar
 tuscany-extensibility-2.0-SNAPSHOT.jar
 tuscany-extensibility-equinox-2.0-SNAPSHOT.jar
 tuscany-host-http-2.0-SNAPSHOT.jar
 tuscany-host-webapp-2.0-SNAPSHOT.jar
 tuscany-implementation-java-2.0-SNAPSHOT.jar
 tuscany-implementation-java-runtime-2.0-SNAPSHOT.jar
 tuscany-implementation-spring-2.0-SNAPSHOT.jar
 tuscany-implementation-spring-runtime-2.0-SNAPSHOT.jar
 tuscany-implementation-spring-webapp-2.0-SNAPSHOT.jar
 tuscany-implementation-web-2.0-SNAPSHOT.jar
 tuscany-implementation-web-runtime-2.0-SNAPSHOT.jar
 tuscany-interface-java-2.0-SNAPSHOT.jar
 tuscany-interface-java-jaxws-2.0-SNAPSHOT.jar
 tuscany-interface-wsdl-2.0-SNAPSHOT.jar
 tuscany-monitor-2.0-SNAPSHOT.jar
 tuscany-myfaces-2.0-SNAPSHOT.jar
 tuscany-node-api-2.0-SNAPSHOT.jar
 tuscany-node-impl-2.0-SNAPSHOT.jar
 tuscany-node-launcher-2.0-SNAPSHOT.jar
 tuscany-node-launcher-equinox-2.0-SNAPSHOT.jar
 tuscany-policy-security-2.0-SNAPSHOT.jar
 tuscany-sca-api-2.0-SNAPSHOT.jar
 tuscany-sca-client-impl-2.0-SNAPSHOT.jar
 tuscany-shell-2.0-SNAPSHOT.jar
 tuscany-stripes-2.0-SNAPSHOT.jar
 tuscany-web-javascript-2.0-SNAPSHOT.jar
 tuscany-xsd-2.0-SNAPSHOT.jar
 wsdl4j-1.6.2.jar
 XmlSchema-1.4.3.jar
 
 
 On Wed, Mar 23, 2011 at 6:00 PM, Raymond Feng enjoyj...@gmail.com wrote:
 It's strange. After I saw your responses, I downloaded and installed Tomcat 
 6.0.32 freshly. Then I copied helloworld-spring.war into webapps, started 
 Tomcat, pointed the browser to:
 
 http://localhost:8080/helloworld-spring/mvc/
 
 It just works without any issues!
 
 BTW, if you run mvn clean install for the webapp, we actually do the 
 integration test to verify all the endpoints are working.
 
 Can you show a list of jars in the WEB-INF/lib?
 
 Thanks,
 Raymond
  
 Raymond Feng
 rf...@apache.org
 Apache Tuscany PMC member and committer: tuscany.apache.org
 Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
 Personal Web Site: www.enjoyjava.com
 
 
 On Mar 23, 2011, at 2:09 AM, Florian Moga wrote:
 
 Same here but without the ClassCastException...
 
 On Wed, Mar 23, 2011 at 9:44 AM, ant elder

Re: Tuscany/Spring MVC integration

2011-03-23 Thread Raymond Feng
Hi,

I just tried on Ubuntu w/ Java 1.6.0-20-b2 and it also works fine. But I didn't 
rebuild the WAR there though (I copied it from the mac).

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Mar 23, 2011, at 2:45 PM, Florian Moga wrote:

 I'm running Ubuntu 10.10, OpenJDK 1.6.0_20, Maven 2.2.1.
 
 On Wed, Mar 23, 2011 at 11:41 PM, Raymond Feng enjoyj...@gmail.com wrote:
 I'm on MaC OS. What about you?
 
  
 Raymond Feng
 rf...@apache.org
 Apache Tuscany PMC member and committer: tuscany.apache.org
 Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
 Personal Web Site: www.enjoyjava.com
 
 
 On Mar 23, 2011, at 1:19 PM, Florian Moga wrote:
 
 Still getting it after building current trunk and using Tomcat 6.0.32... 
 Anyway, the sample looks really good, nice contribution!
 
 
 On Wed, Mar 23, 2011 at 7:22 PM, Raymond Feng enjoyj...@gmail.com wrote:
 FYI: I just rebuilt from the latest Trunk and the WAR works well with Tomcat.
 
  
 Raymond Feng
 rf...@apache.org
 Apache Tuscany PMC member and committer: tuscany.apache.org
 Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
 Personal Web Site: www.enjoyjava.com
 
 
 On Mar 23, 2011, at 9:28 AM, Florian Moga wrote:
 
 Integration test works fine (no errors in logs). Here's what I'm seeing in 
 WEB-INF/lib:
 
 aopalliance-1.0.jar
 app-1.2.0-v20090520-1800.jar
 asm-3.1.jar
 axiom-api-1.2.10.jar
 axiom-impl-1.2.10.jar
 cglib-2.2.jar
 common-3.5.0-v20090520-1800.jar
 commons-beanutils-1.7.0.jar
 commons-cli-1.2.jar
 commons-codec-1.3.jar
 commons-collections-3.2.jar
 commons-digester-1.8.jar
 commons-discovery-0.4.jar
 commons-logging-1.1.1.jar
 contenttype-3.3.0-v20080604-1400.jar
 geronimo-javamail_1.4_spec-1.6.jar
 httpclient-4.0.3.jar
 httpcore-4.0.1.jar
 jabsorb-1.3.1.jar
 jackson-core-asl-1.7.1.jar
 jackson-mapper-asl-1.7.1.jar
 jackson-xc-1.7.1.jar
 jaxen-1.1.1.jar
 jettison-1.2.jar
 jobs-3.4.0-v20080512.jar
 jstl-1.2.jar
 myfaces-api-1.2.2.jar
 myfaces-impl-1.2.2.jar
 osgi-3.5.0-v20090520.jar
 preferences-3.2.300-v20090520-1800.jar
 registry-3.4.100-v20090520-1800.jar
 runtime-3.4.0-v20080512.jar
 sample-implementation-spring-helloworld-contribution-2.0-SNAPSHOT.jar
 servlet-api-2.5.jar
 slf4j-api-1.6.1.jar
 slf4j-jdk14-1.6.1.jar
 spring-aop-3.0.5.RELEASE.jar
 spring-asm-3.0.5.RELEASE.jar
 spring-beans-3.0.5.RELEASE.jar
 spring-context-3.0.5.RELEASE.jar
 spring-context-support-3.0.5.RELEASE.jar
 spring-core-3.0.5.RELEASE.jar
 spring-expression-3.0.5.RELEASE.jar
 spring-web-3.0.5.RELEASE.jar
 spring-webmvc-3.0.5.RELEASE.jar
 stripes-1.5.2.jar
 tuscany-assembly-2.0-SNAPSHOT.jar
 tuscany-assembly-xml-2.0-SNAPSHOT.jar
 tuscany-assembly-xsd-2.0-SNAPSHOT.jar
 tuscany-binding-http-2.0-SNAPSHOT.jar
 tuscany-binding-jsonp-2.0-SNAPSHOT.jar
 tuscany-binding-jsonp-runtime-2.0-SNAPSHOT.jar
 tuscany-binding-jsonrpc-2.0-SNAPSHOT.jar
 tuscany-binding-jsonrpc-runtime-2.0-SNAPSHOT.jar
 tuscany-binding-sca-runtime-2.0-SNAPSHOT.jar
 tuscany-binding-ws-2.0-SNAPSHOT.jar
 tuscany-builder-2.0-SNAPSHOT.jar
 tuscany-common-http-2.0-SNAPSHOT.jar
 tuscany-common-java-2.0-SNAPSHOT.jar
 tuscany-common-xml-2.0-SNAPSHOT.jar
 tuscany-contribution-2.0-SNAPSHOT.jar
 tuscany-core-2.0-SNAPSHOT.jar
 tuscany-core-databinding-2.0-SNAPSHOT.jar
 tuscany-core-spi-2.0-SNAPSHOT.jar
 tuscany-data-api-2.0-SNAPSHOT.jar
 tuscany-databinding-2.0-SNAPSHOT.jar
 tuscany-databinding-jaxb-2.0-SNAPSHOT.jar
 tuscany-databinding-json-2.0-SNAPSHOT.jar
 tuscany-deployment-2.0-SNAPSHOT.jar
 tuscany-domain-node-2.0-SNAPSHOT.jar
 tuscany-extensibility-2.0-SNAPSHOT.jar
 tuscany-extensibility-equinox-2.0-SNAPSHOT.jar
 tuscany-host-http-2.0-SNAPSHOT.jar
 tuscany-host-webapp-2.0-SNAPSHOT.jar
 tuscany-implementation-java-2.0-SNAPSHOT.jar
 tuscany-implementation-java-runtime-2.0-SNAPSHOT.jar
 tuscany-implementation-spring-2.0-SNAPSHOT.jar
 tuscany-implementation-spring-runtime-2.0-SNAPSHOT.jar
 tuscany-implementation-spring-webapp-2.0-SNAPSHOT.jar
 tuscany-implementation-web-2.0-SNAPSHOT.jar
 tuscany-implementation-web-runtime-2.0-SNAPSHOT.jar
 tuscany-interface-java-2.0-SNAPSHOT.jar
 tuscany-interface-java-jaxws-2.0-SNAPSHOT.jar
 tuscany-interface-wsdl-2.0-SNAPSHOT.jar
 tuscany-monitor-2.0-SNAPSHOT.jar
 tuscany-myfaces-2.0-SNAPSHOT.jar
 tuscany-node-api-2.0-SNAPSHOT.jar
 tuscany-node-impl-2.0-SNAPSHOT.jar
 tuscany-node-launcher-2.0-SNAPSHOT.jar
 tuscany-node-launcher-equinox-2.0-SNAPSHOT.jar
 tuscany-policy-security-2.0-SNAPSHOT.jar
 tuscany-sca-api

Re: Tuscany/Spring MVC integration

2011-03-22 Thread Raymond Feng
Hi, Florian.

Thank you for the feedback. Did you try to deploy the hello-spring.war into 
Tomcat/Jetty? 

You are right, the provided scope seems to be an issue (for some reason, 
provided is used by some folks in the wrong way:-). I'll fix it. 

Thanks,
Raymond
 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com


On Mar 22, 2011, at 1:16 AM, Florian Moga wrote:

 Hi Raymond,
 
 Having Spring MVC support in Tuscany sounds and looks great! I had a look at 
 the sample but I haven't been able to start it up successfully. I'm seeing 
 the following in logs:
 
 Caused by: java.io.FileNotFoundException: Could not open ServletContext 
 resource [/WEB-INF/classes/helloworld-context.xml]
 
 Caused by: java.lang.ClassNotFoundException: sample.DateService
 
 This is probably due to the 
 sample-implementation-spring-helloworld-contribution dependency having the 
 scope set to provided. I don't know how that should be handled, I've tried 
 adding the jar to the lib/ folder in Tomcat but the first error was still 
 appearing. How should I do this correctly?
 
 Thanks,
 
 Florian
 
 
 On Tue, Mar 22, 2011 at 12:33 AM, Raymond Feng enjoyj...@gmail.com wrote:
 Hi,
 
 I recently added support of Spring MVC integration for Tuscany on top of the 
 Tuscany/Spring web application feature. 
 
 https://cwiki.apache.org/confluence/download/attachments/5964931/Spring+Tuscany.pptx
 
 To support the Spring MVC which has a servlet-scoped application context, I 
 added code to allow Tuscany to start/stop a node per servlet and enhanced the 
 CompositeContext and Spring implementation provider to link the Spring 
 application context to Tuscany.
 
 Here is a working sample:
 
 https://svn.apache.org/repos/asf/tuscany/sandbox/rfeng/sca-java-2.x/implementation-spring/
  (You can find how to invoke it at 
 https://svn.apache.org/repos/asf/tuscany/sandbox/rfeng/sca-java-2.x/implementation-spring/helloworld-spring-webapp/src/test/java/sample/HelloworldClientTestCase.java)
 
 (PS: I'm all confused by the move of our samples into various 
 contrib/unreleased folders and had a difficult time to dig out the 
 Spring/Tuscany integration sample. For now, I leave it in my sandbox before 
 the sample structure is settled. ) 
 
 Thanks,
 Raymond
  
 Raymond Feng
 rf...@apache.org
 Apache Tuscany PMC member and committer: tuscany.apache.org
 Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
 Personal Web Site: www.enjoyjava.com
 
 
 



  1   2   3   4   5   6   7   8   9   10   >