Domain level autowiring etc.

2007-11-27 Thread Simon Laws
Should autowiring work at the domain level? It doesn't at the moment. It's
only considered within a contributed composite. To autowire at the domain
level we have to adjust the way that service endpoints and references are
matched, i.e. extend the process to looking at interfaces and policies.

In line with moving the registration and lookup code out of the SCA binding
[1] I'm thinking about tidying the code in this area to make future
reliability scenarios easier to cope with (by making sure all the processing
is in one place with a clear services of associated events) so now would be
a good time to cover other outstanding issues. I think the outstanding
things are

Domain level wire elements in stand alone composites.
Domain level autowiring

Are there any more that people can think of?

Regards

Simon

[1] http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg25636.html


Problems building node-impl

2007-11-27 Thread ant elder
I'm getting some errors building node-impl on the latest trunk code, anyone
else seeing this or is it something in my local environment?

failure type=junit.framework.AssertionFailedError message=null
junit.framework.AssertionFailedError: null
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.fail(Assert.java:53)
at
org.apache.tuscany.sca.node.impl.DomainAPITestCase.testAddAndUpdateContribution
(DomainAPITestCase.java:149)

system-errjava.lang.NullPointerException
at org.apache.tuscany.sca.domain.impl.SCADomainImpl.addContribution(
SCADomainImpl.java:483)
at org.apache.tuscany.sca.domain.impl.SCADomainImpl.updateContribution(
SCADomainImpl.java:512)
at
org.apache.tuscany.sca.node.impl.DomainAPITestCase.testAddAndUpdateContribution
(DomainAPITestCase.java:141)


