You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Rashmi Hunt <ra...@gmail.com> on 2006/06/13 08:53:33 UTC
Bootstrapping Tuscany runtime and locating a service with sandbox code
I was trying to see how the client code looks like with the new APIs
from the sandbox. With the new architecture, I don't see TuscanyRuntime,
ModuleContext etc.
I do see DefaultBootstrapper, RuntimeComponent, CompositeComponentExtension
etc in the sandbox, But, need some help in understanding set of client APIs.
Question,
1) Which API starts Tuscany runtime?
2) If I have a java component (e.g JobBankServiceComponent), which API to
use for locating/invoking the service?
3) Is there a sample(preferably ported over from M1), which shows usage of
the new APIs? (I couldn't find such a sample in the sandbox tree)
Below snippet is my client code based on M1 driver. Mainly looking for APIs
which will replace
the below snippet.
// Obtain Tuscany runtime
TuscanyRuntime tuscany = new TuscanyRuntime("jobbank", null);
// Start the runtime
tuscany.start();
// Obtain SCA module context.ModuleContext moduleContext =
CurrentModuleContext.getContext();
// Locate the JobBank service
JobBankService jobBankService = (JobBankService) moduleContext.locateService
("JobBankServiceComponent");
jobBankService.postJobDescription("Principal Engineer");
Help is appreciated.
Regards
Rashmi
Re: Bootstrapping Tuscany runtime and locating a service with sandbox code
Posted by Jim Marino <jm...@myromatours.com>.
Hi Rashmi,
Jeremy will be able to answer your question regarding bootstrapping.
For how to locate services, the spec API is evolving to accommodate
the new recursive API. I have some thoughts I have been working on in
the sandbox under jboynes/spec/sca but they are very early which will
be proposed to the spec group. If you want, you can have a look and
let me know what you think. I plan to have these operational sometime
towards the end of the week.
Jim
On Jun 12, 2006, at 11:53 PM, Rashmi Hunt wrote:
> I was trying to see how the client code looks like with the new APIs
> from the sandbox. With the new architecture, I don't see
> TuscanyRuntime,
> ModuleContext etc.
>
> I do see DefaultBootstrapper, RuntimeComponent,
> CompositeComponentExtension
> etc in the sandbox, But, need some help in understanding set of
> client APIs.
> Question,
> 1) Which API starts Tuscany runtime?
> 2) If I have a java component (e.g JobBankServiceComponent), which
> API to
> use for locating/invoking the service?
> 3) Is there a sample(preferably ported over from M1), which shows
> usage of
> the new APIs? (I couldn't find such a sample in the sandbox tree)
>
> Below snippet is my client code based on M1 driver. Mainly looking
> for APIs
> which will replace
> the below snippet.
> // Obtain Tuscany runtime
> TuscanyRuntime tuscany = new TuscanyRuntime("jobbank", null);
> // Start the runtime
> tuscany.start();
> // Obtain SCA module context.ModuleContext moduleContext =
> CurrentModuleContext.getContext();
> // Locate the JobBank service
> JobBankService jobBankService = (JobBankService)
> moduleContext.locateService
> ("JobBankServiceComponent");
> jobBankService.postJobDescription("Principal Engineer");
>
> Help is appreciated.
>
> Regards
> Rashmi
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: Bootstrapping Tuscany runtime and locating a service with sandbox
code
Posted by Jeremy Boynes <jb...@apache.org>.
Rashmi Hunt wrote:
> I was trying to see how the client code looks like with the new APIs
> from the sandbox. With the new architecture, I don't see TuscanyRuntime,
> ModuleContext etc.
>
> I do see DefaultBootstrapper, RuntimeComponent, CompositeComponentExtension
> etc in the sandbox, But, need some help in understanding set of client
> APIs.
> Question,
> 1) Which API starts Tuscany runtime?
There's still working going on on that. The actual process for doing
this will depend on the host environment, with support provided by the
DefaultBootstrapper to handle a lot of the common functions.
For J2SE we should continue to support the "TuscanyRuntime" host but
would need to switch the implementation to use the bootstrapper. I've
also started to mess around with a "launcher" that would remove the need
to have any bootstrap code in application by replacing it with a
"client" container.
The Tomcat code won't need to change much - just updates to how the
bootstrapper is invoked.
> 2) If I have a java component (e.g JobBankServiceComponent), which API to
> use for locating/invoking the service?
I think Jim is working on this stuff - I've not looked at his spec api
changes yet.
> 3) Is there a sample(preferably ported over from M1), which shows usage of
> the new APIs? (I couldn't find such a sample in the sandbox tree)
>
Not yet.
--
Jeremy
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org