Re: Design pattern for working with multiple implementations of an interface

2011-07-24 Thread chetan mehrotra
terFactory(ServiceReference reference) protected void unbindAdapterFactory(ServiceReference reference) Chetan Mehrotra [1] http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterManage

Re: Apache Aries Blue Print and JMX

2011-08-02 Thread chetan mehrotra
Hi Matt, You would need to register the service with a service property jmx.objectname. Its value would be as per JMX naming conventions like 'domain:instance=name1'. Once that is done the service would be registered with JMX server Have a look at TestCase MBeanTest [1] Chetan Me

Re: Install Object as bundle

2011-08-19 Thread chetan mehrotra
You can also have look at Karaf Spring deployer which creates a Bundle on the fly for a give Spring config file http://svn.apache.org/viewvc/karaf/trunk/deployer/spring/src/main/java/org/apache/karaf/deployer/spring/SpringTransformer.java?view=markup Chetan Mehrotra On Fri, Aug 19, 2011 at 7

Re: jms in a bundle v2

2011-11-10 Thread Chetan Mehrotra
t packages to be exported from base JBoss system [1] http://felix.apache.org/site/apache-felix-framework-configuration-properties.html Chetan Mehrotra

Re: jms in a bundle v2

2011-11-10 Thread Chetan Mehrotra
with 7.1. So you might have to wait. Also have a look at thread [3] which says that you can connect using Netty Chetan Mehrotra [1] https://issues.jboss.org/browse/JBPAPP-7502 [2] https://issues.jboss.org/browse/AS7-1338 [3] http://community.jboss.org/message/629603

Re: activator with dependency injection for service

2012-05-28 Thread Chetan Mehrotra
call lifecycle methods like init and destroy Chetan Mehrotra On Mon, May 28, 2012 at 10:17 PM, miten mehta wrote: > Hi, > > I am trying to use spring dm in felix for doing a client module with > activator in which I wanting to do dependency injection of service. I am >

Re: activator with dependency injection for service

2012-05-29 Thread Chetan Mehrotra
Not sure about your usecase here. But as I said you can configure Spring call any method of the ActivatorClient class of yours upon bean factory initialization which would happen once your bundle is activated. And in that call you can perform required invocation Chetan Mehrotra On Tue, May 29

Re: How to run embedding example

2012-07-19 Thread Chetan Mehrotra
org.apache.felix.main 4.0.2 In the /examples/servicebased.host/pom.xml and use the resultant jar in Launch command Chetan Mehrotra

Re: Lazy component activation and service registration

2012-08-04 Thread Chetan Mehrotra
es are created using a factory class and are not created directly by container? Chetan Mehrotra

Re: Lazy component activation and service registration

2012-08-04 Thread Chetan Mehrotra
required. Thanks for the pointer!! Chetan Mehrotra On Sat, Aug 4, 2012 at 10:07 PM, Neil Bartlett wrote: > Thanks for the clarifications. > > It's generally a bad idea to use non-interfaces for services... > because if the client knows the specific class, why bother looki

Re: Question regarding logging facilitys in OSGi environments

2012-08-19 Thread Chetan Mehrotra
couple of bundles. The logging would be configured via cfg file. A log file named logging.log would created under pax-example/runner directory. In your Netbean env you would have to find a similar way to provide config Chetan Mehrotra [1] http://team.ops4j.org/wiki/display/paxlogging/Config

Re: Change HTTPService Port Through Configuration Admin

2012-08-22 Thread Chetan Mehrotra
>From the code below it appears that the new properties instance that you create is not being passed back. Try passing the properties object as part of update call configuration.update(properties); Chetan Mehrotra On Thu, Aug 23, 2012 at 3:48 AM, Evan Ruff wrote: > Hey guys! > >

Determining Servlet class which handles a given HTTP request

2012-09-02 Thread Chetan Mehrotra
related to Sling can somewhat be extracted from Recent Requests plugin [6] Thoughts? Chetan Mehrotra [1] https://github.com/apache/felix/blob/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/HttpWhiteboardWebConsolePlugin.java [2] https://github.com/apache/felix/blob

Re: Determining Servlet class which handles a given HTTP request

2012-09-02 Thread Chetan Mehrotra
plemented by Sling servlet resolver module module which provide the information it has about various servlets it manages. The information might consist of 1. Servlet Alias 2. Servlet Class 3. Bundle which provides that servlet Similarly information about registered filters can be captured Chetan

Re: Issue with Maven OSGi bundle - Embed-Dependency * results in invalid import of '.'

2012-09-03 Thread Chetan Mehrotra
ecause you compilation errors Also it would be better if you use a more recent version of maven-bundle-plugin i.e. 2.3.7 which might fail the build itself with proper error message Chetan Mehrotra [1] https://github.com/apache/felix/blob/trunk/framework/src/main/java/org/apache/felix/framework/util/mani

Re: Issue with Maven OSGi bundle - Embed-Dependency * results in invalid import of '.'

2012-09-03 Thread Chetan Mehrotra
bundle for java-xmlbuilder' module installed int the Felix or else mark the relevant package as optional Chetan Mehrotra - To unsubscribe, e-mail: users-unsubscr...@felix.apache.org For additional commands,

Re: Apache Felix OSGi Tutorial using Declarative Services

2012-09-21 Thread Chetan Mehrotra
Also have a look at https://github.com/bdelacretaz/OSGi-for-mere-mortals by Bertrand. A working example which demonstrates most of the features of SCR Chetan Mehrotra - To unsubscribe, e-mail: users-unsubscr...@felix.apache.org

Re: A fresh installation of webconsole can't resolve javax.servlet

2012-09-26 Thread Chetan Mehrotra
exports the required packages Chetan Mehrotra - To unsubscribe, e-mail: users-unsubscr...@felix.apache.org For additional commands, e-mail: users-h...@felix.apache.org

Re: Determining Servlet class which handles a given HTTP request

2012-09-26 Thread Chetan Mehrotra
Created issue FELIX-3684 [1] and provided patch which exposes a webconsole plugin. This plugin displays information in a manner similar to how HTTP Whiteboard plugin does Chetan Mehrotra [1] https://issues.apache.org/jira/browse/FELIX-3684

Re: Determining Servlet class which handles a given HTTP request

2012-09-28 Thread Chetan Mehrotra
try to configure my Intellij as per guideline for future work though Chetan Mehrotra - To unsubscribe, e-mail: users-unsubscr...@felix.apache.org For additional commands, e-mail: users-h...@felix.apache.org

Maven Bundle Plugin - Marking packages from optional dependencies as required

2012-10-06 Thread Chetan Mehrotra
be optional? Chetan Mehrotra - To unsubscribe, e-mail: users-unsubscr...@felix.apache.org For additional commands, e-mail: users-h...@felix.apache.org

Re: Embedding dependencies to Bundle: Please help

2012-10-08 Thread Chetan Mehrotra
an asterik (*) in the end i.e. org.springframework.context.support;resolution:=optional,* due to which bnd was not able to add required import instruction. Try adding the * . Chetan Mehrotra - To unsubscribe, e-mail: users-unsubscr...@felix.apache.org For addi

Re: Maven Bundle Plugin - Marking packages from optional dependencies as required

2012-10-09 Thread Chetan Mehrotra
(#1) the maven-bundle-plugin would mark packages from it as optional which conflicts with #2. So I am looking for a way to achieve both #1 and #2 Chetan Mehrotra [1] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/pom.xml

Re: Maven Bundle Plugin - Marking packages from optional dependencies as required

2012-10-09 Thread Chetan Mehrotra
> If you have scope=provided, these bundles don't add to the transitive > dependencies of oak-core and as such this suffi Makes sense ... did not thought about that. Thanks for the solution!! Chetan Mehrotra - To

Re: servlet bridge problem

2012-11-04 Thread Chetan Mehrotra
You can deploy the Felix Whiteboard bundle (org.apache.felix:org.apache.felix.http.whiteboard:2.0.4) and then expose the servlet as bp service This servlet would then be accessible at /foo Chetan Mehrotra [1] http://felix.apache.org/site/apache-felix-http

Re: Resource Accessing in Services: question about how HttpService works

2012-12-05 Thread Chetan Mehrotra
urther it creates a default http context based on the bundle [2]. So when you register resource it knows from which bundle the request for that resource needs to be served. Chetan Mehrotra [1] https://github.com/apache/felix/blob/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/s

Re: HttpService: ServletContext not shared across filters

2012-12-13 Thread Chetan Mehrotra
3. Also set property 'context.shared' to true with the filter This seems to allow sharing of the HttpContext and thus the servlet context between various servlets Chetan Mehrotra [1] https://github.com/apache/felix/blob/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboar

Re: Classpath scanning with OSGi

2013-01-15 Thread Chetan Mehrotra
s into account the imported package space (see PackageAdminResolver [2]) Chetan Mehrotra [1] http://git.eclipse.org/c/gemini.blueprint/org.eclipse.gemini.blueprint.git/tree/io/src/main/java/org/eclipse/gemini/blueprint/io/OsgiBundleResourcePatternResolver.java [2] http://git.eclipse.org/c/gemini.blu

Re: HTTP Service Whiteboard with SCR

2013-01-19 Thread Chetan Mehrotra
Hi Dave, Looking at the HttpContextManager [1] which is used by the whiteboard logic to obtain content it appears that it takes care of case when http content with given contextId does not exist. How are you registering Servlet and HttpContext? Chetan Mehrotra [1] https://github.com/apache

Re: No HttpService available

2013-03-14 Thread Chetan Mehrotra
[2]. You need to install Felix HTTP Whiteboard Bundle for that I find #2 easier to use regards Chetan [1] http://www.aqute.biz/Snippets/Tracker [2] http://felix.apache.org/documentation/subprojects/apache-felix-http-service.html#using-the-whiteboard Chetan Mehrotra On Thu, Mar 14, 2013 at 5:20

Re: No HttpService available

2013-03-14 Thread Chetan Mehrotra
erence) { ((HttpService)getService()).unregister("/hello"); super.remove(reference); } } } regards Chetan [1] http://www.aqute.biz/Snippets/Tracker Chetan Mehrotra On Thu, Mar 14, 2013 at 7:34 PM, Felix Meschberger wrote: > Hi > > Could it be th

Re: Project build error: Unknown packaging: bundle

2013-03-24 Thread Chetan Mehrotra
What version of Maven are you using. Looking at [1] and [2] it appears that there was some issue with earlier version of Maven and you might be hitting that [1] https://issues.sonatype.org/browse/MNGECLIPSE-1636 [2] http://jira.codehaus.org/browse/MNG-4338 Chetan Mehrotra

Re: Help needed to use maven to build an osgi application

2013-03-31 Thread Chetan Mehrotra
-plugin [3] to package the bundle as part of single executable jar. This is currenly limited to supporting Felix and would not work for Equinox. See [4] as one example of this plugin in action which packages a bunch of bundles as part of an example application Chetan Mehrotra [1] https://ops4j1

Re: ServiceTracker problems

2013-05-22 Thread Chetan Mehrotra
stener(new ButtonActionListener(frame, ref)); frame.addToolBarButton(button); frame.addServiceToList(ref.getBundle().getSymbolicName()); return super.addingService(ref); } That you get the expected flow working Chetan Mehrotra On Wed, May 22, 2013 at 7:37 PM, Snorre Lothar von Gohren Edwin < snorre.ed...@gma

Re: declarative Services

2013-06-06 Thread Chetan Mehrotra
Export-Package list i.e. private classes 2. Have other DS Components within that bundle refer to these services as references Chetan Mehrotra On Thu, Jun 6, 2013 at 2:42 PM, Michael Täschner wrote: > Hi Neil, > > thanks for the info. Yes that is what you taught last year as well. I just

Re: Running several instances of Felix

2013-06-19 Thread Chetan Mehrotra
Do you want to launch multiple jvm (seprate processes) of Felix or within same process multiple Felix instances? Chetan Mehrotra On Wed, Jun 19, 2013 at 1:12 PM, Benoît Thiébault wrote: > Hi everyone, > > We have developed a simulation software based on OSGi and using Felix. > >

Re: Running several instances of Felix

2013-06-19 Thread Chetan Mehrotra
avoid any potential issue related to concurrent access. [1] http://felix.apache.org/site/apache-felix-framework-bundle-cache.html Chetan Mehrotra On Wed, Jun 19, 2013 at 1:19 PM, Benoît Thiébault wrote: > Multiple JVM (and separate processes). > > Le 19 juin 2013 à 09:47, Chetan Mehrotr

Re: Felix SCR service ordering

2013-11-05 Thread Chetan Mehrotra
/sling/blob/trunk/bundles/commons/osgi/src/main/java/org/apache/sling/commons/osgi/ServiceUtil.java Chetan Mehrotra On Mon, Nov 4, 2013 at 5:34 PM, Stijn de Witt wrote: >> The spec says which one it is, not that the algorithm is picking the first >> element in an ordered collection

Re: Felix http service, whiteboard, DS and HttpContext

2013-11-06 Thread Chetan Mehrotra
uld do the job of registering the servlet with proper context Chetan Mehrotra On Wed, Nov 6, 2013 at 10:07 PM, Bruce Jackson wrote: > Hi All > > Does anyone use the Felix http service, DS and the whiteboard with a > custom HttpContext? > I can register a servlet with DS and the

Re: Felix http service, whiteboard, DS and HttpContext

2013-11-10 Thread Chetan Mehrotra
3. Also set property 'context.shared' to true with the filter This seems to allow sharing of the HttpContext across bundles. I have also now updated the docs [2]. Chetan Mehrotra [1] https://github.com/apache/felix/blob/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboar

Re: Bad BundleSymbolicName in generated Manifest

2013-12-11 Thread Chetan Mehrotra
Have a look at Maven Bundle Plugin docs around how it computes the Bundle-SymbolicName by default [1]. So in your case it defaults to artifactId (see point 4 under ) Chetan Mehrotra [1] http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html#ApacheFelixMavenBundlePlugin%28BND%29

[ANN] Felix Jaas Support version 0.0.2 Released

2014-02-17 Thread Chetan Mehrotra
The Felix team is pleased to announce the release of Felix Jaas Support version 0.0.2 Apache Felix JAAS support aims to simplify usage of JAAS in OSGi http://felix.apache.org/documentation/subprojects/apache-felix-jaas.html This release is available from http://felix.apache.org/site/downloads.

Re: AW: OpenJPA Support in Apache Felix

2014-03-24 Thread Chetan Mehrotra
To give an example of what Richard is suggesting have a look at LeakDetector [1] class from one of the Apache Sling bundles. This approach allow you to write a generic code which should work on any OSGi container which later version of OSGi spec which provide support for BundleWiring class Chetan

Re: Equivalent of packageAdmin.getExportedPackages() in OSGi R5

2014-08-11 Thread Chetan Mehrotra
(BundleRevision.PACKAGE_NAMESPACE) } Chetan Mehrotra [1] https://gist.github.com/chetanmeh/10971530 On Mon, Aug 11, 2014 at 8:02 PM, Christopher BROWN wrote: > Hello, > > I'm upgrading some code that used PackageAdmin with Felix 3.2.2 to Felix > 4.4.1 and am trying to find the equivalent cod

Re: Loading a class from a different bundle dynamically

2014-12-13 Thread Chetan Mehrotra
Also have a look at Sling Testing Tools [1] Chetan Mehrotra [1] http://sling.apache.org/documentation/development/sling-testing-tools.html On Sat, Dec 13, 2014 at 2:05 AM, Christian Schneider wrote: > You can also do this without an Activator and just DS. > > On the production side yo

Re: Dynamic reference cardinality

2015-05-13 Thread Chetan Mehrotra
This can possibly be done via new '.cardinality.minimum' support added to SCR as part of RFC 190 (Section 5.10 [1]) (see FELIX-4391) This allows you to configure the floor of reference via ConfigAdmin at runtime. Chetan Mehrotra [1] https://github.com/osgi/design/raw/master/rfcs/r

Re: Unable to deploy and test Apache Felix Web Console & Script Console Plugin

2015-10-13 Thread Chetan Mehrotra
based in input params and then evaluates the script Chetan Mehrotra [1] https://github.com/apache/felix/tree/trunk/webconsole-plugins/script-console/src/main/java/org/apache/felix/webconsole/plugins/scriptconsole/internal On Tue, Oct 13, 2015 at 2:26 PM, KingSaladin wrote: > > Ok great ! >

Re: Help in using your Quartz OSGi bundle

2015-10-19 Thread Chetan Mehrotra
ass > not found exceptions are thrown (yeah, because most of those transitive > dependencies are not bundles!). Have a look at Sling Common Scheduler bundle [1] which *embeds* Quartz. Might be of some help Chetan Mehrotra [1] https://github.com/apache/sling/blob/trunk/bundles/commons/sc

Re: DS and .. Fragments (not)?

2015-11-18 Thread Chetan Mehrotra
Component: OSGI-INF/*.xml In such a case would not any DS xml present in fragment bundle would get picked up? Chetan Mehrotra - To unsubscribe, e-mail: users-unsubscr...@felix.apache.org For additional commands, e-mail: users-h...@felix.apache.org

Re: Setting up Http Servlet Bridge (relative paths)

2016-02-10 Thread Chetan Mehrotra
Felix WebConsole is accessible at http://localhost:8080/foo/osgi/system/console where 'foo' is contextPath and 'osgi' is the path against which the ProxyServlet is bound Chetan Mehrotra [1] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-examples/standalone/src/main/ja

Re: Problems while creating custom JAAS LoginModule

2016-06-15 Thread Chetan Mehrotra
checking the generated MANIFEST.MF of your bundle if bnd instruction is working i.e. required header is getting added Chetan Mehrotra On Wed, Jun 15, 2016 at 6:18 PM, deadbrain wrote: > Hi all Felix gurus, > > I am using latest released bundles (5.4 distro and up to date > LogService