error type=org.apache.tuscany.sca.node.NodeException message=Composite {
http://primary}CalculatorA is not deployable
org.apache.tuscany.sca.node.NodeException: Composite {
http://primary}CalculatorA is not deployable
at
org.apache.tuscany.sca.node.impl.SCANodeImpl.addToDomainLevelComposite(
SCANodeImpl.java:479)
at
org.apache.tuscany.sca.node.impl.StandaloneNodeTestCase.testAddDepdendentContributions
(StandaloneNodeTestCase.java:196)

   ...ant


Re: Problems building node-impl

2007-11-27 Thread Simon Laws
On Nov 27, 2007 9:47 AM, ant elder [EMAIL PROTECTED] wrote:

 I'm getting some errors building node-impl on the latest trunk code,
 anyone
 else seeing this or is it something in my local environment?

failure type=junit.framework.AssertionFailedError message=null
 junit.framework.AssertionFailedError: null
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.fail(Assert.java:53)
at

 org.apache.tuscany.sca.node.impl.DomainAPITestCase.testAddAndUpdateContribution
 (DomainAPITestCase.java:149)

system-errjava.lang.NullPointerException
at org.apache.tuscany.sca.domain.impl.SCADomainImpl.addContribution(
 SCADomainImpl.java:483)
at org.apache.tuscany.sca.domain.impl.SCADomainImpl.updateContribution(
 SCADomainImpl.java:512)
at

 org.apache.tuscany.sca.node.impl.DomainAPITestCase.testAddAndUpdateContribution
 (DomainAPITestCase.java:141)


 error type=org.apache.tuscany.sca.node.NodeException message=Composite
 {
 http://primary}CalculatorA http://primary%7DCalculatorA is not
 deployable
 org.apache.tuscany.sca.node.NodeException: Composite {
 http://primary}CalculatorA http://primary%7DCalculatorA is not
 deployable
at
 org.apache.tuscany.sca.node.impl.SCANodeImpl.addToDomainLevelComposite(
 SCANodeImpl.java:479)
at

 org.apache.tuscany.sca.node.impl.StandaloneNodeTestCase.testAddDepdendentContributions
 (StandaloneNodeTestCase.java:196)

   ...ant

Hi Ant

There seem to be two things going on here. Errors being reported in
AddAndUpdateContribution and also in AddDependentContributions. Did they
appear in this order?

Did you do a full svn up and a mvn clean etc?

Doesn't look like environmental things to me. I looked to see if I have
committed all my changes and it looks like I did. If you still get if after
a clean we need to get it in the debugger and find out what's going on.

Regards

Simon


Re: Problems building node-impl

2007-11-27 Thread Rajini Sivaram
Simon,

I had the same two failures with a clean build after checking out the code
yesterday.


Thank you...

Regards,

Rajini


On 11/27/07, Simon Laws [EMAIL PROTECTED] wrote:

 On Nov 27, 2007 9:47 AM, ant elder [EMAIL PROTECTED] wrote:

  I'm getting some errors building node-impl on the latest trunk code,
  anyone
  else seeing this or is it something in my local environment?
 
 failure type=junit.framework.AssertionFailedError message=null
  junit.framework.AssertionFailedError: null
 at junit.framework.Assert.fail(Assert.java:47)
 at junit.framework.Assert.fail(Assert.java:53)
 at
 
 
 org.apache.tuscany.sca.node.impl.DomainAPITestCase.testAddAndUpdateContribution
  (DomainAPITestCase.java:149)
 
 system-errjava.lang.NullPointerException
 at org.apache.tuscany.sca.domain.impl.SCADomainImpl.addContribution(
  SCADomainImpl.java:483)
 at
 org.apache.tuscany.sca.domain.impl.SCADomainImpl.updateContribution(
  SCADomainImpl.java:512)
 at
 
 
 org.apache.tuscany.sca.node.impl.DomainAPITestCase.testAddAndUpdateContribution
  (DomainAPITestCase.java:141)
 
 
  error type=org.apache.tuscany.sca.node.NodeException
 message=Composite
  {
  http://primary}CalculatorA http://primary%7DCalculatorA is not
  deployable
  org.apache.tuscany.sca.node.NodeException: Composite {
  http://primary}CalculatorA http://primary%7DCalculatorA is not
  deployable
 at
  org.apache.tuscany.sca.node.impl.SCANodeImpl.addToDomainLevelComposite(
  SCANodeImpl.java:479)
 at
 
 
 org.apache.tuscany.sca.node.impl.StandaloneNodeTestCase.testAddDepdendentContributions
  (StandaloneNodeTestCase.java:196)
 
...ant
 
 Hi Ant

 There seem to be two things going on here. Errors being reported in
 AddAndUpdateContribution and also in AddDependentContributions. Did they
 appear in this order?

 Did you do a full svn up and a mvn clean etc?

 Doesn't look like environmental things to me. I looked to see if I have
 committed all my changes and it looks like I did. If you still get if
 after
 a clean we need to get it in the debugger and find out what's going on.

 Regards

 Simon



Re: Problems building node-impl

2007-11-27 Thread ant elder
On Nov 27, 2007 10:01 AM, Simon Laws [EMAIL PROTECTED] wrote:

 On Nov 27, 2007 9:47 AM, ant elder [EMAIL PROTECTED] wrote:

  I'm getting some errors building node-impl on the latest trunk code,
  anyone
  else seeing this or is it something in my local environment?
 
 failure type=junit.framework.AssertionFailedError message=null
  junit.framework.AssertionFailedError: null
 at junit.framework.Assert.fail(Assert.java:47)
 at junit.framework.Assert.fail(Assert.java:53)
 at
 
 
 org.apache.tuscany.sca.node.impl.DomainAPITestCase.testAddAndUpdateContribution
  (DomainAPITestCase.java:149)
 
 system-errjava.lang.NullPointerException
 at org.apache.tuscany.sca.domain.impl.SCADomainImpl.addContribution(
  SCADomainImpl.java:483)
 at
 org.apache.tuscany.sca.domain.impl.SCADomainImpl.updateContribution(
  SCADomainImpl.java:512)
 at
 
 
 org.apache.tuscany.sca.node.impl.DomainAPITestCase.testAddAndUpdateContribution
  (DomainAPITestCase.java:141)
 
 
  error type=org.apache.tuscany.sca.node.NodeException
 message=Composite
  {
  http://primary}CalculatorA http://primary%7DCalculatorA 
 http://primary%7DCalculatorA is not
  deployable
  org.apache.tuscany.sca.node.NodeException: Composite {
  http://primary}CalculatorA http://primary%7DCalculatorA 
 http://primary%7DCalculatorA is not
  deployable
 at
  org.apache.tuscany.sca.node.impl.SCANodeImpl.addToDomainLevelComposite(
  SCANodeImpl.java:479)
 at
 
 
 org.apache.tuscany.sca.node.impl.StandaloneNodeTestCase.testAddDepdendentContributions
  (StandaloneNodeTestCase.java:196)
 
...ant
 
 Hi Ant

 There seem to be two things going on here. Errors being reported in
 AddAndUpdateContribution and also in AddDependentContributions. Did they
 appear in this order?

 Did you do a full svn up and a mvn clean etc?

 Doesn't look like environmental things to me. I looked to see if I have
 committed all my changes and it looks like I did. If you still get if
 after
 a clean we need to get it in the debugger and find out what's going on.

 Regards

 Simon


I think i'm all up to date  and have done a clean etc.

Taking these one at a time i've started debuging the
StandaloneNodeTestCase.testAddDepdendentContributions failure. That gets to
line 196 of StandaloneNodeTestCase.java and calls
node.addToDomainLevelComposite where the code at line 478 of SCANodeImpl has
if ( !isDeployable(composite)){, the composite isn't deployable so that then
throws the NodeException. I'm not sure I understand that check, does a
composite have to be deployable to  use it with addToDomainLevelComposite ?

   ...ant


Re: Problems building node-impl

2007-11-27 Thread Simon Laws
On Nov 27, 2007 10:46 AM, ant elder [EMAIL PROTECTED] wrote:

 On Nov 27, 2007 10:01 AM, Simon Laws [EMAIL PROTECTED] wrote:

  On Nov 27, 2007 9:47 AM, ant elder [EMAIL PROTECTED] wrote:
 
   I'm getting some errors building node-impl on the latest trunk code,
   anyone
   else seeing this or is it something in my local environment?
  
  failure type=junit.framework.AssertionFailedError
 message=null
   junit.framework.AssertionFailedError: null
  at junit.framework.Assert.fail(Assert.java:47)
  at junit.framework.Assert.fail(Assert.java:53)
  at
  
  
 
 org.apache.tuscany.sca.node.impl.DomainAPITestCase.testAddAndUpdateContribution
   (DomainAPITestCase.java:149)
  
  system-errjava.lang.NullPointerException
  at org.apache.tuscany.sca.domain.impl.SCADomainImpl.addContribution
 (
   SCADomainImpl.java:483)
  at
  org.apache.tuscany.sca.domain.impl.SCADomainImpl.updateContribution(
   SCADomainImpl.java:512)
  at
  
  
 
 org.apache.tuscany.sca.node.impl.DomainAPITestCase.testAddAndUpdateContribution
   (DomainAPITestCase.java:141)
  
  
   error type=org.apache.tuscany.sca.node.NodeException
  message=Composite
   {
   http://primary}CalculatorA http://primary%7DCalculatorA 
 http://primary%7DCalculatorA 
  http://primary%7DCalculatorA is not
   deployable
   org.apache.tuscany.sca.node.NodeException: Composite {
   http://primary}CalculatorA http://primary%7DCalculatorA 
 http://primary%7DCalculatorA 
  http://primary%7DCalculatorA is not
   deployable
  at
   org.apache.tuscany.sca.node.impl.SCANodeImpl.addToDomainLevelComposite
 (
   SCANodeImpl.java:479)
  at
  
  
 
 org.apache.tuscany.sca.node.impl.StandaloneNodeTestCase.testAddDepdendentContributions
   (StandaloneNodeTestCase.java:196)
  
 ...ant
  
  Hi Ant
 
  There seem to be two things going on here. Errors being reported in
  AddAndUpdateContribution and also in AddDependentContributions. Did they
  appear in this order?
 
  Did you do a full svn up and a mvn clean etc?
 
  Doesn't look like environmental things to me. I looked to see if I have
  committed all my changes and it looks like I did. If you still get if
  after
  a clean we need to get it in the debugger and find out what's going on.
 
  Regards
 
  Simon
 

 I think i'm all up to date  and have done a clean etc.

 Taking these one at a time i've started debuging the
 StandaloneNodeTestCase.testAddDepdendentContributions failure. That gets
 to
 line 196 of StandaloneNodeTestCase.java and calls
 node.addToDomainLevelComposite where the code at line 478 of SCANodeImpl
 has
 if ( !isDeployable(composite)){, the composite isn't deployable so that
 then
 throws the NodeException. I'm not sure I understand that check, does a
 composite have to be deployable to  use it with addToDomainLevelComposite
 ?

   ...ant

Somehow I messed up with svn. Probably by copying a directory on disc that
had an .svn sub-directory. Can you take a look at your
node-impl/src/test/resources/nodeBupdate directory and tell me if it has
anything in it?

Simon


Re: Problems building node-impl

2007-11-27 Thread ant elder
On Nov 27, 2007 11:47 AM, Simon Laws [EMAIL PROTECTED] wrote:



 On Nov 27, 2007 11:31 AM, ant elder [EMAIL PROTECTED] wrote:

 
 
  On Nov 27, 2007 11:24 AM, Simon Laws [EMAIL PROTECTED] wrote:
 
  
  
   On Nov 27, 2007 10:46 AM, ant elder [EMAIL PROTECTED] wrote:
  
On Nov 27, 2007 10:01 AM, Simon Laws [EMAIL PROTECTED]
wrote:
   
 On Nov 27, 2007 9:47 AM, ant elder  [EMAIL PROTECTED] wrote:

  I'm getting some errors building node-impl on the latest trunk
code,
  anyone
  else seeing this or is it something in my local environment?
 
 failure type=junit.framework.AssertionFailedError
message=null
  junit.framework.AssertionFailedError: null
 at junit.framework.Assert.fail (Assert.java:47)
 at junit.framework.Assert.fail(Assert.java:53)
 at
 
 

org.apache.tuscany.sca.node.impl.DomainAPITestCase.testAddAndUpdateContribution
  ( DomainAPITestCase.java:149)
 
 system-errjava.lang.NullPointerException
 at
org.apache.tuscany.sca.domain.impl.SCADomainImpl.addContribution(
  SCADomainImpl.java :483)
 at

org.apache.tuscany.sca.domain.impl.SCADomainImpl.updateContribution(
  SCADomainImpl.java:512)
 at
 
 

org.apache.tuscany.sca.node.impl.DomainAPITestCase.testAddAndUpdateContribution
  (DomainAPITestCase.java:141)
 
 
  error type=org.apache.tuscany.sca.node.NodeException
 message=Composite
  {
  http://primary}CalculatorA http://primary%7DCalculatorA 
http://primary%7DCalculatorA 
 http://primary%7DCalculatorA  is not
  deployable
  org.apache.tuscany.sca.node.NodeException: Composite {
  http://primary}CalculatorA http://primary%7DCalculatorA 
http://primary%7DCalculatorA 
 http://primary%7DCalculatorA is not
  deployable
 at
 
org.apache.tuscany.sca.node.impl.SCANodeImpl.addToDomainLevelComposite
(
  SCANodeImpl.java:479)
 at
 
 

org.apache.tuscany.sca.node.impl.StandaloneNodeTestCase.testAddDepdendentContributions
  (StandaloneNodeTestCase.java:196)
 
...ant
 
 Hi Ant

 There seem to be two things going on here. Errors being reported
in
 AddAndUpdateContribution and also in AddDependentContributions.
Did they
 appear in this order?

 Did you do a full svn up and a mvn clean etc?

 Doesn't look like environmental things to me. I looked to see if I
have
 committed all my changes and it looks like I did. If you still get
if
 after
 a clean we need to get it in the debugger and find out what's
going on.

 Regards

 Simon

   
I think i'm all up to date  and have done a clean etc.
   
Taking these one at a time i've started debuging the
StandaloneNodeTestCase.testAddDepdendentContributions failure. That
gets to
line 196 of StandaloneNodeTestCase.java and calls
node.addToDomainLevelComposite where the code at line 478 of
SCANodeImpl has
if ( !isDeployable(composite)){, the composite isn't deployable so
that then
throws the NodeException. I'm not sure I understand that check, does
a
composite have to be deployable to  use it with
addToDomainLevelComposite ?
   
  ...ant
   
   Somehow I messed up with svn. Probably by copying a directory on disc
   that had an .svn sub-directory. Can you take a look at your
   node-impl/src/test/resources/nodeBupdate directory and tell me if it has
   anything in it?
  
   Simon
 
 
  Its empty.
 
 ...ant
 
  Ok, can you svn up and try node-impl again.

 Simon


All ok now, thanks.

   ...ant


Re: Distribution structure for SCA Java 1.1 release (was Re: Sample dependencies not pulled in distribution)

2007-11-27 Thread Simon Laws
On Nov 27, 2007 2:25 PM, ant elder [EMAIL PROTECTED] wrote:

 I've just committed a runtime-war module as a start of whats being talked
 about here, which could be merged or replace distribution/webapp at some
 point. I'll post some more details later. One comment inline below:

   ...ant

 On Nov 23, 2007 6:00 PM, Simon Laws [EMAIL PROTECTED] wrote:

 snip


  I'm with you up to this point. What Tomcat deep integration work is
 going
  on
  (I do know about the Geronimo stuff).
 
  
   - fix Tomcat deep integration and document how to do it (by copying
 the
   binary lib directory jars to Tomcat lib etc)
 

 I don't think anyone has done much with Tomcat deep integration since M1
 days, i tried it a while back but there were varrious class loader issues.
 With all the fixing up of class loaders done for osgi recently this may
 work
 ok now, i just tried moving all the jars from the runtime-war from the war
 lib folder to the Tomcat lib folder and it all seems to keep working ok
 now
 so maybe we just need to test it a bit more and then document it.

   ...ant

So when the contribution is a war in its own right what you say last is the
solution? Or is there something else?

Simon


Callback problem

2007-11-27 Thread Giorgio Zoppi
Hi,
i've a problem with callbacks in this situation.
I create a component, call it.. AComponent


@Remotable
@Callback(AComponentCallback.class)

public interface AComponent {
@OneWay
void someMethod();
}

public interface AComponentCallback
{
  void receiveResult()
}

I'd like to set callback to AComponent dynamically and i's wiring
target dynamically to a component, is it feasible?
I.e something like:

ServiceReferenceImplWorkerService myworker =
(ServiceReferenceImplWorkerService)workerQueue.get();
ServiceReferenceWorkpoolService workpoolServiceReference =
workpoolContext.createSelfReference(WorkpoolService.class);
myworker.setCallback(workpoolServiceReference);
WorkerService ws = myworker.getService();
ws.compute(new TestJob(10));

I tried, but when it computes I got

http://petrus:49233/WorkerComponent527fe31a93f9f21b5378257c5e343047c99445dc
 [java] 27-nov-2007 15.22.50 workpool.WorkerServiceImpl compute
 [java] INFO:
WorkerComponent527fe31a93f9f21b5378257c5e343047c99445dc is computing a
new job
 [java] RuntimeException invoking receiveResult:
org.osoa.sca.ServiceRuntimeException: No callback wire found for /
 [java] org.osoa.sca.ServiceRuntimeException: No callback wire found for /
 [java] at
org.apache.tuscany.sca.core.invocation.JDKCallbackInvocationHandler.invoke(JDKCallbackInvocationHandler.java:63)

The question is then how are callbacks attached to a component? And
when callbacks are wired?

BTW I saw Apache Tribes for group memebership and it's ok for small groups.

Cheers,
Giorgio.

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



Re: Distribution structure for SCA Java 1.1 release (was Re: Sample dependencies not pulled in distribution)

2007-11-27 Thread ant elder
I've just committed a runtime-war module as a start of whats being talked
about here, which could be merged or replace distribution/webapp at some
point. I'll post some more details later. One comment inline below:

   ...ant

On Nov 23, 2007 6:00 PM, Simon Laws [EMAIL PROTECTED] wrote:

snip


 I'm with you up to this point. What Tomcat deep integration work is going
 on
 (I do know about the Geronimo stuff).

 
  - fix Tomcat deep integration and document how to do it (by copying the
  binary lib directory jars to Tomcat lib etc)


I don't think anyone has done much with Tomcat deep integration since M1
days, i tried it a while back but there were varrious class loader issues.
With all the fixing up of class loaders done for osgi recently this may work
ok now, i just tried moving all the jars from the runtime-war from the war
lib folder to the Tomcat lib folder and it all seems to keep working ok now
so maybe we just need to test it a bit more and then document it.

   ...ant


[jira] Created: (TUSCANY-1920) SCADomainFinder's getSCADomain() method always returning null object

2007-11-27 Thread Jeff Davis (JIRA)
SCADomainFinder's getSCADomain() method always returning null object


 Key: TUSCANY-1920
 URL: https://issues.apache.org/jira/browse/TUSCANY-1920
 Project: Tuscany
  Issue Type: Bug
  Components: Java SCA Core Runtime
Affects Versions: Java-SCA-1.0.1
 Environment: Java 1.5. Windows Vista. Eclipse Europa IDE..
Reporter: Jeff Davis


Using the calculator-distributed sample, I start it as instructed in the 
README file (runDomain, runNodeB etc), and the sample works fine. However, when 
I leave the domain and nodes running and try running the following class main:

public class TestRemote {

public static void main(String[] args) {
SCADomainFinder domainFinder = SCADomainFinder.newInstance();
SCADomain domainProxy;
try {
domainProxy = 
domainFinder.getSCADomain(http://localhost:8877;);
CalculatorService calculatorService = 

domainProxy.getService(CalculatorService.class, CalculatorServiceComponentA);

System.out.println(3 + 2= + calculatorService.add(3, 
2));

} catch (DomainException e) {

e.printStackTrace();
}

}
}

It returns the following error:

Exception in thread main java.lang.NullPointerException
at 
org.apache.tuscany.sca.node.impl.SCADomainImpl.getServiceReference(SCADomainImpl.java:417)
at 
org.apache.tuscany.sca.node.impl.SCADomainImpl.getService(SCADomainImpl.java:348)
at node.TestRemote.main(TestRemote.java:17)



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



[jira] Updated: (TUSCANY-1920) SCADomainFinder's getSCADomain() method always returning null object

2007-11-27 Thread Simon Laws (JIRA)

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

Simon Laws updated TUSCANY-1920:


Fix Version/s: Java-SCA-1.1
 Assignee: Simon Laws

Target 1.1. and assign to me

 SCADomainFinder's getSCADomain() method always returning null object
 

 Key: TUSCANY-1920
 URL: https://issues.apache.org/jira/browse/TUSCANY-1920
 Project: Tuscany
  Issue Type: Bug
  Components: Java SCA Core Runtime
Affects Versions: Java-SCA-1.0.1
 Environment: Java 1.5. Windows Vista. Eclipse Europa IDE..
Reporter: Jeff Davis
Assignee: Simon Laws
 Fix For: Java-SCA-1.1


 Using the calculator-distributed sample, I start it as instructed in the 
 README file (runDomain, runNodeB etc), and the sample works fine. However, 
 when I leave the domain and nodes running and try running the following class 
 main:
 public class TestRemote {
   
   public static void main(String[] args) {
   SCADomainFinder domainFinder = SCADomainFinder.newInstance();
   SCADomain domainProxy;
   try {
   domainProxy = 
 domainFinder.getSCADomain(http://localhost:8877;);
   CalculatorService calculatorService = 
   
 domainProxy.getService(CalculatorService.class, 
 CalculatorServiceComponentA);
   
   System.out.println(3 + 2= + calculatorService.add(3, 
 2));
   
   } catch (DomainException e) {
   e.printStackTrace();
   }
   }
 }
 It returns the following error:
 Exception in thread main java.lang.NullPointerException
   at 
 org.apache.tuscany.sca.node.impl.SCADomainImpl.getServiceReference(SCADomainImpl.java:417)
   at 
 org.apache.tuscany.sca.node.impl.SCADomainImpl.getService(SCADomainImpl.java:348)
   at node.TestRemote.main(TestRemote.java:17)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



Re: Callback problem

2007-11-27 Thread Simon Nash

This should work.  I am trying to understand the code example you
gave.  In the code snippet you have a call to setCallback() that
passes a ServiceReferenceWorkpoolService as the callback for a
service of type WorkpoolService.  However, your sample service is
of type AComponent and its callback service is of type
AComponentCallback.  Somewhere you need to call setCallback() on
a service reference of type AComponent, passing a callback service
reference of type AComponentCallback.  Is there any code that
does this?

  Simon

Giorgio Zoppi wrote:


Hi,
i've a problem with callbacks in this situation.
I create a component, call it.. AComponent


@Remotable
@Callback(AComponentCallback.class)

public interface AComponent {
@OneWay
void someMethod();
}

public interface AComponentCallback
{
  void receiveResult()
}

I'd like to set callback to AComponent dynamically and i's wiring
target dynamically to a component, is it feasible?
I.e something like:

ServiceReferenceImplWorkerService myworker =
(ServiceReferenceImplWorkerService)workerQueue.get();
ServiceReferenceWorkpoolService workpoolServiceReference =
workpoolContext.createSelfReference(WorkpoolService.class);
myworker.setCallback(workpoolServiceReference);
WorkerService ws = myworker.getService();
ws.compute(new TestJob(10));

I tried, but when it computes I got

http://petrus:49233/WorkerComponent527fe31a93f9f21b5378257c5e343047c99445dc
 [java] 27-nov-2007 15.22.50 workpool.WorkerServiceImpl compute
 [java] INFO:
WorkerComponent527fe31a93f9f21b5378257c5e343047c99445dc is computing a
new job
 [java] RuntimeException invoking receiveResult:
org.osoa.sca.ServiceRuntimeException: No callback wire found for /
 [java] org.osoa.sca.ServiceRuntimeException: No callback wire found for /
 [java] at
org.apache.tuscany.sca.core.invocation.JDKCallbackInvocationHandler.invoke(JDKCallbackInvocationHandler.java:63)

The question is then how are callbacks attached to a component? And
when callbacks are wired?

BTW I saw Apache Tribes for group memebership and it's ok for small groups.

Cheers,
Giorgio.

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





--
Simon C Nash   IBM Distinguished Engineer
Hursley Park, Winchester, UK   [EMAIL PROTECTED]
Tel. +44-1962-815156   Fax +44-1962-818999


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



Re: Distribution structure for SCA Java 1.1 release (was Re: Sample dependencies not pulled in distribution)

2007-11-27 Thread Simon Nash


ant elder wrote:


On Nov 27, 2007 2:29 PM, Simon Laws [EMAIL PROTECTED] wrote:




On Nov 27, 2007 2:25 PM, ant elder [EMAIL PROTECTED] wrote:



I've just committed a runtime-war module as a start of whats being
talked
about here, which could be merged or replace distribution/webapp at some
point. I'll post some more details later. One comment inline below:

 ...ant

On Nov 23, 2007 6:00 PM, Simon Laws [EMAIL PROTECTED] wrote:

snip



I'm with you up to this point. What Tomcat deep integration work is


going


on
(I do know about the Geronimo stuff).



- fix Tomcat deep integration and document how to do it (by copying


the


binary lib directory jars to Tomcat lib etc)



I don't think anyone has done much with Tomcat deep integration since M1
days, i tried it a while back but there were varrious class loader
issues.
With all the fixing up of class loaders done for osgi recently this may
work
ok now, i just tried moving all the jars from the runtime-war from the
war
lib folder to the Tomcat lib folder and it all seems to keep working ok
now
so maybe we just need to test it a bit more and then document it.

 ...ant



So when the contribution is a war in its own right what you say last is
the solution? Or is there something else?




Right, though for deep integration to work we'd still need some new code
that looks in each war as its deployed for .composite files and
sca-contibution.xmls, and i guess to do it properly also something like the
implementation.web that was mentioned a while ago.


I'm interested in getting this to work.  Is there a hook point in Tomcat
that we could use to look at war code as it's deployed?

  Simon



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



Re: Callback problem

2007-11-27 Thread Giorgio Zoppi
2007/11/27, Simon Nash [EMAIL PROTECTED]:
 This should work.  I am trying to understand the code example you
 gave.  In the code snippet you have a call to setCallback() that
 passes a ServiceReferenceWorkpoolService as the callback for a
 service of type WorkpoolService.  However, your sample service is
 of type AComponent and its callback service is of type
 AComponentCallback.  Somewhere you need to call setCallback() on
 a service reference of type AComponent, passing a callback service
 reference of type AComponentCallback.  Is there any code that
 does this?
Let me explain, the example was a proof of concept.
Actually in my code I have a component of name
WorkerComponentdc2c3b13d2aaa45d33c779af064c447f460d89f3, which is
dynamically generated, which it has no reference to other components.
Its definition is given by a template:
private StringTemplate t = new StringTemplate(component
xmlns=\http://www.osoa.org/xmlns/sca/1.0\;
name=\$componentName$\\n +
implementation.java class=\$className$\/+
property 
name=\workerName\$componentName$/property+
/component);
I process it with my own component processor and then i add it to the
composite.(replacing $name$, with appropriate values)

This is my worker.This worker implements an interface:

@Remotable
@Callback(WorkerServiceCallback.class)
@DataBinding(org.apache.tuscany.sca.databinding.job.Job)
public interface WorkerServiceT,E {
@OneWay
void compute(JobT,E job);
void start();
void stop();
}

Instead WorkpoolService implements WorkerServiceCallback:

@Remotable
public interface WorkerServiceCallback {
void receiveResult(Job resultType,  boolean reuse,
ServiceReferenceImplWorkerService serviceReference);
}

I generate a reference to a given worker component, i pass it as
CallableReference to
another component,

@Service(WorkpoolService.class)
@Scope(COMPOSITE)
@DataBinding(org.apache.tuscany.sca.databinding.job.Job)


public class WorkpoolServiceImpl implements WorkpoolService,
WorkerServiceCallback .


Now my requirement is to add dynamically a callback to the worker, but
it fails.So when a callback gets wired to a component?
I have a pair of hypothesis: the first is that a worker needs to set a
callback in its own runtime (in my case i set the callback in the
workpool runtime, which is in another host), the second is that's
something that i don't understand :).

Cheers,
Giorgio.

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



getQNameDefinition?

2007-11-27 Thread Simon Laws
I'm looking at the getQNameDefinition method which is described in the
assembly spec but I don't have a specific scenario describing how it works
or what it's for. It would seem to be saying that parts of the domain model
should be available based on QName but I don't understand why it uses a
Contribution URI as a context, what the supplied symbol space is for and
what the return type is expected to be. I believe we are able to write out
the model to XML for any composite so if we want to support this function I
would suggest we do that to start with.

Anyone have any background on this function?

Regards

Simon


Re: Domain level autowiring etc.

2007-11-27 Thread Raymond Feng

Please see my comments inline.

Thanks,
Raymond

- Original Message - 
From: Simon Laws [EMAIL PROTECTED]

To: tuscany-dev tuscany-dev@ws.apache.org
Sent: Tuesday, November 27, 2007 1:18 AM
Subject: Domain level autowiring etc.



Should autowiring work at the domain level? It doesn't at the moment. It's
only considered within a contributed composite. To autowire at the domain
level we have to adjust the way that service endpoints and references are
matched, i.e. extend the process to looking at interfaces and policies.



Domain-level autowiring should be supported. The matching algorithm should 
check the interfaces and policies and the same rules apply to both autowire 
and regular wires.


In line with moving the registration and lookup code out of the SCA 
binding

[1] I'm thinking about tidying the code in this area to make future
reliability scenarios easier to cope with (by making sure all the 
processing
is in one place with a clear services of associated events) so now would 
be

a good time to cover other outstanding issues. I think the outstanding
things are

Domain level wire elements in stand alone composites.
Domain level autowiring



A related question: For the @target attribute of reference or wire 
element, the URI is componentName/serviceName. Can the URI point to a 
component service in the SCA domain or does it have to be in the same 
composite?



Are there any more that people can think of?

Regards

Simon

[1] http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg25636.html




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



Re: Distribution structure for SCA Java 1.1 release (was Re: Sample dependencies not pulled in distribution)

2007-11-27 Thread Jean-Sebastien Delfino

Rajini Sivaram wrote:

Sebastien,


We would like to enable a binary Tuscany distribution to run under OSGi. I
am not sure of the level of granularity at which a bundle-ized Tuscany makes
sense in terms of providing modularity and versioning using OSGi. But I
would like to make sure that the bundles from the list below can be run in
some form under OSGi.

The big difference between packaging for OSGi and standard jars (apart from
the additional entries in the manifest) is that OSGi bundle classpath can
only refer to entries inside the bundle, while standard Jar classpath can
only refer to jars outside the jar file without a customized classloader.

I currently have Tuscany loaded into OSGi in two different ways. The first
is a small list of large bundles (all 3rd party jars are grouped together),
which are explicitly installed by an application that uses Tuscany. And the
second is a large list of small bundles (each 3rd party jar is retained as a
single bundle), loaded using OSGi bundle repository (OBR). Tuscany runtime
and the required Tuscany extensions are installed by the application, the
3rd party jars are automatically installed by OBR.

I am not sure how big each of the bundles you have listed below will be, and
also what the relative size of the samples would be compared to the bundle
itself. But I imagine that the easiest way to bundle these for OSGi would be
to create each of these as a single OSGi bundle. I would like to add
META-INF/MANIFEST.MF with OSGi import/export headers and an OSGi
Bundle-ClassPath to the zip/jar file corresponding to the bundle. This is to
enable a very coarsely grained set of bundles that can be easily installed
by an OSGi application. The additional manifest file will not impact
non-OSGi applications. By default, Tuscany will be run without OSGi, and the
zip file corresponding to the bundle will need to be unzipped first (no
change). To run Tuscany under OSGi, the zip file can be installed directly
into OSGi.

I would also like to enable finer grained OSGi bundles which can be
installed using OBR. For the all-in-one bundle, could we have OSGi manifest
entries inserted into each of the jar files including Tuscany modules and
3rd party jars, so that the jars can be installed independently into OSGi?
But this only makes sense if we can have separate jars for the Tuscany
extensions, rather than a combined tuscany-all.jar (otherwise OBR will
install all the 3rd party bundles when tuscany-all is installed). The base
Tuscany runtime could either be a single jar, or with some more fixes for
classloading, it could be multiple jars based on the maven modules. Again,
the OSGi manifest entries will not impact non-OSGi Tuscany. The splitting of
Tuscany jars also shouldn't have any impact since
tuscany-sca-manifest.jarcan just point to the longer list of Tuscany
jars instead of tuscany-all.

The third alternative is to have a separate set of jars, specifically
targetted for OSGi-based Tuscany, which would be somewhere in between the
coarsely grained first option and too finely grained second one. Rather than
provide this as part of the binary distribution, this could be an optional
build with the source distribution.


Suggestions?


Thank you...

Regards,

Rajini



Sorry for the delay I missed this one between ApacheCon and some 
vacation last week.


It looks like you're now thinking about having:
- one bundle per Tuscany JAR
- some way to use 3rd party JARs from the bundles

which I think make sense and will allow us to better leverage OSGi for 
isolation, versioning etc.

--
Jean-Sebastien

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



Re: getQNameDefinition?

2007-11-27 Thread Raymond Feng

Hi,

My understanding is that this operation provides look-up capability in an 
installed contribution. For example, if you want to find a WSDL portType 
based on the QName in contribution A, the call will be:


QName wsdlPortType = new QName(http://schemas.xmlsoap.org/wsdl/;, 
PortType); // The symbol space which differentiates XML artifacts, such as 
WSDL PortType, WSDL Binding or BPEL process

QName portTypeName = new QName(http://ns1/;, StockQuote);
javax.wsdl.PortType portType = 
domain.getDefinitionByQName(http://contributions/A;,  wsdlPortType, 
portTypeName);


Thanks,
Raymond

- Original Message - 
From: Simon Laws [EMAIL PROTECTED]

To: tuscany-dev tuscany-dev@ws.apache.org
Sent: Tuesday, November 27, 2007 9:06 AM
Subject: getQNameDefinition?



I'm looking at the getQNameDefinition method which is described in the
assembly spec but I don't have a specific scenario describing how it works
or what it's for. It would seem to be saying that parts of the domain 
model

should be available based on QName but I don't understand why it uses a
Contribution URI as a context, what the supplied symbol space is for and
what the return type is expected to be. I believe we are able to write out
the model to XML for any composite so if we want to support this function 
I

would suggest we do that to start with.

Anyone have any background on this function?

Regards

Simon




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



Re: Domain level autowiring etc.

2007-11-27 Thread Jean-Sebastien Delfino

Raymond Feng wrote:
[snip]


Should autowiring work at the domain level? It doesn't at the moment. 
It's

only considered within a contributed composite. To autowire at the domain
level we have to adjust the way that service endpoints and references are
matched, i.e. extend the process to looking at interfaces and policies.



Domain-level autowiring should be supported. The matching algorithm 
should check the interfaces and policies and the same rules apply to 
both autowire and regular wires.


+1

[snip]


A related question: For the @target attribute of reference or wire 
element, the URI is componentName/serviceName. Can the URI point to 
a component service in the SCA domain or does it have to be in the same 
composite?


The URI can point to a service outside of the composite.

I think it helps to think about the domain like this:

- there is a domain level composite (model)

- adding a composite to the domain is like including the composite in 
the domain level composite using an SCA include


Then the normal SCA scoping, naming, wiring, resolving etc. rules apply.

--
Jean-Sebastien

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



Re: Policy Framework Scenarios.

2007-11-27 Thread Raymond Feng

Please see my comments inline.

Thanks,
Raymond

- Original Message - 
From: Venkata Krishnan [EMAIL PROTECTED]

To: tuscany-dev@ws.apache.org
Sent: Monday, November 26, 2007 2:51 AM
Subject: Policy Framework Scenarios.



Hi,

Most part of the core policy framework now implemented except for the 
thing
that deals with evaluating the 'appliesTo' xpath against the SCDL which is 
a

bit incomplete.  I hope to wrap this too in a week.


IMO, it's a bit challenging from two perspectives to apply the xpath:
1) The xpath needs to apply to an XML sub tree in the SCDL.
2) We need to deal with XML inheritance/subsitutionGroup, for example, the 
xpath sca:implementation will match sca:implementation.java.




Meanwhile, I'd like to whet and evolve whatever has been done with 
different
user perspectives... so here are some perspectives I could think of... 
could

people kindly help with their opinions and inputs on this, please also
if any of you have other scenarios or ways of approaching this... please
pitch in...

A) Perspective of Policy Administrator 

- defines a bunch of intents and policysets for the domain, in the
definitions.xml
- profiles the various binding-types and implementation-types for the
various intents it 'mustProvide' and 'mayProvide'
   1) How does the Policy-Admin know from a binding/impl type about the
intents that it provides for ?  Should every binding/impl type have its 
own

definitions.xml file where it publishes this information ?  The specs says
that there is just this one file for the entire SCA domain - have I got it
wrong?
   2)What about the bunch of intents that the spec states as something 
that

would be supported by every SCA Runtime such as authentication,
confidentiality, integrity etc.  Since it makes no sense to have every
binding/impl type to define this as well, should we have a global
definitions.xml in the core module where we define these ?
   3) A binding / implementation type could have its own custom model of
representing policies within policysets and interpretting them.  For 
example

the ws-binding-axis2 use config param model (which is custom made) and
ws-policy assertion model (which is a standard) to represent policies. 
How

should this model information be communicated to the Policy Admin in a
standard way that is consistent across binding/impl types?  If we allow
every binding/impl type to have its own definitions.xml then could this 
also

contain the xsd for the policy model?



I don't think a global definitions.xml will fly. There are a few players in 
the picture:


a) Intent: Define the abstract requirements
b) PolicySet: Define the concrete configuration of policies that can be used 
to realized one or more intents
c) ImplementationType and BindingType: Define the intents that an 
implementation or binding type always provides or may provide.


a) should be provided by Tuscany core runtime and extensions, for example, 
the policy-transaction module will package the intent definitions for 
transactions.
b) should be contribution-based. Different contributions should be able to 
configure an intent differently. For example, for authentication, we may 
configure different userid/password pairs and for authorization, we may 
select different roles.

c) should be provided by the Implementation/Binding extensions



B) Perspective of Binding/Impl type developer ...
-
- defines the intents and xsds for the policy model that the binding/impl
type will use
- defines the StAX processors for loading the policy model that the
binding/impl type will use
- adds code to interpret various policies and exercise them.
   1) Do we leave the design for this to every binding / implementation
type or do we put in a programming model that is to be common across all
binding/impl types?  I'd feel it would be better to leave it to the
bindings/impl extension because each extension will have its own way of
implementing various QoS and how it would interface with a QoS
infrastructure as part of its (i.e. the extension's) lifecycle.  For 
example
the binding-ws-axis2 injects security related policies into the 
axis2-config
during the service and client creation time and does nothing specific 
during

invocation of service operations.

Sorry about making this very long.

Thanks
- Venkat




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



Re: Policy Framework Scenarios.

2007-11-27 Thread Jean-Sebastien Delfino

Venkata Krishnan wrote:


Meanwhile, I'd like to whet and evolve whatever has been done with different
user perspectives... so here are some perspectives I could think of... could
people kindly help with their opinions and inputs on this, please also
if any of you have other scenarios or ways of approaching this... please
pitch in...


I'll propose a scenario in a separate email.



A) Perspective of Policy Administrator 

- defines a bunch of intents and policysets for the domain, in the
definitions.xml
- profiles the various binding-types and implementation-types for the
various intents it 'mustProvide' and 'mayProvide'
1) How does the Policy-Admin know from a binding/impl type about the
intents that it provides for ?  Should every binding/impl type have its own
definitions.xml file where it publishes this information ?  The specs says
that there is just this one file for the entire SCA domain - have I got it
wrong?


Good question for the spec group. On one hand it'd be nice to support 
multiple definitions.xml files. On the other hand I trust that a system 
administrator can do something like 'cat *.xml  definitions.xml' to put 
multiple definitions in one file.



2)What about the bunch of intents that the spec states as something that
would be supported by every SCA Runtime such as authentication,
confidentiality, integrity etc.  Since it makes no sense to have every
binding/impl type to define this as well, should we have a global
definitions.xml in the core module where we define these ?


I'd prefer one of the policy modules, but we need to clearly understand 
(1) before going there I think.



3) A binding / implementation type could have its own custom model of
representing policies within policysets and interpretting them.  For example
the ws-binding-axis2 use config param model (which is custom made) and
ws-policy assertion model (which is a standard) to represent policies.  How
should this model information be communicated to the Policy Admin in a
standard way that is consistent across binding/impl types?  If we allow
every binding/impl type to have its own definitions.xml then could this also
contain the xsd for the policy model?


I'm not sure I understand the issue here, if there is an issue but it'd 
be nice for a custom policy language to be described with an XSD or some 
form useful to the administrator.




B) Perspective of Binding/Impl type developer ...
-
- defines the intents and xsds for the policy model that the binding/impl
type will use


