Friday, May 16, 2008

Adding IM (Jabber/XMPP) messaging to Oracle APEX

One of my APEX application relies heavily on email notifications for work flow approval and task assignment notification. A few months ago it occurred to me that it would be really nice to implement IM notification and let users decide how they like to be notified. So I went to work and found a great java open source XMPP/Jabber client called Smack. My first implementation was just a simple class that called smack functions loaded on the DB by loadjava. But I recently found a project started by Adrien Sales that wraps more of the Smack functions such as rosters. To add IM functionality to your application follow these steps:

  1. Download Oracle XMPP/Jabber Instant Messenger for Oracle 11G.
    If you are using Oracle 10g download from here (I had to recompile using an older smack version and JDK1_4)
  2. Login to sqlplus as sysdba and create account XMPP to load java classes and package.
    create user XMPP identified by XMPP
    default tablespace your_tablespace
    temporary tablespace your_temp_tablespace
    quota unlimited on users;
    GRANT "CONNECT" TO XMPP;
    GRANT "DBA" TO XMPP;
  3. From the shell go to the dist folder and excute
    loadjava -u XMPP/XMPP -resolve lib/smack.jar
    loadjava -u XMPP/XMPP -resolve lib/smackx.jar
    loadjava -u XMPP/XMPP -resolve OracleXMPP.jar
  4. Login to sqlplus as sysdba and execute:
    call dbms_java.grant_permission('PUBLIC', 'java.net.SocketPermission', '*', 'accept, connect,
    listen, resolve');
    call dbms_java.grant_permission('PUBLIC', 'java.net.NetPermission', '*', 'accept, connect,
    listen, resolve');
  5. Connect as XMPP/XMPP and run the following script.

  6. Grant privileges on the new package to APEX_PUBLIC_USER:
    grant execute, debug on dbms_xmpp to APEX_PUBLIC_USER;
  7. Login to APEX to SQL Workshop> SQL Commands and test:
    select XMPP.dbms_xmpp.send_plain_text_message('talk.google.com',
    5222,
    'gmail.com',
    'my_user',
    'my_password',
    'recipient@gmail.com',
    'XMPP Test',
    'Hello from Oracle APEX') xmpp_return_code
    from dual;
And thats it! Now if your company happens to be running a XMPP/Jabber server (like we do at Oracle) or if you have a user base that has gmail accounts or any of the other services running on XMPP, this could be a great alternative to emails. This is a huge hit on my applications and I bet anyone can come with more creative ways to include Jabber with APEX. Let me know how you use it.

I am also planning to post soon how I'm running my own Jabber server and how I can integrate it with my APEX application. Stay tuned!

For more information on Jabber please visit http://www.jabber.org/.

56 comments:

Patrick Wolf said...

Noel,

that sounds really interesting. I think I have to have a closer look at the IM integration.

Thanks for sharing
Patrick

Elliot Liang said...

Hi Noel,
What a great IM integration program.
It works fine in Oracle 11g, but, we also have Oracle 10g DB, after we download the 10g version that you support and setup, it failure(The return code is '-1').
What's wrong? Could you please give us a favor?

Noel Portugal said...

Elliot,
I updated the code http://noelportugal.googlepages.com/dist.zip i did found a bug. I didn't notice since I stopped using 10g. Thanks for noticing. Let me know if this fixes the problem.

Elliot Liang said...

Hi Noel,
bravo!bravo!
It works!
Thanks for helping, we rock!

Andy (Agenor) said...

Hi Noel

This looks really interesting and something that we could really use in our SaaS application (built on Oracle 11g EE and written in APEX v3.11).

Did you ever release an APEX package that we could perhaps benefit from using ?

Many thanks in advance

Andy Smith
andy.smith@agenor.co.uk

123 123 said...

Interesting article as for me. I'd like to read more about that topic. Thanks for giving this data.
Sexy Lady
Busty London escorts

オテモヤン said...

オナニー
逆援助
SEX
フェラチオ
ソープ
逆援助
出張ホスト
手コキ
おっぱい
フェラチオ
中出し
セックス
デリヘル
包茎
逆援
性欲

generic propecia said...

Hello people want to express my satisfaction with this blog very creative and I really like the views of the focus very good indeed Thank you for the helpful information. I hope you keep up the good work on making your blog a success!

Cris said...

This information is very interesting, I really enjoyed, I would like get more information about this, because is very beautiful, thanks for sharing! costa rica investment opportunities

Isma said...

Hello .. firstly I would like to send greetings to all readers. After this, I recognize the content so interesting about this article. For me personally I liked all the information. I would like to know of cases like this more often. In my personal experience I might mention a book called Generic Viagra in this book that I mentioned have very interesting topics, and also you have much to do with the main theme of this article.

jugan said...

What a great idea!! i'ld like to know more how many people you met on 1st sept, i'm quite late to see this blog.Very good! Nice information this is really interesting. Good luck in building the table.
bandages

Dissertation Help said...

Thanks for sharing Instant Messenger. Let me download and review it. Hope it works properly for.

mobility scooters said...

Thanks to this blog I finally managed to find the information matching my criteria and for this I would like to thank the author for sharing this blog with us. Looking forward for more.

Dissertation said...

Thanks for providing this article. Seems very interesting one. I am going to read it out and share with my friends also dissertation help.

foley catheter said...

I am regular visitor to this site and I love reading quality blogs. This site has some of the best blogs found on the internet. Thanks.

tratamente celulita said...

information is really useful, but I wonder how many of you have read the article to depth? I did it 3 times and still think it would be something to understand.

social media icons said...

I've added a number of these applications, but not all have worked. May give some failures, as it is in life, can not go all razor

gene perfecte said...

Thank you very much for this valuable information. I will sure use this in the next future to manage my work. Thanks again.

incontinence products said...

I am extremely delighted to be on this site reading some top quality stuff. Thanks for sharing.

aparitia celulitei said...

a lot of personal details that are not given because I knew but came on this site I think I solved most of problems. thanks

bancuri sida said...

much sophisticated language with many things that you can easily catch your ears. I went for a few seconds in the application, but I hit the bad, to be honest.

cosuri cadou said...

some codes besides the fact that I felt lost everything, do not know how I could ever reach a point in common with his incropirea.

order lexapro said...

I want have to know more and more, on your blog just interesting and useful information.

keffie said...

Thank you very much for this valuable piece of informaton. I've been searching this for a long time and now I've founded on this great site! I appreciate, thank you again.

haine ieftine online

desene said...

Thank you very much for this valuable piece of informaton. I've been searching this for a long time and now I've founded on this great site! I appreciate, thank you again.

costume barbatesti said...

Thank you very much for this valuable piece of informaton. I recently came across your blog and have been reading along. I thought I would leave my first comment. I just want to emphasize the good work on this blog, has excellent views and a clear vision of what you are looking for.

costume barbatesti

baterie iphone said...

I recently came across your blog and have been reading along. I thought I would leave my first comment. I think it’s a well informatics written post. Its shows the written quality of writer. Welldone friend keep it up..

baterie iphone 4s

atractii turistice roma said...

You see players dont need patches if you ban the cheaters like how happy C-West players are. So my question is When Gms will start to come other servers? Please dont tell any forms of the answer " Gms log in to servers dailly and ban cheaters" because they dont.

atractii turistice roma

sfaturi slabit said...

Will Gamers First be at the Penny Arcade Expo 2010 in Seattle? If the answer is yes what could people attending expect to see?

sfaturi slabit

cosuri cadou paste said...

Case in point; the recent arrest of TontonQ. I was investigating him and the trouble he caused in game for a rather long time.

cosuri cadou paste

http://www.promovareweb.org/ said...

Honestly, I'm not even sure what I just read. That translation didn't make an inkling of sense.
When it comes to policies handling customers and cheaters, each version of KO has its own direction. What goes for KOKO may not necessarily go for KOWorld. Communications with the developers have been pretty much non-existent on my end of things since maintenance began, so I really can't say if there's anything coming from them in that respect.


http://www.promovareweb.org/

gaslamp san diego hotels said...

Very nice information. I would love to link to this post if you didn't mind. Thank you for the great content and the wonderful inspiration.

5 star hotels indianapolis said...

HI friends, This is my first time I have visited this site. Thank you for the great info.

clasamente online said...

I know its impossible, and not even close to being a priority on the list of "things to do" atm, but, could you add this somewhere in there?

Again - this is a rough thought, but the idea is clear - a better trading platform to allow complex trades to be handled securely and safely.

clasamente online

hotel near tampa airport said...

Thumbs up! nice article and wonderful and structured blog. Thanks for all the work you do with this blog in sharing with us some wonderful inspiring ideas!! I LOVE looking through them.

Franco Luis said...

hi, I read your post and it was amazing , KEEP IT, great job.
t-shirt torino
maglia torino
maglia calcio

cribbble said...

Common sense counts for a lot. When performing investigations to determine whether or not someone is sharing their account, just having one or two random log ins from a different IP isn't going to set off any red flags.
cribbble

here said...

You can just use the Keyword Search here in this thread to find that information for yourself. As for the upcoming Sheriff system, that's in its final stages. We're making the last run on users who have requested or been nominated for positions and, once that's finished up, should be able to implement the system hopefully by the end of this week.

here

optimizare google said...

Always have been. I keep track of dirty clans I come across even though the list is currently unavailable to the public. It has to undergo a few changes in design before I can bring it back out again.

optimizare google

rules poker said...

@GourTrom
Any new information to share with us regarding the main website. You mentioned updating it a few months ago and mentioned including what the players wanted to see on it?
Nope.

rules poker

George said...

When I enter the Transaction ID's for Character Seal, it keeps failing.
Bugged or not, some sort of responce to the ticket would be appreciated.
Tomorrow will be Day 8.

George

visit said...

Total? I don't know. I'm not in constant awareness of the staffing in our overseas office. In the US office? Two; myself and Korlash, and even I'm not technically exclusive to KOL any more. The majority of my time goes to KOL, but I'm also on call for work with Fallen Earth and any other game teams that need my assistance. If I had to take a stab at it, I'd say more than five, fewer than ten employees.

visit

diet said...

These logs that you speak of in regards to perfect combos... Are they a difficult thing to check? Is it simply timing between hits that is measured or is there some other kind of data that you see? If someone is suspected of using the "perfect combo", how do you become aware of them? By our request to check an individual or is there some kind of flag that pops up for you to go look at?

diet

http://skyrimbestrace.com/ said...

National Point Transferring, however, completely subverts this entire concept.
Normally when you go into PvP, you can expect a fight. It may not be a fair or even fight, but you'll still have to put yourself at risk and earn your NP through combat. National Point Transferring (NPT) avoids this. The standard form of NPT is a person (or group of persons) repeatedly killing a player for the sole purpose of gaining NP -- the difference is that the player being killed is willfully running to their doom for the sole purpose of giving the killers NP. What this ends up causing is an artificial inflation of a player's NP score. They'll end up having a high value of NP without actually having any real skills to back it up. Then they, and like-minded cheaters, join a clan and use their ill-gotten NP to get high on the Ranking Board to an undeserved position. This practice is most commonly assisted by illegal third party tools to make the process of transferring NP as fast and risk-free as possible.

http://skyrimbestrace.com/

emailing said...

As for concerns about being banned because of Ladder Ranking? Don't worry about it -- where a person or clan sits on the ranking tables has no impact on the investigation. It's irrelevant. We look at different factors than ranking when determining bans for illegal NP activity.

emailing

dissertation help UK said...

It is very nice to see this blog and it's really informative for the readers. It is really nice to see the best information presented in an easy and understanding manner.
Thank you.

owais said...

Wonderful post.Thanx for sharing.
Download Spider man 3 Game | Download Ea sports cricket 2011 | Download free Full version Games | Download UEFA Euro 2012

elviswilliams said...

It's a great experience to me and its having the good information too, if any one read these posts, they get good knowledge. Thanks for Share!
Athletic Apparel

Umair Ahmed said...


hey that's really a great post and i like this and thanks for sharing it with us!I have read a few of the articles on your website now because I was looking for information aboutgames App. and I really like your style of blogging.

write my dissertation said...

A very good post. I am glad to have found this page through search engine and I am enjoying my stay reading some top quality blogs. Thanks.
professional dissertation writer
top quality dissertation proposal

palacevip6 said...

Fantastic article! I initially discovered your blog a few days ago, and I website the exact same day. I have a number of cool thoughts for some future posts you could write. I'll shoot you an email later. Keep up the great work. escort london

Coupons Queens said...

Hello Dear, Really your blog is very interesting, it contains great and unique information. I enjoyed to visiting your blog. It's just amazing!.

Thanks very much

Abdul Rafay said...

Nice information, valuable and excellent design, as share good stuff with good ideas and concepts, lots of great information and inspiration, both of which I need, thanks for all the enthusiasm to offer such helpful information here.

Thanks
A R
Writing Essayz

forte music said...

At Forte School of forte music, Learning Music is FUN! Learn Piano, Guitar, Singing, Saxophone, Flute, Violin, Drums and More. Book a Free Lesson Online Today!

Melisa Marzett said...

Even a newbie like me will be able to add IM functionality to an application by following the steps described above! Kindest regards,www.proof-reading.services

international money transfer services said...

theatrical feast for women of all ages and the men who love them!" and CBS’ Magee Hickey “I haven't laughed so hard in years. It's touching, poignant, funny and oh so very real."international money transfer services