EasyBeans

implement Interface ManagedService Interface (EJB Services registered by EZB)

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: EasyBeans 1.1.0
  • Fix Version/s: EasyBeans 1.1.0 M1
  • Component/s: OSGi
  • Description:
    Hide
    from newsgroup discussions:

    Guillaume Sauthier schrieb:
    >
    > From our point of view, it's quite simple to add the ManagedService interface support to the proxy registered as a service.
    > The real question is what do we do with the Dictionnary given as param of the updated() method ?
    > Do you expect theses values to be in some way injected into the bean ? Or just having the ability to "tag" the service with some properties is enough for you ?
    at the moment yes.
    riena tracks all services as they are published (and unpublished). If it finds a property "riena.remote=true", then it tries to publish this OSGi service as web service. if Riena has found such a service it also looks for the protocol (per ex. hessian) and the path to the webservice endpoint. both are parameters.


    > Again, all depends on your use case ...
    >
    > ... answer are belows :)
    > Seems that having ManagedService interface is the easiest way to accomplish what you want.
    ...thats also my point... ManagedService opens flexibility to users of EZBs registered Services
    Show
    from newsgroup discussions: Guillaume Sauthier schrieb: > > From our point of view, it's quite simple to add the ManagedService interface support to the proxy registered as a service. > The real question is what do we do with the Dictionnary given as param of the updated() method ? > Do you expect theses values to be in some way injected into the bean ? Or just having the ability to "tag" the service with some properties is enough for you ? at the moment yes. riena tracks all services as they are published (and unpublished). If it finds a property "riena.remote=true", then it tries to publish this OSGi service as web service. if Riena has found such a service it also looks for the protocol (per ex. hessian) and the path to the webservice endpoint. both are parameters. > Again, all depends on your use case ... > > ... answer are belows :) > Seems that having ManagedService interface is the easiest way to accomplish what you want. ...thats also my point... ManagedService opens flexibility to users of EZBs registered Services
  • Environment:
    Eclipse 3.4, Equinox 3.4, EZB 1.1.0 Snapshot, JDK 1.5

Activity

Hide
ekkehard gentz added a comment - 30/Jul/08 1:47 PM
additional info:

I need this to use Eclipse Riena remote OSGI Services.

if I would register a service fornEclipsen Riena to use,
I have to do something like

.......
private ServiceRegistration beanReg;
.......
       
Hashtable<String, String> properties = new Hashtable<String, String>(3);
        properties.put(RSDPublisherProperties.PROP_IS_REMOTE, Boolean.TRUE.toString());
        properties.put(RSDPublisherProperties.PROP_REMOTE_PROTOCOL, "hessian");
        properties.put(RSDPublisherProperties.PROP_REMOTE_PATH, "/slbWS");

beanReg = context.registerService(StatelessRemote.class.getName(), slb, properties);
.............

its not such a good idea to have two services for each EJB Interface -
on the other side its good that all these services were already registered by EZB.

so I need a way to set properties - easioest would be using a managed service

ekke
Show
ekkehard gentz added a comment - 30/Jul/08 1:47 PM additional info: I need this to use Eclipse Riena remote OSGI Services. if I would register a service fornEclipsen Riena to use, I have to do something like ....... private ServiceRegistration beanReg; .......         Hashtable<String, String> properties = new Hashtable<String, String>(3);         properties.put(RSDPublisherProperties.PROP_IS_REMOTE, Boolean.TRUE.toString());         properties.put(RSDPublisherProperties.PROP_REMOTE_PROTOCOL, "hessian");         properties.put(RSDPublisherProperties.PROP_REMOTE_PATH, "/slbWS"); beanReg = context.registerService(StatelessRemote.class.getName(), slb, properties); ............. its not such a good idea to have two services for each EJB Interface - on the other side its good that all these services were already registered by EZB. so I need a way to set properties - easioest would be using a managed service ekke
Hide
Guillaume Sauthier added a comment - 21/Aug/08 11:04 AM
This has been fixed in nightly builds:
http://maven.objectweb.org/maven2-snapshot/org/ow2/easybeans/osgi/ow2-easybeans-osgi/1.1.0-SNAPSHOT/

Ekke, if it works for you, please close the issue.
Show
Guillaume Sauthier added a comment - 21/Aug/08 11:04 AM This has been fixed in nightly builds: http://maven.objectweb.org/maven2-snapshot/org/ow2/easybeans/osgi/ow2-easybeans-osgi/1.1.0-SNAPSHOT/ Ekke, if it works for you, please close the issue.
Hide
ekkehard gentz added a comment - 29/Aug/08 11:48 AM
perfect - all works well.
thx
ekke
Show
ekkehard gentz added a comment - 29/Aug/08 11:48 AM perfect - all works well. thx ekke

People

Dates

  • Created:
    30/Jul/08 1:40 PM
    Updated:
    29/Aug/08 1:44 PM
    Resolved:
    21/Aug/08 11:04 AM