- This topic has 2 replies, 2 voices, and was last updated 17 years, 5 months ago by
Renen.
-
AuthorPosts
-
RenenMemberHello,
I would like to add a “reference” to the jboss supplied rar file mail-ra.rar.
How do I go about this?
I can force a reference through the project build path. But this doesn’t actually work.
MyEclipse 6.0.0GA
JBoss 4.2.2GAThank you for your input!
renen.
February 7, 2008 at 7:06 am #281547
Loyal WaterMemberCan you please rephrase the question for me. Are you trying to add this to your project ?
Also, can you go to MyEclipse > Installation Summary > Installation Details and paste the information here for me.
February 7, 2008 at 8:51 am #281551
RenenMemberHi Nipun,
Thanks for the reply.
mail-ra.rar, contains, if I understand correctly, a JCA resource adapter that allows JBoss to connect a JMS queue to a POP3 mail box (see http://wiki.jboss.org/wiki/Wiki.jsp?page=InboundJavaMail). Certainly, it appears to contain the worker classes necessary to make this happen.
I am running a standard JBOSS 4.2.2 installation and mail-ra-rar is located in my deploy directory.
Normally I would have accessed these resources by simply adding a reference to an external library (under project properties, build path). That doesn’t work for this resource. And this is the problem I am trying to solve.
At the risk of being verbose, here is the code from http://wiki.jboss.org/wiki/Wiki.jsp?page=InboundJavaMail that I am trying to get to work:
import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.mail.Message;import org.jboss.annotation.ejb.ResourceAdapter;
import org.jboss.resource.adapter.mail.inflow.MailListener;
import org.jboss.logging.Logger;/**
* A JavaMail based MDB for EJB3 use
*/
@MessageDriven(activationConfig={
@ActivationConfigProperty(propertyName=”mailServer”, propertyValue=”mailHost”),
@ActivationConfigProperty(propertyName=”mailFolder”, propertyValue=”INBOX”),
@ActivationConfigProperty(propertyName=”storeProtocol”, propertyValue=”imap”),
@ActivationConfigProperty(propertyName=”userName”, propertyValue=””),
@ActivationConfigProperty(propertyName=”password”, propertyValue=”seam”)
})
@ResourceAdapter(“mail-ra.rar”)
public class EJB3TestJavaMailMDB implements MailListener
{
private static Logger log = Logger.getLogger(EJB3TestJavaMailMDB.class);public void onMessage(Message msg)
{
log.info(“onMessage, msg=”+msg);
}
}Thanks in advance for your input!
Here is my config:
*** Date:
07 February 2008 04:36:57 PM** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.5.0_11*** MyEclipse details:
MyEclipse Enterprise Workbench
Version: 6.0.0 GA
Build id: 6.0.0-GA-200708*** Eclipse details:
MyEclipse Enterprise WorkbenchVersion: 6.0.0 GA
Build id: 6.0.0-GA-200708Eclipse Graphical Editing Framework
Version: 3.3.0.v20070620
Build id: 20070620-1021Eclipse Platform
Version: 3.3.0.v20070612-_19UEkLEzwsdF9jSqQ-G
Build id: I20070625-1500Eclipse RCP
Version: 3.3.0.v20070607-8y8eE8NEbsN3X_fjWS8HPNG
Build id: I20070625-1500Eclipse Java Development Tools
Version: 3.3.0.v20070606-0010-7o7jCHEFpPoqQYvnXqejeR
Build id: I20070625-1500Eclipse Plug-in Development Environment
Version: 3.3.0.v20070607-7N7M-DUUEF6Ez0H46IcCC
Build id: I20070625-1500Eclipse Project SDK
Version: 3.3.0.v20070607-7M7J-BIolz-OcxWxvWAPSfLPqevO
Build id: I20070625-1500Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-showsplash
-launcher
C:\Program Files\MyEclipse 6.0\eclipse\eclipse.exe
-name
Eclipse
–launcher.library
C:\Program Files\MyEclipse 6.0\eclipse\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.0.v20070523\eclipse_1017a.dll
-startup
C:\Program Files\MyEclipse 6.0\eclipse\plugins\org.eclipse.equinox.launcher_1.0.0.v20070606.jar
-exitdata
183c_7c
-vm
C:\Program Files\MyEclipse 6.0\jre\bin\javaw.exe -
AuthorPosts