#include <thread>
#include <mutex>
-
#include "ResourceContainerImpl.h"
#include "BundleActivator.h"
#include "RCSResourceContainer.h"
#include "oc_logger.hpp"
#include "SoftSensorResource.h"
-
using OC::oc_log_stream;
using namespace OIC::Service;
bool has_suffix(const std::string &str, const std::string &suffix)
{
return str.size() >= suffix.size()
- && str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0;
+ && str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0;
}
void ResourceContainerImpl::startContainer(const std::string &configFile)
std::replace(activatorName.begin(), activatorName.end(), '.', '/');
((BundleInfoInternal *) bundleInfo)->setActivatorName(activatorName);
((BundleInfoInternal *) bundleInfo)->setLibraryPath(
- bundles[i]["libraryPath"]);
+ bundles[i]["libraryPath"]);
}
- info_logger() << "Init Bundle:" << bundles[i]["id"] << ";" << bundles[i]["path"]
- << endl;
+ info_logger() << "Init Bundle:" << bundles[i]["id"] << ";"
+ << bundles[i]["path"] << endl;
registerBundle(bundleInfo);
- auto f = std::bind(&ResourceContainerImpl::activateBundleThread, this, bundleInfo);
+ auto f = std::bind(&ResourceContainerImpl::activateBundleThread, this,
+ bundleInfo);
boost::thread activator(f);
m_activators.push_back(std::move(activator));
{
info_logger() << "No configuration file for the container provided" << endl;
}
- vector<boost::thread>::iterator activatorIterator;
+ vector< boost::thread >::iterator activatorIterator;
- for(activatorIterator = m_activators.begin(); activatorIterator != m_activators.end(); activatorIterator++){
- activatorIterator->timed_join(boost::posix_time::seconds(BUNDLE_ACTIVATION_WAIT_SEC)); // wait for bundles to be activated
+ for (activatorIterator = m_activators.begin(); activatorIterator != m_activators.end();
+ activatorIterator++)
+ {
+ activatorIterator->timed_join(
+ boost::posix_time::seconds(BUNDLE_ACTIVATION_WAIT_SEC)); // wait for bundles to be activated
}
}
{
info_logger() << "Stopping resource container.";
for (std::map< std::string, BundleInfoInternal * >::iterator it = m_bundles.begin();
- it != m_bundles.end(); ++it)
+ it != m_bundles.end(); ++it)
{
BundleInfoInternal *bundleInfo = it->second;
deactivateBundle(bundleInfo);
{
void *bundleHandle = m_bundles[id]->getBundleHandle();
info_logger() << "Unregister bundle: " << m_bundles[id]->getID() << ", "
- << m_bundles[id]->getID() << endl;
+ << m_bundles[id]->getID() << endl;
const char *error;
dlclose(bundleHandle);
if ((error = dlerror()) != NULL)
string strResourceType = resource->m_resourceType;
RCSResourceObject::Ptr server = nullptr;
- info_logger() << "Registration of resource " << strUri << "," << strResourceType << endl;
+ info_logger() << "Registration of resource " << strUri << "," << strResourceType
+ << endl;
registrationLock.lock();
if (m_mapResources.find(strUri) == m_mapResources.end())
resource->registerObserver(this);
server->setGetRequestHandler(
- std::bind(&ResourceContainerImpl::getRequestHandler, this,
- std::placeholders::_1, std::placeholders::_2));
+ std::bind(&ResourceContainerImpl::getRequestHandler, this,
+ std::placeholders::_1, std::placeholders::_2));
server->setSetRequestHandler(
- std::bind(&ResourceContainerImpl::setRequestHandler, this,
- std::placeholders::_1, std::placeholders::_2));
+ std::bind(&ResourceContainerImpl::setRequestHandler, this,
+ std::placeholders::_1, std::placeholders::_2));
info_logger() << "Registration finished " << strUri << "," << strResourceType
- << endl;
+ << endl;
if (m_config->isHasInput(resource->m_bundleId))
{
string strUri = resource->m_uri;
string strResourceType = resource->m_resourceType;
- info_logger() << "Unregistration of resource " << resource->m_uri << "," << resource->m_resourceType
- << endl;
+ info_logger() << "Unregistration of resource " << resource->m_uri << ","
+ << resource->m_resourceType << endl;
if (m_config->isHasInput(resource->m_bundleId))
{
RCSGetResponse ResourceContainerImpl::getRequestHandler(const RCSRequest &request,
const RCSResourceAttributes &attributes)
{
- (void)attributes;
+ (void) attributes;
RCSResourceAttributes attr;
if (m_mapServers.find(request.getResourceUri()) != m_mapServers.end()
- && m_mapResources.find(request.getResourceUri()) != m_mapResources.end())
+ && m_mapResources.find(request.getResourceUri()) != m_mapResources.end())
{
- for (string attrName : m_mapResources[request.getResourceUri()]->getAttributeNames())
+ auto getFunction = [this, &attr, &request] ()
{
- attr[attrName] = m_mapResources[request.getResourceUri()]->getAttribute(
- attrName);
- }
+ for (string attrName : m_mapResources[request.getResourceUri()]->getAttributeNames())
+ {
+ attr[attrName] = m_mapResources[request.getResourceUri()]->getAttribute(attrName);
+ }
+ };
+ boost::thread getThread(getFunction);
+ getThread.timed_join(boost::posix_time::seconds(BUNDLE_SET_GET_WAIT_SEC));
}
return RCSGetResponse::create(attr);
RCSResourceAttributes attr = attributes;
if (m_mapServers.find(request.getResourceUri()) != m_mapServers.end()
- && m_mapResources.find(request.getResourceUri()) != m_mapResources.end())
+ && m_mapResources.find(request.getResourceUri()) != m_mapResources.end())
{
- for (string attrName : m_mapResources[request.getResourceUri()]->getAttributeNames())
+ auto setFunction = [this, &attr, &request] ()
{
- if (!attr[attrName].toString().empty())
+ for (string attrName : m_mapResources[request.getResourceUri()]->getAttributeNames())
{
- m_mapResources[request.getResourceUri()]->setAttribute(attrName,
- attr[attrName].toString());
+ if (!attr[attrName].toString().empty())
+ {
+ m_mapResources[request.getResourceUri()]->setAttribute(attrName,
+ attr[attrName].toString());
+ }
}
- }
+ };
+ boost::thread setThread(setFunction);
+ setThread.timed_join(boost::posix_time::seconds(BUNDLE_SET_GET_WAIT_SEC));
}
return RCSSetResponse::create(attr);
void ResourceContainerImpl::onNotificationReceived(const std::string &strResourceUri)
{
info_logger() << "ResourceContainerImpl::onNotificationReceived\n\tnotification from "
- << strResourceUri << ".\n";
+ << strResourceUri << ".\n";
if (m_mapServers.find(strResourceUri) != m_mapServers.end())
{
const std::string &strResourceType)
{
return RCSResourceObject::Builder(strUri, strResourceType, "DEFAULT_INTERFACE").setObservable(
- true).setDiscoverable(true).build();
+ true).setDiscoverable(true).build();
}
void ResourceContainerImpl::startBundle(const std::string &bundleId)
}
else
{
- error_logger() << "Bundle with ID \'" << bundleId << "\' is not registered." << endl;
+ error_logger() << "Bundle with ID \'" << bundleId << "\' is not registered."
+ << endl;
}
}
}
else
{
- error_logger() << "Bundle with ID \'" << bundleId << "\' is not registered." << endl;
+ error_logger() << "Bundle with ID \'" << bundleId << "\' is not registered."
+ << endl;
}
}
- void ResourceContainerImpl::addBundle(const std::string &bundleId, const std::string &bundleUri,
- const std::string &bundlePath,
- std::map< string, string > params)
+ void ResourceContainerImpl::addBundle(const std::string &bundleId,
+ const std::string &bundleUri, const std::string &bundlePath,
+ std::map< string, string > params)
{
- (void)bundleUri;
+ (void) bundleUri;
if (m_bundles.find(bundleId) != m_bundles.end())
error_logger() << "BundleId already exist" << endl;
}
info_logger() << "Add Bundle:" << bundleInfo->getID().c_str() << ";"
- << bundleInfo->getPath().c_str() << endl;
+ << bundleInfo->getPath().c_str() << endl;
registerBundle(bundleInfo);
}
else
{
error_logger() << "Bundle with ID \'" << bundleId << "\' is not registered."
- << endl;
+ << endl;
}
}
{
std::list< RCSBundleInfo * > ret;
for (std::map< std::string, BundleInfoInternal * >::iterator it = m_bundles.begin();
- it != m_bundles.end(); ++it)
+ it != m_bundles.end(); ++it)
{
{
RCSBundleInfo *bundleInfo = RCSBundleInfo::build();
- ((BundleInfoInternal *) bundleInfo)->setBundleInfo((RCSBundleInfo *) it->second);
+ ((BundleInfoInternal *) bundleInfo)->setBundleInfo(
+ (RCSBundleInfo *) it->second);
ret.push_back(bundleInfo);
}
}
}
void ResourceContainerImpl::addResourceConfig(const std::string &bundleId,
- const std::string &resourceUri,
- std::map< string, string > params)
+ const std::string &resourceUri, std::map< string, string > params)
{
if (m_bundles.find(bundleId) != m_bundles.end())
{
else
{
error_logger() << "Bundle with ID \'" << bundleId << "\' is not registered."
- << endl;
+ << endl;
}
}
else
{
error_logger() << "Bundle with ID \'" << bundleId << "\' is not registered."
- << endl;
+ << endl;
}
}
std::list< string > ResourceContainerImpl::listBundleResources(const std::string &bundleId)
{
- std::list< string > ret;
+ std::list < string > ret;
if (m_mapBundleResources.find(bundleId) != m_mapBundleResources.end())
{
{
bundleActivator = (activator_t *) dlsym(bundleHandle, "externalActivateBundle");
bundleDeactivator = (deactivator_t *) dlsym(bundleHandle,
- "externalDeactivateBundle");
+ "externalDeactivateBundle");
resourceCreator = (resourceCreator_t *) dlsym(bundleHandle,
- "externalCreateResource");
+ "externalCreateResource");
resourceDestroyer = (resourceDestroyer_t *) dlsym(bundleHandle,
- "externalDestroyResource");
+ "externalDestroyResource");
if ((error = dlerror()) != NULL)
{
void ResourceContainerImpl::undiscoverInputResource(const std::string &outputResourceUri)
{
- auto foundDiscoverResource
- = m_mapDiscoverResourceUnits.find(outputResourceUri);
+ auto foundDiscoverResource = m_mapDiscoverResourceUnits.find(outputResourceUri);
if (foundDiscoverResource != m_mapDiscoverResourceUnits.end())
{
m_mapDiscoverResourceUnits.erase(foundDiscoverResource);
std::string type = makeValue(INPUT_RESOURCE_TYPE);
std::string attributeName = makeValue(INPUT_RESOURCE_ATTRIBUTENAME);
- DiscoverResourceUnit::Ptr newDiscoverUnit
- = std::make_shared<DiscoverResourceUnit>(outputResourceUri);
+ DiscoverResourceUnit::Ptr newDiscoverUnit = std::make_shared
+ < DiscoverResourceUnit > (outputResourceUri);
newDiscoverUnit->startDiscover(
- DiscoverResourceUnit::DiscoverResourceInfo(uri, type, attributeName),
- std::bind(&SoftSensorResource::onUpdatedInputResource,
- (SoftSensorResource*)foundOutputResource->second,
- std::placeholders::_1, std::placeholders::_2));
-
- auto foundDiscoverResource
- = m_mapDiscoverResourceUnits.find(outputResourceUri);
+ DiscoverResourceUnit::DiscoverResourceInfo(uri, type,
+ attributeName),
+ std::bind(&SoftSensorResource::onUpdatedInputResource,
+ (SoftSensorResource*) foundOutputResource->second,
+ std::placeholders::_1, std::placeholders::_2));
+
+ auto foundDiscoverResource = m_mapDiscoverResourceUnits.find(
+ outputResourceUri);
if (foundDiscoverResource != m_mapDiscoverResourceUnits.end())
{
foundDiscoverResource->second.push_back(newDiscoverUnit);
{
m_mapDiscoverResourceUnits.insert(
std::make_pair(outputResourceUri,
- std::list<DiscoverResourceUnit::Ptr>{newDiscoverUnit}));
+ std::list< DiscoverResourceUnit::Ptr >
+ { newDiscoverUnit }));
}
}
}
if (m_mapResources.find(resourceUri) != m_mapResources.end())
{
resourceDestroyer_t *resourceDestroyer =
- m_bundles[bundleId]->getResourceDestroyer();
+ m_bundles[bundleId]->getResourceDestroyer();
if (resourceDestroyer != NULL)
{
}
}
- void ResourceContainerImpl::activateBundleThread(RCSBundleInfo* rcsBundleInfo){
+ void ResourceContainerImpl::activateBundleThread(RCSBundleInfo* rcsBundleInfo)
+ {
activateBundle(rcsBundleInfo);
}
#if(JAVA_SUPPORT)
- JavaVM *ResourceContainerImpl::getJavaVM(string bundleId)
+ JavaVM *ResourceContainerImpl::getJavaVM(string bundleId)
+ {
+ return m_bundleVM[bundleId];
+ }
+
+ void ResourceContainerImpl::registerJavaBundle(RCSBundleInfo *bundleInfo)
+ {
+ info_logger() << "Registering Java bundle " << bundleInfo->getID() << endl;
+ JavaVM *jvm;
+ JNIEnv *env;
+ JavaVMInitArgs vm_args;
+ JavaVMOption options[3];
+
+ BundleInfoInternal *bundleInfoInternal = (BundleInfoInternal *) bundleInfo;
+
+ if (FILE *file = fopen(bundleInfo->getPath().c_str(), "r"))
{
- return m_bundleVM[bundleId];
+ fclose(file);
+ info_logger() << "Resource bundle " << bundleInfo->getPath().c_str() << " available." << endl;
+ //return true;
}
-
- void ResourceContainerImpl::registerJavaBundle(RCSBundleInfo *bundleInfo)
+ else
{
- info_logger() << "Registering Java bundle " << bundleInfo->getID() << endl;
- JavaVM *jvm;
- JNIEnv *env;
- JavaVMInitArgs vm_args;
- JavaVMOption options[3];
-
- BundleInfoInternal *bundleInfoInternal = (BundleInfoInternal *) bundleInfo;
+ error_logger() << "Resource bundle " << bundleInfo->getPath().c_str() << " not available" << endl;
+ return;
+ }
- if (FILE *file = fopen(bundleInfo->getPath().c_str(), "r"))
- {
- fclose(file);
- info_logger() << "Resource bundle " << bundleInfo->getPath().c_str() << " available." << endl;
- //return true;
- }
- else
- {
- error_logger() << "Resource bundle " << bundleInfo->getPath().c_str() << " not available" << endl;
- return;
- }
+ char optionString[] = "-Djava.compiler=NONE";
+ options[0].optionString = optionString;
+ char classpath[1000];
+ strcpy(classpath, "-Djava.class.path=");
+ strcat(classpath, bundleInfo->getPath().c_str());
- char optionString[] = "-Djava.compiler=NONE";
- options[0].optionString = optionString;
- char classpath[1000];
- strcpy(classpath, "-Djava.class.path=");
- strcat(classpath, bundleInfo->getPath().c_str());
+ info_logger() << "Configured classpath: " << classpath << "|" << endl;
- info_logger() << "Configured classpath: " << classpath << "|" << endl;
+ options[1].optionString = classpath;
- options[1].optionString = classpath;
+ char libraryPath[1000];
+ strcpy(libraryPath, "-Djava.library.path=");
+ strcat(libraryPath, bundleInfo->getLibraryPath().c_str());
+ options[2].optionString = libraryPath;
- char libraryPath[1000];
- strcpy(libraryPath, "-Djava.library.path=");
- strcat(libraryPath, bundleInfo->getLibraryPath().c_str());
- options[2].optionString = libraryPath;
+ info_logger() << "Configured library path: " << libraryPath << "|" << endl;
- info_logger() << "Configured library path: " << libraryPath << "|" << endl;
+ vm_args.version = JNI_VERSION_1_4;
+ vm_args.options = options;
+ vm_args.nOptions = 3;
+ vm_args.ignoreUnrecognized = 1;
- vm_args.version = JNI_VERSION_1_4;
- vm_args.options = options;
- vm_args.nOptions = 3;
- vm_args.ignoreUnrecognized = 1;
+ int res;
+ res = JNI_CreateJavaVM(&jvm, (void **) &env, &vm_args);
- int res;
- res = JNI_CreateJavaVM(&jvm, (void **) &env, &vm_args);
+ if (res < 0)
+ {
+ error_logger() << " cannot create JavaVM." << endl;
+ return;
+ }
+ else
+ {
+ info_logger() << "JVM successfully created " << endl;
+ }
- if (res < 0)
- {
- error_logger() << " cannot create JavaVM." << endl;
- return;
- }
- else
- {
- info_logger() << "JVM successfully created " << endl;
- }
+ m_bundleVM.insert(std::pair< string, JavaVM * >(bundleInfo->getID(), jvm));
- m_bundleVM.insert(std::pair< string, JavaVM * >(bundleInfo->getID(), jvm));
+ const char *className = bundleInfoInternal->getActivatorName().c_str();
- const char *className = bundleInfoInternal->getActivatorName().c_str();
+ info_logger() << "Looking up class: " << bundleInfoInternal->getActivatorName() << "|" << endl;
- info_logger() << "Looking up class: " << bundleInfoInternal->getActivatorName() << "|" << endl;
+ jclass bundleActivatorClass = env->FindClass(className);
- jclass bundleActivatorClass = env->FindClass(className);
+ if (bundleActivatorClass == NULL)
+ {
+ error_logger() << "Cannot register bundle " << bundleInfoInternal->getID()
+ << " bundle activator(" << bundleInfoInternal->getActivatorName()
+ << ") not found " << endl;
+ return;
+ }
- if (bundleActivatorClass == NULL)
- {
- error_logger() << "Cannot register bundle " << bundleInfoInternal->getID()
- << " bundle activator(" << bundleInfoInternal->getActivatorName()
- << ") not found " << endl;
- return;
- }
+ jmethodID activateMethod = env->GetMethodID(bundleActivatorClass, "activateBundle",
+ "()V");
- jmethodID activateMethod = env->GetMethodID(bundleActivatorClass, "activateBundle",
- "()V");
+ if (activateMethod == NULL)
+ {
+ error_logger() << "Cannot register bundle " << bundleInfoInternal->getID()
+ << " activate bundle method not found " << endl;
+ return;
+ }
+ bundleInfoInternal->setJavaBundleActivatorMethod(activateMethod);
- if (activateMethod == NULL)
- {
- error_logger() << "Cannot register bundle " << bundleInfoInternal->getID()
- << " activate bundle method not found " << endl;
- return;
- }
- bundleInfoInternal->setJavaBundleActivatorMethod(activateMethod);
+ jmethodID deactivateMethod = env->GetMethodID(bundleActivatorClass, "deactivateBundle",
+ "()V");
- jmethodID deactivateMethod = env->GetMethodID(bundleActivatorClass, "deactivateBundle",
- "()V");
+ if (deactivateMethod == NULL)
+ {
+ error_logger() << "Cannot register bundle " << bundleInfoInternal->getID()
+ << " deactivate bundle method not found " << endl;
+ return;
+ }
- if (deactivateMethod == NULL)
- {
- error_logger() << "Cannot register bundle " << bundleInfoInternal->getID()
- << " deactivate bundle method not found " << endl;
- return;
- }
+ bundleInfoInternal->setJavaBundleDeactivatorMethod(deactivateMethod);
- bundleInfoInternal->setJavaBundleDeactivatorMethod(deactivateMethod);
+ jmethodID constructor;
- jmethodID constructor;
+ constructor = env->GetMethodID(bundleActivatorClass, "<init>", "(Ljava/lang/String;)V");
- constructor = env->GetMethodID(bundleActivatorClass, "<init>", "(Ljava/lang/String;)V");
+ jstring bundleID = env->NewStringUTF(bundleInfoInternal->getID().c_str());
- jstring bundleID = env->NewStringUTF(bundleInfoInternal->getID().c_str());
+ jobject bundleActivator = env->NewObject(bundleActivatorClass, constructor, bundleID);
- jobject bundleActivator = env->NewObject(bundleActivatorClass, constructor, bundleID);
+ bundleInfoInternal->setJavaBundleActivatorObject(bundleActivator);
- bundleInfoInternal->setJavaBundleActivatorObject(bundleActivator);
+ bundleInfoInternal->setLoaded(true);
- bundleInfoInternal->setLoaded(true);
+ m_bundles[bundleInfo->getID()] = ((BundleInfoInternal *)bundleInfo);
- m_bundles[bundleInfo->getID()] = ((BundleInfoInternal *)bundleInfo);
+ info_logger() << "Bundle registered" << endl;
+ }
- info_logger() << "Bundle registered" << endl;
- }
+ void ResourceContainerImpl::activateJavaBundle(string bundleId)
+ {
+ info_logger() << "Activating java bundle" << endl;
+ JavaVM *vm = getJavaVM(bundleId);
+ BundleInfoInternal *bundleInfoInternal = (BundleInfoInternal *) m_bundles[bundleId];
+ JNIEnv *env;
+ int envStat = vm->GetEnv((void **) &env, JNI_VERSION_1_4);
- void ResourceContainerImpl::activateJavaBundle(string bundleId)
+ if (envStat == JNI_EDETACHED)
{
- info_logger() << "Activating java bundle" << endl;
- JavaVM *vm = getJavaVM(bundleId);
- BundleInfoInternal *bundleInfoInternal = (BundleInfoInternal *) m_bundles[bundleId];
- JNIEnv *env;
- int envStat = vm->GetEnv((void **) &env, JNI_VERSION_1_4);
-
- if (envStat == JNI_EDETACHED)
- {
- if (vm->AttachCurrentThread((void **) &env, NULL) != 0)
- {
- error_logger() << "Failed to attach " << endl;
- }
- }
- else if (envStat == JNI_EVERSION)
+ if (vm->AttachCurrentThread((void **) &env, NULL) != 0)
{
- error_logger() << "Env: version not supported " << endl;
+ error_logger() << "Failed to attach " << endl;
}
+ }
+ else if (envStat == JNI_EVERSION)
+ {
+ error_logger() << "Env: version not supported " << endl;
+ }
- env->CallVoidMethod(bundleInfoInternal->getJavaBundleActivatorObject(),
- bundleInfoInternal->getJavaBundleActivatorMethod());
+ env->CallVoidMethod(bundleInfoInternal->getJavaBundleActivatorObject(),
+ bundleInfoInternal->getJavaBundleActivatorMethod());
- m_bundles[bundleId]->setActivated(true);
- }
+ m_bundles[bundleId]->setActivated(true);
+ }
- void ResourceContainerImpl::deactivateJavaBundle(string bundleId)
- {
- info_logger() << "Deactivating java bundle" << endl;
- JavaVM *vm = getJavaVM(bundleId);
- BundleInfoInternal *bundleInfoInternal = (BundleInfoInternal *) m_bundles[bundleId];
- JNIEnv *env;
- int envStat = vm->GetEnv((void **) &env, JNI_VERSION_1_4);
+ void ResourceContainerImpl::deactivateJavaBundle(string bundleId)
+ {
+ info_logger() << "Deactivating java bundle" << endl;
+ JavaVM *vm = getJavaVM(bundleId);
+ BundleInfoInternal *bundleInfoInternal = (BundleInfoInternal *) m_bundles[bundleId];
+ JNIEnv *env;
+ int envStat = vm->GetEnv((void **) &env, JNI_VERSION_1_4);
- if (envStat == JNI_EDETACHED)
- {
- if (vm->AttachCurrentThread((void **) &env, NULL) != 0)
- {
- error_logger() << "Failed to attach " << endl;
- }
- }
- else if (envStat == JNI_EVERSION)
+ if (envStat == JNI_EDETACHED)
+ {
+ if (vm->AttachCurrentThread((void **) &env, NULL) != 0)
{
- error_logger() << "Env: version not supported " << endl;
+ error_logger() << "Failed to attach " << endl;
}
+ }
+ else if (envStat == JNI_EVERSION)
+ {
+ error_logger() << "Env: version not supported " << endl;
+ }
- env->CallVoidMethod(bundleInfoInternal->getJavaBundleActivatorObject(),
- bundleInfoInternal->getJavaBundleDeactivatorMethod());
+ env->CallVoidMethod(bundleInfoInternal->getJavaBundleActivatorObject(),
+ bundleInfoInternal->getJavaBundleDeactivatorMethod());
- m_bundles[bundleId]->setActivated(false);
- }
+ m_bundles[bundleId]->setActivated(false);
+ }
- void ResourceContainerImpl::unregisterBundleJava(string id)
- {
- info_logger() << "Unregister Java bundle: " << m_bundles[id]->getID() << ", "
- << m_bundles[id]->getID() << endl;
+ void ResourceContainerImpl::unregisterBundleJava(string id)
+ {
+ info_logger() << "Unregister Java bundle: " << m_bundles[id]->getID() << ", "
+ << m_bundles[id]->getID() << endl;
- info_logger() << "Destroying JVM" << endl;
- m_bundleVM[id]->DestroyJavaVM();
+ info_logger() << "Destroying JVM" << endl;
+ m_bundleVM[id]->DestroyJavaVM();
- delete m_bundles[id];
- m_bundles.erase(id);
- }
+ delete m_bundles[id];
+ m_bundles.erase(id);
+ }
#endif
}