[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Classloading command [was Re: [virgo-dev] Classloading & Inner frameworks supportability commands]
- From: "Iliev, Hristo" <hristo.iliev@xxxxxxx>
- Date: Thu, 8 Jul 2010 08:37:13 +0200
- Accept-language: en-US, de-DE
- Acceptlanguage: en-US, de-DE
- Delivered-to: email@example.com
- Thread-index: Acsd0Uq3l2dwBC5TTsKn6dS65V2zPwAlNc+Q
- Thread-topic: Classloading command [was Re: [virgo-dev] Classloading & Inner frameworks supportability commands]
If the nested frameworks stuff we send could execute arbitrary shell line then the classloading commands you tried can really be used to debug also the kernel space as well as other nested frameworks. Kernel developers deserve some help too I guess.
Btw we had a discussion in SAP about the JMX interfaces last week, so I think it is now a must-have since everyone agrees on this point :) Can you send an example so we can start preparing the commands for Virgo?
From: virgo-dev-bounces@xxxxxxxxxxx [mailto:virgo-dev-bounces@xxxxxxxxxxx] On Behalf Of Glyn Normington
Sent: Wednesday, July 07, 2010 3:38 PM
To: Virgo Project
Subject: Classloading command [was Re: [virgo-dev] Classloading & Inner frameworks supportability commands]
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]:
osgi> clload org.eclipse.virgo.web.core.WebApplicationRegistry
Successfully loaded [org.eclipse.virgo.web.core.WebApplicationRegistry] from:
[exported by 37 org.eclipse.virgo.web.core]
osgi> clexport org.eclipse.virgo.web.core.WebApplicationRegistry
Bundles exporting [org.eclipse.virgo.web.core.WebApplicationRegistry]:
(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?
virgo-dev mailing list