In most cases the intents are probably defined separately, the binding 
declares which ones it supports.



- defines the StAX processors for loading the policy model that the
binding/impl type will use
- adds code to interpret various policies and exercise them.
1) Do we leave the design for this to every binding / implementation
type or do we put in a programming model that is to be common across all
binding/impl types?  I'd feel it would be better to leave it to the
bindings/impl extension because each extension will have its own way of
implementing various QoS and how it would interface with a QoS
infrastructure as part of its (i.e. the extension's) lifecycle.  For example
the binding-ws-axis2 injects security related policies into the axis2-config
during the service and client creation time and does nothing specific during
invocation of service operations.


+1 for leaving it to the binding/impl type.

--
Jean-Sebastien

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



Re: Policy Framework Scenarios.

2007-11-27 Thread Jean-Sebastien Delfino

Raymond Feng wrote:

Please see my comments inline.

Thanks,
Raymond

- Original Message - From: Venkata Krishnan 
[EMAIL PROTECTED]

To: tuscany-dev@ws.apache.org
Sent: Monday, November 26, 2007 2:51 AM
Subject: Policy Framework Scenarios.



Hi,

Most part of the core policy framework now implemented except for the 
thing
that deals with evaluating the 'appliesTo' xpath against the SCDL 
which is a

bit incomplete.  I hope to wrap this too in a week.


IMO, it's a bit challenging from two perspectives to apply the xpath:
1) The xpath needs to apply to an XML sub tree in the SCDL.
2) We need to deal with XML inheritance/subsitutionGroup, for example, 
the xpath sca:implementation will match sca:implementation.java.




