You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Lorie <lo...@gmail.com> on 2010/12/22 17:35:15 UTC

Use of CXF D-OSGi with complex distributed services

Dear CXF-D-OSGi users,
I've been trying for some times to distribute my OSGi-based application on
several machines, using CXF D-OSGi to implement distributed services. I
managed to get some very simple examples working (like HelloWorld), but as
soon as I try to adapt these examples to my "real-world" needs, I'm getting
stuck. The problem comes from the implementations of databinding provided by
CXF. 
JAXB doesn't support passing an object through its interface type. Let's say
I want to have an interface Person, which might be implemented by several
classes, my HelloWorld service can not take a Person as argument.. Quite
cumbersome when we want to create well-architectured applications... 
On the other hand, AEGIS is able to deal with interfaces, but it doesn't
support types that don't have a default constructor... Well.. I can
implement default constructor for all of my classes, but what happens when
using libraries? A very simple example is the java.util.UUID....

This finding made me gave up on using D-OSGi, but, unfortunatley, it seems
to be the only mature implementation of OSGi remote services, that can
easily be integrated with Spring DM....

So is there another databinding implementation that does not have these
constraints, and that can be used by CFX? Or any workaround to get things
working with JAXB or AEGIS?

Any help would be appreciated.

Regards,
Lorie.

-- 
View this message in context: http://cxf.547215.n5.nabble.com/Use-of-CXF-D-OSGi-with-complex-distributed-services-tp3315295p3315295.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Use of CXF D-OSGi with complex distributed services

Posted by Julien Vey <ve...@gmail.com>.
Indeed, I created a wrapper using the toString() and fromString() method of
the UUID Class. It was the simpliest way I found to solve this issue.

Cheers,

Julien Vey

2010/12/24 Lorie <lo...@gmail.com>

>
> Thanx Julien for this information.
> How did you solve your problem with the UUID class? Did you replace it with
> something else?
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Use-of-CXF-D-OSGi-with-complex-distributed-services-tp3315295p3317454.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

Re: Use of CXF D-OSGi with complex distributed services

Posted by Lorie <lo...@gmail.com>.
Ok I will try this..
Thank you very much for the tip.
-- 
View this message in context: http://cxf.547215.n5.nabble.com/Use-of-CXF-D-OSGi-with-complex-distributed-services-tp3315295p3317474.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Use of CXF D-OSGi with complex distributed services

Posted by Lorie <lo...@gmail.com>.
Thanx Julien for this information.
How did you solve your problem with the UUID class? Did you replace it with
something else?
-- 
View this message in context: http://cxf.547215.n5.nabble.com/Use-of-CXF-D-OSGi-with-complex-distributed-services-tp3315295p3317454.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Use of CXF D-OSGi with complex distributed services

Posted by Julien Vey <ve...@gmail.com>.
Hi Lorie,

I faced the same problem concerning the UUID class.
Actually, this is a jdk problem. UUID implements the interface Serializable
and as explained in the javadoc, each class that implements this interface
must have a public default constructor with no argument, UUID hasn't.

It's quite logical that each object used by D-OSGI needs to be serializable,
otherwise how could they be serialized and then deserialized on the other
side.
To my mind, Aegis behaviour is correct. I don't know about your JAXB issue.

Hoping you will find answers.
Regards

--
Julien




2010/12/22 Lorie <lo...@gmail.com>

>
> Dear CXF-D-OSGi users,
> I've been trying for some times to distribute my OSGi-based application on
> several machines, using CXF D-OSGi to implement distributed services. I
> managed to get some very simple examples working (like HelloWorld), but as
> soon as I try to adapt these examples to my "real-world" needs, I'm getting
> stuck. The problem comes from the implementations of databinding provided
> by
> CXF.
> JAXB doesn't support passing an object through its interface type. Let's
> say
> I want to have an interface Person, which might be implemented by several
> classes, my HelloWorld service can not take a Person as argument.. Quite
> cumbersome when we want to create well-architectured applications...
> On the other hand, AEGIS is able to deal with interfaces, but it doesn't
> support types that don't have a default constructor... Well.. I can
> implement default constructor for all of my classes, but what happens when
> using libraries? A very simple example is the java.util.UUID....
>
> This finding made me gave up on using D-OSGi, but, unfortunatley, it seems
> to be the only mature implementation of OSGi remote services, that can
> easily be integrated with Spring DM....
>
> So is there another databinding implementation that does not have these
> constraints, and that can be used by CFX? Or any workaround to get things
> working with JAXB or AEGIS?
>
> Any help would be appreciated.
>
> Regards,
> Lorie.
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Use-of-CXF-D-OSGi-with-complex-distributed-services-tp3315295p3315295.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>