You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Mark Derricutt <ma...@talios.com> on 2016/03/06 22:28:40 UTC

Felix and JavaMail

Hey all,

I was wondering what the current status of JavaMail was with Felix and OSGi ( and Karaf )?  Is it possible to just install some bundles and use Javamail or do we need to update felix configuration with boot class loader overrides still?

All my google searches just come up with all the old and ancient "you need to make your own bundle" camp and still mess with class loaders.

Makr


-- 
Mark Derricutt
http://www.theoryinpractice.net
http://www.chaliceofblood.net
http://plus.google.com/+MarkDerricutt
http://twitter.com/talios
http://facebook.com/mderricutt

Re: Felix and JavaMail

Posted by Balázs Zsoldos <ba...@everit.biz>.
Hi Mark,

we have used the following artifact with no issue:

http://search.maven.org/#artifactdetails%7Ccom.sun.mail%7Cjavax.mail%7C1.5.5%7Cjar

Additional notes:

We created a wrapper project that makes it much easier to send emails
(MimeMessage class is not so easy to work with):
http://www.everit.org/email-javamail/
It is based on email-api: http://www.everit.org/email-api/

Also, there are some other projects that you might be interested in:

   - email-javamail-dkim <https://github.com/everit-org/email-javamail-dkim>:
   Possibility to attach DKIM signature to your mail if you use our
   email-javamail. DKIM is useful not to get your e-mail lost in the spam
   folder
   - email-store-ri <https://github.com/everit-org/email-store-ri>: Stores
   email defined in email-api within persistent database
   - email-queue <https://github.com/everit-org/email-queue>: Persists
   email in a queue before sending them out by using email-store. We had the
   experience that sending out one email takes 2-3 seconds, but sending out 10
   takes the same amount of time. Building up the connection with the SMTP
   server is the slow part. Not to have a hang on the user interface, it is
   better to put the emails into the queue and send them together frequently
   with a scheduler. This module will be released to maven central within 24
   hours, and documentation comes soon, too.

All of them are available on maven-central
<http://search.maven.org/#search%7Cga%7C1%7Ceverit%20email>.

If you are interested in these but having problems using them, please let
me know.

Kind regards,
*Balázs **Zsoldos*

On Sun, Mar 6, 2016 at 10:28 PM, Mark Derricutt <ma...@talios.com> wrote:

> Hey all,
>
> I was wondering what the current status of JavaMail was with Felix and
> OSGi ( and Karaf )?  Is it possible to just install some bundles and use
> Javamail or do we need to update felix configuration with boot class loader
> overrides still?
>
> All my google searches just come up with all the old and ancient "you need
> to make your own bundle" camp and still mess with class loaders.
>
> Makr
>
>
> --
> Mark Derricutt
> http://www.theoryinpractice.net
> http://www.chaliceofblood.net
> http://plus.google.com/+MarkDerricutt
> http://twitter.com/talios
> http://facebook.com/mderricutt
>

Re: Felix and JavaMail

Posted by Mark Derricutt <ma...@talios.com>.
On 7 Mar 2016, at 20:56, Paul Bakker wrote:

> Hi Mark,
>
> Do you explicitly need JavaMail, or do you just want to send mail from Java?
> If you don't need JavaMail, there's a component in Amdatu that offers this. It supports both smtp and AWS SES.
> http://amdatu.org/components/email.html <http://amdatu.org/components/email.html>

Not explicitly - we wrap javamail access in our own higher-level service which abstracts away the majority of things. Amdatu looks good, tho I see it uses commons-email which in turn is a wrapper for JavaMail.

Looks like one of the root causes of our problems is this OLD system (this layer dates back almost 8-9 years now ) was depending on javamail 1.4 - from before it was in Maven Central, and I believe before it had any OSGi metadata on it so it looks like it was just dropped into the ./lib directory of the karaf ( and felix instance before it ).

Things seem to all startup under 4.0.4 (so nice to see the full app running on a new container ) now altho now just hitting activation framework issues with class loaders - it's been soooooo long since I've even THOUGHT about the evil Activation Framework :)

mark



-- 
Mark Derricutt
http://www.theoryinpractice.net
http://www.chaliceofblood.net
http://plus.google.com/+MarkDerricutt
http://twitter.com/talios
http://facebook.com/mderricutt

Re: Felix and JavaMail

Posted by Paul Bakker <pa...@gmail.com>.
Hi Mark,

Do you explicitly need JavaMail, or do you just want to send mail from Java? 
If you don't need JavaMail, there's a component in Amdatu that offers this. It supports both smtp and AWS SES.
http://amdatu.org/components/email.html <http://amdatu.org/components/email.html>

Cheers,

Paul

> On 07 Mar 2016, at 08:16, Frank Langel <fr...@frankjlangel.com> wrote:
> 
> Neil,
> 
> I shouldn’t have misquoted you. The statements from you book where incorrectly summarized by me. I realized that when pressing send button.
> 
> Sorry
> Frank
> 
> 
> 
> 
> On 3/7/16, 8:14 AM, "Neil Bartlett" <nj...@gmail.com> wrote:
> 
>> Hi Frank,
>> 
>> I don't say Karaf is bloated as such. It's much better than the old JavaEE
>> app servers.
>> 
>> It's just that I have never seen a good reason to use it instead of plain
>> OSGi.
>> 
>> Regards, Neil.
>> On 7 Mar 2016 08:02, "Frank Langel" <fr...@frankjlangel.com> wrote:
>> 
>>> Well,
>>> 
>>> Karaf is a strange journey. Some people like it, some don’t.
>>> I am more in the Neil Bartlett kind of Apache Felix camp who thinks Karaf
>>> too bloated.
>>> 
>>> I discovered Hana is using Eclipse Equinox, so I need to get familiar with
>>> that.
>>> 
>>> Let me know if you need help with the javamail, should be easy sailing
>>> though.
>>> Frank
>>> 
>>> 
>>> From:  Mark Derricutt
>>> Reply-To:  <us...@felix.apache.org>
>>> Date:  Monday, March 7, 2016 at 1:26 AM
>>> To:  <us...@felix.apache.org>
>>> Subject:  Re: Felix and JavaMail
>>> 
>>> On 7 Mar 2016, at 10:32, Frank Langel wrote:
>>> 
>>> I never had any issues sending mail. What exactly is your issue?
>>> 
>>> Looks like Karaf already ships with javamail so it looks like it was more
>>> an issue with using the <packaging>kar</packaging> lifecycle and some extra
>>> strict checking of dependencies.
>>> 
>>> I'm working thru migrating a project deployed via a rather ancient version
>>> of karaf so I think it's more just a matter of working out the build
>>> process to package things up.  Sending email from the application in
>>> question is already working fine.
>>> 
>>> Mark
>>> 
>>> --
>>> Mark Derricutt
>>> http://www.theoryinpractice.net
>>> http://www.chaliceofblood.net
>>> http://plus.google.com/+MarkDerricutt
>>> http://twitter.com/talios
>>> http://facebook.com/mderricutt
>>> 
>>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 


Re: Felix and JavaMail

Posted by Frank Langel <fr...@frankjlangel.com>.
Neil,

I shouldn’t have misquoted you. The statements from you book where incorrectly summarized by me. I realized that when pressing send button.

Sorry
Frank




On 3/7/16, 8:14 AM, "Neil Bartlett" <nj...@gmail.com> wrote:

>Hi Frank,
>
>I don't say Karaf is bloated as such. It's much better than the old JavaEE
>app servers.
>
>It's just that I have never seen a good reason to use it instead of plain
>OSGi.
>
>Regards, Neil.
>On 7 Mar 2016 08:02, "Frank Langel" <fr...@frankjlangel.com> wrote:
>
>> Well,
>>
>> Karaf is a strange journey. Some people like it, some don’t.
>> I am more in the Neil Bartlett kind of Apache Felix camp who thinks Karaf
>> too bloated.
>>
>> I discovered Hana is using Eclipse Equinox, so I need to get familiar with
>> that.
>>
>> Let me know if you need help with the javamail, should be easy sailing
>> though.
>> Frank
>>
>>
>> From:  Mark Derricutt
>> Reply-To:  <us...@felix.apache.org>
>> Date:  Monday, March 7, 2016 at 1:26 AM
>> To:  <us...@felix.apache.org>
>> Subject:  Re: Felix and JavaMail
>>
>> On 7 Mar 2016, at 10:32, Frank Langel wrote:
>>
>> I never had any issues sending mail. What exactly is your issue?
>>
>> Looks like Karaf already ships with javamail so it looks like it was more
>> an issue with using the <packaging>kar</packaging> lifecycle and some extra
>> strict checking of dependencies.
>>
>> I'm working thru migrating a project deployed via a rather ancient version
>> of karaf so I think it's more just a matter of working out the build
>> process to package things up.  Sending email from the application in
>> question is already working fine.
>>
>> Mark
>>
>> --
>> Mark Derricutt
>> http://www.theoryinpractice.net
>> http://www.chaliceofblood.net
>> http://plus.google.com/+MarkDerricutt
>> http://twitter.com/talios
>> http://facebook.com/mderricutt
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Felix and JavaMail

Posted by Neil Bartlett <nj...@gmail.com>.
Hi Frank,

I don't say Karaf is bloated as such. It's much better than the old JavaEE
app servers.

It's just that I have never seen a good reason to use it instead of plain
OSGi.

Regards, Neil.
On 7 Mar 2016 08:02, "Frank Langel" <fr...@frankjlangel.com> wrote:

> Well,
>
> Karaf is a strange journey. Some people like it, some don’t.
> I am more in the Neil Bartlett kind of Apache Felix camp who thinks Karaf
> too bloated.
>
> I discovered Hana is using Eclipse Equinox, so I need to get familiar with
> that.
>
> Let me know if you need help with the javamail, should be easy sailing
> though.
> Frank
>
>
> From:  Mark Derricutt
> Reply-To:  <us...@felix.apache.org>
> Date:  Monday, March 7, 2016 at 1:26 AM
> To:  <us...@felix.apache.org>
> Subject:  Re: Felix and JavaMail
>
> On 7 Mar 2016, at 10:32, Frank Langel wrote:
>
> I never had any issues sending mail. What exactly is your issue?
>
> Looks like Karaf already ships with javamail so it looks like it was more
> an issue with using the <packaging>kar</packaging> lifecycle and some extra
> strict checking of dependencies.
>
> I'm working thru migrating a project deployed via a rather ancient version
> of karaf so I think it's more just a matter of working out the build
> process to package things up.  Sending email from the application in
> question is already working fine.
>
> Mark
>
> --
> Mark Derricutt
> http://www.theoryinpractice.net
> http://www.chaliceofblood.net
> http://plus.google.com/+MarkDerricutt
> http://twitter.com/talios
> http://facebook.com/mderricutt
>
>

Re: Felix and JavaMail

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi guys,

Karaf Minimal is really minimal and ship the minimal needed for Karaf 
itself and applications. Karaf 4.1.x standard distribution will be 
already lighter as we will remove blueprint for instance.

Javamail is not included in Karaf standard distribution: it comes with 
the pax-web feature (and just the API from SMX).

Of course, you can start from Equinox or Felix framework and build your 
stuff, but lot of time, you will end with kind of Karaf (minimal at 
least) ;)

Regards
JB

On 03/07/2016 08:02 AM, Frank Langel wrote:
> Well,
>
> Karaf is a strange journey. Some people like it, some don’t.
> I am more in the Neil Bartlett kind of Apache Felix camp who thinks Karaf too bloated.
>
> I discovered Hana is using Eclipse Equinox, so I need to get familiar with that.
>
> Let me know if you need help with the javamail, should be easy sailing though.
> Frank
>
>
> From:  Mark Derricutt
> Reply-To:  <us...@felix.apache.org>
> Date:  Monday, March 7, 2016 at 1:26 AM
> To:  <us...@felix.apache.org>
> Subject:  Re: Felix and JavaMail
>
> On 7 Mar 2016, at 10:32, Frank Langel wrote:
>
> I never had any issues sending mail. What exactly is your issue?
>
> Looks like Karaf already ships with javamail so it looks like it was more an issue with using the <packaging>kar</packaging> lifecycle and some extra strict checking of dependencies.
>
> I'm working thru migrating a project deployed via a rather ancient version of karaf so I think it's more just a matter of working out the build process to package things up.  Sending email from the application in question is already working fine.
>
> Mark
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Felix and JavaMail

Posted by Frank Langel <fr...@frankjlangel.com>.
Well, 

Karaf is a strange journey. Some people like it, some don’t.
I am more in the Neil Bartlett kind of Apache Felix camp who thinks Karaf too bloated. 

I discovered Hana is using Eclipse Equinox, so I need to get familiar with that.

Let me know if you need help with the javamail, should be easy sailing though.
Frank


From:  Mark Derricutt
Reply-To:  <us...@felix.apache.org>
Date:  Monday, March 7, 2016 at 1:26 AM
To:  <us...@felix.apache.org>
Subject:  Re: Felix and JavaMail

On 7 Mar 2016, at 10:32, Frank Langel wrote:

I never had any issues sending mail. What exactly is your issue?

Looks like Karaf already ships with javamail so it looks like it was more an issue with using the <packaging>kar</packaging> lifecycle and some extra strict checking of dependencies.

I'm working thru migrating a project deployed via a rather ancient version of karaf so I think it's more just a matter of working out the build process to package things up.  Sending email from the application in question is already working fine.

Mark

-- 
Mark Derricutt
http://www.theoryinpractice.net
http://www.chaliceofblood.net
http://plus.google.com/+MarkDerricutt
http://twitter.com/talios
http://facebook.com/mderricutt


Re: Felix and JavaMail

Posted by Mark Derricutt <ma...@talios.com>.
On 7 Mar 2016, at 10:32, Frank Langel wrote:

> I never had any issues sending mail. What exactly is your issue?

Looks like Karaf already ships with javamail so it looks like it was more an issue with using the `<packaging>kar</packaging>` lifecycle and some extra strict checking of dependencies.

I'm working thru migrating a project deployed via a rather ancient version of karaf so I think it's more just a matter of working out the build process to package things up.  Sending email from the application in question is already working fine.

Mark


-- 
Mark Derricutt
http://www.theoryinpractice.net
http://www.chaliceofblood.net
http://plus.google.com/+MarkDerricutt
http://twitter.com/talios
http://facebook.com/mderricutt

Re: Felix and JavaMail

Posted by Frank Langel <fr...@frankjlangel.com>.
I never had any issues sending mail. What exactly is your issue?



On 3/6/16, 10:28 PM, "Mark Derricutt" <ma...@talios.com> wrote:

>Hey all,
>
>I was wondering what the current status of JavaMail was with Felix and OSGi ( and Karaf )?  Is it possible to just install some bundles and use Javamail or do we need to update felix configuration with boot class loader overrides still?
>
>All my google searches just come up with all the old and ancient "you need to make your own bundle" camp and still mess with class loaders.
>
>Makr
>
>
>-- 
>Mark Derricutt
>http://www.theoryinpractice.net
>http://www.chaliceofblood.net
>http://plus.google.com/+MarkDerricutt
>http://twitter.com/talios
>http://facebook.com/mderricutt


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org