Best Practices for Web application published by Karaf

2017-03-29 Thread Cristiano Costantini
Hello all, which the best practices to publish a web application from Karaf currently in 2017? I know that it exists the WebContainer ( https://karaf.apache.org/manual/latest/webcontainer) which supports both publishing of WABs or WARs to Karaf. I however see different approaches, used in conjun

Re: Best Practices for Web application published by Karaf

2017-03-30 Thread Cristiano Costantini
r/tasklist-blueprint-cdi/angular-ui > > I just added Web-ContextPath to the Manifest and used the > src/main/resources to deploy the static files. > Web-ContextPath: /tasklist > > Christian > > 2017-03-29 11:10 GMT+02:00 Cristiano Costantini < > cristiano.costant...@gmail.c

bundle:watch

2017-04-04 Thread Cristiano Costantini
Hello all, I am trying to use for the first time the bundle:watch command, however I cannot get it to work correctly... I watch a bundle with bundle:watch ID, I also start explicitly watching with bundle:watch --start, the bundle is correctly listed when I execute bundle:watch --list , but when I

Re: bundle:watch

2017-04-04 Thread Cristiano Costantini
> regards, Achim > > > 2017-04-04 10:41 GMT+02:00 Cristiano Costantini < > cristiano.costant...@gmail.com>: > > Hello all, > > I am trying to use for the first time the bundle:watch command, > however I cannot get it to work correctly... > > I watch a bun

Karaf JDBC

2017-04-05 Thread Cristiano Costantini
hello, Is it possible to specify at configuration a JDBC datasource to be created when Karaf boots the first time? For information, I'm learning using Karaf JDBC ( https://karaf.apache.org/manual/latest/#_datasources_jdbc) and then Karaf JPA (https://karaf.apache.org/manual/latest/#_persistence_j

Re: Karaf JDBC

2017-04-05 Thread Cristiano Costantini
etc. > > If you then start karaf the DataSource service should come up. > > Christian > > > On 05.04.2017 11:43, Cristiano Costantini wrote: > > hello, > > Is it possible to specify at configuration a JDBC datasource to be created > when Karaf boots the

Re: Karaf JDBC

2017-04-05 Thread Cristiano Costantini
oh! I've just found this page https://ops4j1.jira.com/wiki/display/PAXJDBC/Create+DataSource+from+config you created it only 4 days ago! It seems the answer to my question, I'll try this approach ;-) Cristiano Il giorno mer 5 apr 2017 alle ore 13:32 Cristiano Costantini < cris

Simply Protect HTTP servlet

2017-04-28 Thread Cristiano Costantini
Hello All, How can I implement a Basic HTTP Authentication similar to the one use by Karaf WebConsole (which I understand uses Jaas) to protect access to HTTP resources in Karaf? thanks Cristiano

Re: Simply Protect HTTP servlet

2017-04-29 Thread Cristiano Costantini
> user > > > > Then, the access to any servlet (/*) in your application will be secure > using > the karaf JAAS realm. > > Regards > JB > > On 04/28/2017 12:58 PM, Cristiano Costantini wrote: > > Hello All, > > > > How can

Re: Simply Protect HTTP servlet

2017-05-02 Thread Cristiano Costantini
gt; With Pax-Web the file-extension actually doesn't matter. So if you just > add a web.xml to it you should be safe to use the default jaas mechanism > provided by karaf and pax-web/jetty at that point. > > regards, Achim > > > 2017-04-29 9:17 GMT+02:00 Cristiano Co

Quintessence of Karaf

2017-11-24 Thread Cristiano Costantini
For anyone who own the latest book of Robert Martin, "Clean Architecture", go read page 157. There he says: "My preference is to decoupling to the point where a service [i.e. a network service like a Rest or SOAP] could be formed, should it become necessary; but then to leave the components in the

Re: AspectJ WeavingHook (was :Third-Party Licensing Policy)

2014-01-11 Thread Cristiano Costantini
I'm with you on the idea of a Blueprint AOP (I would love to abandon spring for blueprint in a future day). Il giorno sabato 11 gennaio 2014, Krzysztof Sobkowiak ha scritto: > I thought about a separate implementation of WeavingHook. But I could > look at Aries weaving. Is it implemented in t

Re: Security in Module

2015-03-26 Thread Cristiano Costantini
Hi Andy, some time ago I did some test to use Spring Security within Karaf, the code I wrote for this study is published here: https://github.com/cristcost/springsec It is a very specific use case, in particular it is not a bundle but it is a War that is osgi-fied, but there is implemented a sprin

[Cellar] how to configure a MapStore for persistence

2016-03-25 Thread Cristiano Costantini
Hi All, If I want to configure persistence in the hazelcast.xml and I add a MapStore configuration like this: com.hazelcast.examples.DummyStore 60 1000 true How and where I can publish the com.hazelcast.examples.DummyStore class in order to avoid the exception: 2016-03-25 08:44:01,467 | WARN

Re: [Cellar] how to configure a MapStore for persistence

2016-03-25 Thread Cristiano Costantini
> > On 03/25/2016 09:00 AM, Cristiano Costantini wrote: > > Hi All, > > > > If I want to configure persistence in the hazelcast.xml and I add a > > MapStore configuration like this: > > > > > > enabled="true"&g

Re: [Cellar] how to configure a MapStore for persistence

2016-03-25 Thread Cristiano Costantini
3.5.2] at com.hazelcast.map.impl.mapstore.StoreConstructor.getStoreFromClassOrNull(StoreConstructor.java:82)[15:com.hazelcast:3.5.2] ... 28 more thank you again! Il giorno ven 25 mar 2016 alle ore 09:14 Cristiano Costantini < cristiano.costant...@gmail.com> ha scritto: > thank you very mu

Re: [Cellar] how to configure a MapStore for persistence

2016-03-25 Thread Cristiano Costantini
Thank you again! Il giorno ven 25 mar 2016 alle ore 09:20 Jean-Baptiste Onofré < j...@nanthrax.net> ha scritto: > Hi Cristiano, > > It should be hosted by [15:com.hazelcast:3.5.2] (cellar-core uses the > CombinedClassLoader). > > Regards > JB > > On 03/25/20

Re: [Cellar] how to configure a MapStore for persistence

2016-03-25 Thread Cristiano Costantini
my fragment that also replace the /etc/hazelcast.xml file? Would it work or would fail because the file already exists (created by the hazelcast feature) and it won't be replaced? Thank you, Cristiano Il giorno ven 25 mar 2016 alle ore 09:21 Cristiano Costantini < cristiano.costant...@gm

[Cellar] register a custom serializer

2016-03-31 Thread Cristiano Costantini
Hi all, does anyone has ever successfully registered a custom serializer in the Cellar's Hazelcast instance? I'm having problems... if I configure a serializer like this: and even if I've fragmented the Hazelcast bundle with a bundle that contains the two above classes, I get a class not found

Custom shell commands from Karaf 2.x to Karaf 4.x

2016-04-01 Thread Cristiano Costantini
Hi all, in my application I've developed some shell command using the now @Deprecated org.apache.karaf.shell.console.OsgiCommandSupport Is there any guide or can you suggest me an example on how to implement the commands with the new API? Thanks. Cristiano

Re: Custom shell commands from Karaf 2.x to Karaf 4.x

2016-04-01 Thread Cristiano Costantini
/apache/karaf/jdbc/command > > Regards, > Morgan > > 2016-04-01 14:26 GMT+02:00 Cristiano Costantini < > cristiano.costant...@gmail.com>: > >> Hi all, >> in my application I've developed some shell command using the now >> @Deprecated org.apache.

Re: Custom shell commands from Karaf 2.x to Karaf 4.x

2016-04-01 Thread Cristiano Costantini
you Cristiano Il giorno ven 1 apr 2016 alle ore 15:11 Cristiano Costantini < cristiano.costant...@gmail.com> ha scritto: > Yeah! > that's what I'm searching to achieve... > > I've finally found the documentation page at > https://karaf.apache.org/manual/lat

Re: Custom shell commands from Karaf 2.x to Karaf 4.x

2016-04-01 Thread Cristiano Costantini
tiste Onofré < j...@nanthrax.net> ha scritto: > That's it, and it's what you can find in the command archetype ;) > > Regards > JB > > On 04/01/2016 03:29 PM, Cristiano Costantini wrote: > > Hi, yes I confirm it by myself, the @Reference i

Installing feature bundles anyway

2016-05-04 Thread Cristiano Costantini
Hello All, in the previous version of Karaf I was using (2.4.0) it was possible to install the bundles of a Features even if it cannot be started, using the option -c (--no-clean): karaf@root> features:install --help DESCRIPTION features:install Installs a feature with the specified name

Re: Installing feature bundles anyway

2016-05-04 Thread Cristiano Costantini
the bundles & features > installed before the failure. > > Regards > JB > > On 05/04/2016 09:42 AM, Cristiano Costantini wrote: > > Hello All, > > in the previous version of Karaf I was using (2.4.0) it was possible to > > install the bundles of a Features

Re: Installing feature bundles anyway

2016-05-04 Thread Cristiano Costantini
an before). > > What's the missing requirement message ? > > Regards > JB > > On 05/04/2016 10:22 AM, Cristiano Costantini wrote: > > Hi JB, > > thanks, I've tried but the option -t but it only report the same error > > (i.e. "Error executing

[Cellar] Store a cluster config property on the cluster

2016-05-26 Thread Cristiano Costantini
Hello all, I want to store a config property using cellar cluster, programmatically from within a bundle. (basically, the bundle in the first node to come up on the cluster does some initialization, when the same bundle is started on another node, this initialization need not to be repeated and I

Re: [Cellar] Store a cluster config property on the cluster

2016-05-26 Thread Cristiano Costantini
gular code > 2. Use the ClusterConfigMBean > 3. Minic PropSetCommand and directly use the clusterMap (a bit harder) > > Regards > JB > > On 05/26/2016 09:22 AM, Cristiano Costantini wrote: > > Hello all, > > > > I want to store a config property using cellar cluster,

[Cellar] How can I use the org.apache.karaf.cellar.core.utils.CombinedClassLoader ?

2016-06-21 Thread Cristiano Costantini
Hello all, I'm struggling to fix an issue where I am sending a message to topic over the Hazelcast instance of Cellar. I get a ClassNotFoundException from within the CombinedClassLoader when deserializing the topic. >From the Javadoc of the class I see that "A bundle can add itself for to this c

Re: [Cellar] How can I use the org.apache.karaf.cellar.core.utils.CombinedClassLoader ?

2016-06-21 Thread Cristiano Costantini
No, never heard about it, what is it and where can I found info? Thank you very much! Cristiano Il giorno Tue, 21 Jun 2016 alle 21:00 Jean-Baptiste Onofré ha scritto: > Hi Cristiano, > > Do you use TCCL ? > > Regards > JB > > On 06/21/2016 07:20 PM, Cristiano Costant

Re: [Cellar] How can I use the org.apache.karaf.cellar.core.utils.CombinedClassLoader ?

2016-06-22 Thread Cristiano Costantini
> ha scritto: > TCCL is the ThreadContextClassLoader. > > If you explain on IRC what you try to achieve, I can guide you to fix that. > > Regards > JB > > On 06/21/2016 09:05 PM, Cristiano Costantini wrote: > > No, never heard about it, what is it and where can I foun

Reasons that triggers IllegalStateException: Invalid BundleContext

2016-06-30 Thread Cristiano Costantini
Hello All, I'n our application it happen sometime to find in situations where we get the "Invalid BundleContext" exception: java.lang.IllegalStateException: Invalid BundleContext. at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:453) What are the potential re

Re: Reasons that triggers IllegalStateException: Invalid BundleContext

2016-06-30 Thread Cristiano Costantini
Nick Baker ha scritto: > A more complete stack trace would help us point you to the offending code. > I can say that I usually see this when a Service is still held by someone > when it should have been removed from "play" by a ServiceTracker or other > similar mechanism. &g