JBoss Community

Configure JBoss AS 7.2 to use ironjacamar mail resource adapter

created by Jody Schering in IronJacamar - View the full discussion

I'm trying to setup a MDB that listens for mail received message for a particular email address. To do this I'm trying to use the ironjacamar mail-1.0.19.Final.rar resource adapter. Unfortunately, I don't know how to configure JBoss AS 7.2 (EAP 6.1) to use the resource adapter. Does anyone know how to configure Jboss to use this resource adapter?

 

I think there are 2 steps:

1. Setup the mail-1.0.19.Final.rar as a resource adapter in the standalone.xml

2. Deploy the mail-1.0.19.Final.rar in deployments directory.

 

Unfortunately I don't know what's needed in the ressource-adapter section of the standalone.xml or if there is any other configuration I need. Any help would be very appreciated.

 

 

 

Here's the information I get from the rar-info.bat script for the rar.

Archive:mail-1.0.19.Final.rar
JCA version:1.5
Type:
InBound
Reauth:
No
Compliant:Yes
Native:
No

 

 

Structure:

----------

META-INF/

META-INF/MANIFEST.MF

META-INF/ra.xml

ironjacamar-mail.jar

 

 

Resource-adapter:

-----------------

Class: org.jboss.jca.adapters.mail.MailResourceAdapter

  Config-property: QueueSize (java.lang.Integer)

 

 

Activation-spec:

----------------

Class: org.jboss.jca.adapters.mail.inflow.MailActivationSpec

  Message-listener: org.jboss.jca.adapters.mail.inflow.MailListener

  Required-config-property: mailServer

  Required-config-property: mailFolder

  Required-config-property: storeProtocol

  Introspected Config-property: debug (java.lang.Boolean)

  Introspected Config-property: flush (java.lang.Boolean)

  Introspected Config-property: maxMessages (java.lang.Integer)

  Introspected Config-property: messageSelector (java.lang.String)

  Introspected Config-property: password (java.lang.String)

  Introspected Config-property: pollingInterval (java.lang.Long)

  Introspected Config-property: port (java.lang.Integer)

  Introspected Config-property: starttls (java.lang.Boolean)

  Introspected Config-property: userName (java.lang.String)

 

 

META-INF/MANIFEST.MF:

---------------------

Manifest-Version: 1.0

Ant-Version: Apache Ant 1.8.4

Created-By: 1.6.0_45-b06 (Sun Microsystems Inc.)

 

 

 

 

META-INF/ra.xml:

----------------

<?xml version="1.0" encoding="UTF-8"?>

 

 

<!-- $Id: ra.xml 71556 2008-04-01 13:39:35Z adrian@jboss.org $ -->

 

 

<connector xmlns="http://java.sun.com/xml/ns/j2ee"

           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee

           http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"

           version="1.5">

 

 

  <description>JBoss JavaMail Resource Adapter</description>

  <display-name>JavaMail Adapter</display-name>

 

  <vendor-name>Red Hat Middleware LLC</vendor-name>

  <eis-type>JavaMail Adapter</eis-type>

  <resourceadapter-version>7.0</resourceadapter-version>

 

 

  <license>

    <description>

JBoss, Home of Professional Open Source.

Copyright 2011, Red Hat Middleware LLC, and individual contributors

as indicated by the @author tags. See the copyright.txt file in the

distribution for a full listing of individual contributors.

 

 

This is free software; you can redistribute it and/or modify it

under the terms of the GNU Lesser General Public License as

published by the Free Software Foundation; either version 2.1 of

the License, or (at your option) any later version.

 

 

This software is distributed in the hope that it will be useful,

but WITHOUT ANY WARRANTY; without even the implied warranty of

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU

Lesser General Public License for more details.

 

 

You should have received a copy of the GNU Lesser General Public

License along with this software; if not, write to the Free

Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA

02110-1301 USA, or see the FSF site: http://www.fsf.org.

    </description>

    <license-required>true</license-required>

  </license>

 

 

  <resourceadapter>

    <resourceadapter-class>org.jboss.jca.adapters.mail.MailResourceAdapter</resourceadapter-class>

    <config-property>

      <config-property-name>QueueSize</config-property-name>

      <config-property-type>java.lang.Integer</config-property-type>

      <config-property-value>1024</config-property-value>

    </config-property>

 

 

    <inbound-resourceadapter>

      <messageadapter>      

        <messagelistener>

          <messagelistener-type>org.jboss.jca.adapters.mail.inflow.MailListener</messagelistener-type>

          <activationspec>

            <activationspec-class>org.jboss.jca.adapters.mail.inflow.MailActivationSpec</activationspec-class>

            <required-config-property>

              <config-property-name>mailServer</config-property-name>

            </required-config-property>

            <required-config-property>

              <config-property-name>mailFolder</config-property-name>

            </required-config-property>

            <required-config-property>

              <config-property-name>storeProtocol</config-property-name>

            </required-config-property>

          </activationspec>

        </messagelistener>

      </messageadapter>

    </inbound-resourceadapter>

 

 

  </resourceadapter>

 

 

</connector>

 

 

Deployment descriptor:

----------------------

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<resource-adapters>

  <resource-adapter>

    <archive>mail-1.0.19.Final.rar</archive>

    <config-property name="QueueSize">1024</config-property>

    <transaction-support>NoTransaction</transaction-support>

  </resource-adapter>

</resource-adapters>

Reply to this message by going to Community

Start a new discussion in IronJacamar at Community