activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r439353 - /incubator/activemq/site/weblogic-integration.html
Date Fri, 01 Sep 2006 15:30:51 GMT
Author: chirino
Date: Fri Sep  1 08:30:50 2006
New Revision: 439353

URL: http://svn.apache.org/viewvc?rev=439353&view=rev
Log:
Latest export from confluence

Modified:
    incubator/activemq/site/weblogic-integration.html

Modified: incubator/activemq/site/weblogic-integration.html
URL: http://svn.apache.org/viewvc/incubator/activemq/site/weblogic-integration.html?rev=439353&r1=439352&r2=439353&view=diff
==============================================================================
--- incubator/activemq/site/weblogic-integration.html (original)
+++ incubator/activemq/site/weblogic-integration.html Fri Sep  1 08:30:50 2006
@@ -365,36 +365,7 @@
 
 <H4><A name="WebLogicIntegration-ActiveMQasaWebLogicApplication"></A>ActiveMQ
as a WebLogic Application</H4>
 
-<P>The easiest type of WebLogic application to configure with all the needed ActiveMQ
libraries and configuration and not much else is a web application.  The JARs go in <TT>WEB-INF/lib/</TT>
and config files typically in <TT>WEB-INF/</TT>.  The only necessary configuration
for the web application itself is to install a listener that will start and stop ActiveMQ
when the web application is started and stopped.</P>
-
-<P>The easiest way to do this is to a use the commonly available Spring listeners,
which start a Spring context, which can point ActiveMQ to an XBean configuration file, which
starts ActiveMQ.  A little roundabout, but it works well in practice with very little configuration.</P>
-
-<P><B>J2EE WEB-INF/web.xml</B></P>
-<DIV class="code"><DIV class="codeContent">
-<PRE class="code-xml"><SPAN class="code-tag">&lt;?xml version=<SPAN class="code-quote">&quot;1.0&quot;</SPAN>
encoding=<SPAN class="code-quote">&quot;UTF-8&quot;</SPAN>?&gt;</SPAN>
-
-&lt;web-app version=<SPAN class="code-quote">&quot;2.4&quot;</SPAN>
-         xmlns=<SPAN class="code-quote">&quot;http://java.sun.com/xml/ns/j2ee&quot;</SPAN>
-         <SPAN class="code-keyword">xmlns:xsi</SPAN>=<SPAN class="code-quote">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</SPAN>
-         xsi:schemaLocation=<SPAN class="code-quote">&quot;http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd&quot;</SPAN> &gt;
-    <SPAN class="code-tag">&lt;listener&gt;</SPAN>
-        <SPAN class="code-tag">&lt;listener-class&gt;</SPAN>org.springframework.web.context.ContextLoaderListener<SPAN
class="code-tag">&lt;/listener-class&gt;</SPAN>
-    <SPAN class="code-tag">&lt;/listener&gt;</SPAN>
-<SPAN class="code-tag">&lt;/web-app&gt;</SPAN></PRE>
-</DIV></DIV>
-<P><B>Spring WEB-INF/applicationContext.xml</B></P>
-<DIV class="code"><DIV class="codeContent">
-<PRE class="code-xml"><SPAN class="code-tag">&lt;?xml version=<SPAN class="code-quote">&quot;1.0&quot;</SPAN>
encoding=<SPAN class="code-quote">&quot;UTF-8&quot;</SPAN> ?&gt;</SPAN>
-<SPAN class="code-tag">&lt;!DOCTYPE beans PUBLIC <SPAN class="code-quote">&quot;-//SPRING//DTD
BEAN//EN&quot;</SPAN> <SPAN class="code-quote">&quot;http://www.springframework.org/dtd/spring-beans.dtd&quot;</SPAN>&gt;</SPAN>
-<SPAN class="code-tag">&lt;beans&gt;</SPAN>
-    <SPAN class="code-tag">&lt;bean id=<SPAN class="code-quote">&quot;brokerService&quot;</SPAN>
class=<SPAN class="code-quote">&quot;org.apache.activemq.xbean.BrokerFactoryBean&quot;</SPAN>&gt;</SPAN>
-        <SPAN class="code-tag">&lt;property name=<SPAN class="code-quote">&quot;config&quot;</SPAN>
value=<SPAN class="code-quote">&quot;classpath:activemq-config.xml&quot;</SPAN>/&gt;</SPAN>
-    <SPAN class="code-tag">&lt;/bean&gt;</SPAN>
-<SPAN class="code-tag">&lt;/beans&gt;</SPAN></PRE>
-</DIV></DIV>
-<P>Again, the <TT>web.xml</TT> listener starts Spring and reads the Spring
<TT>META-INF/applicationContext.xml</TT> file (the default location used by the
<TT>ContextLoaderListener</TT>), and the <TT>applicationContext.xml</TT>
indicates that the ActiveMQ configuration file should be read from the class path with the
name <TT>activemq-config.xml</TT>.  That file could be placed in <TT>WEB-INF/classes</TT>
or in a directory on the file system that is added to the WebLogic class path (for ease of
editing).</P>
-
-<P>With this approach, the normal WebLogic deployment tools, admin console, etc. can
be used to deploy, start, stop, and restart ActiveMQ (packaged into a web application WAR).
 Additionally, a simple web page included in the WAR will be available whenever ActiveMQ is
