Add a deprecation warning to the JBI guide pages
git-svn-id: https://svn.apache.org/repos/asf/servicemix/documentation/trunk@1344761 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/scala/org/apache/servicemix/documentation/Helper.scala b/src/main/scala/org/apache/servicemix/documentation/Helper.scala
index 92cfc21..7d417cd 100644
--- a/src/main/scala/org/apache/servicemix/documentation/Helper.scala
+++ b/src/main/scala/org/apache/servicemix/documentation/Helper.scala
@@ -51,4 +51,9 @@
*/
def sitegen(engine: TemplateEngine) = (engine.getClass.getName == SITEGEN_ENGINE)
+ /**
+ * Determine if this is a page from the JBI guide
+ */
+ def jbi(uri: String) = uri.startsWith("/jbi")
+
}
diff --git a/src/main/webapp/WEB-INF/scalate/layouts/default.ssp b/src/main/webapp/WEB-INF/scalate/layouts/default.ssp
index 580c93c..3f71a7f 100644
--- a/src/main/webapp/WEB-INF/scalate/layouts/default.ssp
+++ b/src/main/webapp/WEB-INF/scalate/layouts/default.ssp
@@ -139,9 +139,17 @@
${include(toc(requestUri))}
</div>
<div id="body">
+ <% if (jbi(requestUri)) { %>
+ <div class="note">
+ <h1>JBI Support deprecated in Apache ServiceMix 4</h1>
+ <p>JBI 1.0 support is available in Apache ServiceMix 4 to allow existing users to migrate more easily to this latest version - if you're a new user, you should consider JBI deprecated and not use it for your project.
+ Take a look at our <a href="${uri("/users-guide/getting-started/technology-selection.html")}"</a>technology selection guidelines</a> for more information.</p>
+ </div>
+ <% } %>
<%= body %>
</div>
<% } %>
+
<% if (!navigation) { %>
<%= body %>
<% } %>
diff --git a/src/main/webapp/users-guide/getting-started/technology-selection.conf b/src/main/webapp/users-guide/getting-started/technology-selection.conf
index b52f239..60d7380 100644
--- a/src/main/webapp/users-guide/getting-started/technology-selection.conf
+++ b/src/main/webapp/users-guide/getting-started/technology-selection.conf
@@ -29,6 +29,6 @@
The NMR provides the basic ESB features for ServiceMix 4. You can use it to connect multiple camel routes in a lightweight way. It can also be used as a common transport on which you can add container-level auditing by registering your own ExchangeListener implementation.
h3. When to use JBI?
-If you want to build a full-blown SOA solution using BPEL, ServiceMix includes a version of Apache ODE that integrates well with JBI messaging. Because we still support JBI 1.0 on ServiceMix, you can also move your existing JBI artifacts from ServiceMix 3 to the new container with no/minimal changes.
+We still support JBI 1.0 in ServiceMix 4 so you can leverage your previous investments and move your existing JBI artifacts from ServiceMix 3 to the new container with no/minimal changes before migrating them to use Camel and/or CXF directly. For new projects, you should consider JBI deprecated and always use Camel and/or CXF inside ServiceMix instead.
diff --git a/src/test/scala/org/apache/servicemix/documentation/HelperTest.scala b/src/test/scala/org/apache/servicemix/documentation/HelperTest.scala
index ff3a0ed..fc8fa5c 100644
--- a/src/test/scala/org/apache/servicemix/documentation/HelperTest.scala
+++ b/src/test/scala/org/apache/servicemix/documentation/HelperTest.scala
@@ -46,6 +46,13 @@
}
+ @Test
+ def testJbi = {
+ assertTrue(jbi("/jbi/index.html"))
+ assertTrue(jbi("/jbi/components/servicemix-http.html"))
+ assertFalse(jbi("/nmr/index.html"))
+ }
+
def assertValidToc(expected: String, location: String): Unit = {
assertEquals("Should return valid TOC for " + location,
expected, toc(location))