2

I have a XPage application where I use JavaMail in one of my managed beans. Currently I have added the jar-file C:\Programme\IBM\Notes\framework\shared\eclipse\plugins\com.ibm.designer.lib.javamail_9.0.0.20130301-1431\lib\mail.jarto the build-path of the manged bean. This works well. But now I want to use a newer version of JavaMail as the Domino server uses version 1.3 but I need version 1.4.x.

I have downloaded the new JavaMail jar-files from Oracle. In Domino Designer (version 9) I add this jar-file to the new design element "Code / Jars" and remove the old jar-files from the build path.
My managed bean is still compiling and running as desired, but if I check the version the bean is using it reports still version 1.3. To check the version number I use the debug property of JavaMail and it's reporting version 1.3 to the domino server console.

Is there a way to tell the domino server to use the jar-files in the application (i.e. the nsf) and not his own? Is there another approach to update the JavaMail version?

The reason I want to use a newer version of JavaMail is as follows: I want to read mails from an imap server with ssl. To avoid the problem of importing ssl-certificates I simply want to trust all hosts. This can be be done via MailSSLSocketFactory, but this is only available since version 1.4.2. Therefore I want to use a newer version of JavaMail.

Another reason I want to use a newer version is as follows: the method "getSortedMessages" of "IMAPFolder" is only available since version 1.4.4. (and so are some other features of JavaMail).

4

3 回答 3

1

这对你来说可能有点太晚了......我认为正确的方法可能是将 jar 文件作为 OSGi 插件包含在内。

我花了一些时间来弄清楚如何做到这一点 - 最近成功了 :-) 我已经在两篇文章中描述了完成这项工作的步骤。第一个是关于将 JAR 包装到插件中:http ://www.dalsgaard-data.eu/blog/wrap-an-existing-jar-file-into-a-plug-in/ - 第二个是关于部署(第一个中有一个链接)。

/约翰

于 2014-02-02T22:33:07.877 回答
0

我在这里遇到了同样的问题,但找到了解决方案。请注意,这不是最好的答案,但它会起作用。只需在此处下载最新的 javamail jar并将 jar 文件重命名为“mail.jar”。只需将 IBM\Notes\framework\shared\eclipse\plugins\com.ibm.designer.lib.javamail_9.0.0.20130301-1431\lib\mail.jar 中的当前文件替换为该文件即可。退出 http 任务并重新启动它。该代码现在将与最新版本一起使用。

于 2014-01-23T20:36:03.907 回答
0

您可以通过创建一个取代支持 JavaMail 库的 OSGi 插件来解决这个问题:com.ibm.designer.lib.javamail。为此,请执行以下操作:

  1. 创建一个 ID 为com.ibm.designer.lib.javamail的 OSGi 插件(Dalsgaard 的操作教程
  2. 将其版本设置为比 Domino 服务器附带的版本更高的数字(要知道版本类型,请告诉 http osgi ss com.ibm.designer.lib.javamail)。截至目前使用 9.0.1.qualifier 应该没问题
  3. 通过更新站点或直接将其复制到 domino\workspace\applications\eclipse\plugins 文件夹下来部署插件。
  4. 重新启动 HTTP 服务。现在将使用更高版本 - 您创建的版本
于 2017-02-11T14:53:23.863 回答