I was trying to isolate the tuscany related code from
client code and move the tuscany related code that is
CompositeContext, locateService etc in common service
factory. Then client can call the service using the
service name only. Before i tried to pass the
bussiness interface also because client knows it but i
couldn't cast it to the java.lang.Object and and i
didn't want to hard code the type because this is
common service factory can be use for many different
service with different interface type. 

--- scabooz <[EMAIL PROTECTED]> wrote:

> Hi Muhwas,
> 
> I'm somewhat interested in this topic, so if you
> don't
> mind I have another question.  I'm not understanding
> why it was important for you not pass the interface
> class when it seems the intended interface was
> known.
> 
> I'm asking because I'm very interested in making
> sure that
> I have all the use cases related to dynamically
> obtaining
> service references.
> 
> thanks,
> Dave
> 
> ----- Original Message ----- 
> From: "muhwas" <[EMAIL PROTECTED]>
> To: <tuscany-dev@ws.apache.org>
> Sent: Thursday, April 19, 2007 3:00 PM
> Subject: Re: using service name to call a service
> 
> 
> >I have tried that and it worked fine if you just
> pass
> > the java.lang.Object.class and service name. I was
> > writing a common service factory which return the
> > service bussiness interface with service name
> only.
> > and the client know which interface class it cast
> too
> > :)
> > --- scabooz <[EMAIL PROTECTED]> wrote:
> > 
> >> Muhwas,
> >> 
> >> Your objection to the locateService API seems to
> be
> >> the need to pass the business interface class. As
> >> Simon
> >> noted, this doesn't go away with the new v1.0
> API.
> >> 
> >> If the business interface were not passed as a
> >> parameter,
> >> what interface would you expect the returned
> proxy
> >> to implement?
> >> 
> >> Dave
> >> 
> >> 
> >> ----- Original Message ----- 
> >> From: "Simon Laws" <[EMAIL PROTECTED]>
> >> To: <tuscany-dev@ws.apache.org>
> >> Sent: Thursday, April 19, 2007 7:35 AM
> >> Subject: Re: using service name to call a service
> >> 
> >> 
> >> > On 4/13/07, muhwas <[EMAIL PROTECTED]> wrote:
> >> >>
> >> >> Hi guys,
> >> >>
> >> >> I was wondering if there is any way to get a
> >> reference
> >> >> to web service interface using service name
> (in
> >> SCDL
> >> >> file) only instead of doing
> >> >>
> >> >>
> >>
> >
>
compositeContext.locateService(ClassName.class,"composite")
> >> >>
> >> >> thank you,
> >> >> muhwas
> >> >>
> >> >>
> >>
> >
>
---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail:
> >> [EMAIL PROTECTED]
> >> >> For additional commands, e-mail:
> >> [EMAIL PROTECTED]
> >> >>
> >> >> Hi Muhwas
> >> >
> >> > I'm not sure what the options were on M2. In
> the
> >> latest software (in the
> >> > trunk of our svn respository) we are moving to
> >> implement V1.0 of the SCA
> >> > specifications. The emphasis here is on
> component
> >> context although how a
> >> > component context is obtained is not specified.
> In
> >> the trunk 
> >> > implementation
> >> > we currently have an embedded host container
> that
> >> allows a component 
> >> > context
> >> > to be returned in the following way.
> >> >
> >> > SCARuntime.start("my.composite");
> >> > ComponentContext context =
> >> SCARuntime.getComponentContext
> >> > ("MyComponentName");
> >> >
> >> > From there the spec says that you should be
> able
> >> to do (not sure it quite
> >> > works like this yet)
> >> >
> >> > MyService service =
> >> context.getService(MyService.class,
> >> "MyServiceName");
> >> >
> >> > I know this doesn't answer your question re. M2
> >> but hopefully gives you an
> >> > idea of where we are going.
> >> >
> >> > Regards
> >> >
> >> > Simon
> >> > 
> >> 
> >> 
> >>
> >
>
---------------------------------------------------------------------
> >> 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]
> >
> 
>
---------------------------------------------------------------------
> 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]

Reply via email to