running, so a simple HTTP request can determine whether the ActiveMQ module has been started.</P>
+<P>The easiest type of WebLogic application to configure with all the needed ActiveMQ
libraries and configuration and not much else is a web application.  The JARs go in <TT>WEB-INF/lib/</TT>
and config files typically in <TT>WEB-INF/</TT>.  The only necessary configuration
for the web application itself is to install a listener that will start and stop ActiveMQ
when the web application is started and stopped.  There are also a couple optional classes
that can be used to integrate ActiveMQ with WebLogic&apos;s management and security systems.
 Additionally, in this example, a simple web page included in the WAR will be available whenever
ActiveMQ is running, so a simple HTTP request can determine whether the ActiveMQ module has
been started.</P>
 
 <H4><A name="WebLogicIntegration-ManagementOptions"></A>Management Options</H4>
 
@@ -413,13 +384,13 @@
 </UL>
 
 
-<H4><A name="WebLogicIntegration-SecurityOptions"></A>Security Options</H4>
+<P>The sample below includes an optional class that lets ActiveMQ hook into the WebLogic
runtime MBeanServer.  This means ActiveMQ MBeans will appear alongside WebLogic MBeans (and
even JVM MBeans if they are enabled).  This means management clients will access ActiveMQ
MBeans through the normal WebLogic listen port (e.g. 7001) rather than using a dedicated JMX
port, though IIOP must be enabled for this to work.  However, note that this is optional,
and you can skip this class and use one of the other approaches (JVM or embedded MBeanServer)
to expose the ActiveMQ MBeans.</P>
 
-<P>ActiveMQ has optional authentication and authorization plugins, which are based
on JAAS.  Fortunately, WebLogic provides a JAAS LoginModule that performs the authentication
against the default WebLogic security realm, and returns the appropriate principals for authorization.
 Some wiring is required to link these together, but the bottom line is that ActiveMQ can
use the WebLogic security realm to process a login and then you can configure the WebLogic
principals (users and/or groups) that should be allowed to connect.</P>
+<H4><A name="WebLogicIntegration-SecurityOptions"></A>Security Options</H4>
 
-<P>You may choose to use authentication only, in which case any user with a valid WebLogic
login can access ActiveMQ.  You may also add authorization to that, so that the ActiveMQ broker
as a whole or individual destinations limit the users which can interact with them.</P>
+<P>ActiveMQ has optional authentication and authorization plugins, which are based
on JAAS.  Fortunately, WebLogic provides a JAAS LoginModule that performs the authentication
against the default WebLogic security realm, and returns the appropriate principals for authorization.
 Unfortunately, by default, ActiveMQ cannot authorize access to specific users within the
security realm based on WebLogic principals, meaning either there&apos;s no security or
a login is required but any user with a valid login has full access to ActiveMQ.  However,
with custom security classes like the ones shown below, ActiveMQ can use the WebLogic security
realm to process a login and then you can configure the WebLogic principals (users and/or
groups) that should be allowed to perform read/write/create/remove actions on a per-broker
or per-destination basis.</P>
 
-<P>For purposes of this example, we have only implemented an authorization approach
that allows any member of a single specific WebLogic group to access all resources in ActiveMQ.
 Between the authorization plugin provided here and the default one provided with ActiveMQ,
