You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by brindy <br...@brindy.org.uk> on 2008/08/14 16:20:15 UTC

Direction of Axis2 + OSGi

Hi all,

I've been exchanging a view comments with Davanum who asked me to post this
here.  

I like the work done so far on integrating OSGi with Axis2 but for it to be
really useful, bundles should not have to be coupled to Axis2.  I believe
this is the plan anway, but just thought I should share how I think this
should work. 

I want to be able to expose OSGi services as web services transparently and
without having any dependency on a web service implementation.  For
instance, I might have an Activator which defines a service using the
standard OSGi approach:

public class MyActivator implements Activator {

    private ServiceReference ref;

    public void start(BundleContext context) {
 
        Dictionary props = new HashTable();
       props.put("webservice", "path/to/webservice/NameOfService");
       ref = context.registerService(SomeInterface.class.getName(), new
ImplementationOfSomeInterface(), props);

    }

    public void stop(BundleContext context) {
       // ...
    }

}

At the point the service is registered the web service implementation should
notice that a service has been registered which has the "webservice"
property specified and make it available at the given path.  When the
service is unregistered or the bundle is stopped the implementation should
be removed.

This gives the following advantages:
1) No dependency on any specific web service implementation
2) The service is available natively to other OSGi bundles
3) Other remoting mechanisms (in addition to or instead of web services,
e.g. AMF) can use the same mechanism

So I guess I am looking for confirmation this is the intention with the OSGi
part of Axis2 and what the time line is for this to be implemented?

Thanks in advance.

Cheers,
Brindy
-- 
View this message in context: http://www.nabble.com/Direction-of-Axis2-%2B-OSGi-tp18982493p18982493.html
Sent from the Axis - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: Direction of Axis2 + OSGi

Posted by Saminda Abeyruwan <sa...@gmail.com>.
Thanks Brindy.

Saminda

On Thu, Aug 14, 2008 at 4:32 PM, brindy <br...@brindy.org.uk> wrote:

>
> Hi Saminda,
>
> #3 is just a pleasant side effect of the service consumption, nothing that
> needs to be done by this project.  For instance, after I register my
> service
> in the usual OSGi way... every other bundle in the OSGi framework can
> access
> it, Axis2 can expose it as a web service and (for example) BlazeDS can
> expose it as a remote object using the AMF protocol.  All these things work
> together without having to know anything about each other and I have an
> object that can be accessed in a (virtually) technology agnostic manner.
>
> Looking forward to phase 2, I'll keep an eye on this mailing list for when
> it becomes available.
>
> Thanks,
> Brindy
>
>
>
> Saminda Abeyruwan-3 wrote:
> >
> > Hi Brindy,
> >
> > 1) No dependency on any specific web service implementation
> >> 2) The service is available natively to other OSGi bundles
> >> 3) Other remoting mechanisms (in addition to or instead of web services,
> >> e.g. AMF) can use the same mechanism
> >>
> >> So I guess I am looking for confirmation this is the intention with the
> >> OSGi
> >> part of Axis2 and what the time line is for this to be implemented?
> >
> >
> > Yes it is.  This is the second phase of OSGi/Axis2 integration.
> >
> > During the first phase of OSGi integration we wanted to properly bundle
> > Axis2. Hence we came up with org.apache.axis2.osgi.jar bundle. You will
> be
> > able to test this bundle from the instruction available in
> >
> https://svn.apache.org/repos/asf/webservices/axis2/scratch/java/saminda/osgi_test
> .
> > Follow axis2_osgi_integration.pdf to run and test the bundle. As you have
> > mentioned, org.apache.axis2.osgi.jar bundle contains/export Axis2 related
> > packages and other packages needed to be imported.
> >
> > Second phase of Axis2/OSGi integration is to consume OSGi SOA
> > infrastructure
> > to expose an OSGi service as a Web service. As you have mentioned, our
> > goal
> > is to use Directory object to fill the meta-date needed for the OSGi
> > service
> > and create Axis2 Web service out of it. We are in the process of mapping
> > services.xml to a bunch of name/value pairs  that needed for Directory
> > object and  use the  special key "org.apache.axis2.ws" to distinguish
> the
> > OSGi service that needed to be expose as web service.
> >
> > Please be kind elaborate on #3. IMO it wasn't in our original plan. We
> > wanted to get OSGi/Axis2 integration complete before next Axis2 major
> > release (1.5).
> >
> >
> > Thank you!
> >
> > Saminda
> >
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Direction-of-Axis2-%2B-OSGi-tp18982493p18982493.html
> >> Sent from the Axis - Dev mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-dev-help@ws.apache.org
> >>
> >> This gives the following advantages:
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Direction-of-Axis2-%2B-OSGi-tp18982493p18989144.html
> Sent from the Axis - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>

Re: Direction of Axis2 + OSGi

Posted by brindy <br...@brindy.org.uk>.
Hi Saminda,

#3 is just a pleasant side effect of the service consumption, nothing that
needs to be done by this project.  For instance, after I register my service
in the usual OSGi way... every other bundle in the OSGi framework can access
it, Axis2 can expose it as a web service and (for example) BlazeDS can
expose it as a remote object using the AMF protocol.  All these things work
together without having to know anything about each other and I have an
object that can be accessed in a (virtually) technology agnostic manner.

Looking forward to phase 2, I'll keep an eye on this mailing list for when
it becomes available.

Thanks,
Brindy



Saminda Abeyruwan-3 wrote:
> 
> Hi Brindy,
> 
> 1) No dependency on any specific web service implementation
>> 2) The service is available natively to other OSGi bundles
>> 3) Other remoting mechanisms (in addition to or instead of web services,
>> e.g. AMF) can use the same mechanism
>>
>> So I guess I am looking for confirmation this is the intention with the
>> OSGi
>> part of Axis2 and what the time line is for this to be implemented?
> 
> 
> Yes it is.  This is the second phase of OSGi/Axis2 integration.
> 
> During the first phase of OSGi integration we wanted to properly bundle
> Axis2. Hence we came up with org.apache.axis2.osgi.jar bundle. You will be
> able to test this bundle from the instruction available in
> https://svn.apache.org/repos/asf/webservices/axis2/scratch/java/saminda/osgi_test.
> Follow axis2_osgi_integration.pdf to run and test the bundle. As you have
> mentioned, org.apache.axis2.osgi.jar bundle contains/export Axis2 related
> packages and other packages needed to be imported.
> 
> Second phase of Axis2/OSGi integration is to consume OSGi SOA
> infrastructure
> to expose an OSGi service as a Web service. As you have mentioned, our
> goal
> is to use Directory object to fill the meta-date needed for the OSGi
> service
> and create Axis2 Web service out of it. We are in the process of mapping
> services.xml to a bunch of name/value pairs  that needed for Directory
> object and  use the  special key "org.apache.axis2.ws" to distinguish the
> OSGi service that needed to be expose as web service.
> 
> Please be kind elaborate on #3. IMO it wasn't in our original plan. We
> wanted to get OSGi/Axis2 integration complete before next Axis2 major
> release (1.5).
> 
> 
> Thank you!
> 
> Saminda
> 
>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Direction-of-Axis2-%2B-OSGi-tp18982493p18982493.html
>> Sent from the Axis - Dev mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-dev-help@ws.apache.org
>>
>> This gives the following advantages:
> 
> 

-- 
View this message in context: http://www.nabble.com/Direction-of-Axis2-%2B-OSGi-tp18982493p18989144.html
Sent from the Axis - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: Direction of Axis2 + OSGi

Posted by Saminda Abeyruwan <sa...@gmail.com>.
Hi Brindy,

1) No dependency on any specific web service implementation
> 2) The service is available natively to other OSGi bundles
> 3) Other remoting mechanisms (in addition to or instead of web services,
> e.g. AMF) can use the same mechanism
>
> So I guess I am looking for confirmation this is the intention with the
> OSGi
> part of Axis2 and what the time line is for this to be implemented?


Yes it is.  This is the second phase of OSGi/Axis2 integration.

During the first phase of OSGi integration we wanted to properly bundle
Axis2. Hence we came up with org.apache.axis2.osgi.jar bundle. You will be
able to test this bundle from the instruction available in
https://svn.apache.org/repos/asf/webservices/axis2/scratch/java/saminda/osgi_test.
Follow axis2_osgi_integration.pdf to run and test the bundle. As you have
mentioned, org.apache.axis2.osgi.jar bundle contains/export Axis2 related
packages and other packages needed to be imported.

Second phase of Axis2/OSGi integration is to consume OSGi SOA infrastructure
to expose an OSGi service as a Web service. As you have mentioned, our goal
is to use Directory object to fill the meta-date needed for the OSGi service
and create Axis2 Web service out of it. We are in the process of mapping
services.xml to a bunch of name/value pairs  that needed for Directory
object and  use the  special key "org.apache.axis2.ws" to distinguish the
OSGi service that needed to be expose as web service.

Please be kind elaborate on #3. IMO it wasn't in our original plan. We
wanted to get OSGi/Axis2 integration complete before next Axis2 major
release (1.5).


Thank you!

Saminda

>
>
>
> --
> View this message in context:
> http://www.nabble.com/Direction-of-Axis2-%2B-OSGi-tp18982493p18982493.html
> Sent from the Axis - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
> This gives the following advantages: