DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: How to send an email by invoking Java from a trigger?

  1. #1
    Brent Guest

    How to send an email by invoking Java from a trigger?


    Hi,

    I am an oracle novice, so any help would be appreciated immensly.

    Currently I have EJBs and Java classes created to send emails for my application.
    Now I would like to be able to send an email after a trigger is run on one
    of my Oracle 8i tables. How can I hook up to my java classes and EJBs from
    Oracle?

    Has anyone ever made this happen? Any ideas?

    Thanks in advance,
    Brent

  2. #2
    Mitchell Gibbs Guest

    Re: How to send an email by invoking Java from a trigger?


    Brent,

    I did this through an Oracle job, but you could just as easily do it through
    a trigger. You need to load all the necessary Java classes into the Oracle
    user (JavaMail,etc.), grant the user the appropriate Java roles, and then
    create a procedure or function to call the Java method from PL/SQL. Then
    call that procedure or function in the trigger event. I did not use EJBs
    though...

    There are some good examples on technet.oracle.com.

    Good luck!

    Mitch

    "Brent" <brentlaufenberg@hotmail.com> wrote:
    >
    >Hi,
    >
    >I am an oracle novice, so any help would be appreciated immensly.
    >
    >Currently I have EJBs and Java classes created to send emails for my application.
    > Now I would like to be able to send an email after a trigger is run on

    one
    >of my Oracle 8i tables. How can I hook up to my java classes and EJBs from
    >Oracle?
    >
    >Has anyone ever made this happen? Any ideas?
    >
    >Thanks in advance,
    >Brent



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center