Hi,
Im trying to do the $subject and follow is the scenario.
There is an osgi bundle "DatasetService" which has an operation
"getDatasetUploadingDir()". The service is registered as an osgi service
using the bundle activator (DatasetServiceActivator.java file in the
attachment).
And Im accessing the service from jaggery as follows.
* var carbon = require('carbon'); var datasetService =
carbon.server.osgiService('org.wso2.carbon.ml.dataset.DatasetService');
log.info <http://log.info>(datasetService.getDatasetUploadingDir());*
Is this the correct way to call an osgi service from jaggery? Or is there a
better way to achieve this?
Regards,
--
*Supun Sethunga*
Software Engineer
WSO2, Inc.
lean | enterprise | middleware
Mobile : +94 716546324
package org.wso2.carbon.ml.dataset;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
public class DatasetServiceActivator implements BundleActivator {
public void start(BundleContext context) throws Exception {
final Log logger = LogFactory.getLog(DatasetSummary.class);
DatasetService datasetService = new DatasetService();
context.registerService(DatasetService.class.getName(), datasetService, null);
logger.info("Dataset Service registered successfully.");
}
public void stop(BundleContext context) throws Exception {
// TODO Auto-generated method stub
}
}
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev