Author: thomas.diesler(a)jboss.com
Date: 2010-02-25 02:28:55 -0500 (Thu, 25 Feb 2010)
New Revision: 101450
Removed:
projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleManagementDeployer.java
Modified:
projects/jboss-osgi/projects/runtime/deployers/trunk/.classpath
projects/jboss-osgi/projects/runtime/deployers/trunk/.settings/org.eclipse.jdt.core.prefs
projects/jboss-osgi/projects/runtime/deployers/trunk/pom.xml
projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/helpers/PackageAdminDependencyItem.java
Log:
Remove BundleManagementDeployer
Modified: projects/jboss-osgi/projects/runtime/deployers/trunk/.classpath
===================================================================
--- projects/jboss-osgi/projects/runtime/deployers/trunk/.classpath 2010-02-25 07:18:02
UTC (rev 101449)
+++ projects/jboss-osgi/projects/runtime/deployers/trunk/.classpath 2010-02-25 07:28:55
UTC (rev 101450)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes"
path="src/main/java"/>
- <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con"
path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Modified:
projects/jboss-osgi/projects/runtime/deployers/trunk/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
projects/jboss-osgi/projects/runtime/deployers/trunk/.settings/org.eclipse.jdt.core.prefs 2010-02-25
07:18:02 UTC (rev 101449)
+++
projects/jboss-osgi/projects/runtime/deployers/trunk/.settings/org.eclipse.jdt.core.prefs 2010-02-25
07:28:55 UTC (rev 101450)
@@ -1,4 +1,4 @@
-#Wed Feb 04 09:36:33 CET 2009
+#Thu Feb 25 08:25:55 CET 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
Modified: projects/jboss-osgi/projects/runtime/deployers/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/deployers/trunk/pom.xml 2010-02-25 07:18:02 UTC
(rev 101449)
+++ projects/jboss-osgi/projects/runtime/deployers/trunk/pom.xml 2010-02-25 07:28:55 UTC
(rev 101450)
@@ -31,8 +31,8 @@
<properties>
<version.jboss.deployers>2.2.0.Alpha1</version.jboss.deployers>
- <version.jboss.osgi.deployment>1.0.1</version.jboss.osgi.deployment>
- <version.jboss.osgi.spi>1.0.4</version.jboss.osgi.spi>
+
<version.jboss.osgi.deployment>1.0.2-SNAPSHOT</version.jboss.osgi.deployment>
+ <version.jboss.osgi.spi>1.0.5-SNAPSHOT</version.jboss.osgi.spi>
<version.osgi>4.2.0</version.osgi>
</properties>
Deleted:
projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleManagementDeployer.java
===================================================================
---
projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleManagementDeployer.java 2010-02-25
07:18:02 UTC (rev 101449)
+++
projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/BundleManagementDeployer.java 2010-02-25
07:28:55 UTC (rev 101450)
@@ -1,100 +0,0 @@
-/*
- * 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;
-
-// $Id: $
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.osgi.spi.management.ManagedBundle;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-/**
- * Register the Bundle as MBean with JMX.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 04-Mar-2009
- */
-public class BundleManagementDeployer extends AbstractSimpleRealDeployer<Bundle>
-{
- private BundleContext systemContext;
- private MBeanServer mbeanServer;
-
- public BundleManagementDeployer()
- {
- super(Bundle.class);
- }
-
- public void setSystemContext(BundleContext systemContext)
- {
- this.systemContext = systemContext;
- }
-
- public void setMbeanServer(MBeanServer mbeanServer)
- {
- this.mbeanServer = mbeanServer;
- }
-
- public void deploy(DeploymentUnit unit, Bundle bundle) throws DeploymentException
- {
- if (mbeanServer != null)
- {
- ManagedBundle mb = new ManagedBundle(systemContext, bundle);
- ObjectName oname = mb.getObjectName();
- try
- {
- if (mbeanServer.isRegistered(mb.getObjectName()) == false)
- {
- mbeanServer.registerMBean(mb, oname);
- unit.addAttachment(ManagedBundle.class, mb);
- }
- }
- catch (Exception ex)
- {
- DeploymentException.rethrowAsDeploymentException(ex.getMessage(), ex);
- }
- }
- }
-
- @Override
- public void undeploy(DeploymentUnit unit, Bundle bundle)
- {
- if (mbeanServer != null)
- {
- try
- {
- ManagedBundle mb = unit.getAttachment(ManagedBundle.class);
- if (mb != null && mbeanServer.isRegistered(mb.getObjectName()))
- mbeanServer.unregisterMBean(mb.getObjectName());
- }
- catch (Exception ex)
- {
- log.warn("Cannot unregister: " + bundle, ex);
- }
- }
- }
-}
\ No newline at end of file
Modified:
projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/helpers/PackageAdminDependencyItem.java
===================================================================
---
projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/helpers/PackageAdminDependencyItem.java 2010-02-25
07:18:02 UTC (rev 101449)
+++
projects/jboss-osgi/projects/runtime/deployers/trunk/src/main/java/org/jboss/osgi/deployer/helpers/PackageAdminDependencyItem.java 2010-02-25
07:28:55 UTC (rev 101450)
@@ -46,8 +46,6 @@
public PackageAdminDependencyItem(BundleContext systemContext, Bundle bundle)
{
super(bundle.getSymbolicName(), null, CTRL_STATE, null);
- if (bundle == null)
- throw new IllegalArgumentException("Null bundle");
this.bundle = bundle;