Solved

How to put a message to JMS vendor from PL/SQL?

Posted on 2004-04-28
3
1,109 Views
Last Modified: 2006-11-17
Hi,

Does any one has an examples about using PL/SQL to put a message to JMS vendor queue?
My data base is Oracle 8, and JMS vendor is MQSonic.
I know that all is easy using Oracle application server and other Oracle products, bu maybe there is free tricks?

thanks in advance,
Raimondas
0
Comment
Question by:berniunas
  • 2
3 Comments
 
LVL 8

Expert Comment

by:annamalai77
ID: 10955719
hi there

can u be bit more clear in ur query. if ur asking for auto mailing facility then try the following queries i have. i have not tried using this but this should work for u.

trigger creation
create or replace trigger automail
after insert  on ltm.GIM_ICRR_HDR for each row
DECLARE
 MAIL_FROM  VARCHAR2(50);
 MAIL_TO      VARCHAR2(50);
 SUBJECT    VARCHAR2(50);
 MAILBODY  VARCHAR2(150);
CURSOR cur_email IS
SELECT DISTINCT E_MAIL_NO FROM ltm.PUR_SUPP_MAST
WHERE SUPP_CODE = :NEW.SUPP_CODE;
sup_email  cur_email%ROWTYPE;
Begin
OPEN cur_email;
FETCH cur_email INTO  sup_email;
MAIL_FROM := 'www.LTM.com';
MAIL_TO := sup_email.E_MAIL_NO;
SUBJECT :=' New GRN NO : ' || :NEW.ICRR_NO;
MAILBODY:= 'GRN Details :-  GRN Date is   ' || :NEW.ICRR_DATE ||  '  CRR NO : ' ||
:NEW.CRR_NO || '  SUPPILER NAME :  '  || :NEW.SUPP_NAME;
auto_mail_proc(MAIL_FROM,MAIL_TO,SUBJECT,MAILBODY);
CLOSE cur_email;
End;
/

also go thru the oracle documentation for mailing
regards
annamalai
0
 

Author Comment

by:berniunas
ID: 10956220
thanks for your answer, but i need not mailing, but i need how to connect to
JMS (java message service) vendor and to put a message into a queue.

thanks again
0
 
LVL 8

Accepted Solution

by:
annamalai77 earned 250 total points
ID: 10956459
hi there

try the following link from oracle JMS.

http://otn.oracle.com/sample_code/tech/java/jsp/samples/jms/Readme.html

also try this link also

http://www.onjava.com/pub/a/onjava/2001/05/03/jms_primer.html

regards
annamalai
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now