james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rauno Palosaari" <ra...@rauno.com>
Subject Getting mailet attributes from a Matcher
Date Tue, 27 Nov 2001 10:50:10 GMT
Hi all.

Is it possible to get mailet-parameters from a Matcher, I wrote a matcher and a mailet:
<mailet match="IsCustomer" class="DoStuff">
     <query>select domain from customer</query>

(What I want to do is to get the Matcher conditions from a db.)

DoStuff.java (mailet) has no problems getting connection, username, etc.
I want to access the parameters from my matcher as well.
getMatcherConfig().getMailetContext().getAttribute("connection"); doesn't do the job unless
somebody sets the attribute first, I guess.

Is there any way around this, i.e. other than passing the parameters in the matcher condition
part (well, it does the job but it's ugly): 
<mailet match="IsCustomer=jdbc:mysql:///whatever,user,something,select domain from customer"


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message