[jboss-user] [JCA/JBoss] - How to deploy resource adapter in JBoss

ihari2004 do-not-reply at jboss.com
Wed Oct 10 03:44:02 EDT 2007


hi frenz,
        I am new to jboss and j2ee, i have to deploy one resource adapter for IMAP and POP3 in jboss,  It is bundled in two packages

org.jboss.seam.mail.ra (has 9 java classes)
 + in which InboundMailResourceAdapter class implements Resource Adapter.

org.jboss.seam.example.mailer (has one ReceiveEmailExample class)

and one ra.xml as shown

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

<connector xmlns="http://java.sun.com/xml/ns/j2ee"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.5">
	<display-name>Incoming Email Resource Adapter</display-name>
	<vendor-name>Peter Muir</vendor-name>
	<eis-type>POP3 and IMAP email</eis-type>
	<resourceadapter-version>1.0</resourceadapter-version>
	
		<resourceadapter-class>
			org.jboss.seam.mail.ra.InboundMailResourceAdapter
		</resourceadapter-class>
		<inbound-resourceadapter>
			
				
					<messagelistener-type>
						org.jboss.seam.mail.ra.InboundMailListener
					</messagelistener-type>
					
						<activationspec-class>
							org.jboss.seam.mail.ra.InboundMailActivationSpec
						</activationspec-class>
						<required-config-property>
							<config-property-name>
								host
							</config-property-name>
						</required-config-property>
						<required-config-property>
							<config-property-name>
								username
							</config-property-name>
						</required-config-property>
						<required-config-property>
							<config-property-name>
								password
							</config-property-name>
						</required-config-property>
						<required-config-property>
							<config-property-name>
								interval
							</config-property-name>
						</required-config-property>
						<required-config-property>
							<config-property-name>
								type
							</config-property-name>
						</required-config-property>
					
				
			
		</inbound-resourceadapter>
	



First i complied all java files in eclipse by providing required jar in path.
Then i bundled these class files and ra.xml into mail_ra.rar.
Now to deploy it in JBoss i have written a mail_ds.xml as shown

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE connection-factories PUBLIC
        "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
        "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">

<connection-factories>

    <no-tx-connection-factory>
        <jndi-name>Incoming Email Resource Adapter</jndi-name>
        <rar-name>mail_ra.rar</rar-name>
        <connection-definition>
            org.jboss.seam.mail.ra.InboundMailResourceAdapter
        </connection-definition>
        <config-property name="RepositoryPath"
            type="java.lang.String">..</config-property>
    </no-tx-connection-factory>

</connection-factories>


My queries are the parameter value of <connection-definition> must be a connectionfactory class, but the class i provided is implementing ResourceAdapter.
Also when i tried to deploy it in JBoss AS 4.2.1, it failed.
I also decompiled some ra.jars present in deploy folder and verified the java files. The implementation of those files is different with the files i was tying to deploy.
Could any one suggest me, the process to deploy resource adapter in jboss?
I have read abt JCA and resource adapters 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093310#4093310

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093310



More information about the jboss-user mailing list