dev@glassfish.java.net

Re: Glassfish OSGI bundle

From: Paul M Davies (Oracle) <"Paul>
Date: Thu, 09 Dec 2010 13:41:14 -0800

Hi,

Incidentally, some of Jerome's answers can also be found in the
GlassFish product documentation:
>>>> 1. What is the best way to bundle these JARs? Are there any tools that
>>>> you use in GF to bundle these? I'm currently using bnd.
>>>>
>>> not that I know of.
>>>
According to Packaging an Add-On Component
<http://docs.sun.com/app/docs/doc/821-1749/ghpun?l=en&a=view> in the
Add-On Component Development Guide, the component should be packaged as
an OSGi bundle. Admittedly this section is a little thin right now, but
if there's more to say, we can consider adding this information in a
future (post-3.1) release.
>>>> 2. I looked into one of the manifest files of one of the bundle
>>>> grizzly-container.jar and found some properties like HK2-Import-Bundles,
>>>> HK2-Class-Path-Id, HK2-Bundle-Name keys. Are these similar to the OSGi
>>>> properties?
>>>>
>>>>
>>> yes but there are legacy and not used anymore.
>>>
>>>
>>>> 3. Where do I drop the bundles after I have created them? In
>>>> glassfish/modules directory?
>>>>
>>> yes
>>>
This requirement is also stated in Integrating an Add-On Component With
GlassFish Server
<http://docs.sun.com/app/docs/doc/821-1749/ghmne?l=en&a=view> in the
Add-On Component Development Guide. Note that in the GlassFish product
docs, the placeholder /as-install/ is defined to include the glassfish
directory <http://docs.sun.com/app/docs/doc/821-1749/ghpfg>.
>>>
>>>> Is there a felix command to see if my
>>>> bundle have been 'deposited' correctly?
>>>>
>>>>
>>> connect to the felix console "telnet localhost:6666' and do a "felix:ls" command. check the documentation on felix on how to use the console.
>>>
Information about how to connect to the Apache Felix Remote shell is
provided in OSGi Module Management Subsystem
<http://docs.sun.com/app/docs/doc/821-1751/gjjxt?l=en&a=view>
in the Administration Guide. This section also includes a link to more
information about the Felix Remote Shell and some simple examples of
Felix Remote Shell commands for managing OSGi modules.

Regards,
-Paul
-- 
Oracle <http://www.oracle.com>
Paul Davies| Principal Technical Writer| +1.408.276.3413
Oracle GlassFish Server Documentation
4140 Network Circle, Santa Clara CA 95054, USA
Green Oracle <http://www.oracle.com/commitment> 	Oracle is committed to 
developing practices and products that help protect the environment