Details

    • Type: Sub-task Sub-task
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: future release
    • Fix Version/s: None
    • Component/s: OSGi-JavaEE
    • Labels:
      None

      Description

      Needing to move the logics of publishing beans into OSGiServiceExtension class in order to make @Publish to work in hybrid javaee bundle.

        Activity

        Hide
        TangYong added a comment -

        Currently, this moving has been finished, and triggering publish services has been put into AfterDeploymentValidation Observer method as following:

        void afterDeploymentValidation(@Observes AfterDeploymentValidation adv)

        { //Publish @Publish Classes into OSGi Registry Instance<Object> instance = this.manager.instance(); publishOSGiService(instance); }

        And, beforeBeanDiscovery method adds the second parameter as following,

        void beforeBeanDiscovery(@Observes BeforeBeanDiscovery bdd, BeanManager manager){
        debug("beforeBeanDiscovery" + bdd);
        bdd.addQualifier(OSGiService.class); //XXX:needed?

        if (manager instanceof WeldManager)

        { this.manager = (WeldManager)manager; }

        }

        In the future, once CDI Specification adds a portable method called "Instance<Object> instance()", the strong type cast(WeldManager) will be deleted and make a improvement. Now, the above is enough.

        Show
        TangYong added a comment - Currently, this moving has been finished, and triggering publish services has been put into AfterDeploymentValidation Observer method as following: void afterDeploymentValidation(@Observes AfterDeploymentValidation adv) { //Publish @Publish Classes into OSGi Registry Instance<Object> instance = this.manager.instance(); publishOSGiService(instance); } And, beforeBeanDiscovery method adds the second parameter as following, void beforeBeanDiscovery(@Observes BeforeBeanDiscovery bdd, BeanManager manager){ debug("beforeBeanDiscovery" + bdd); bdd.addQualifier(OSGiService.class); //XXX:needed? if (manager instanceof WeldManager) { this.manager = (WeldManager)manager; } } In the future, once CDI Specification adds a portable method called "Instance<Object> instance()", the strong type cast(WeldManager) will be deleted and make a improvement. Now, the above is enough.

          People

          • Assignee:
            Sanjeeb Sahoo
            Reporter:
            TangYong
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: