On 26/09/12 16:32, Koray Duman wrote:
Thank you so much. I can understand now.
Last time I want to ask a question.
I dont know is there any pattern but I will make a interface/impl class
and I will put all method necessary for web service . Is it good

Having an interface and its implementation in different bundles is recommended given that the client runtime can then reuse the same interface bundle

Cheers, Sergey


Best Regards,

------------------------------------------------------------------------
*From:* Sergey Beryozkin <[email protected]>
*To:* Koray Duman <[email protected]>
*Cc:* "[email protected]" <[email protected]>
*Sent:* Wednesday, September 26, 2012 5:56 PM
*Subject:* Re: Multiple Servises Registration


On 26/09/12 13:30, Koray Duman wrote:
 > But I cannot understand that,
 >
 > A service defined with a interface. The service indicate to this
 > interface.Is it ok.
 >
 > Why is used "service.exported.interfaces" properties. I think There are
 > alot of service/interface defined in same configuration and we will
 > choise that which one exported.Is it true?

I think '"service.exported.interfaces"="*"' is there to safe typing say
'"service.exported.interfaces"="com.frm.DBService"' in cases when it is
known the object implements only 'com.frm.DBService'.

If an object implements many interfaces then I guess something like

"service.exported.interfaces"="com.frm.DBService" can be used to
restrict to a single interface only

Sergey

 >
 > Thank you for your responce.
 >
 >
 > ------------------------------------------------------------------------
 > *From:* Sergey Beryozkin <[email protected]
<mailto:[email protected]>>
 > *To:* [email protected] <mailto:[email protected]>
 > *Cc:* Koray Duman <[email protected] <mailto:[email protected]>>
 > *Sent:* Wednesday, September 26, 2012 3:04 PM
 > *Subject:* Re: Multiple Servises Registration
 >
 > On 26/09/12 12:06, Koray Duman wrote:
 > > I will explain with in a java program.
 > >
 > > {
 > >
 > > Dictionary props = new Hashtable();
 > props.put("service.exported.interfaces", "*");
 > props.put("service.exported.configs", "org.apache.cxf.ws
<http://org.apache.cxf.ws/>
 > <http://org.apache.cxf.ws/>"); props.put("org.apache.cxf.ws
 > <http://org.apache.cxf.ws.ad/>.address",
 > "http://localhost:9090/greeter";); ServiceRegistration rdb =
 > bc.registerService(DBService.class.getName(), new DBServiceImpl(),
props);
 > >
 > > ServiceRegistration rOther =
 > bc.registerService(OtherService.class.getName(), new OtherServiceImpl(),
 > props); }
 > >
 > > Is this code ok.? Both services will work on same configuration.
 >
 > Except that an address has to be different per every endpoint
 >
 > > I want to make it in configuration XML file.
 >
 > Not sure about it, given that the addresses have to be unique, so
 > reusing the properties at the XML level seems problematic
 >
 > Sergey
 >
 > >
 > > Thank you
 > >
 > >
 > >
 > >
 > >
 > >
 > > ________________________________
 > > From: Sergey Beryozkin<[email protected]
<mailto:[email protected]>
 > <mailto:[email protected] <mailto:[email protected]>>>
 > > To: [email protected] <mailto:[email protected]>
<mailto:[email protected] <mailto:[email protected]>>
 > > Sent: Wednesday, September 26, 2012 12:23 PM
 > > Subject: Re: Multiple Servises Registration
 > >
 > > Hi,
 > > On 26/09/12 08:33, Koray Duman wrote:
 > >>
 > >> We are using Spring DM and CXF-DOSGI on osgi framework. We can
 > register the service this like. It is work
 > >>
 > >>
 > >> <osgi:reference id="dbService" interface="com.frm.DBService" />
 > >>
 > >> <osgi:service interface="com.frm.DBService">
 > >> <osgi:service-properties>
 > >> <entry key="service.exported.interfaces" value="*" />
 > >> <entry key="service.exported.configs" value="org.apache.cxf.rs" />
 > >> <entry key="service.exported.intents" value="HTTP" />
 > >> <entry key="org.apache.cxf.rs.databinding" value="jaxb" />
 > >> </osgi:service-properties>
 > >> <ref bean="dbService" />
 > >> </osgi:service>
 > >>
 > >>
 > >> We want to register new one. How can I register new one
 > >>
 > > Repeat the above for another interface, or do you mean something else ?
 > >
 > > Cheers, Sergey
 > >> Thank You
 > >>
 >
 >
 >
 >


--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com




--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Reply via email to