Author: vishwanathk
Date: Tue Dec 11 07:33:30 2012
New Revision: 1420020

URL: http://svn.apache.org/viewvc?rev=1420020&view=rev
Log:
Reformat

Modified:
    openejb/site/trunk/content/tomee-and-webspheremq.mdtext

Modified: openejb/site/trunk/content/tomee-and-webspheremq.mdtext
URL: 
http://svn.apache.org/viewvc/openejb/site/trunk/content/tomee-and-webspheremq.mdtext?rev=1420020&r1=1420019&r2=1420020&view=diff
==============================================================================
--- openejb/site/trunk/content/tomee-and-webspheremq.mdtext (original)
+++ openejb/site/trunk/content/tomee-and-webspheremq.mdtext Tue Dec 11 07:33:30 
2012
@@ -16,116 +16,117 @@ Notice:    Licensed to the Apache Softwa
            specific language governing permissions and limitations
            under the License.
 
-**Steps to integrate TomEE with Websphere MQ** <br>
+**Steps to integrate TomEE with Websphere MQ** 
 
 1. Unzip rar file place jars under tomee/lib
 
 2. Added the below to conf/tomee.xml
-
-
-< tomee> </br>
-  < Container id="wmq" type="MESSAGE"><br>
+    
+<pre>
+    &lt;tomee&gt;     
+    &lt;Container id=&quot;wmq&quot; type=&quot;MESSAGE&quot;&gt;
     ResourceAdapter=wmqRA
     MessageListenerInterface=javax.jms.MessageListener
     ActivationSpecClass=com.ibm.mq.connector.inbound.ActivationSpecImpl
-</br>
-  < /Container>
+    &lt;/Container&gt;
 
 
-  < Resource id="wmqRA" type="com.ibm.mq.connector.ResourceAdapterImpl" 
<br>class-name="com.ibm.mq.connector.ResourceAdapterImpl">
-    <br>connectionConcurrency=5  </br>
-    maxConnections=10 </br>
-    logWriterEnabled=true </br>
-    reconnectionRetryCount=5 </br>
-    reconnectionRetryInterval=300000 </br>
-    traceEnabled=false </br>
-    traceLevel=3 </br>
-  < /Resource>
-
-  < Resource **id="qcf"** </br> type="javax.jms.ConnectionFactory" 
class-name="com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl">
-    TransactionSupport=none </br>
-    ResourceAdapter=wmqRA </br>
-    HostName=10.a.b.c </br>  
-    Port=1414 </br>
-    QueueManager=QM_TIERL</br>
-   Channel=SYSTEM.ADMIN.SVRCONN</br>
-   TransportType=Client</br>
-   UserName=xyz</br>
-   Password=*****</br>
-  </Resource>
-
-  < Resource id="wmq-javax.jms.QueueConnectionFactory" </br> 
type="javax.jms.QueueConnectionFactory" 
class-name="com.ibm.mq.connector.outbound.ManagedQueueConnectionFactoryImpl">
-    TransactionSupport=xa </br>
-    ResourceAdapter=wmqRA </br>
-  < /Resource>
-
-  < Resource id="wmq-javax.jms.TopicConnectionFactory" </br> 
type="javax.jms.TopicConnectionFactory" 
class-name="com.ibm.mq.connector.outbound.ManagedTopicConnectionFactoryImpl">
-    TransactionSupport=xa </br>
-    ResourceAdapter=wmqRA </br>
-  < /Resource>
-
-  < Resource **id="queue"** type="javax.jms.Queue" </br> 
-class-name="com.ibm.mq.connector.outbound.MQQueueProxy"> </br>
-    arbitraryProperties </br>
-    baseQueueManagerName </br>
-    baseQueueName </br>
-    CCSID=1208 </br>
-    encoding=NATIVE </br>
-    expiry=APP </br>
-    failIfQuiesce=true </br>
-    persistence=APP </br>
-    priority=APP </br>
-    readAheadClosePolicy=ALL </br>
-    targetClient=JMS </br>
-  </Resource>
-
-  < Resource id="wmq-javax.jms.Topic" type="javax.jms.Topic" 
class-name="com.ibm.mq.connector.outbound.MQTopicProxy">
-    arbitraryProperties </br>
-    baseTopicName </br>
-    brokerCCDurSubQueue=SYSTEM.JMS.D.CC.SUBSCRIBER.QUEUE </br>
-    brokerDurSubQueue=SYSTEM.JMS.D.SUBSCRIBER.QUEUE </br>
-    brokerPubQueue </br>
-    brokerPubQueueManager </br>
-    brokerVersion=1 </br>
-    CCSID=1208 </br>
-    encoding=NATIVE </br>
-    expiry=APP </br>
-    failIfQuiesce=true </br>
-    persistence=APP </br>
-    priority=APP </br>
-    readAheadClosePolicy=ALL </br>
-    targetClient=JMS </br>
-  </Resource> </br>
-
-< /tomee>       
-
-3. in web.xml add the below to access resources</br>
- < resource-ref> </br>
-     < res-ref-name>myqcf< /res-ref-name> </br>
-    < res-type>javax.jms.ConnectionFactory < /res-type></br>
-    < res-auth>Container</res-auth>< /br>
-    < res-sharing-scope>Shareable< /res-sharing-scope></br>
-    < mapped-name>qcf< /mapped-name></br>
-  < /resource-ref>
+   &lt;Resource id=&quot;wmqRA&quot; 
type=&quot;com.ibm.mq.connector.ResourceAdapterImpl&quot; 
class-name=&quot;com.ibm.mq.connector.ResourceAdapterImpl&quot;&gt;
+    connectionConcurrency=5  
+    maxConnections=10 
+    logWriterEnabled=true 
+    reconnectionRetryCount=5 
+    reconnectionRetryInterval=300000 
+    traceEnabled=false 
+    traceLevel=3 
+   &lt;/Resource&gt;
+
+   &lt;Resource **id=&quot;qcf&quot;**  
type=&quot;javax.jms.ConnectionFactory&quot; 
class-name=&quot;com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl&quot;&gt;
+    TransactionSupport=none 
+    ResourceAdapter=wmqRA 
+    HostName=10.a.b.c   
+    Port=1414 
+    QueueManager=QM_TIERL
+   Channel=SYSTEM.ADMIN.SVRCONN
+   TransportType=Client
+   UserName=xyz
+   Password=*****
+  &lt;/Resource&gt;
+
+  &lt;Resource id=&quot;wmq-javax.jms.QueueConnectionFactory&quot;  
type=&quot;javax.jms.QueueConnectionFactory&quot; 
class-name=&quot;com.ibm.mq.connector.outbound.ManagedQueueConnectionFactoryImpl&quot;&gt;
+    TransactionSupport=xa 
+    ResourceAdapter=wmqRA 
+  &lt;/Resource&gt;
+
+  &lt;Resource id=&quot;wmq-javax.jms.TopicConnectionFactory&quot;  
type=&quot;javax.jms.TopicConnectionFactory&quot; 
class-name=&quot;com.ibm.mq.connector.outbound.ManagedTopicConnectionFactoryImpl&quot;&gt;
+    TransactionSupport=xa 
+    ResourceAdapter=wmqRA 
+  &lt;/Resource&gt;
+
+  &lt;Resource **id=&quot;queue&quot;** type=&quot;javax.jms.Queue&quot;  
+class-name=&quot;com.ibm.mq.connector.outbound.MQQueueProxy&quot;&gt; 
+    arbitraryProperties 
+    baseQueueManagerName 
+    baseQueueName 
+    CCSID=1208 
+    encoding=NATIVE 
+    expiry=APP 
+    failIfQuiesce=true 
+    persistence=APP 
+    priority=APP 
+    readAheadClosePolicy=ALL 
+    targetClient=JMS 
+  &lt;/Resource&gt;
+
+  &lt;Resource id=&quot;wmq-javax.jms.Topic&quot; 
type=&quot;javax.jms.Topic&quot; 
class-name=&quot;com.ibm.mq.connector.outbound.MQTopicProxy&quot;&gt;
+    arbitraryProperties 
+    baseTopicName 
+    brokerCCDurSubQueue=SYSTEM.JMS.D.CC.SUBSCRIBER.QUEUE 
+    brokerDurSubQueue=SYSTEM.JMS.D.SUBSCRIBER.QUEUE 
+    brokerPubQueue 
+    brokerPubQueueManager 
+    brokerVersion=1 
+    CCSID=1208 
+    encoding=NATIVE 
+    expiry=APP 
+    failIfQuiesce=true 
+    persistence=APP 
+    priority=APP 
+    readAheadClosePolicy=ALL 
+    targetClient=JMS 
+  &lt;/Resource&gt; 
+
+ &lt;/tomee&gt;         
+
+3. In web.xml add the below to access resources
+ &lt;resource-ref&gt; 
+     &lt;res-ref-name&gt;myqcf&lt; /res-ref-name&gt; 
+    &lt;res-type&gt;javax.jms.ConnectionFactory &lt; /res-type&gt;
+    &lt;res-auth&gt;Container&lt;/res-auth&gt;&lt; /br&gt;
+    &lt;res-sharing-scope&gt;Shareable&lt; /res-sharing-scope&gt;
+    &lt;mapped-name&gt;qcf&lt; /mapped-name&gt;
+  &lt;/resource-ref&gt;
   
