Announcement Announcement Module

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
Validation error while register OSGI service if SecurityManager is set Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Validation error while register OSGI service if SecurityManager is set

    Method of Inner class should use "AbstractOsgiBundleApplicationContext.this" instead of "this".

    The method is listed below:

    void sgiBundleApplicationContext.publishContextAsOsgiSe rviceIfNecessary()

    // Publish under all the significant interfaces we see
    boolean hasSecurity = (System.getSecurityManager() != null);

    if (hasSecurity) {
    try {
    serviceRegistration = AccessController.doPrivileged(new PrivilegedAction<ServiceRegistration>() {
    public ServiceRegistration run() {
    return getBundleContext().registerService(serviceNames, this, serviceProperties);
    }, acc);
    } catch (AccessControlException ex) {
    logger.error("Application context service publication aborted due to security issues "
    + "- does the bundle has the rights to publish the service ? ", ex);
    } else {
    serviceRegistration = getBundleContext().registerService(serviceNames, this, serviceProperties);