you should have the foundation to enhance this if more feature-rich authorization is required.</P>
+<P>You may choose to use authentication only, in which case any user with a valid WebLogic
login can access ActiveMQ, and no custom code is necessary.  You may also add authorization
to that using some custom code, to apply specific security constraints to specific users or
destinations.  For purposes of this example, we have only implemented an authorization approach
that allows any member of a single specific WebLogic group to access all resources in ActiveMQ.
 Between the authorization plugin provided here and the default one provided with ActiveMQ,
you should have the foundation to enhance this if more feature-rich authorization is required.</P>
 
 <H4><A name="WebLogicIntegration-ActiveMQIntegrationArchitecture"></A>ActiveMQ
Integration Architecture</H4>
 
@@ -447,7 +418,64 @@
 </UL>
 
 
-<H4><A name="WebLogicIntegration-CodeandConfigurationFiles"></A>Code and
Configuration Files</H4>
+<H4><A name="WebLogicIntegration-BuildingtheActiveMQtoWebLogicIntegrationWAR"></A>Building
the ActiveMQ to WebLogic Integration WAR</H4>
+
+<P>This section discusses the code, libraries, and configuration files necessary to
build the ActiveMQ web application that will be deployed in WebLogic Express.</P>
+
+<H5><A name="WebLogicIntegration-StartingandStoppingActiveMQ"></A>Starting
and Stopping ActiveMQ</H5>
+
+<P>ActiveMQ needs to start when the web application is deployed or started, and stop
when the web application is stopped or undeployed.  The easiest way to do this is to a use
the commonly available Spring listeners, which start a Spring context, which can point ActiveMQ
to an XBean configuration file, which starts ActiveMQ.  A little roundabout, but it works
well in practice with very little configuration.</P>
+
+<P><B>J2EE WEB-INF/web.xml</B></P>
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-xml"><SPAN class="code-tag">&lt;?xml version=<SPAN class="code-quote">&quot;1.0&quot;</SPAN>
encoding=<SPAN class="code-quote">&quot;UTF-8&quot;</SPAN>?&gt;</SPAN>
+
+&lt;web-app version=<SPAN class="code-quote">&quot;2.4&quot;</SPAN>
+         xmlns=<SPAN class="code-quote">&quot;http://java.sun.com/xml/ns/j2ee&quot;</SPAN>
+         <SPAN class="code-keyword">xmlns:xsi</SPAN>=<SPAN class="code-quote">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</SPAN>
+         xsi:schemaLocation=<SPAN class="code-quote">&quot;http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd&quot;</SPAN> &gt;
+    <SPAN class="code-tag">&lt;listener&gt;</SPAN>
+        <SPAN class="code-tag">&lt;listener-class&gt;</SPAN>org.springframework.web.context.ContextLoaderListener<SPAN
class="code-tag">&lt;/listener-class&gt;</SPAN>
+    <SPAN class="code-tag">&lt;/listener&gt;</SPAN>
+<SPAN class="code-tag">&lt;/web-app&gt;</SPAN></PRE>
+</DIV></DIV>
+<P><B>Spring WEB-INF/applicationContext.xml</B></P>
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-xml"><SPAN class="code-tag">&lt;?xml version=<SPAN class="code-quote">&quot;1.0&quot;</SPAN>
encoding=<SPAN class="code-quote">&quot;UTF-8&quot;</SPAN> ?&gt;</SPAN>
+<SPAN class="code-tag">&lt;!DOCTYPE beans PUBLIC <SPAN class="code-quote">&quot;-//SPRING//DTD
BEAN//EN&quot;</SPAN> <SPAN class="code-quote">&quot;http://www.springframework.org/dtd/spring-beans.dtd&quot;</SPAN>&gt;</SPAN>
+<SPAN class="code-tag">&lt;beans&gt;</SPAN>
+    <SPAN class="code-tag">&lt;bean id=<SPAN class="code-quote">&quot;brokerService&quot;</SPAN>
class=<SPAN class="code-quote">&quot;org.apache.activemq.xbean.BrokerFactoryBean&quot;</SPAN>&gt;</SPAN>
+        <SPAN class="code-tag">&lt;property name=<SPAN class="code-quote">&quot;config&quot;</SPAN>
value=<SPAN class="code-quote">&quot;classpath:activemq-config.xml&quot;</SPAN>/&gt;</SPAN>
+    <SPAN class="code-tag">&lt;/bean&gt;</SPAN>
+<SPAN class="code-tag">&lt;/beans&gt;</SPAN></PRE>
+</DIV></DIV>
+<P>Again, the <TT>web.xml</TT> listener starts Spring and reads the Spring
<TT>META-INF/applicationContext.xml</TT> file (the default location used by the
<TT>ContextLoaderListener</TT>), and the <TT>applicationContext.xml</TT>
indicates that the ActiveMQ configuration file should be read from the class path with the
name <TT>activemq-config.xml</TT>.  That file could be placed in <TT>WEB-INF/classes</TT>
or in a directory on the file system that is added to the WebLogic class path (for ease of
editing).</P>
+
+<P>With this approach, the normal WebLogic deployment tools, admin console, etc. can
be used to deploy, start, stop, and restart ActiveMQ (packaged into a web application WAR).</P>
+
+<H5><A name="WebLogicIntegration-RequiredLibraries"></A>Required Libraries</H5>
+
+<P>ActiveMQ required a number of JARs which should be included in the web application
<TT>WEB-INF/lib</TT> directory.  </P>
+
+<P>This list was generated for ActiveMQ 4.0.1:</P>
+<UL>
+	<LI><TT>activemq-core</TT> (basic ActiveMQ code)</LI>
+	<LI><TT>activemq-jaas</TT> (ActiveMQ security code)</LI>
+	<LI><TT>activeio-core</TT> (ActiveMQ networking layer)</LI>
+	<LI><TT>derby</TT> (embedded DB for persistent messages)</LI>
+	<LI><TT>commons-logging</TT> (logging abstraction library)</LI>
+	<LI><TT>log4j</TT> (actual logging package used)</LI>
+	<LI><TT>backport-util-concurrent</TT> (concurrency utility library)</LI>
+	<LI><TT>spring</TT> (used to configure and start ActiveMQ)</LI>
+	<LI><TT>xbean-spring</TT> (used to configure ActiveMQ)</LI>
+</UL>
+
+
+<P>Additionally, to build the custom security plugins, the WebLogic <TT>server/lib/weblogic.jar</TT>
is presently required at compile time.</P>
+
+<P>Of these, Derby could be omitted if ActiveMQ was configured to not use a database
for persistence or to use a separate database for persistence.  The WebLogic JAR is needed
only at build time (it&apos;s provided by the server at runtime).  Spring could be omitted
if a different strategy was used to start and stop ActiveMQ when the web app was started or
stopped (a little custom code could replace this dependency).  The rest are probably unavoidable,
unless ActiveMQ changes its dependencies in a future version.</P>
+
+<H5><A name="WebLogicIntegration-CodeandConfigurationFiles"></A>Code and
Configuration Files</H5>
 
 <P><B>TODO:</B> show and discuss code for:</P>
 <UL>
@@ -458,10 +486,6 @@
 </UL>
 
 
-<H4><A name="WebLogicIntegration-ActiveMQWebApplication"></A>ActiveMQ Web
Application</H4>
-
-<P><B>TODO:</B> List the JARs that need to go into the web app, and repeat
or refer to the <TT>web.xml</TT> and <TT>applicationContext.xml</TT>
listed above</P>
-
 <H4><A name="WebLogicIntegration-InstallationProcedure"></A>Installation
Procedure</H4>
 
 <P>This procedure makes the following assumptions:</P>
@@ -536,8 +560,8 @@
     </DIV>
     <DIV id="site-footer">
           Added by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=ammulder">Aaron
Mulder</A>,
-    last edited by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=chirino">Hiram
Chirino</A> on Sep 01, 2006
-                  &nbsp;(<A href="http://goopen.org/confluence/pages/diffpages.action?pageId=13349&originalId=13362">view
change</A>)
+    last edited by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=ammulder">Aaron
Mulder</A> on Sep 01, 2006
+                  &nbsp;(<A href="http://goopen.org/confluence/pages/diffpages.action?pageId=13349&originalId=13363">view
change</A>)
               
       (<A href="http://goopen.org/confluence/pages/editpage.action?pageId=13349">edit
page</A>)
     </DIV>



Mime
View raw message