Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 68191 invoked from network); 6 Jan 2010 06:28:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Jan 2010 06:28:46 -0000 Received: (qmail 62404 invoked by uid 500); 6 Jan 2010 06:28:46 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 62354 invoked by uid 500); 6 Jan 2010 06:28:46 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 62345 invoked by uid 99); 6 Jan 2010 06:28:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jan 2010 06:28:46 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jan 2010 06:28:45 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E6E4D23888EC; Wed, 6 Jan 2010 06:28:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r896325 - in /geronimo/sandbox/delos: ./ mbeanForRFC66/ mbeanForRFC66/src/ mbeanForRFC66/src/java/ mbeanForRFC66/src/java/main/ mbeanForRFC66/src/java/main/org/ mbeanForRFC66/src/java/main/org/apache/ mbeanForRFC66/src/java/main/org/apache/... Date: Wed, 06 Jan 2010 06:28:24 -0000 To: scm@geronimo.apache.org From: delos@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100106062824.E6E4D23888EC@eris.apache.org> Author: delos Date: Wed Jan 6 06:28:18 2010 New Revision: 896325 URL: http://svn.apache.org/viewvc?rev=896325&view=rev Log: upload demo for portlet 2.0 and dojo 1.4.0 Added: geronimo/sandbox/delos/mbeanForRFC66/ geronimo/sandbox/delos/mbeanForRFC66/doc.zip (with props) geronimo/sandbox/delos/mbeanForRFC66/pom.xml geronimo/sandbox/delos/mbeanForRFC66/src/ geronimo/sandbox/delos/mbeanForRFC66/src/java/ geronimo/sandbox/delos/mbeanForRFC66/src/java/main/ geronimo/sandbox/delos/mbeanForRFC66/src/java/main/org/ geronimo/sandbox/delos/mbeanForRFC66/src/java/main/org/apache/ geronimo/sandbox/delos/mbeanForRFC66/src/java/main/org/apache/geronimo/ geronimo/sandbox/delos/mbeanForRFC66/src/java/main/org/apache/geronimo/mbean/ geronimo/sandbox/delos/mbeanForRFC66/src/java/main/org/apache/geronimo/mbean/webextender/ geronimo/sandbox/delos/mbeanForRFC66/src/java/main/org/apache/geronimo/mbean/webextender/WebExtenderMbean.java geronimo/sandbox/delos/mockUI_bundle_portlet/ geronimo/sandbox/delos/mockUI_bundle_portlet/dojoBundleList_anntation.JPG (with props) geronimo/sandbox/delos/mockUI_bundle_portlet/singlebundle.JPG (with props) geronimo/sandbox/delos/portlet+dojo/ geronimo/sandbox/delos/portlet+dojo/portlet-dojo1.4.0-demo.zip (with props) Removed: geronimo/sandbox/delos/doc.zip geronimo/sandbox/delos/dojoBundleList_anntation.JPG geronimo/sandbox/delos/pom.xml geronimo/sandbox/delos/singlebundle.JPG geronimo/sandbox/delos/src/ Added: geronimo/sandbox/delos/mbeanForRFC66/doc.zip URL: http://svn.apache.org/viewvc/geronimo/sandbox/delos/mbeanForRFC66/doc.zip?rev=896325&view=auto ============================================================================== Binary file - no diff available. Propchange: geronimo/sandbox/delos/mbeanForRFC66/doc.zip ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: geronimo/sandbox/delos/mbeanForRFC66/pom.xml URL: http://svn.apache.org/viewvc/geronimo/sandbox/delos/mbeanForRFC66/pom.xml?rev=896325&view=auto ============================================================================== --- geronimo/sandbox/delos/mbeanForRFC66/pom.xml (added) +++ geronimo/sandbox/delos/mbeanForRFC66/pom.xml Wed Jan 6 06:28:18 2010 @@ -0,0 +1,18 @@ + + 4.0.0 + org.apache.geronimo.mbean + org.apache.geronimo.mbean.webextender + jar + 1.0-SNAPSHOT + + org.apache.geronimo.mbean.webextender + + + + org.osgi + org.osgi.jmx + 1.0 + + + Added: geronimo/sandbox/delos/mbeanForRFC66/src/java/main/org/apache/geronimo/mbean/webextender/WebExtenderMbean.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/delos/mbeanForRFC66/src/java/main/org/apache/geronimo/mbean/webextender/WebExtenderMbean.java?rev=896325&view=auto ============================================================================== --- geronimo/sandbox/delos/mbeanForRFC66/src/java/main/org/apache/geronimo/mbean/webextender/WebExtenderMbean.java (added) +++ geronimo/sandbox/delos/mbeanForRFC66/src/java/main/org/apache/geronimo/mbean/webextender/WebExtenderMbean.java Wed Jan 6 06:28:18 2010 @@ -0,0 +1,332 @@ +package org.apache.geronimo.mbean.webextender; + +import javax.management.openmbean.CompositeData; +import javax.management.openmbean.CompositeType; +import javax.management.openmbean.SimpleType; +import javax.management.openmbean.TabularData; +import javax.management.openmbean.TabularType; + +import org.osgi.jmx.Item; + +/** + * This class is a standard mbean. It's used to monitor Web extender in OSGI framework. + * The extender is implemented per the OSGI document RFC 66 "OSGI and Web Applications". + * In general, extender will + * + *
    + *
  1. adapt Web containers to OSGI framework
  2. + *
  3. convert a WAR into WAB with an URLHandler
  4. + *
  5. monitor the status of an deployed WAB by predefined event
  6. + *
+ * The purpose of this mbean is to monitor information of extender, which is derived from the document. It doesn't + * contains information dedicated for Web container and OSGI bundle, such as servlet list or bundle dependencies. + * Here are two reasons for excluding these information + * + *
    + *
  1. existence of a large number of mbeans in normal Web container, such as Tomcat and Jetty, so the mbean just + * focus on extender itself without taking information of Web container into account.
  2. + *
  3. in RFC 139, several mbeans are defined to monitor various information of a normal OSGI bundle, so it's unnecessary + * to define the information for an OSGI bundle here.
  4. + *
+ * + * @author Delos + * + */ + +public interface WebExtenderMbean { + /** + * The key IDENTIFIER, used in {@link #IDENTIFIER_ITEM}. + */ + String IDENTIFIER = "IDENTIFIER"; + /** + * The item containing the bundle identifier in {@link #WAB_EVENT_TYPE}. The + * key is {@link #IDENTIFIER} and the the type is {@link SimpleType#LONG}. + */ + Item IDENTIFIER_ITEM = new Item(IDENTIFIER, "The id of the bundle", + SimpleType.LONG); + + /** + * The key VERSION, used in {@link #VERSION_ITEM}. + */ + String VERSION = "VERSION"; + /** + * The item containing the bundle version in {@link #WAB_EVENT_TYPE}. The key + * is {@link #VERSION} and the the type is {@link SimpleType#STRING}. + */ + Item VERSION_ITEM = new Item(VERSION, "The version of the bundle", + SimpleType.STRING); + + /** + * The key SYMBOLIC_NAME, used in {@link #SYMBOLIC_NAME_ITEM}. + */ + String SYMBOLIC_NAME = "SymbolicName"; + + /** + * The item containing the symbolic name in {@link #WAB_EVENT_TYPE}. The key is + * {@link #SYMBOLIC_NAME} and the the type is {@link SimpleType#STRING}. + */ + Item SYMBOLIC_NAME_ITEM = new Item(SYMBOLIC_NAME, + "The symbolic name of the bundle", SimpleType.STRING); + + /** + * The key CONTEXTPATH, used in {@link #CONTEXTPATH_ITEM}. + */ + String CONTEXTPATH = "CONTEXTPATH"; + + /** + * The item containing the context path in {@link #WAB_EVENT_TYPE}. The key is + * {@link #CONTEXTPATH} and the the type is {@link SimpleType#STRING}. + */ + Item CONTEXTPATH_ITEM = new Item(CONTEXTPATH, + "The context path of the bundle", SimpleType.STRING); + + /** + * The key TIMESTAMP, used in {@link #TIMESTAMP_ITEM}. + */ + String TIMESTAMP = "TIMESTAMP"; + + /** + * The item containing the timestamp in {@link #WAB_EVENT_TYPE}. The key is + * {@link #TIMESTAMP} and the the type is {@link SimpleType#STRING}. + */ + Item TIMESTAMP_ITEM = new Item(TIMESTAMP, + "The timestamp of the bundle", SimpleType.STRING); + + /** + * The key EXTENDER_ID, used in {@link #EXTENDER_ID_ITEM}. + */ + String EXTENDER_ID = "EXTENDER_ID"; + + /** + * The item containing the extender bundle id in {@link #WAB_EVENT_TYPE}. The key is + * {@link #EXTENDER_ID} and the the type is {@link SimpleType#STRING}. + */ + Item EXTENDER_ID_ITEM = new Item(EXTENDER_ID, + "The extender bundle id of the bundle", SimpleType.STRING); + + /** + * The key EXTENDER_SYMBOLIC_NAME, used in {@link #EXTENDER_SYMBOLIC_NAME_ITEM}. + */ + String EXTENDER_SYMBOLIC_NAME = "EXTENDER_SYMBOLIC_NAME"; + + /** + * The item containing the extender bundle symbolic name in {@link #WAB_EVENT_TYPE}. The key is + * {@link #EXTENDER_SYMBOLIC_NAME} and the the type is {@link SimpleType#STRING}. + */ + Item EXTENDER_SYMBOLIC_NAME_ITEM = new Item(EXTENDER_SYMBOLIC_NAME, + "The extender bundle symbolic name of the bundle", SimpleType.STRING); + + /** + * The key EXTENDER_VERSION, used in {@link #EXTENDER_VERSION_ITEM}. + */ + String EXTENDER_VERSION = "EXTENDER_VERSION"; + + /** + * The item containing the extender bundle version in {@link #WAB_EVENT_TYPE}. The key is + * {@link #EXTENDER_VERSION} and the the type is {@link SimpleType#STRING}. + */ + Item EXTENDER_VERSION_ITEM = new Item(EXTENDER_VERSION, + "The extender bundle version of the bundle", SimpleType.STRING); + + /** + * The key EXCEPTION_MESSAGE, used in {@link #EXCEPTION_MESSAGE_ITEM}. + */ + String EXCEPTION_MESSAGE = "WABEvent"; + + /** + * The item containing the exception message for a FAILED event in {@link #WAB_EVENT_TYPE}. The key is {@link #EXCEPTION_MESSAGE} and the type is {@link SimpleType#INTEGER} + */ + Item EXCEPTION_MESSAGE_ITEM = new Item( + EXCEPTION_MESSAGE, + "The exception message when extender failed to deploy a WAB", + SimpleType.STRING); + + /** + * The key EVENT, used in {@link #EVENT_ITEM}. + */ + String EVENT = "WABEvent"; + + /** + * The item containing the event type. The key is {@link #EVENT} and the type is {@link SimpleType#INTEGER} + */ + Item EVENT_ITEM = new Item( + EVENT, + "The type of the event: {DEPLOYING=1, DEPLOYED=2, UNDEPLOYING=4, UNDEPLOYED=8, FAILED=16}", + SimpleType.INTEGER); + + + + /** + * The Composite Type that represents a bundle event. This composite consists of: + *
    + *
  • {@link #CONTEXTPATH_ITEM}
  • + *
  • {@link #EVENT_ITEM}
  • + *
  • {@link #EXTENDER_ID_ITEM}
  • + *
  • {@link #EXTENDER_SYMBOLIC_NAME_ITEM}
  • + *
  • {@link #EXTENDER_VERSION_ITEM}
  • + *
  • {@link #IDENTIFIER_ITEM}
  • + *
  • {@link #SYMBOLIC_NAME_ITEM}
  • + *
  • {@link #TIMESTAMP_ITEM}
  • + *
  • {@link #VERSION_ITEM}
  • + *
+ */ + CompositeType WAB_EVENT_TYPE = Item.compositeType("WAB_EVENT", + "This type encapsulates WAB bundle events", + CONTEXTPATH_ITEM, + EVENT_ITEM, + EXTENDER_ID_ITEM, + EXTENDER_SYMBOLIC_NAME_ITEM, + EXTENDER_VERSION_ITEM, + IDENTIFIER_ITEM, + SYMBOLIC_NAME_ITEM, + TIMESTAMP_ITEM, + VERSION_ITEM); + + + /** + * The Tabular Type describing the type of the Tabular Data value that is + * returned from {@link #getEvents(long)} method. The primary item is + * {@link #EVENT_ITEM}. + */ + TabularType HEADERS_TYPE = Item.tabularType("HEADERS", + "The table of WAB events", WAB_EVENT_TYPE, new String[] { EVENT }); + + + //Web container + + /** + * Return the extender bundle id + * + * @return Return the extender bundle id + */ + public long getWebExtenderId(); + + /** + * In OSGI environment, Web container may be replaced dynamically in OSGI environment. + * This method returns the bundle id for the Web container currently used. + * + * @return the bundle id for the Web container currently used + * + */ + public long getCurrentWebContainerId(); + + /** + * In OSGI environment, Web container may be replaced dynamically in OSGI environment. + * This method returns available Web containers in current framework. + * + * @return the id list of all the available Web containers in current framework + */ + public long[] getWebContainerIds(); + + /** + * Check whether the Web container with specified id is available in current framework + * + * @param containerId - the bundle id for the Web container + * @return true if the container is available; otherwise, return false + */ + public boolean isContainerAvailable(String containerId); + + //URL handler + /** + * In OSGI environment, URLHandler is used to convert a WAR into a WAB in OSGI environment. There may be several + * URLHanlders available. URLHandler is registered as an OSGI service. + * + * This method returns the id list of all the available URLHanlders + * + * @return the service id list of all the available URLHanlders + * + * + */ + public long[] getURLHandlerIds(); + + /** + * This method returns the id of URLHanlder currently used + * + * @return the service id of all the available URLHanlders + * + */ + public long getCurrentURLHanlderId(); + + + //WAB + /** + * In OSGI environment, a WAR can also be deployed in an OSGI Web container. + * But a WAR has to be converted into a WAB first. + * + * This method check whether specified WAB is converted from a WAR. + * + * @param wabId - the id of wab + * @return return true if the WAB is converted from a WAR;otherwise, return false + */ + public boolean isConvertedWAB(String wabId); + + + /** + * Get the id list of all the deployed WAB + * + * @return the bundle id of all the deployed WABs + */ + public long[] getDeployedWABIds(); + + /** + * Get the id list of all the WABs that are being deployed + * + * @return the bundle id of all the WABs that are being deployed + */ + public long[] getDeployingWABIds(); + + /** + * Get the id list of all the WABs that are failed to be deployed + * + * @return the bundle id of all the WABs that are failed to be deployed + */ + public long[] getFailedWABIds(); + + /** + * + * There are several events during the life-cycle of a WAB. + * + * This method returns the latest event happened to the WAB. + * + * The CompositeData is typed by the {@link #WAB_EVENT_TYPE}. + * + * @param wabId - the bundle id of a WAB + * + * @return the name of last event happened to the WAB + */ + public CompositeData getEvents(String wabId); + + /** + * + * There are several events during the life-cycle of a WAB. + * + * This method returns all the event that has happened to the WAB. + * + * The TabularData is typed by the {@link #WAB_EVENT_TYPE}. + * + * @param wabId - the id of a WAB + * + * @return the name of last event happened to the WAB + */ + public TabularData getLastEvents(); + + + /** + * Check whether WAB with specified id contains the annotation in code.That means + * code scan is needed.It's determined by the value of "metadata-complete" in descriptor. + * + * @param wabId - the bundle id of a WAB + * + * @return true if the WAB contains annotation;otherwise,return false; + */ + public boolean containsAnnotation(String wabId); + + /** + * Get the context path of the WAB with specified id + * + * @param wabId - the bundle id of a WAB + * + * @return the context path of the WAB + */ + public String getContextPath(String wabId); +} Added: geronimo/sandbox/delos/mockUI_bundle_portlet/dojoBundleList_anntation.JPG URL: http://svn.apache.org/viewvc/geronimo/sandbox/delos/mockUI_bundle_portlet/dojoBundleList_anntation.JPG?rev=896325&view=auto ============================================================================== Binary file - no diff available. Propchange: geronimo/sandbox/delos/mockUI_bundle_portlet/dojoBundleList_anntation.JPG ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: geronimo/sandbox/delos/mockUI_bundle_portlet/singlebundle.JPG URL: http://svn.apache.org/viewvc/geronimo/sandbox/delos/mockUI_bundle_portlet/singlebundle.JPG?rev=896325&view=auto ============================================================================== Binary file - no diff available. Propchange: geronimo/sandbox/delos/mockUI_bundle_portlet/singlebundle.JPG ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: geronimo/sandbox/delos/portlet+dojo/portlet-dojo1.4.0-demo.zip URL: http://svn.apache.org/viewvc/geronimo/sandbox/delos/portlet%2Bdojo/portlet-dojo1.4.0-demo.zip?rev=896325&view=auto ============================================================================== Binary file - no diff available. Propchange: geronimo/sandbox/delos/portlet+dojo/portlet-dojo1.4.0-demo.zip ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream