Package org.osgi.framework

Examples of org.osgi.framework.BundleContext.ungetService()


                }               
            } catch (Exception e) {
                addErrorMessage(renderRequest, getLocalizedString(renderRequest, "consolebase.obrmanager.err.actionError"), e.getMessage());
                logger.error("Exception", e);
            } finally {
                bundleContext.ungetService(reference);
            }

            obrManagerView.include(renderRequest, renderResponse);
        }
View Full Code Here


            request.setAttribute("resolverId", resolverId);
            resolverMap.put(resolverId, resolver);
            resolveView.include(request, response);
        } finally {
            if (reference != null) {
                bundleContext.ungetService(reference);
            }
        }
    }       

    private void deployResources(RenderRequest request, RenderResponse response) throws Exception {
View Full Code Here

        GeronimoApplicationContextManager applicationManager =
            getService(applicationManagerReference, GeronimoApplicationContextManager.class);
        try {
            applicationManager.registerApplicationContext(new GeronimoApplicationContext(this));
        } finally {
            bundleContext.ungetService(applicationManagerReference);
        }
       
        setApplicationState(ApplicationState.INSTALLED);
    }
View Full Code Here

            applicationBundles.clear();

            throw be;
        } finally {
            if (resolver != null) {
                bundleContext.ungetService(resolverRef);
            }
            if (packageAdmin != null) {
                bundleContext.ungetService(packageAdminRef);
            }
        }
View Full Code Here

        } finally {
            if (resolver != null) {
                bundleContext.ungetService(resolverRef);
            }
            if (packageAdmin != null) {
                bundleContext.ungetService(packageAdminRef);
            }
        }
    }
   
    @SuppressWarnings("deprecation")
View Full Code Here

                   tldScanStream(url, new TldLocation(entry.getName(), new UnpackedJarResource(entry.getFileUrl())));
                } else {
                    tldScanStream(url, new TldLocation(entry.getName(), new BundleJarResource(entry.getBundle())));
                }
            }
            bundleContext.ungetService(reference);           
        }
    }
   
    private void tldScanStream(URL url, TldLocation location) throws IOException {
        InputStream in = url.openStream();
View Full Code Here

            TldRegistry tldRegistry = (TldRegistry) bundleContext.getService(reference);
            for (TldProvider.TldEntry entry : tldRegistry.getDependentTlds(bundle)) {
                URL url = entry.getURL();
                tldLocationBundleMap.put(url.toString(), entry.getBundle());
            }
            bundleContext.ungetService(reference);
        }
        return tldLocationBundleMap;
    }

    private LinkedHashSet<Class<?>> getListenerClasses(WebApp webApp, WebModule webModule, Map<String, Bundle> tldLocationBundleMap, Set<String> listenerNames) throws DeploymentException {
View Full Code Here

                    return;
                }
                pa.refreshPackages(new Bundle[]{sr[0].getBundle()});
            }
            finally {
                bundleContext.ungetService(ref);
            }
        } catch (InvalidSyntaxException ex) {
            LOGGER.error("Problem refresh the affected shell command bundle", ex);
        }
       
View Full Code Here

                        throw new ConfigurationException( OsgiManager.PROP_PASSWORD, "Cannot update password property",
                            e );
                    }
                    finally
                    {
                        bc.ungetService( ref );
                    }
                }
            }
        }
    }
View Full Code Here

            ServiceRegistration synConfigServiceRegistration =
                    synapseRegistrationsService.getSynapseConfigurationServiceRegistration();

            if (synConfigServiceRegistration != null) {
                bundleContext.ungetService(synConfigServiceRegistration.getReference());
            }

            ServiceRegistration synEnvServiceRegistration =
                    synapseRegistrationsService.getSynapseEnvironmentServiceRegistration();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.