You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2011/01/11 23:58:49 UTC

[jira] Created: (ARIES-536) Have a way to specify a blueprint bundle should be started synchronously if possible

Have a way to specify a blueprint bundle should be started synchronously if possible
------------------------------------------------------------------------------------

                 Key: ARIES-536
                 URL: https://issues.apache.org/jira/browse/ARIES-536
             Project: Aries
          Issue Type: New Feature
          Components: Blueprint
            Reporter: Guillaume Nodet


The use case is for ordering startup using start-level.  If you have a bundle that has an optional dependency on a service provided by blueprint, you have no way to raise the chances that the service will be used from the start as blueprint bundles are started asynchronously.
I'd like to have a way to specifiy that the blueprint bundle should be started asynchronously, at least until a GRACE_PERIOD event would be fired, in which case, the remaning things would be done asynchronously.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] [Updated] (ARIES-536) Have a way to specify a blueprint bundle should be started in sync with the start level service as much as possible

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ARIES-536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated ARIES-536:
----------------------------------

    Fix Version/s: blueprint-core-0.3.2
    
> Have a way to specify a blueprint bundle should be started in sync with the start level service as much as possible
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: ARIES-536
>                 URL: https://issues.apache.org/jira/browse/ARIES-536
>             Project: Aries
>          Issue Type: New Feature
>          Components: Blueprint
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: blueprint uber bundle 0.4, blueprint.core-0.4, blueprint-core-0.3.2
>
>
> The use case is for ordering startup using start-level.  If you have a bundle that has an optional dependency on a service provided by blueprint, you have no way to raise the chances that the service will be used from the start as blueprint bundles are started asynchronously.
> I'd like to have a way to specifiy that the blueprint bundle should be started asynchronously, at least until a GRACE_PERIOD event would be fired, in which case, the remaning things would be done asynchronously.
> This definitely should not be used as a way to work around bad bundle behaviors that aren't resiliant with missing dependencies, but really to ensure that when the server boots up, services are started in an optimal order (log and  configadmin should be started before the other ones if possible).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (ARIES-536) Have a way to specify a blueprint bundle should be started in sync with the start level service as much as possible

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ARIES-536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet resolved ARIES-536.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: blueprint-0.4.0

> Have a way to specify a blueprint bundle should be started in sync with the start level service as much as possible
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: ARIES-536
>                 URL: https://issues.apache.org/jira/browse/ARIES-536
>             Project: Aries
>          Issue Type: New Feature
>          Components: Blueprint
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: blueprint-0.4.0
>
>
> The use case is for ordering startup using start-level.  If you have a bundle that has an optional dependency on a service provided by blueprint, you have no way to raise the chances that the service will be used from the start as blueprint bundles are started asynchronously.
> I'd like to have a way to specifiy that the blueprint bundle should be started asynchronously, at least until a GRACE_PERIOD event would be fired, in which case, the remaning things would be done asynchronously.
> This definitely should not be used as a way to work around bad bundle behaviors that aren't resiliant with missing dependencies, but really to ensure that when the server boots up, services are started in an optimal order (log and  configadmin should be started before the other ones if possible).

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (ARIES-536) Have a way to specify a blueprint bundle should be started in sync with the start level service as much as possible

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ARIES-536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet reassigned ARIES-536:
-------------------------------------

    Assignee: Guillaume Nodet

> Have a way to specify a blueprint bundle should be started in sync with the start level service as much as possible
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: ARIES-536
>                 URL: https://issues.apache.org/jira/browse/ARIES-536
>             Project: Aries
>          Issue Type: New Feature
>          Components: Blueprint
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: blueprint-0.4.0
>
>
> The use case is for ordering startup using start-level.  If you have a bundle that has an optional dependency on a service provided by blueprint, you have no way to raise the chances that the service will be used from the start as blueprint bundles are started asynchronously.
> I'd like to have a way to specifiy that the blueprint bundle should be started asynchronously, at least until a GRACE_PERIOD event would be fired, in which case, the remaning things would be done asynchronously.
> This definitely should not be used as a way to work around bad bundle behaviors that aren't resiliant with missing dependencies, but really to ensure that when the server boots up, services are started in an optimal order (log and  configadmin should be started before the other ones if possible).

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (ARIES-536) Have a way to specify a blueprint bundle should be started in sync with the start level service as much as possible

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12983666#action_12983666 ] 