My suggestion: let's get a concrete scenario working first (a little 
more concrete than helloworld, I'm going to propose one in a separate 
email to this thread), and let's see how appliesTo is used in this 
context before engaging in a struggle to complete its implementation.


Who knows, maybe we'll find that we don't need it, maybe we'll raise 
issues to the spec that will cause it to change, or maybe we'll find 
that we really need that xpath... but I think we'll have a much better 
understanding of this after we go through a concrete policy usage scenario.

--
Jean-Sebastien

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



Using security policies in the Bigbank scenario, was Re: Policy Framework Scenarios.

2007-11-27 Thread Jean-Sebastien Delfino

Jean-Sebastien Delfino wrote:
[snip]


I'll propose a scenario in a separate email.



Here it goes:
- We have support for SCA security policies.
- We have a Bigbank application.
- A bank application should be secure.
Looks like a perfect fit to me.

Going through a real world like scenario and trying and showing how to 
use SCA policies in an application like Bigbank will help our users 
understand how to use policies. It will also help us improve what we 
have, mature our policy story and provide feedback to the spec if necessary.


To make it real, I'd suggest to look at the Bigbank application and 
first think about where it'll make business sense to apply 
authentication, confidentiality, integrity or nothing.


To make the scenario a little more interesting we could split checking 
and savings account management in two divisions of the Bank running 
different composites. We'll then have to consider:

- exchanges within a department
- exchanges across departments
- exchanges with the outside world

...with different security requirements for each.

--
Jean-Sebastien

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



Re: Data transformation from/to POJO

2007-11-27 Thread Raymond Feng

I think there are two options:

1) Make the JAXB databinding as the default databinding for POJOs (simple 
and complex types).


2) Keep the POJO databindings and implement the POJO--XML transformers 
using JAXB-impl


Thanks,
Raymond

- Original Message - 
From: Jean-Sebastien Delfino [EMAIL PROTECTED]

To: tuscany-dev@ws.apache.org
Sent: Monday, November 26, 2007 3:26 PM
Subject: Re: Data transformation from/to POJO



Raymond Feng wrote:

Hi,

I just did a test to see how JAXB-RI handles the POJO without any 
annotations. The result seems to be promising.


I started with a POJO:

public class MyBean {
   private int age;
   private String name;
   private ListString notes = new ArrayListString();

   public int getAge() {
   return age;
   }
   public void setAge(int age) {
   this.age = age;
   }
   public String getName() {
   return name;
   }
   public void setName(String name) {
   this.name = name;
   }
   public ListString getNotes() {
   return notes;
   }
   public void setNotes(ListString notes) {
   this.notes = notes;
   }
}

The following test case is then successful.

public void testPOJO() throws Exception {
   JAXBContext context = JAXBContext.newInstance(MyBean.class);
   StringWriter writer = new StringWriter();
   MyBean bean = new MyBean();
   bean.setName(Test);
   bean.setAge(20);
   bean.getNotes().add(1);
   bean.getNotes().add(2);
   JAXBElementObject element = new JAXBElementObject(new 
QName(http://ns1;, bean), Object.class, bean);

   context.createMarshaller().marshal(element, writer);
   System.out.println(writer.toString());
   Object result = context.createUnmarshaller().unmarshal(new 
StringReader(writer.toString()));

   assertTrue(result instanceof JAXBElement);
   JAXBElement e2 = (JAXBElement)result;
   assertTrue(e2.getValue() instanceof MyBean);
}

?xml version=1.0 encoding=UTF-8 standalone=yes?ns2:bean 
xsi:type=myBean xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xmlns:ns2=http://ns1;age20/agenameTest/name/ns2:bean





Good that it seems promising :) what do I need to do to get the JaxB to 
XML transformer to pick up the Item bean in the store tutorial?


--
Jean-Sebastien

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




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



[jira] Created: (TUSCANY-1921) Spring implementation looks for application context files in the wrong location

2007-11-27 Thread Niklas Gustavsson (JIRA)
Spring implementation looks for application context files in the wrong location
---

 Key: TUSCANY-1921
 URL: https://issues.apache.org/jira/browse/TUSCANY-1921
 Project: Tuscany
  Issue Type: Bug
  Components: Java SCA Spring Implementation Extension
Affects Versions: Java-SCA-1.0.1
Reporter: Niklas Gustavsson


When setting the location on an implementation.spring to a JAR file, the 
current Tuscany implementation first looks for the Spring-Context attribute in 
the manifest (which looks okay). However, if that is not found, it tries to 
load the application context from application-context.xml in the root of the 
JAR.

Reading the spec, you'll find this section:
If there is no MANIFEST.MF file or no Spring-Context header within
that file, then the default behavior is to build an application context using 
all the *.xml files in the META-INF/spring directory. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



Re: Data transformation from/to POJO

2007-11-27 Thread Jean-Sebastien Delfino

Raymond Feng wrote:

I think there are two options:

1) Make the JAXB databinding as the default databinding for POJOs 
(simple and complex types).


What about doing that? any drawback?



2) Keep the POJO databindings and implement the POJO--XML transformers 
using JAXB-impl


Thanks,
Raymond

- Original Message - From: Jean-Sebastien Delfino 
[EMAIL PROTECTED]

To: tuscany-dev@ws.apache.org
Sent: Monday, November 26, 2007 3:26 PM
Subject: Re: Data transformation from/to POJO



Raymond Feng wrote:

Hi,

I just did a test to see how JAXB-RI handles the POJO without any 
annotations. The result seems to be promising.


I started with a POJO:

public class MyBean {
   private int age;
   private String name;
   private ListString notes = new ArrayListString();

   public int getAge() {
   return age;
   }
   public void setAge(int age) {
   this.age = age;
   }
   public String getName() {
   return name;
   }
   public void setName(String name) {
   this.name = name;
   }
   public ListString getNotes() {
   return notes;
   }
   public void setNotes(ListString notes) {
   this.notes = notes;
   }
}

The following test case is then successful.

public void testPOJO() throws Exception {
   JAXBContext context = JAXBContext.newInstance(MyBean.class);
   StringWriter writer = new StringWriter();
   MyBean bean = new MyBean();
   bean.setName(Test);
   bean.setAge(20);
   bean.getNotes().add(1);
   bean.getNotes().add(2);
   JAXBElementObject element = new JAXBElementObject(new 
QName(http://ns1;, bean), Object.class, bean);

   context.createMarshaller().marshal(element, writer);
   System.out.println(writer.toString());
   Object result = context.createUnmarshaller().unmarshal(new 
StringReader(writer.toString()));

   assertTrue(result instanceof JAXBElement);
   JAXBElement e2 = (JAXBElement)result;
   assertTrue(e2.getValue() instanceof MyBean);
}

?xml version=1.0 encoding=UTF-8 standalone=yes?ns2:bean 
xsi:type=myBean 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xmlns:ns2=http://ns1;age20/agenameTest/name/ns2:bean





Good that it seems promising :) what do I need to do to get the JaxB 
to XML transformer to pick up the Item bean in the store tutorial?


--
Jean-Sebastien

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




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




--
Jean-Sebastien

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



Re: Data transformation from/to POJO

2007-11-27 Thread Raymond Feng

I'll prototype to see if it's feasible.

Thanks,
Raymond

- Original Message - 
From: Jean-Sebastien Delfino [EMAIL PROTECTED]

To: tuscany-dev@ws.apache.org
Sent: Tuesday, November 27, 2007 1:18 PM
Subject: Re: Data transformation from/to POJO



Raymond Feng wrote:

I think there are two options:

1) Make the JAXB databinding as the default databinding for POJOs (simple 
and complex types).


What about doing that? any drawback?



2) Keep the POJO databindings and implement the POJO--XML transformers 
using JAXB-impl


Thanks,
Raymond

- Original Message - From: Jean-Sebastien Delfino 
[EMAIL PROTECTED]

To: tuscany-dev@ws.apache.org
Sent: Monday, November 26, 2007 3:26 PM
Subject: Re: Data transformation from/to POJO



Raymond Feng wrote:

Hi,

I just did a test to see how JAXB-RI handles the POJO without any 
annotations. The result seems to be promising.


I started with a POJO:

public class MyBean {
   private int age;
   private String name;
   private ListString notes = new ArrayListString();

   public int getAge() {
   return age;
   }
   public void setAge(int age) {
   this.age = age;
   }
   public String getName() {
   return name;
   }
   public void setName(String name) {
   this.name = name;
   }
   public ListString getNotes() {
   return notes;
   }
   public void setNotes(ListString notes) {
   this.notes = notes;
   }
}

The following test case is then successful.

public void testPOJO() throws Exception {
   JAXBContext context = JAXBContext.newInstance(MyBean.class);
   StringWriter writer = new StringWriter();
   MyBean bean = new MyBean();
   bean.setName(Test);
   bean.setAge(20);
   bean.getNotes().add(1);
   bean.getNotes().add(2);
   JAXBElementObject element = new JAXBElementObject(new 
QName(http://ns1;, bean), Object.class, bean);

   context.createMarshaller().marshal(element, writer);
   System.out.println(writer.toString());
   Object result = context.createUnmarshaller().unmarshal(new 
StringReader(writer.toString()));

   assertTrue(result instanceof JAXBElement);
   JAXBElement e2 = (JAXBElement)result;
   assertTrue(e2.getValue() instanceof MyBean);
}

?xml version=1.0 encoding=UTF-8 standalone=yes?ns2:bean 
xsi:type=myBean xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xmlns:ns2=http://ns1;age20/agenameTest/name/ns2:bean





Good that it seems promising :) what do I need to do to get the JaxB to 
XML transformer to pick up the Item bean in the store tutorial?


--
Jean-Sebastien

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




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




--
Jean-Sebastien

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




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



Re: Data transformation from/to POJO

2007-11-27 Thread Jean-Sebastien Delfino

Jean-Sebastien Delfino wrote:

Raymond Feng wrote:

I think there are two options:

1) Make the JAXB databinding as the default databinding for POJOs 
(simple and complex types).


What about doing that? any drawback?



And, jumping ahead and assuming that any drawbacks are acceptable, what 
about using that as well instead of where we currently use Java 
serialization to achieve pass by value through remotable interfaces.


That'll allow us to remove the requirement for objects that flow through 
a remotable interface to implement java.io.Serializable, which is not 
quite right.

--
Jean-Sebastien

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



Re: Callback problem

2007-11-27 Thread Simon Nash


Giorgio Zoppi wrote:


2007/11/27, Simon Nash [EMAIL PROTECTED]:


This should work.  I am trying to understand the code example you
gave.  In the code snippet you have a call to setCallback() that
passes a ServiceReferenceWorkpoolService as the callback for a
service of type WorkpoolService.  However, your sample service is
of type AComponent and its callback service is of type
AComponentCallback.  Somewhere you need to call setCallback() on
a service reference of type AComponent, passing a callback service
reference of type AComponentCallback.  Is there any code that
does this?


Let me explain, the example was a proof of concept.
Actually in my code I have a component of name
WorkerComponentdc2c3b13d2aaa45d33c779af064c447f460d89f3, which is
dynamically generated, which it has no reference to other components.
Its definition is given by a template:
private StringTemplate t = new StringTemplate(component
xmlns=\http://www.osoa.org/xmlns/sca/1.0\;
name=\$componentName$\\n +
implementation.java class=\$className$\/+
property 
name=\workerName\$componentName$/property+
/component);
I process it with my own component processor and then i add it to the
composite.(replacing $name$, with appropriate values)

This is my worker.This worker implements an interface:

@Remotable
@Callback(WorkerServiceCallback.class)
@DataBinding(org.apache.tuscany.sca.databinding.job.Job)
public interface WorkerServiceT,E {
@OneWay
void compute(JobT,E job);
void start();
void stop();
}

Instead WorkpoolService implements WorkerServiceCallback:

@Remotable
public interface WorkerServiceCallback {
void receiveResult(Job resultType,  boolean reuse,
ServiceReferenceImplWorkerService serviceReference);
}

I generate a reference to a given worker component, i pass it as
CallableReference to
another component,

@Service(WorkpoolService.class)
@Scope(COMPOSITE)
@DataBinding(org.apache.tuscany.sca.databinding.job.Job)


public class WorkpoolServiceImpl implements WorkpoolService,
WorkerServiceCallback .



All of this looks OK to me.


Now my requirement is to add dynamically a callback to the worker, but
it fails.So when a callback gets wired to a component?


I think your code should work.  The callback service reference that
you have dynamically set into the service reference for the worker
will be passed to the worker on the compute() call.  The worker
will store the callback address in a thread-local area and use it
when it makes the callback.  Are you by any chance switching threads
in the worker and making the callback from a different thread?  This
will not work with the current implementation.  I am intending to
remove this thread sensitivity but at the moment it is a limitation.

  Simon


I have a pair of hypothesis: the first is that a worker needs to set a
callback in its own runtime (in my case i set the callback in the
workpool runtime, which is in another host), the second is that's
something that i don't understand :).

Cheers,
Giorgio.

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







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



Re: Callback problem

2007-11-27 Thread Simon Nash

One more question.  What is the code in the worker that makes a
callback to the workpool?  Does it use an injected reference
annotated with @Callback, or does it make the callback using a
CallableReference for the callback that it obtains from the
RequestContext using the getCallback() method?

  Simon

Simon Nash wrote:



Giorgio Zoppi wrote:


2007/11/27, Simon Nash [EMAIL PROTECTED]:


This should work.  I am trying to understand the code example you
gave.  In the code snippet you have a call to setCallback() that
passes a ServiceReferenceWorkpoolService as the callback for a
service of type WorkpoolService.  However, your sample service is
of type AComponent and its callback service is of type
AComponentCallback.  Somewhere you need to call setCallback() on
a service reference of type AComponent, passing a callback service
reference of type AComponentCallback.  Is there any code that
does this?



Let me explain, the example was a proof of concept.
Actually in my code I have a component of name
WorkerComponentdc2c3b13d2aaa45d33c779af064c447f460d89f3, which is
dynamically generated, which it has no reference to other components.
Its definition is given by a template:
private StringTemplate t = new StringTemplate(component
xmlns=\http://www.osoa.org/xmlns/sca/1.0\;
name=\$componentName$\\n +
implementation.java class=\$className$\/+
property name=\workerName\$componentName$/property+
/component);
I process it with my own component processor and then i add it to the
composite.(replacing $name$, with appropriate values)

This is my worker.This worker implements an interface:

@Remotable
@Callback(WorkerServiceCallback.class)
@DataBinding(org.apache.tuscany.sca.databinding.job.Job)
public interface WorkerServiceT,E {
@OneWay
void compute(JobT,E job);
void start();
void stop();
}

Instead WorkpoolService implements WorkerServiceCallback:

@Remotable
public interface WorkerServiceCallback {
void receiveResult(Job resultType,  boolean reuse,
ServiceReferenceImplWorkerService serviceReference);
}

I generate a reference to a given worker component, i pass it as
CallableReference to
another component,

@Service(WorkpoolService.class)
@Scope(COMPOSITE)
@DataBinding(org.apache.tuscany.sca.databinding.job.Job)


public class WorkpoolServiceImpl implements WorkpoolService,
WorkerServiceCallback .



All of this looks OK to me.


Now my requirement is to add dynamically a callback to the worker, but
it fails.So when a callback gets wired to a component?


 
I think your code should work.  The callback service reference that
you have dynamically set into the service reference for the worker
will be passed to the worker on the compute() call.  The worker
will store the callback address in a thread-local area and use it
when it makes the callback.  Are you by any chance switching threads
in the worker and making the callback from a different thread?  This
will not work with the current implementation.  I am intending to
remove this thread sensitivity but at the moment it is a limitation.

  Simon


I have a pair of hypothesis: the first is that a worker needs to set a
callback in its own runtime (in my case i set the callback in the
workpool runtime, which is in another host), the second is that's
something that i don't understand :).

Cheers,
Giorgio.

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











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



Updated online store tutorial

2007-11-27 Thread Jean-Sebastien Delfino

The online store tutorial application is now pretty much working.

It shows how SCA allows a business to create an online store composite 
application and recompose and evolve it as the business changes and expands.


1. How to build an online store to sell fruits online with an SCA 
composite, a few java components (a shopping cart, a catalog, a currency 
converter), and a Web 2.0 AJAX UI.


2. How to recompose/rewire the store application after a merger with a 
vegetables company and offer a merged catalog of fruits and vegetables.


3. How to evolve the store's infrastructure by integrating the shopping 
cart service component with a database.


4. How to configure the store composite to start offering Web services 
to other online stores.


5. How to expand to another geography, with a slightly different UI, 
currency, and wiring to different online services.


Slides showing these steps are available there:
http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/tutorial/Tutorial.pdf

The code is there:
http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/tutorial/
(the amazon and www-cloud modules are work in progress, not yet 
integrated with what I just described)


If anybody is interested in contributing documentation, I think we could 
use some help to document the above steps and how to develop the online 
store using Tuscany in more details.



On a different note, the tutorial does not yet show how to distribute 
the application across different containers like Tomcat or Geronimo. I 
think we should add that aspect too, I'll post some ideas on that in a 
different email.

--
Jean-Sebastien

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



Re: Distribution structure for SCA Java 1.1 release (was Re: Sample dependencies not pulled in distribution)

2007-11-27 Thread Jean-Sebastien Delfino

Jean-Sebastien Delfino wrote:

[snip]
Simon Nash wrote:

I would like to make a start on improving the modularity of the
distro by building a distro containing only a base SCA runtime.
Sebastien's description of this was
 - base SCA runtime (assembly, policy fwk, impl-java)


[snip]

I haven't yet figured out how to do a sandbox

build that pulls in code from the trunk, without copying it.  Does
anyone else have an example of this that I could look at?


Modules assembled by the Maven assembly plugin are taken out of the 
Maven repository, so you shouldn't need to copy the code to come up with 
a different assembly.


For an example, look at the assemblies under sca/distribution.

I'm also going to put together an assembly for the eclipse plugin, I'll 
give a pointer when it's there.


Here it is:
- pom.xml [1] runs the Maven assembly plugin as part of the build
- runtime.xml [2] configures the assembly plugin to grab all dependency 
modules from the Maven repos plus a few local files


[1] 
http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/tools/eclipse/plugins/runtime/pom.xml
[2] 
http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/tools/eclipse/plugins/runtime/src/main/assembly/runtime.xml


To build a source distro you may have to directly point to the 
directories that contain the sources, but ../../../sca/modules/... 
relative path from the sandbox should work.




Hope this helps.


--
Jean-Sebastien

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



Distributed online store scenario, was: Updated online store tutorial

2007-11-27 Thread Jean-Sebastien Delfino

Jean-Sebastien Delfino wrote:
[snip]

The online store tutorial application is now pretty much working.



[snip]

 the tutorial does not yet show how to distribute
the application across different containers like Tomcat or Geronimo. I 
think we should add that aspect too, I'll post some ideas on that in a 
different email.


I'm thinking of the following scenario to explore the distribution of a 
composition across multiple containers working together in an SCA domain.


Our online store fruit business is going to merge with a company that 
sells vegetables, same as in the original tutorial scenario.


But instead of providing the vegetable catalog as a Web Service in the 
Internet service cloud, the vegetable company has implemented the 
catalog as an EJB session bean, in a JEE EAR running on Geronimo.


So we're going to have to represent the vegetable catalog EJB component 
in our store SCA domain and wire to it. We can probably follow what's 
described in http://www.osoa.org/pages/viewpage.action?pageId=3980 for now.


Also, since we're re-composing the application anyway with this merger, 
we're going to offload our main server and push the fruit catalog 
component out to its own application server, a Tomcat server.


I put slides showing the original store merger and that new variation there:
http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/tutorial/Tutorial-distributed-scenario.pdf

I think it will be interesting to walk through that scenario, understand 
the concrete steps to recompose the application and implement the 
merger, and... get it working :)


Thoughts?
--
Jean-Sebastien

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



[jira] Commented: (TUSCANY-1921) Spring implementation looks for application context files in the wrong location

2007-11-27 Thread gengshaoguang (JIRA)

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

gengshaoguang commented on TUSCANY-1921:


Hi, 
I have 2 points to mention, first: implementation-spring has no ability to loan 
multi spring xml files (now).

second: if there is no Spring-Context in the manifest.mf, Tuscany will try to 
load a application-context.xml at the root of the jar.(at this point, there is 
small bug in the source, detail below)


::[503,95] of SpringXMLComponentTypeLoader.java, a / should be appended to 
!.

 Spring implementation looks for application context files in the wrong 
 location
 ---

 Key: TUSCANY-1921
 URL: https://issues.apache.org/jira/browse/TUSCANY-1921
 Project: Tuscany
  Issue Type: Bug
  Components: Java SCA Spring Implementation Extension
Affects Versions: Java-SCA-1.0.1
Reporter: Niklas Gustavsson

 When setting the location on an implementation.spring to a JAR file, the 
 current Tuscany implementation first looks for the Spring-Context attribute 
 in the manifest (which looks okay). However, if that is not found, it tries 
 to load the application context from application-context.xml in the root of 
 the JAR.
 Reading the spec, you'll find this section:
 If there is no MANIFEST.MF file or no Spring-Context header within
 that file, then the default behavior is to build an application context using 
 all the *.xml files in the META-INF/spring directory. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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



Re: [DAS] external static model based Types - gaps

2007-11-27 Thread Amita Vadhavkar
For this , support for keyref is required from SDO , which will be there in
SDO 3 (as per some old mails). With keyref, FK
relationships in DB can be mapped in model XSDs and there will be no need of
DAS config/COC to provide relationshp info.

Regards,
Amita

On Oct 16, 2007 1:42 PM, Amita Vadhavkar [EMAIL PROTECTED] wrote:

 When DAS uses the external model.xsd to get Types from SDO, if there are
 containment properties, DAS can
 use the information to 1) form Relationships in DAS Config with name same
 as containment property name
 2) Also similar to Dynamic Types behavior of DAS, it can modify child Type
 to have a property with
 relationship_opposite of parent Type.

 DAS is missing this processing for static model based Types at present and
 so when used in static way, needs
 to be supplied relationship information through external DAS Config (or
 implied relationships if Convention over config
 is followed).

 If 1) and 2) is provided, and if the Type names match the DB entity names,
 user can use model.xsds and dynamic queries
 to get results and will not need external config. Thus DAS Config will be
 better aligned with static model.

 If external config is also available in the above case, it can take
 precedence in forming relationships,
 TableName-TypeName mapping etc.

 -

 Also, in ConfigHelper.addRelationship() API, can give parameter to pass in
 relationship name (optional), so it
 does not always need to default to the implicit name formation rule of DAS

 Regards,
 Amita



Re: Distribution structure for SCA Java 1.1 release (was Re: Sample dependencies not pulled in distribution)

2007-11-27 Thread shaoguang geng
Hi,
I recently read the article on osoa.org: 
《Power_Combination_SCA_Spring_OSGi.pdf》
This article gave great impression to me(and my colleague).

So I think here making Tuscany an osgi based container, will boost Tuscany onto 
a new era.

I think from the architect view of Tuscany, it is very robust to get leveraged 
into an osgi runtime.

Jean-Sebastien Delfino [EMAIL PROTECTED] wrote: Rajini Sivaram wrote:
 Sebastien,
 
 
 We would like to enable a binary Tuscany distribution to run under OSGi. I
 am not sure of the level of granularity at which a bundle-ized Tuscany makes
 sense in terms of providing modularity and versioning using OSGi. But I
 would like to make sure that the bundles from the list below can be run in
 some form under OSGi.
 
 The big difference between packaging for OSGi and standard jars (apart from
 the additional entries in the manifest) is that OSGi bundle classpath can
 only refer to entries inside the bundle, while standard Jar classpath can
 only refer to jars outside the jar file without a customized classloader.
 
 I currently have Tuscany loaded into OSGi in two different ways. The first
 is a small list of large bundles (all 3rd party jars are grouped together),
 which are explicitly installed by an application that uses Tuscany. And the
 second is a large list of small bundles (each 3rd party jar is retained as a
 single bundle), loaded using OSGi bundle repository (OBR). Tuscany runtime
 and the required Tuscany extensions are installed by the application, the
 3rd party jars are automatically installed by OBR.
 
 I am not sure how big each of the bundles you have listed below will be, and
 also what the relative size of the samples would be compared to the bundle
 itself. But I imagine that the easiest way to bundle these for OSGi would be
 to create each of these as a single OSGi bundle. I would like to add
 META-INF/MANIFEST.MF with OSGi import/export headers and an OSGi
 Bundle-ClassPath to the zip/jar file corresponding to the bundle. This is to
 enable a very coarsely grained set of bundles that can be easily installed
 by an OSGi application. The additional manifest file will not impact
 non-OSGi applications. By default, Tuscany will be run without OSGi, and the
 zip file corresponding to the bundle will need to be unzipped first (no
 change). To run Tuscany under OSGi, the zip file can be installed directly
 into OSGi.
 
 I would also like to enable finer grained OSGi bundles which can be
 installed using OBR. For the all-in-one bundle, could we have OSGi manifest
 entries inserted into each of the jar files including Tuscany modules and
 3rd party jars, so that the jars can be installed independently into OSGi?
 But this only makes sense if we can have separate jars for the Tuscany
 extensions, rather than a combined tuscany-all.jar (otherwise OBR will
 install all the 3rd party bundles when tuscany-all is installed). The base
 Tuscany runtime could either be a single jar, or with some more fixes for
 classloading, it could be multiple jars based on the maven modules. Again,
 the OSGi manifest entries will not impact non-OSGi Tuscany. The splitting of
 Tuscany jars also shouldn't have any impact since
 tuscany-sca-manifest.jarcan just point to the longer list of Tuscany
 jars instead of tuscany-all.
 
 The third alternative is to have a separate set of jars, specifically
 targetted for OSGi-based Tuscany, which would be somewhere in between the
 coarsely grained first option and too finely grained second one. Rather than
 provide this as part of the binary distribution, this could be an optional
 build with the source distribution.
 
 
 Suggestions?
 
 
 Thank you...
 
 Regards,
 
 Rajini
 

Sorry for the delay I missed this one between ApacheCon and some 
vacation last week.

It looks like you're now thinking about having:
- one bundle per Tuscany JAR
- some way to use 3rd party JARs from the bundles

which I think make sense and will allow us to better leverage OSGi for 
isolation, versioning etc.
-- 
Jean-Sebastien

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



   
-
Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how.