[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Classloading command [was Re: [virgo-dev] Classloading & Inner frameworks supportability commands]

Hi Hristo

Much better progress on this one! The classloading commands are available in the Equinox console and seem to work fine for bundles in the user region. For example:

osgi> clhas org.eclipse.virgo.web.core.WebApplicationRegistry

Bundles containing [org.eclipse.virgo.web.core.WebApplicationRegistry]:
  37 org.eclipse.virgo.web.core

osgi> clload org.eclipse.virgo.web.core.WebApplicationRegistry

Successfully loaded [org.eclipse.virgo.web.core.WebApplicationRegistry] from:
  37 org.eclipse.virgo.web.core
  36 org.eclipse.gemini.web.tomcat
   [exported by 37 org.eclipse.virgo.web.core]

osgi> clexport org.eclipse.virgo.web.core.WebApplicationRegistry

Bundles exporting [org.eclipse.virgo.web.core.WebApplicationRegistry]:
  37 org.eclipse.virgo.web.core

(I observe that this command only processes bundles in the user region. For example, it can't find the org.eclipse.virgo.kernel.deployer.Deployer class which resides in the org.eclipse.virgo.kernel.deployer bundle in the kernel region. This doesn't matter since application developers should only be interested in bundles in the user region.)

So this is a really useful piece of function for users and I'd like to explore integrating it into Virgo alongside other Virgo commands. :-)

In general, we put commands behind JMX interfaces so they can be driven both from the Equinox console (or other shells that may come along) and from the admin console. As a next step, we'll review the source code of the classloading command and give you some more feedback. Perhaps we could then point you at some existing JMX commands and you could try massaging your code into that kind of shape and integrating it into Virgo (and we'll happily guide you through the process as you'll probably be learning a lot about Virgo along the way). Ok?

On 5 Jul 2010, at 11:40, Iliev, Hristo wrote:


We are currently working on some supportability features for OSGi and in particular Equinox. This includes:
*         Classloading - by a given class name list all bundles that:
o    contain it
o    export it
o    can load it
*         Inner frameworks
o    lists all inner frameworks in a tree view
o    lists details:
*  Start time
*  Origin bundle
*  System bundle's class
*  Startup call stack
o    executes certain commands in the inner framework (list, start/stop, install/uninstall/update)

The classloading commands (bundle) can be found here:

The inner framework files can be found inside the zip located here:<https://wiki.wdf.sap.corp/wiki/download/attachments/759500197/inner_frk.zip>

To install the inner framework bundles & agent:
1.  Place the three main components in one folder (Java agent(FDAgent), Collector library(FDLib), instrumentation library(javassist))
2.  Add the package of the framework collector library (com.sap.osgi.frameworkdetection.lib) to the bootdelegation property (org.osgi.framework.bootdelegation). Before starting the server add -javaagent:<path-to-the-agent>FDAgent_1.1.jar to the command line after the java keyword.
3.  Install the Framework Detection Command bundle in the Equinox environment you just launched, start that bundle and use the commands it provides.

We would like to contribute the code to Virgo since we think the commands will make the diagnostics of problems (often needed in server environment) much easier.

What do you about this idea?

Hristo Iliev