[
https://issues.apache.org/jira/browse/JDKIM-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901444#action_12901444
]
Stefano Bagnara commented on JDKIM-19:
--------------------------------------
please note that simply changing the 2 fields to protect would not allow you to
subclass and change the field value based on mail input because mailets must be
thread safe so fields must not be changed by service executions.
I guess the best solution is to create 2 protected methods (getPrivateKey and
getSignatureTemplate) that by default will lookup the private fields and in
your subclass you can replace their implementation to lookup a db instead of
using a private field).
> Change scope on 2 variables in DKIMSign to support subclassing
> --------------------------------------------------------------
>
> Key: JDKIM-19
> URL: https://issues.apache.org/jira/browse/JDKIM-19
> Project: JAMES jDKIM
> Issue Type: Improvement
> Components: mailet
> Affects Versions: 0.2
> Environment: software, mailet
> Reporter: Jerry Malcolm
> Assignee: Stefano Bagnara
> Fix For: 0.2
>
>
> I need to have separate private keys for DKIM for different domains that I
> host on my server. I plan to create a database table that looks up the
> private key based on the domain. I figured I could subclass your DKIMSign
> mailet, override the service method, set the privateKey and
> signatureTemplate variables and then call the parent service method. But it
> turns out that the privateKey and signatureTemplate variables are scoped to
> 'private'. I know I can just clone the entire method or even the entire
> java class file. But I'd much prefer to inherit everything other than that
> one little change I need. But I can't do it with private scope on the key
> and template.
> Request to change scope on pfivateKey and signatureTemplate variables from
> private to protected to support subclassing of this mailet
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]