[ 
https://issues.apache.org/jira/browse/GERONIMO-5380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12879194#action_12879194
 ] 

David Jencks commented on GERONIMO-5380:
----------------------------------------

gbeans as osgi services implemented in rev 955091.  This introduces 
seriailzation incompatibility for GBeanInfo and GBeanData.  I don't think this 
is a problem but can be convinced otherwise.

Here's a description of how it works, also on the dev list:

1. There's a new annotation @OsgiService you can add to a gbean (defined with 
@GBean annotation).  Optionally, you can include a String array of the 
interfaces to register the service under.

2. Your gbean can implement ServiceInterfaces and supply the String array of 
interfaces to be registered under after it has been created.

3. A deployer can set the interfaces and service properties on a GBeanData.  
For instance, to expose it in osgi jndi context, it can include a 
osgi.jndi.service.name=jndiName entry.

4. Your gbean can implement osgi's ServiceFactory.

When the gbean instance is created, if it's an osgi service (see annotation in 
(1)), the service interfaces are determined as follows:

a. if gbean data specifies them, that is used.
b. if the gbean implements ServiceInterfaces, that is used.
c. if the gbean info specifies them, that is used.
d. Otherwise, the class and all implemented interfaces are used.

The service properties are determined as follows:
a. if gbean data specifies them, that is used.
b. Otherwise, a org.apache.geronimo.abstractName=<abstract name> entry is added.

The gbean is registered as an osgi service, and unregistered when it stops.


> Optionally expose gbeans in the osgi serviice registry
> ------------------------------------------------------
>
>                 Key: GERONIMO-5380
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5380
>             Project: Geronimo
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>          Components: kernel, osgi
>    Affects Versions: 3.0
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: 3.0
>
>
> One step for better osgi integration would be to optionally expose gbeans as 
> osgi services.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to