- < resource-env-ref></br>
-   < resource-env-ref-name>myqueue< /resource-env-ref-name></br>
-   < resource-env-ref-type>javax.jms.Queue< /resource-env-ref-type></br>
-   < mapped-name>queue< /mapped-name></br>
-  < /resource-env-ref></br>
-
-**Java Code: </br>**
-
-@Resource(name = "qcf") </br>
-private ConnectionFactory connectionFactory; </br>
-@Resource(name = "queue") </br>
-private Queue queue;</br></br>
-Connection connection = connectionFactory.createConnection();</br>
-Session session = connection.createSession(false, 
QueueSession.AUTO_ACKNOWLEDGE);
-MessageProducer producer = session.createProducer(queue);</br>
-TextMessage message = session.createTextMessage();</br>
-message.setText("Test Message");</br>
-connection.start();</br>
-producer.send(message);</br>
-session.close();</br>
-connection.close();</br>
+ &lt;resource-env-ref&gt;
+   &lt;resource-env-ref-name&gt;myqueue&lt; /resource-env-ref-name&gt;
+   &lt;resource-env-ref-type&gt;javax.jms.Queue&lt; /resource-env-ref-type&gt;
+   &lt;mapped-name&gt;queue&lt; /mapped-name&gt;
+  &lt;/resource-env-ref&gt;
+</pre>
+
+**Code:**
+<pre>    
+    @Resource(name = &quot;qcf&quot;) 
+    private ConnectionFactory connectionFactory; 
+    @Resource(name = &quot;queue&quot;) 
+    private Queue queue;
+    Connection connection = connectionFactory.createConnection();
+    Session session = connection.createSession(false, 
QueueSession.AUTO_ACKNOWLEDGE);
+    MessageProducer producer = session.createProducer(queue);
+    TextMessage message = session.createTextMessage();
+    message.setText(&quot;Test Message&quot;);
+    connection.start();
+    producer.send(message);
+    session.close();
+    connection.close();
+</pre>
\ No newline at end of file


Reply via email to