[jboss-cvs] JBossAS SVN: r60944 - in projects/osgi/trunk: core and 11 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Feb 27 10:00:09 EST 2007


Author: alesj
Date: 2007-02-27 10:00:09 -0500 (Tue, 27 Feb 2007)
New Revision: 60944

Added:
   projects/osgi/trunk/core/src/main/org/jboss/osgi/core/platform/spi/BundleContextAware.java
   projects/osgi/trunk/deployment/src/main/org/jboss/osgi/aspects/
   projects/osgi/trunk/deployment/src/main/org/jboss/osgi/aspects/ServiceIntroduction.java
   projects/osgi/trunk/deployment/src/main/org/jboss/osgi/metadata/plugins/ServiceRegistryPojo.java
   projects/osgi/trunk/deployment/src/main/org/jboss/osgi/metadata/spi/annotations/
   projects/osgi/trunk/deployment/src/main/org/jboss/osgi/metadata/spi/annotations/OsgiService.java
Modified:
   projects/osgi/trunk/build/build.iml
   projects/osgi/trunk/core/core.iml
   projects/osgi/trunk/core/src/main/org/jboss/osgi/core/platform/plugin/FelixPlatform.java
   projects/osgi/trunk/core/src/main/org/jboss/osgi/core/platform/plugin/FelixWrapper.java
   projects/osgi/trunk/deployment/src/main/org/jboss/osgi/deployers/OSGiKernelRegistryPlugin.java
   projects/osgi/trunk/deployment/src/main/org/jboss/osgi/deployers/OSGiPluginDeployer.java
   projects/osgi/trunk/deployment/src/main/org/jboss/osgi/metadata/plugins/AbstractReferenceMetaData.java
   projects/osgi/trunk/deployment/src/main/org/jboss/osgi/metadata/plugins/AbstractServiceMetaData.java
   projects/osgi/trunk/deployment/src/resources/schema/osgi-beans_1_0.xsd
   projects/osgi/trunk/testsuite/src/main/org/jboss/test/server/Main.java
   projects/osgi/trunk/testsuite/testsuite.iml
Log:
Additional OSGi service registry / lookup handling.

Modified: projects/osgi/trunk/build/build.iml
===================================================================
--- projects/osgi/trunk/build/build.iml	2007-02-27 14:50:25 UTC (rev 60943)
+++ projects/osgi/trunk/build/build.iml	2007-02-27 15:00:09 UTC (rev 60944)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <module version="4" relativePaths="true" type="JAVA_MODULE">
   <component name="ModuleRootManager" />
-  <component name="NewModuleRootManager" inherit-compiler-output="false">
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5" inherit-compiler-output="false">
     <output url="file://$MODULE_DIR$/classes" />
     <exclude-output />
     <content url="file://$MODULE_DIR$" />

Modified: projects/osgi/trunk/core/core.iml
===================================================================
--- projects/osgi/trunk/core/core.iml	2007-02-27 14:50:25 UTC (rev 60943)
+++ projects/osgi/trunk/core/core.iml	2007-02-27 15:00:09 UTC (rev 60944)
@@ -42,9 +42,20 @@
         <SOURCES />
       </library>
     </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../microcontainer/thirdparty/jboss/aop/lib/jboss-aop-jdk50.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES>
+          <root url="jar://$MODULE_DIR$/../../microcontainer/thirdparty/jboss/aop/lib/jboss-aop-src.zip!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="library" exported="" name="Microcontainer 2.0" level="application" />
     <orderEntry type="library" exported="" name="osgi.core" level="project" />
     <orderEntry type="library" exported="" name="Felix 0.8.0" level="application" />
-    <orderEntry type="library" exported="" name="Microcontainer 2.0" level="application" />
     <orderEntryProperties />
   </component>
 </module>

Modified: projects/osgi/trunk/core/src/main/org/jboss/osgi/core/platform/plugin/FelixPlatform.java
===================================================================
--- projects/osgi/trunk/core/src/main/org/jboss/osgi/core/platform/plugin/FelixPlatform.java	2007-02-27 14:50:25 UTC (rev 60943)
+++ projects/osgi/trunk/core/src/main/org/jboss/osgi/core/platform/plugin/FelixPlatform.java	2007-02-27 15:00:09 UTC (rev 60944)
@@ -68,6 +68,7 @@
       if (felix != null)
       {
          felix.shutdown();
+         felix = null;
       }
    }
 

