Skip to main content

How to specify metadata of EJB registered as OSGi service?

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
5 replies [Last post]
jkraushaar
Offline
Joined: 2013-01-07

Hi,

when deploying EJBs in a hybrid application they become registered as OSGi services. I am looking for a way to specify additional OSGi metadata for the registered services.

Is this possible? If yes: how?

Thanks for your help
Jochen

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
codeprince
Offline
Joined: 2007-05-10

> I am looking for a way to specify additional OSGi metadata for the registered services.

Pl. telling us detailed meaning of additional OSGi metadata.
What additional OSGi metadata you want to specify.

Thanks
Tang Yong

ss141213
Offline
Joined: 2005-03-30

Currently, when we register an ejb as service, we register the portable jndi name as a service property. I think what he wants is to provide additional properties as service properties. IIRC, we have an RFE already filed to track this requirement, but we have not gotton to that yet.

Sahoo

codeprince
Offline
Joined: 2007-05-10

If he wants to register additional properties as service properties, considering three common ways in gf,

1) MANIFEST.MF

defining a key eg. EJBServiceProperties, then the user can write

EJBServiceProperties: a, b, c......

Then, while deploying ejb bundles, by scanning the key, we can register these EJBServiceProperties , of course, he should first plan to register an ejb as service.

2) Using asadmin deploy

using deploy command's props to reach the same effect. However, I do not recommend the way because we will miss the effect of using common osgi install command.

3) Using annotation in source

this is an OSGi EJB RFC's contents and should be combined with CDI/OSGi. Future's consideration.

Tang

jkraushaar
Offline
Joined: 2013-01-07

Thanks Sahoo, that is exactly what I meant.

Jochen

codeprince
Offline
Joined: 2007-05-10

BTW: we welcome more guys to join Glassfish OSGi-JavaEE contribution!

Thanks
Tang