geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Mulder" <ammul...@alumni.princeton.edu>
Subject Re: Mailing from geronimo
Date Fri, 29 Sep 2006 13:05:44 GMT
Rick, I'm confused about the syntax you posted.  I think there are
several problems:

 * It looks like something out of config.xml, which does not work in a
deployment plan
 * It uses a groupId of org.apache.geronimo.* which is not valid for
Geronimo 1.1.x.
 * You're claiming that something can be looked up in java:comp/env
but you didn't use e.g. a resource ref, so nothing mail-related will
be in java:comp/env

Can you take another stab at your Geroinmo 1.1.1 mail example for Peter?

Thanks,
     Aaron

On 9/29/06, Rick McGuire <rickmcg@gmail.com> wrote:
> Peter Petersson wrote:
> > Hi all!
> >
> > I quite new to Geronimo (using 1.1.1) and have some problems geting
> > mail to work from a geronimo-quartz job.
> > As I understand it I need to set up a gbean or do some other
> > configuration for javamail to work (?).
> Yes, your application needs to have a dependency on the javamail config
> to ensure you're getting all of the correct jar files on your
> classpath.  The protocol problem you cite below is a symptom of not
> having that.  Adding the following to your deployment plan should be
> sufficient:
>
>     <module name="org.apache.geronimo.configs/javamail/1.1.1/car"/>
>
> That should be sufficient to get the classes on your classpath and allow
> you do drive everything from your code.  Additionally, you can do some
> basic session configuration in the plan (as opposed to keeping the
> configuration in your code) by using:
>
>     <module name="org.apache.geronimo.configs/javamail/1.1.1/car">
>         <gbean name="SMTPTransport">
>             <attribute name="host">smtp.myisp.com</attribute>
>             <attribute name="port">25</attribute>
>         </gbean>
>     </module>
>
> Then in your application, create the mail Session instance using
>
>     InitialContext ic = new InitialContext();
>     Session mailSession = (Session)
> ic.lookup("java:comp/env/mail/MailSession");
>
> When you request the transport instance from this session, this will
> pick up the SMTP configuration from the plan.
>
> Rick
>
>
> > The example i have folowed for the Quartz Scheduler Plugin over at
> > http://gplugins.sourceforge.net/ have a nice setup including mailing
> > (in the "Deployable Jobs Example" section) but it dose not go into
> > details on howto set up mailing (its not the scope of the example).
> >
> > What do I need to do to get it to work? as it is now i get this exception
> >
> > MessagingException Unable to locate provider for protocol: smtp
> >
> > Anny good pointer out there to get mailing working in Geronimo ?
> >
> > Cheers
> >  Peter
> >
>
>

Mime
View raw message