users@glassfish.java.net

Re: OBR in Glassfish v3?

From: Sanjeeb Sahoo <sahoo_at_sun.com>
Date: Fri, 21 May 2010 12:09:17 +0530

Hi Rickard,

I acknowledge absence of proper documentation about OSGi features in
GlassFish. I don't see our docs to change either before 3.1 release, so
in the mean while, I have created a Wiki page [1] to capture whatever
information available. Take a look at it and send your comments. Keep in
mind that I have just recently created the page, so it does not have all
the info I want it to have. I certainly want to add an FAQ and some
documentation in the form of a guide.

Coming back to use of OBR, it is one of the things we would like to have
a better story about in 3.1 release. /Can you please tell us what kind
of OBR related feature you are looking for in glassfish? /

To use OBR in current glassfish, please download and install OBR bundles:

cd .../glassfish/domains/domain1/autodeploy/bundles/
wget http://www.reverse.net/pub/apache/felix/org.osgi.service.obr-1.0.2.jar
wget
http://www.reverse.net/pub/apache/felix/org.apache.felix.bundlerepository-1.6.2.jar

 From the server log you can see that these two bundles automatically
get started.

Once they are started, the bundlerepository bundle adds obr commands to
Felix shell:

telnet localhost 6666
-> obr help

I am assuming you have your own repo which you add using "obr add-url"
command.

You can also use the obr feature of OSGi web console. To use web console
[3], you need to download and install osgi-http service implementation
as well as the web console:
cd .../glassfish/domains/domain1/autodeploy/bundles/
// replace ${glassfish-version} with 3.0 or 3.0.1-SNAPSHOT or
3.1-SNAPSHOT, etc depending on your current glassfish version.
wget
http://download.java.net/maven/glassfish/org/glassfish/osgi-http/${glassfish-version}/osgi-http.jar

wget
http://www.devlib.org/apache/felix/org.apache.felix.webconsole-3.0.0.jar
open localhost:8080/osgi/system/console

The username and password is admin/admin. If you use v3, you may be
prompted for username/password multiple times because of a bug, but
eventually after two or three prompts it succeeds. This bug has been
fixed in 3.0.1 or 3.1 builds.

We are soon going to have a web console update centre package for 3.1,
so you can download and install it from within glassfish admin console.

Thanks,
Sahoo

[1] http://wiki.glassfish.java.net/Wiki.jsp?page=OSGi
[2] http://wiki.glassfish.java.net/Wiki.jsp?page=BlogsGfOsgi
[3]
http://weblogs.java.net/blog/ss141213/archive/2009/05/using_felix_web.html
Rickard Öberg wrote:
> Hi,
>
> I've started to use OSGi in Glassfish v3, and although there is veeery
> little information available on it, I've gotten it to work decently in
> development.
>
> But, for actual deployment it would be nice to have something like OBR
> working. The Felix docs says that it has OBR support, and the
> Glassfish features page mention it, but when I use the shell in
> Glassfish there are no OBR commands available.
>
> What am I missing? Do I have to do something to enable it? Do I have
> to run some bundle to get it to work?
>
> thanks, Rickard
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>