Guillaume Nodet commented on ARIES-536:
---------------------------------------

I'm experimenting with the following patch:

{code}
diff --git a/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java b/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/con
index 74ea5ed..d83c3d1 100644
--- a/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
+++ b/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BlueprintExtender.java
@@ -31,7 +31,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.atomic.AtomicReference;
 
 import org.apache.aries.blueprint.BlueprintConstants;
 import org.apache.aries.blueprint.ParserService;
@@ -54,8 +53,6 @@ import org.osgi.framework.SynchronousBundleListener;
 import org.osgi.service.blueprint.container.BlueprintContainer;
 import org.osgi.service.blueprint.container.BlueprintEvent;
 import org.osgi.util.tracker.BundleTrackerCustomizer;
-import org.osgi.util.tracker.ServiceTracker;
-import org.osgi.util.tracker.ServiceTrackerCustomizer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -313,7 +310,14 @@ public class BlueprintExtender implements BundleActivator, SynchronousBundleList
                 if (compatible) {
                     final BlueprintContainerImpl blueprintContainer = new BlueprintContainerImpl(bundle.getBundleContext(), context.getBundle(), eventDispatcher, handlers, executors,
                     containers.put(bundle, blueprintContainer);
-                    blueprintContainer.schedule();
+                    String val = context.getProperty("org.apache.aries.blueprint.synchronous");
+                    if (Boolean.parseBoolean(val)) {
+                        LOGGER.debug("Starting creation of blueprint bundle {} synchronously", bundle.getSymbolicName());
+                        blueprintContainer.run();
+                    } else {
+                        LOGGER.debug("Scheduling creation of blueprint bundle {} asynchronously", bundle.getSymbolicName());
+                        blueprintContainer.schedule();
+                    }
                 } else {
                     LOGGER.info("Bundle {} is not compatible with this blueprint extender", bundle.getSymbolicName());
                 }
{code}

It will simply start the initlal processing of the blueprint bundle synchronously up to the end or any missing dependency.



> Have a way to specify a blueprint bundle should be started in sync with the start level service as much as possible
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: ARIES-536
>                 URL: https://issues.apache.org/jira/browse/ARIES-536
>             Project: Aries
>          Issue Type: New Feature
>          Components: Blueprint
>            Reporter: Guillaume Nodet
>
> The use case is for ordering startup using start-level.  If you have a bundle that has an optional dependency on a service provided by blueprint, you have no way to raise the chances that the service will be used from the start as blueprint bundles are started asynchronously.
> I'd like to have a way to specifiy that the blueprint bundle should be started asynchronously, at least until a GRACE_PERIOD event would be fired, in which case, the remaning things would be done asynchronously.
> This definitely should not be used as a way to work around bad bundle behaviors that aren't resiliant with missing dependencies, but really to ensure that when the server boots up, services are started in an optimal order (log and  configadmin should be started before the other ones if possible).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] [Updated] (ARIES-536) Have a way to specify a blueprint bundle should be started in sync with the start level service as much as possible

Posted by "Jeremy Hughes (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ARIES-536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeremy Hughes updated ARIES-536:
--------------------------------

    Fix Version/s:     (was: blueprint-0.4.0)
                   blueprint.core-0.4
    
> Have a way to specify a blueprint bundle should be started in sync with the start level service as much as possible
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: ARIES-536
>                 URL: https://issues.apache.org/jira/browse/ARIES-536
>             Project: Aries
>          Issue Type: New Feature
>          Components: Blueprint
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: blueprint.core-0.4
>
>
> The use case is for ordering startup using start-level.  If you have a bundle that has an optional dependency on a service provided by blueprint, you have no way to raise the chances that the service will be used from the start as blueprint bundles are started asynchronously.
> I'd like to have a way to specifiy that the blueprint bundle should be started asynchronously, at least until a GRACE_PERIOD event would be fired, in which case, the remaning things would be done asynchronously.
> This definitely should not be used as a way to work around bad bundle behaviors that aren't resiliant with missing dependencies, but really to ensure that when the server boots up, services are started in an optimal order (log and  configadmin should be started before the other ones if possible).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (ARIES-536) Have a way to specify a blueprint bundle should be started in sync with the start level service as much as possible

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ARIES-536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated ARIES-536:
----------------------------------

    Description: 
The use case is for ordering startup using start-level.  If you have a bundle that has an optional dependency on a service provided by blueprint, you have no way to raise the chances that the service will be used from the start as blueprint bundles are started asynchronously.
I'd like to have a way to specifiy that the blueprint bundle should be started asynchronously, at least until a GRACE_PERIOD event would be fired, in which case, the remaning things would be done asynchronously.

This definitely should not be used as a way to work around bad bundle behaviors that aren't resiliant with missing dependencies, but really to ensure that when the server boots up, services are started in an optimal order (log and  configadmin should be started before the other ones if possible).

  was:
The use case is for ordering startup using start-level.  If you have a bundle that has an optional dependency on a service provided by blueprint, you have no way to raise the chances that the service will be used from the start as blueprint bundles are started asynchronously.
I'd like to have a way to specifiy that the blueprint bundle should be started asynchronously, at least until a GRACE_PERIOD event would be fired, in which case, the remaning things would be done asynchronously.

        Summary: Have a way to specify a blueprint bundle should be started in sync with the start level service as much as possible  (was: Have a way to specify a blueprint bundle should be started synchronously if possible)

> Have a way to specify a blueprint bundle should be started in sync with the start level service as much as possible
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: ARIES-536
>                 URL: https://issues.apache.org/jira/browse/ARIES-536
>             Project: Aries
>          Issue Type: New Feature
>          Components: Blueprint
>            Reporter: Guillaume Nodet
>
> The use case is for ordering startup using start-level.  If you have a bundle that has an optional dependency on a service provided by blueprint, you have no way to raise the chances that the service will be used from the start as blueprint bundles are started asynchronously.
> I'd like to have a way to specifiy that the blueprint bundle should be started asynchronously, at least until a GRACE_PERIOD event would be fired, in which case, the remaning things would be done asynchronously.
> This definitely should not be used as a way to work around bad bundle behaviors that aren't resiliant with missing dependencies, but really to ensure that when the server boots up, services are started in an optimal order (log and  configadmin should be started before the other ones if possible).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] [Updated] (ARIES-536) Have a way to specify a blueprint bundle should be started in sync with the start level service as much as possible

Posted by "Jeremy Hughes (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ARIES-536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeremy Hughes updated ARIES-536:
--------------------------------

    Fix Version/s: blueprint uber bundle 0.4
    
> Have a way to specify a blueprint bundle should be started in sync with the start level service as much as possible
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: ARIES-536
>                 URL: https://issues.apache.org/jira/browse/ARIES-536
>             Project: Aries
>          Issue Type: New Feature
>          Components: Blueprint
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: blueprint uber bundle 0.4, blueprint.core-0.4
>
>
> The use case is for ordering startup using start-level.  If you have a bundle that has an optional dependency on a service provided by blueprint, you have no way to raise the chances that the service will be used from the start as blueprint bundles are started asynchronously.
> I'd like to have a way to specifiy that the blueprint bundle should be started asynchronously, at least until a GRACE_PERIOD event would be fired, in which case, the remaning things would be done asynchronously.
> This definitely should not be used as a way to work around bad bundle behaviors that aren't resiliant with missing dependencies, but really to ensure that when the server boots up, services are started in an optimal order (log and  configadmin should be started before the other ones if possible).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira