You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2012/06/26 23:48:12 UTC

svn commit: r1354251 - in /openejb/site/trunk/content: changing-jms-implementations.mdtext documentation.mdtext powered-by.mdtext

Author: dblevins
Date: Tue Jun 26 21:48:11 2012
New Revision: 1354251

URL: http://svn.apache.org/viewvc?rev=1354251&view=rev
Log:
Doc on Changing the JMS Implementation

Added:
    openejb/site/trunk/content/changing-jms-implementations.mdtext   (with props)
Modified:
    openejb/site/trunk/content/documentation.mdtext
    openejb/site/trunk/content/powered-by.mdtext

Added: openejb/site/trunk/content/changing-jms-implementations.mdtext
URL: http://svn.apache.org/viewvc/openejb/site/trunk/content/changing-jms-implementations.mdtext?rev=1354251&view=auto
==============================================================================
--- openejb/site/trunk/content/changing-jms-implementations.mdtext (added)
+++ openejb/site/trunk/content/changing-jms-implementations.mdtext Tue Jun 26 21:48:11 2012
@@ -0,0 +1,125 @@
+Title: Changing JMS Implementations
+Notice:    Licensed to the Apache Software Foundation (ASF) under one
+           or more contributor license agreements.  See the NOTICE file
+           distributed with this work for additional information
+           regarding copyright ownership.  The ASF licenses this file
+           to you under the Apache License, Version 2.0 (the
+           "License"); you may not use this file except in compliance
+           with the License.  You may obtain a copy of the License at
+           .
+             http://www.apache.org/licenses/LICENSE-2.0
+           .
+           Unless required by applicable law or agreed to in writing,
+           software distributed under the License is distributed on an
+           "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+           KIND, either express or implied.  See the License for the
+           specific language governing permissions and limitations
+           under the License.
+
+ActiveMQ is the default JMS provider in Apache TomEE and OpenEJB.
+
+Changing JMS implementation is as simple as using that implementation's Java EE Connector.  The connector which will be a `.rar` file should be bundled with the application in a `.ear` 
+file.  All JMS usage in that `.ear` will favor the JMS ConnectionFactory and Topic and Queue implementations
+that are configured in the `.rar` file rather than ActiveMQ.
+
+If the JMS implementation does not have a `.rar` file, there are still some options for wiring in an alternate implementation.
+
+# Generic JMS Resource Adapter
+
+If the JMS implementation does not have a Resource Archive (`.rar` file) that defines a compliant Resource Adapter, the [Generic Resource Adapter for JMS](http://genericjmsra.java.net/) should work fine.
+
+To use this Adapter in TomEE or OpenEJB you'll need to create a `services-jar.xml` file and include that in a jar file and add it to the `<tomee.home>/lib/` directory.
+Then you can declare `ConnectionFactory`, `Topic`, and `Queue` and more via the `tomee.xml` file.
+
+The one below should be considered boiler plate.  Updating it to contain some useful default values for your JMS implementation would be good.  These values can be overridden in the `tomee.xml` or `openejb.xml`
+
+Let's say that the following file lives in the jar at `META-INF/org.superbiz/services-jar.xml`
+
+    <?xml version="1.0" encoding="UTF-8"?>
+    <ServiceJar>
+      <ServiceProvider
+          id="genericra"
+          service="Resource"
+          types="GenericJMSRA"
+          class-name="com.sun.genericra.GenericJMSRA">
+              UserName
+              Password
+              ProviderIntegrationMode
+              ConnectionFactoryClassName
+              QueueConnectionFactoryClassName
+              TopicConnectionFactoryClassName
+              XAConnectionFactoryClassName
+              XAQueueConnectionFactoryClassName
+              XATopicConnectionFactoryClassName
+              UnifiedDestinationClassName
+              TopicClassName
+              QueueClassName
+              SupportsXA
+              ConnectionFactoryProperties
+              JndiProperties
+              CommonSetterMethodName
+              RMPolicy
+              LogLevel
+              DeliveryType
+              UseFirstXAForRedelivery
+      </ServiceProvider>
+    
+      <ServiceProvider
+          id="ConnectionFactory"
+          service="Resource"
+          types="javax.jms.ConnectionFactory, javax.jms.QueueConnectionFactory, javax.jms.TopicConnectionFactory, QueueConnectionFactory, TopicConnectionFactory"
+          class-name="com.sun.genericra.outbound.ManagedJMSConnectionFactory">
+              ConnectionFactoryJndiName
+              ClientId
+              ConnectionValidationEnabled
+              ResourceAdapter
+      </ServiceProvider>
+    
+      <ServiceProvider
+          id="Queue"
+          service="Resource"
+          types="javax.jms.Queue, Queue"
+          class-name="com.sun.genericra.outbound.QueueProxy">
+              DestinationJndiName
+              ResourceAdapter
+              UserName
+              Password
+              JndiProperties
+              QueueClassName
+      </ServiceProvider>
+    
+      <ServiceProvider
+          id="Topic"
+          service="Resource"
+          types="javax.jms.Topic, Topic"
+          class-name="com.sun.genericra.outbound.TopicProxy">
+              DestinationJndiName
+              ResourceAdapter
+              UserName
+              Password
+              JndiProperties
+              TopicClassName
+      </ServiceProvider>
+    </ServiceJar>
+
+Once this file is packed in a jar and added to the `<tomee.home>/lib` or  `<openejb.home>/lib` directory, you can 
+then declare and configure "instances" of these things in your `tomee.xml` or `openejb.xml` config file as follows:
+
+    <Resource id="My Generic Adapter" type="GenericJMSRA" provider="org.superbiz">
+    AdapterProperty1 PropertyValue1
+    AdapterProperty2 PropertyValue2
+    ...
+    </Resource>
+
+This is basically the same to all configuration in TomEE/OpenEJB, but with the addition that you must specify the 
+`provider` attribute so the server knows where to look for the `service-jar.xml` file that defines the resource and all its defaults.
+
+In this example the file is in `META-INF/org.superbiz/service-jar.xml`, so the `provider` attribute should specify `org.superbiz`.  You can use whatever prefix you like for the `provider` id, though for obvious reasons we'd advise not using `org.apache.openejb` or `org.apache.tomee` in the prefix.
+
+
+
+
+http://osdir.com/ml/users.openejb.apache.org/2010-01/msg00086.html
+
+
+

Propchange: openejb/site/trunk/content/changing-jms-implementations.mdtext
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: openejb/site/trunk/content/documentation.mdtext
URL: http://svn.apache.org/viewvc/openejb/site/trunk/content/documentation.mdtext?rev=1354251&r1=1354250&r2=1354251&view=diff
==============================================================================
--- openejb/site/trunk/content/documentation.mdtext (original)
+++ openejb/site/trunk/content/documentation.mdtext Tue Jun 26 21:48:11 2012
@@ -26,6 +26,7 @@ See also the [examples page](examples-tr
 - [Security](security.html)
 - [Clients](clients.html)
 - [JNDI Names](jndi-names.html)
+- [Changing JMS implementations](changing-jms-implementations.html)
 }
 
 {span-one-third

Modified: openejb/site/trunk/content/powered-by.mdtext
URL: http://svn.apache.org/viewvc/openejb/site/trunk/content/powered-by.mdtext?rev=1354251&r1=1354250&r2=1354251&view=diff
==============================================================================
--- openejb/site/trunk/content/powered-by.mdtext (original)
+++ openejb/site/trunk/content/powered-by.mdtext Tue Jun 26 21:48:11 2012
@@ -1,6 +1,10 @@
 Title: Powered By
 
 - [Foo][1]
+- [Buzz][2]
+- [Name][3]
 
 
-  [1]: http://foo.bar/
\ No newline at end of file
+  [1]: http://foo.bar/
+  [2]: http://buzz.foo
+  [3]: http://name
\ No newline at end of file