Sunday Apr 17, 2011

TOTD #160: OSGi bundles not auto-starting in GlassFish 3.1 ?

You are copying OSGi bundles in the "domains/domain1/autodeploy/bundles" directory of GlassFish 3.1 and yet the OSGi bundles are not starting. This is because the "fileinstall" bundle which is responsible for autostarting bundles had to be disabled in the final build. This can be easily fixed by executing the following commands:

asadmin delete-jvm-options --target server-config \\
-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell, \\
org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell, \\
org.apache.felix.gogo.command

asadmin create-jvm-options --target server-config \\
-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell, \\
org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell, \\
org.apache.felix.gogo.command,org.apache.felix.shell.remote, \\
org.apache.felix.fileinstall

Note, these commands are whitespace sensitive so ensure the entire command is executed in one line. More details and other options are discussed at users@glassfish.

Learn more about building OSGi-enabled Java EE Applications using NetBeans (screencast #32) and Eclipse (screencast #38).

Technorati: totd osgi glassfish fileinstall

About

profile image
Arun Gupta is a technology enthusiast, a passionate runner, author, and a community guy who works for Oracle Corp.


Java EE 7 Samples

Stay Connected

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today