ss141213's blog
Getting verbose class loading output in GlassFish
Java VM has a standard option called -verbose as shown by java -help:
-verbose[:class|gc|jni]
enable verbose output
To diagnose class loading issues, you need to specify -verbose:class. It's straight forward to use if you are launching the Java process yourself. How does a GlassFish user use this?
Lazy loading of classes not working
Look at the code below where the main() loads a class whose name is specified by first argument. The second argument tells whether the class should be resolved or not. It also contains 5 test classes: A1, A2 and their dependencies: B, B1, B2. We will try to identify how early Bs are needed if I want to use As.
OSGi/JMS/MDB Example
Here is an example of yet another hybrid (OSGi + Java EE) application. This is a complete JMS consumer/producer example using OSGi and GlassFish. You can download the complete sample from here.
JAX-WS Web Service in an OSGi bundle
Recently a user in GlassFish forum asked about developing JAX-WS web service in an OSGi bundle. Here is a complete sample demonstrating a JAX-WS web service invoking an OSGi service via OSGi service registry. You can download it from here. The diagram below hopefully explains the organisation of the sample:
GlassFish at enterprise OSGi face2face event - Meeting with OSGi Experts
Meeting with OSGi Experts
How to embed GlassFish in an existing OSGi runtime?
Typical users of GlassFish use GlassFish in a separate process and they start GlassFish by using commands like the following:
javap ignores Class-Path manifest entry
Did you know javap ignores Class-Path manifest attribute where as javac honors it? I didn't. Now I know. I have a jar called foo.jar with following manifest entry:
Having trouble creating a Jar with MANIFEST.MF?
When my colleague Marina Vatkina sent me some code earlier today hoping a second pair of eyes would spot the obvious error, knowing how thorough Marina typically is, I knew there was no obvious error there. Simplified version of what was being attempted is shown below:
import java.io.*;
import java.util.*;
import java.util.jar.*;
public class CreateJarWithManifest {





