[jboss-cvs] JBossAS SVN: r84804 - in projects/jboss-osgi/trunk/runtime/deployer/src/main: resources and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Feb 26 09:15:05 EST 2009
Author: alesj
Date: 2009-02-26 09:15:05 -0500 (Thu, 26 Feb 2009)
New Revision: 84804
Added:
projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiClassLoadingMetaDataDeployer.java
Modified:
projects/jboss-osgi/trunk/runtime/deployer/src/main/resources/osgi-deployers-jboss-beans.xml
Log:
Add limited CLMD deployer.
Copied: projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiClassLoadingMetaDataDeployer.java (from rev 84799, projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleDeployer.java)
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiClassLoadingMetaDataDeployer.java (rev 0)
+++ projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiClassLoadingMetaDataDeployer.java 2009-02-26 14:15:05 UTC (rev 84804)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.deployer;
+
+import org.jboss.classloading.spi.metadata.ClassLoadingMetaData;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.osgi.framework.Bundle;
+
+/**
+ * This creates limited CLMD.
+ *
+ * @author Ales.Justin at jboss.org
+ */
+public class OSGiClassLoadingMetaDataDeployer extends AbstractSimpleRealDeployer<Bundle>
+{
+ private ClassLoadingMetaData metaData;
+
+ public OSGiClassLoadingMetaDataDeployer(ClassLoadingMetaData metaData)
+ {
+ super(Bundle.class);
+ if (metaData == null)
+ throw new IllegalArgumentException("Null metadata");
+
+ addOutput(ClassLoadingMetaData.class);
+ setStage(DeploymentStages.POST_PARSE);
+ this.metaData = metaData;
+ }
+
+ public void deploy(DeploymentUnit unit, Bundle bundle) throws DeploymentException
+ {
+ // override in any case
+ ClassLoadingMetaData cloned = metaData.clone();
+ unit.addAttachment(ClassLoadingMetaData.class, cloned);
+ }
+}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/runtime/deployer/src/main/resources/osgi-deployers-jboss-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/resources/osgi-deployers-jboss-beans.xml 2009-02-26 13:47:07 UTC (rev 84803)
+++ projects/jboss-osgi/trunk/runtime/deployer/src/main/resources/osgi-deployers-jboss-beans.xml 2009-02-26 14:15:05 UTC (rev 84804)
@@ -81,6 +81,16 @@
<property name="skipBundles"><inject bean="jboss.osgi:service=Framework" property="autoInstall" /></property>
</bean>
+<!--
+ <bean name="OSGiCLMDDeployer" class="org.jboss.osgi.deployer.OSGiClassLoadingMetaDataDeployer">
+ <constructor>
+ <parameter>
+ <classloading xmlns="urn:jboss:classloading:1.0" import-all="false"/>
+ </parameter>
+ </constructor>
+ </bean>
+-->
+
<!-- The Bundle Deployer -->
<bean name="jboss.osgi:service=BundleDeployer" class="org.jboss.osgi.deployer.BundleDeployer"/>
More information about the jboss-cvs-commits
mailing list