openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1776867 - in /openwebbeans/meecrowave/trunk: meecrowave-core/src/main/java/org/apache/meecrowave/openwebbeans/ meecrowave-core/src/main/java/org/apache/meecrowave/tomcat/ meecrowave-doc/src/main/jbake/content/meecrowave-jolokia/
Date Sun, 01 Jan 2017 19:02:53 GMT
Author: rmannibucau
Date: Sun Jan  1 19:02:53 2017
New Revision: 1776867

URL: http://svn.apache.org/viewvc?rev=1776867&view=rev
Log:
avoid issues when deploying an application with env entries + explaining how to run hawt.io

Modified:
    openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/openwebbeans/KnownJarsFilter.java
    openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/tomcat/NoDescriptorRegistry.java
    openwebbeans/meecrowave/trunk/meecrowave-doc/src/main/jbake/content/meecrowave-jolokia/index.adoc

Modified: openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/openwebbeans/KnownJarsFilter.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/openwebbeans/KnownJarsFilter.java?rev=1776867&r1=1776866&r2=1776867&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/openwebbeans/KnownJarsFilter.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/openwebbeans/KnownJarsFilter.java
Sun Jan  1 19:02:53 2017
@@ -65,6 +65,7 @@ public class KnownJarsFilter implements
         add("arquillian-test-spi");
         add("arquillian-tomee-");
         add("asciidoctorj-");
+        add("async-http-client-");
         add("asm-");
         add("avalon-framework-");
         add("axis-");
@@ -119,6 +120,8 @@ public class KnownJarsFilter implements
         add("jna-");
         add("jnr-");
         add("johnzon-");
+        add("jolokia-core-");
+        add("jolokia-jvm-");
         add("json-simple-");
         add("fusemq-leveldb-");
         add("geronimo-");
@@ -132,6 +135,7 @@ public class KnownJarsFilter implements
         add("hamcrest-");
         add("hawtbuf-");
         add("hawtdispatch-");
+        add("hawtio-");
         add("hawtjni-runtime");
         add("hibernate-");
         add("howl-");
@@ -215,7 +219,10 @@ public class KnownJarsFilter implements
         add("ops4j-");
         add("org.eclipse.");
         add("org.junit.");
+        add("org.apache.aries.blueprint.noosgi");
+        add("org.apache.aries.blueprint.web");
         add("org.osgi.core-");
+        add("org.osgi.enterprise");
         add("orient-commons-");
         add("orientdb-core-");
         add("orientdb-nativeos-");
@@ -275,6 +282,7 @@ public class KnownJarsFilter implements
         add("tomee-");
         add("tools.jar");
         add("twitter4j-");
+        add("validation-api-");
         add("velocity-");
         add("wagon-");
         add("webbeans-ee");

Modified: openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/tomcat/NoDescriptorRegistry.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/tomcat/NoDescriptorRegistry.java?rev=1776867&r1=1776866&r2=1776867&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/tomcat/NoDescriptorRegistry.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/tomcat/NoDescriptorRegistry.java
Sun Jan  1 19:02:53 2017
@@ -52,6 +52,7 @@ import static java.util.Collections.empt
 // skip Tomcat MBeans, goal is really to skip mbean-descriptors.xml reading which is slow
for small apps.
 public class NoDescriptorRegistry extends Registry {
     private final MBeanServer mBeanServer = new NoJmxMBeanServer();
+    private final ManagedBean defaultMBean = new PassthroughMBean();
 
     @Override
     public void registerComponent(final Object bean, final String oname, final String type)
throws Exception {
@@ -80,7 +81,7 @@ public class NoDescriptorRegistry extend
 
     @Override
     public ManagedBean findManagedBean(final String name) {
-        return null;
+        return defaultMBean;
     }
 
     @Override
@@ -304,4 +305,7 @@ public class NoDescriptorRegistry extend
             return null;
         }
     }
+
+    private static class PassthroughMBean extends ManagedBean {
+    }
 }

Modified: openwebbeans/meecrowave/trunk/meecrowave-doc/src/main/jbake/content/meecrowave-jolokia/index.adoc
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-doc/src/main/jbake/content/meecrowave-jolokia/index.adoc?rev=1776867&r1=1776866&r2=1776867&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-doc/src/main/jbake/content/meecrowave-jolokia/index.adoc
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-doc/src/main/jbake/content/meecrowave-jolokia/index.adoc
Sun Jan  1 19:02:53 2017
@@ -25,3 +25,40 @@ IMPORTANT: don't forget to secure this e
 Meecrowave core configuration for more details.
 
 More on https://jolokia.org/reference/html/
+
+== Running HawtIO
+
+To run http://hawt.io, the easiest is to setup jaas and run the hawt.io war:
+
+[source]
+----
+java -Djava.security.auth.login.config=login.config \
+    -jar meecrowave-runner.jar \
+    -webapp hawtio-default-offline-1.4.67.war
+----
+
+This assumes you created a `login.config`:
+
+[source]
+----
+karaf {
+  org.apache.catalina.realm.JAASMemoryLoginModule required
+	pathname="/path/to/tomcat-users.xml";
+};
+----
+
+NOTE: the JAAS login module is named `karaf` because it is the default of hawt.io (check
`io.hawt.web.AuthenticationFilter.init()`).
+
+And if you use - as in previous snippet - tomcat-users.xml you need to create an admin (role)
user:
+
+[source,xml]
+----
+<tomcat-users>
+  <user username="admin" password="admin" role="hawtio" roles="admin" />
+</tomcat-users>
+----
+
+NOTE: don't try to use `io.hawt.web.tomcat.TomcatUserDatabaseLoginContext` of hawt.io which
does the same as `JAASMemoryLoginModule`
+excepted it doesn't handle absolute paths which enforce you to use a `catalina.base`.
+
+Using hawt.io war you don't need to run jolokia servlet by yourself, it is already done.



Mime
View raw message