Modified: projects/osgi/trunk/core/src/main/org/jboss/osgi/core/platform/plugin/FelixWrapper.java
===================================================================
--- projects/osgi/trunk/core/src/main/org/jboss/osgi/core/platform/plugin/FelixWrapper.java	2007-02-27 14:50:25 UTC (rev 60943)
+++ projects/osgi/trunk/core/src/main/org/jboss/osgi/core/platform/plugin/FelixWrapper.java	2007-02-27 15:00:09 UTC (rev 60944)
@@ -23,6 +23,7 @@
 
 import java.util.Map;
 import java.util.HashMap;
+import java.util.Collections;
 import java.io.InputStream;
 
 import org.apache.felix.framework.Felix;
@@ -44,7 +45,7 @@
 
    public FelixWrapper()
    {
-      installedBundles = new HashMap<Long, Bundle>();
+      installedBundles = Collections.synchronizedMap(new HashMap<Long, Bundle>());
    }
 
    public void start(Map properties)
@@ -52,9 +53,10 @@
       start(new MutablePropertyResolverImpl(properties), null);
    }
 
-   public void stop()
+   public void shutdown()
    {
       installedBundles.clear();
+      super.shutdown();
       installedBundles = null;
    }
 

Added: projects/osgi/trunk/core/src/main/org/jboss/osgi/core/platform/spi/BundleContextAware.java
===================================================================
--- projects/osgi/trunk/core/src/main/org/jboss/osgi/core/platform/spi/BundleContextAware.java	                        (rev 0)
+++ projects/osgi/trunk/core/src/main/org/jboss/osgi/core/platform/spi/BundleContextAware.java	2007-02-27 15:00:09 UTC (rev 60944)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.core.platform.spi;
+
+import org.osgi.framework.BundleContext;
+
+/**
+ * Simple markup interface.
+ * Simplifies injection.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public interface BundleContextAware
+{
+   /**
+    * Use BundleContext for different service / reference
+    * registry, lookup, etc.
+    *
+    * @param bundleContext current bundle context
+    */
+   void setBundleContext(BundleContext bundleContext);
+}

Added: projects/osgi/trunk/deployment/src/main/org/jboss/osgi/aspects/ServiceIntroduction.java
===================================================================
--- projects/osgi/trunk/deployment/src/main/org/jboss/osgi/aspects/ServiceIntroduction.java	                        (rev 0)
+++ projects/osgi/trunk/deployment/src/main/org/jboss/osgi/aspects/ServiceIntroduction.java	2007-02-27 15:00:09 UTC (rev 60944)
@@ -0,0 +1,56 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.aspects;
+
+import java.lang.annotation.Annotation;
+
+import org.jboss.aop.microcontainer.aspects.AbstractIntroduction;
+import org.jboss.dependency.spi.Controller;
+import org.jboss.osgi.metadata.spi.annotations.OsgiService;
+import org.jboss.kernel.spi.dependency.KernelControllerContext;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class ServiceIntroduction extends AbstractIntroduction
+{
+   public ServiceIntroduction(Controller controller)
+   {
+      this.controller = controller;
+   }
+
+   protected Class<? extends Annotation> getBindingAnnotation()
+   {
+      return OsgiService.class;
+   }
+
+   protected void onRegistration(KernelControllerContext context)
+   {
+      // todo
+   }
+
+   protected void onUnregistration(KernelControllerContext context)
+   {
+      // todo
+   }
+   
+}

Modified: projects/osgi/trunk/deployment/src/main/org/jboss/osgi/deployers/OSGiKernelRegistryPlugin.java
===================================================================
--- projects/osgi/trunk/deployment/src/main/org/jboss/osgi/deployers/OSGiKernelRegistryPlugin.java	2007-02-27 14:50:25 UTC (rev 60943)
+++ projects/osgi/trunk/deployment/src/main/org/jboss/osgi/deployers/OSGiKernelRegistryPlugin.java	2007-02-27 15:00:09 UTC (rev 60944)
@@ -56,7 +56,7 @@
    /**
     * We provide extra KernelRegistryPlugin, which handles OSGi specific lookup
     *
-    * @param name
+    * @param name service / bean lookup name
     * @return KREntry to OSGi service registered in OSGi platform
     */
    public KernelRegistryEntry getEntry(Object name)

Modified: projects/osgi/trunk/deployment/src/main/org/jboss/osgi/deployers/OSGiPluginDeployer.java
===================================================================
--- projects/osgi/trunk/deployment/src/main/org/jboss/osgi/deployers/OSGiPluginDeployer.java	2007-02-27 14:50:25 UTC (rev 60943)
+++ projects/osgi/trunk/deployment/src/main/org/jboss/osgi/deployers/OSGiPluginDeployer.java	2007-02-27 15:00:09 UTC (rev 60944)
@@ -72,30 +72,25 @@
       {
          if (usedBundleAdapters.contains(bundleAdapter.getBundleId()) == false)
          {
+            try
+            {
+               // reference lookup + BC holder
+               BeanMetaDataBuilder builder = new BeanMetaDataBuilder(
+                     "BundleContextHolder",
+                     OSGiKernelRegistryPlugin.class.getName()
+               );
+               builder.addConstructorParameter("org.osgi.framework.BundleContext", bundleAdapter.getBundleContext());
+               controller.install(builder.getBeanMetaData());
+            }
+            catch (Throwable throwable)
+            {
+               throw DeploymentException.rethrowAsDeploymentException("Unable to register OSGiPlugins.", throwable);
+            }
             usedBundleAdapters.add(bundleAdapter.getBundleId());
-            registerOSGiPlugins(unit.getName(), bundleAdapter);
          }
       }
    }
 
-   private void registerOSGiPlugins(String unitName, BundleAdapter bundleAdapter) throws DeploymentException
-   {
-      try
-      {
-         // reference lookup + BC holder
-         BeanMetaDataBuilder builder = new BeanMetaDataBuilder(
-               unitName + "_OSGiKernelRegistryPlugin",
-               OSGiKernelRegistryPlugin.class.getName()
-         );
-         builder.addConstructorParameter("org.osgi.framework.BundleContext", bundleAdapter.getBundleContext());
-         controller.install(builder.getBeanMetaData());
-      }
-      catch (Throwable throwable)
-      {
-         throw DeploymentException.rethrowAsDeploymentException("Unable to register OSGiPlugins.", throwable);
-      }
-   }
-
    public void stop()
    {
       usedBundleAdapters.clear();

Modified: projects/osgi/trunk/deployment/src/main/org/jboss/osgi/metadata/plugins/AbstractReferenceMetaData.java
===================================================================
--- projects/osgi/trunk/deployment/src/main/org/jboss/osgi/metadata/plugins/AbstractReferenceMetaData.java	2007-02-27 14:50:25 UTC (rev 60943)
+++ projects/osgi/trunk/deployment/src/main/org/jboss/osgi/metadata/plugins/AbstractReferenceMetaData.java	2007-02-27 15:00:09 UTC (rev 60944)
@@ -30,6 +30,10 @@
 import org.jboss.osgi.metadata.spi.ListenerMetaData;
 import org.jboss.osgi.metadata.spi.ReferenceMetaData;
 import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.reflect.spi.TypeInfoFactory;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.Controller;
+import org.jboss.aop.proxy.container.GeneratedAOPProxyFactory;
 
 /**
  * OSGi reference meta data.
@@ -48,6 +52,8 @@
    private List<ListenerMetaData> listeners;
    private Set<PropertyMetaData> properties;
 
+   private ControllerContext context;
+
    public Object getUnderlyingValue()
    {
       return getId();
@@ -55,16 +61,38 @@
 
    public Object getValue(TypeInfo info, ClassLoader cl) throws Throwable
    {
-      // todo - OSGi lookup + AOP wrap
-      return null;
+      Class interfaceClass;
+      if (info != null)
+      {
+         TypeInfoFactory tif = info.getTypeInfoFactory();
+         TypeInfo interfaceInfo = tif.getTypeInfo(getInterface(), cl);
+         if (info.isAssignableFrom(interfaceInfo) == false)
+            throw new IllegalArgumentException("Illegal type info: " + interfaceInfo + ", expected: " + info);
+         interfaceClass = interfaceInfo.getType();
+      }
+      else
+      {
+         interfaceClass = cl.loadClass(getInterface());
+      }
+      Controller controller = context.getController();
+      Object result = controller.getInstalledContext(interfaceClass);
+      // todo - add dynamic behaviour
+      return GeneratedAOPProxyFactory.createProxy(result, interfaceClass);
    }
 
+   // we can define ref as a MC bean, not just plain injection
    public List<BeanMetaData> getBeans()
    {
       // todo - reference this + AOP bean
       return null;
    }
 
+   public void initialVisit(MetaDataVisitor visitor)
+   {
+      context = visitor.getControllerContext();
+      super.initialVisit(visitor);
+   }
+
    public String getFilter()
    {
       return filter;

Modified: projects/osgi/trunk/deployment/src/main/org/jboss/osgi/metadata/plugins/AbstractServiceMetaData.java
===================================================================
--- projects/osgi/trunk/deployment/src/main/org/jboss/osgi/metadata/plugins/AbstractServiceMetaData.java	2007-02-27 14:50:25 UTC (rev 60943)
+++ projects/osgi/trunk/deployment/src/main/org/jboss/osgi/metadata/plugins/AbstractServiceMetaData.java	2007-02-27 15:00:09 UTC (rev 60944)
@@ -21,19 +21,27 @@
 */
 package org.jboss.osgi.metadata.plugins;
 
+import java.io.Serializable;
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.io.Serializable;
+import java.util.Properties;
 
 import org.jboss.beans.metadata.spi.BeanMetaData;
 import org.jboss.beans.metadata.spi.MetaDataVisitor;
 import org.jboss.beans.metadata.spi.MetaDataVisitorNode;
+import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
+import org.jboss.beans.metadata.plugins.AbstractArrayMetaData;
+import org.jboss.beans.metadata.plugins.AbstractDependencyValueMetaData;
+import org.jboss.beans.metadata.plugins.AbstractValueMetaData;
+import org.jboss.beans.metadata.plugins.AbstractMapMetaData;
 import org.jboss.dependency.plugins.AbstractDependencyItem;
 import org.jboss.dependency.spi.ControllerState;
 import org.jboss.dependency.spi.DependencyItem;
 import org.jboss.kernel.spi.dependency.KernelControllerContext;
 import org.jboss.osgi.metadata.spi.ServiceMetaData;
+import org.jboss.util.id.GUID;
 
 /**
  * OSGi service meta data.
@@ -53,8 +61,35 @@
 
    public List<BeanMetaData> getBeans()
    {
-      // todo - register OSGi service + GUID name if id doesn't exist
-      return null;
+      String name = getId();
+      if (name == null)
+      {
+         name = new GUID().toString();
+      }
+      BeanMetaDataBuilder builder = new BeanMetaDataBuilder(name, ServiceRegistryPojo.class.getName());
+      AbstractArrayMetaData arrayMetaData = new AbstractArrayMetaData();
+      for(String intf : interfaces)
+      {
+         arrayMetaData.add(new AbstractValueMetaData(intf));
+      }
+      builder.addPropertyMetaData("interfaces", arrayMetaData);
+      if (serviceProperties != null && serviceProperties.isEmpty() == false)
+      {
+         AbstractMapMetaData propertiesMetaData = new AbstractMapMetaData();
+         propertiesMetaData.setType(Properties.class.getName());
+         propertiesMetaData.setKeyType(String.class.getName());
+         propertiesMetaData.setValueType(String.class.getName());
+         for (Map.Entry<String, String> entry : serviceProperties.entrySet())
+         {
+            propertiesMetaData.put(new AbstractValueMetaData(entry.getKey()), new AbstractValueMetaData(entry.getValue()));
+         }
+         builder.addPropertyMetaData("serviceProperties", propertiesMetaData);
+      }
+      builder.addPropertyMetaData("ref", new AbstractDependencyValueMetaData(ref));
+      builder.addPropertyMetaData("lazyInit", lazyInit);
+      builder.addInstall("install", "BundleContextHolder");
+      builder.addUninstall("uninstall");
+      return Collections.singletonList(builder.getBeanMetaData());
    }
 
    public void initialVisit(MetaDataVisitor visitor)

Added: projects/osgi/trunk/deployment/src/main/org/jboss/osgi/metadata/plugins/ServiceRegistryPojo.java
===================================================================
--- projects/osgi/trunk/deployment/src/main/org/jboss/osgi/metadata/plugins/ServiceRegistryPojo.java	                        (rev 0)
+++ projects/osgi/trunk/deployment/src/main/org/jboss/osgi/metadata/plugins/ServiceRegistryPojo.java	2007-02-27 15:00:09 UTC (rev 60944)
@@ -0,0 +1,87 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.metadata.plugins;
+
+import java.util.Dictionary;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+import org.jboss.logging.Logger;
+import org.jboss.osgi.core.platform.spi.BundleContextHolder;
+
+/**
+ * Pojo used to register ServiceMetaData into OSGi framework.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class ServiceRegistryPojo
+{
+   private static Logger logger = Logger.getLogger(ServiceRegistryPojo.class);
+
+   private ServiceRegistration service;
+
+   private String[] interfaces;
+   private Dictionary serviceProperties;
+   private Object ref;
+   private boolean lazyInit;
+
+   public void install(BundleContextHolder bcHolder)
+   {
+      BundleContext bundleContext = bcHolder.getBundleContext();
+      service = bundleContext.registerService(interfaces, ref, serviceProperties);
+   }
+
+   public void uninstall()
+   {
+      if (service != null)
+      {
+         try
+         {
+            service.unregister();
+         }
+         catch (IllegalStateException e)
+         {
+            logger.info("Service already unregistered: " + service);               
+         }
+      }
+   }
+
+   public void setInterfaces(String[] interfaces)
+   {
+      this.interfaces = interfaces;
+   }
+
+   public void setServiceProperties(Dictionary serviceProperties)
+   {
+      this.serviceProperties = serviceProperties;
+   }
+
+   public void setRef(Object ref)
+   {
+      this.ref = ref;
+   }
+
+   public void setLazyInit(boolean lazyInit)
+   {
+      this.lazyInit = lazyInit;
+   }
+}

Added: projects/osgi/trunk/deployment/src/main/org/jboss/osgi/metadata/spi/annotations/OsgiService.java
===================================================================
--- projects/osgi/trunk/deployment/src/main/org/jboss/osgi/metadata/spi/annotations/OsgiService.java	                        (rev 0)
+++ projects/osgi/trunk/deployment/src/main/org/jboss/osgi/metadata/spi/annotations/OsgiService.java	2007-02-27 15:00:09 UTC (rev 60944)
@@ -0,0 +1,53 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.metadata.spi.annotations;
+
+/**
+ * Annotation marking bean as OSGi service.
+ * Underlying bean (ref) is registered with exposed 
+ * interfaces into OSGi framework.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public @interface OsgiService
+{
+   /**
+    * Get exposed interfaces.
+    *
+    * @return exposed interfaces
+    */
+   String[] interfaces();
+
+   /**
+    * Get target reference.
+    *
+    * @return target reference
+    */
+   String ref();
+
+   /**
+    * Is lazy init.
+    *
+    * @return is lazy init
+    */
+   boolean isLazyInit() default false;
+}

Modified: projects/osgi/trunk/deployment/src/resources/schema/osgi-beans_1_0.xsd
===================================================================
--- projects/osgi/trunk/deployment/src/resources/schema/osgi-beans_1_0.xsd	2007-02-27 14:50:25 UTC (rev 60943)
+++ projects/osgi/trunk/deployment/src/resources/schema/osgi-beans_1_0.xsd	2007-02-27 15:00:09 UTC (rev 60944)
@@ -62,10 +62,10 @@
             <xsd:element name="interfaces" type="mc:setType" minOccurs="0"/>
             <xsd:element name="service-properties" type="mc:mapType" minOccurs="0"/>
             <!--  this next entry is to allow a nested bean element -->
-            <xsd:any namespace="##other" minOccurs="0" maxOccurs="1" processContents="skip"/>
+            <!--<xsd:any namespace="##other" minOccurs="0" maxOccurs="1" processContents="skip"/>-->
          </xsd:sequence>
          <xsd:attribute name="id" type="xsd:string" use="optional"/>
-         <xsd:attribute name="ref" type="xsd:string" use="optional"/>
+         <xsd:attribute name="ref" type="xsd:string" use="required"/>
          <xsd:attribute name="interface" type="xsd:string" use="optional"/>
          <xsd:attribute name="lazy-init" type="xsd:boolean" use="optional" default="false"/>
          <xsd:attribute name="depends-on" type="xsd:string" use="optional"/>

Modified: projects/osgi/trunk/testsuite/src/main/org/jboss/test/server/Main.java
===================================================================
--- projects/osgi/trunk/testsuite/src/main/org/jboss/test/server/Main.java	2007-02-27 14:50:25 UTC (rev 60943)
+++ projects/osgi/trunk/testsuite/src/main/org/jboss/test/server/Main.java	2007-02-27 15:00:09 UTC (rev 60944)
@@ -32,10 +32,8 @@
       {
          Server server = new ServerImpl();
          server.start();
-/*
          Thread.sleep(10000);
          server.stop();
-*/
       }
       catch (Throwable t)
       {

Modified: projects/osgi/trunk/testsuite/testsuite.iml
===================================================================
--- projects/osgi/trunk/testsuite/testsuite.iml	2007-02-27 14:50:25 UTC (rev 60943)
+++ projects/osgi/trunk/testsuite/testsuite.iml	2007-02-27 15:00:09 UTC (rev 60944)
@@ -51,15 +51,6 @@
     <orderEntry type="module-library">
       <library>
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../microcontainer/thirdparty/jboss/aop/lib/jboss-aop-jdk50.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
           <root url="jar://$MODULE_DIR$/../../microcontainer/thirdparty/javassist/lib/javassist.jar!/" />
         </CLASSES>
         <JAVADOC />




More information about the jboss-cvs-commits mailing list