Sending a notification using MDB, javamail and a scheduler

Hi,
I have this following scenario.
I need to send an email notification to user B from user A.
So, user A fills the required details and adds the notification object to jms/queue
In MessageDriveBean onMessage(), i am getting the notification object from the queue
and i am able to send an email using JavaMail.
Everything is working fine.
Now , if under any conditions, sending notification fails, I need to implement
a scheduler which should try to send the notification within the specified time interval
and if not again adds the notification object to queue.
Can you please help me to implement a scheduler?
Thanks in advance!!!

Have a look at this simple schedular below, test by changing the method onMessage() to a main method
and simulate.
Hope this help
Ivo Sumelong
* @author isumelong
public class MessageFromQueueMDBHandler {
     * @param args the command line arguments
    public  void onMessage() {
         MessageFromQueueMDBHandler m=new MessageFromQueueMDBHandler();
         m.hanldeMessageFromQuue();
  public synchronized  void  hanldeMessageFromQuue()
// Thread.sleep() is not good since its a static method this
// why wait will be best since it controls only the thread
// that received the messgae from the queue
//schedular information read from database
// numberOfTrials,waitingTimeBeforeResending;
// advantage: schedular behaviour could be changed at run time
int numberOfTrials=4;// from database
      try {
            for(int i=0;i<System.currentTimeMillis();i++)
                if(sendMail())
                break;
                if(i==numberOfTrials)
                   // send an message to queue
                   sendMessageToQueue();
                notifyAll();
                     break;
              long waitingTimeBeforeResending=1000;// from database
            this.wait(waitingTimeBeforeResending);
        } catch (InterruptedException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
  private boolean sendMail()
  // java mail API accesses
      return true;
   private boolean sendMessageToQueue()
  // java JMS API accesses
      return true;
}

Similar Messages

  • Send email notification in latest start and latest end

    Hi all,
    My requirement is to send email notification on latest start and latest end. For latest start, a notification needs to be sent to the manager asking him to start processing the Leave request.
    Am not too concerned about the latest end, since the latest end takes the workitem(MODELED ACtion)  to the next manager, where I can insert a email step in the workflow.
    My concern is how can i send an email to the manager if he has not started processing the lave request within say 3 days
    thanks a ton.
    regards

    Hi,
      If you are looking to send notification ASA work item reaches a latest end then follow the below steps.
    1. Open the step for which you have set the latest end and click latest end tab.
    2. Under the same tab you will find a Drop down box you will find two entries 1 Display Text 2 Modeled  choose the 1 option. and define the text in the task description by choosing Latest End description.
    3. Choose the container element you might have populated the email address.
    Now the configuration that you need to make sure to send a mail to external email id is SCOT settings if SMTP node is configured  then this node would be sending mails to the
    Regards
    Pavan

  • Send email notification including file name and description, when users upload files to particular sub-folders?

    In my site collection i have a document library and document library has customer folder, each Customer folder has 4 sub-folders. i want to send email notification with file name and description to group and users, if they upload any files to Particular
    folder name "Final" not others 3 folders. would it possible to accomplish this solution? if yes please suggest which way i can do that. 
    Note: we have different groups of people, for example Team A and Team B. if files uploaded by any member of Team A, notification should sent to only Team A and specific people not Team B.
    Thanks in advanced for any help!

    Hey Rakib,
    You can add your group and those other people in To field of send mail activity. Have below snapshot for your reference.
    If Current Item URL Contains FolderName (i.e. Final) & Is Current User a member of of Team A
    Send Email to Team A; People1; People2;
    Thanks. Please mark as an answer if it helps.

  • Cannot Send Email Notification Using Stored Procedure.

    Hi Friends,
    I tried to execute this job scheduler...
    begin
    dbms_scheduler.create_job(
    job_name => 'ILMS_JOB_SCHEDULE'
    ,job_type => 'PLSQL_BLOCK'
    ,job_action => 'begin ilms.check_reminder(); end; '
    ,start_date => SYSTIMESTAMP
    ,repeat_interval => 'FREQ=DAILY'
    ,enabled => TRUE
         ,end_date => NULL
    ,comments => 'Ilms job schedule for notification.');
    end;
    However, since the effect is too long I rescheduled the frequency to be every one minute in this set attribute...
    BEGIN
    DBMS_SCHEDULER.SET_ATTRIBUTE(
              name => 'ILMS_JOB_SCHEDULE'
              ,attribute => 'repeat_interval'
              ,value => 'FREQ=MINUTELY;INTERVAL=1'
    DBMS_SCHEDULER.DISABLE('ILMS_JOB_SCHEDULE');
    DBMS_SCHEDULER.ENABLE('ILMS_JOB_SCHEDULE');
    END;
    Check Reminder is the stored procedure invoked by job scheduler to check values in database columns before sending email notification to the respective recipients' email address and also the format of the email notification to be sent to the recipients...
    CREATE OR REPLACE PROCEDURE check_reminder AS
    NO number;
    CURSOR emp_cur is
    select * from pergerakan_ks where TASK_FLAG=7 and TASK_STATUS='InProgress';
    emp_rec emp_cur%rowtype;
    email_to varchar2(200);
    default_email varchar2(200);
    mesg varchar2(4000);
    no_kes varchar2(100);
    subj varchar2(4000);
    kpi number;
    crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
    BEGIN
    default_email:='@abc.com.my';
    FOR emp_rec in emp_cur
    LOOP
    if emp_rec.PKS_TKH_TERIMA is null then
    dbms_output.put_line('count day ' || round(sysdate - to_date(emp_rec.pks_tkh_hantar)) || crlf || crlf);
    if round(sysdate - to_date(emp_rec.pks_tkh_hantar)) >3 then
    email_to:=emp_rec.pks_penghantar_id||default_email;
    select b.KS_BIL_NO into no_kes from kertas_siasatan b where b.KS_ID = emp_rec.pks_ks_id;
    subj:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    mesg:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    dbms_output.put_line('update old pergerakan pks_id : '||emp_rec.pks_id);
    update pergerakan_ks set task_status='Done' where pks_id=emp_rec.pks_id;
    dbms_output.put_line('insert new pergerakan ks : ');
    insert into pergerakan_ks(pks_id,pks_ks_id,pks_km_id,pks_penghantar_id,pks_tkh_hantar,
    pks_penerima_id,pks_tkh_terima,task_name,task_owner,task_status,task_flag,fb_id)
    values(pks_id_seq.nextval,emp_rec.pks_ks_id,emp_rec.pks_km_id,
    emp_rec.pks_penghantar_id,sysdate,
    null,
    null,emp_rec.task_name,
    emp_rec.pks_penghantar_id,
    'InProgress',6,emp_rec.fb_id);
    commit;
    e_mail_message(email_to,email_to,subj,mesg);
    end if;
    end if;
    if emp_rec.PKS_TKH_TERIMA is not null then
    dbms_output.put_line('emp_rec.pks_km_id ' || emp_rec.pks_km_id || crlf);
    select c.KM_KPI into kpi from keluar_masuk_ks c where c.KM_ID = emp_rec.pks_km_id;
    no := round(sysdate - to_date(emp_rec.pks_tkh_terima))-kpi;
    dbms_output.put_line('count day - kpi' || no || crlf);
    dbms_output.put_line('kpi ' || kpi || crlf);
    if no = 1 then
    email_to:=emp_rec.pks_penghantar_id||default_email;
    select b.KS_BIL_NO into no_kes from kertas_siasatan b where b.KS_ID = emp_rec.pks_ks_id;
    subj:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    mesg:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    email_to:=emp_rec.task_owner||default_email;
    subj:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    mesg:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    e_mail_message(email_to,email_to,subj,mesg);
    e_mail_message(email_to,email_to,subj,mesg);
    end if;
    if no = 3 then
    select b.KS_BIL_NO into no_kes from kertas_siasatan b where b.KS_ID = emp_rec.pks_ks_id;
    email_to:=emp_rec.task_owner||default_email;
    subj:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    mesg:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    e_mail_message(email_to,email_to,subj,mesg);
    end if;
    end if;
    END LOOP;
    END;
    E_mail_message is the stored procedure invoked by the check_reminder to tell scheduler information of the connection and the email address of the recipients...
    CREATE OR REPLACE procedure
    e_mail_message
    from_name in varchar2,
    to_name in varchar2,
    subject in varchar2,
    message in varchar2
    is
    l_mailhost VARCHAR2(64);
    l_from VARCHAR2(64);
    l_to VARCHAR2(64);
    crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
    l_mail_conn UTL_SMTP.connection;
    mesg VARCHAR2( 4000 );
    BEGIN
    select a.SERVER into l_mailhost from email_setting a where a.SERVER is not null;
    select a.USERNAME into l_from from email_setting a where a.SERVER is not null;
    --UTL_SMTP.open_data(l_mail_conn);
    mesg:= 'Date: ' || TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss' ) || crlf ||
    'From: <'||l_from||'>' || crlf ||
    'Subject: ' ||subject|| crlf ||
    'To: '||to_name || crlf || '' || crlf ;
    mesg:=mesg||message;
    l_mail_conn := UTL_SMTP.open_connection(l_mailhost, 25);
    UTL_SMTP.helo(l_mail_conn, l_mailhost);
    UTL_SMTP.mail(l_mail_conn, l_from);
    UTL_SMTP.rcpt(l_mail_conn, to_name);
    UTL_SMTP.data(l_mail_conn, mesg);
    UTL_SMTP.quit(l_mail_conn);
    END;
    I tried to execute to execute the e_mail_message procedure but received this error. Also, no notification sent to the email address...
    ORA-29279: SMTP permanent error: 501 5.1.3 Invalid address
    ORA-06512: at "SYS.UTL_SMTP", line 21
    ORA-06512: at "SYS.UTL_SMTP", line 99
    ORA-06512: at "SYS.UTL_SMTP", line 241
    ORA-06512: at "ILMS.E_MAIL_MESSAGE", line 33
    ORA-06512: at line 13
    Please help so that I can receive the email notification into my email...thanks in advance for your time..

    user13281540 wrote:
    ORA-29279: SMTP permanent error: 501 5.1.3 Invalid address
    ORA-06512: at "SYS.UTL_SMTP", line 21
    ORA-06512: at "SYS.UTL_SMTP", line 99
    ORA-06512: at "SYS.UTL_SMTP", line 241
    ORA-06512: at "ILMS.E_MAIL_MESSAGE", line 33
    ORA-06512: at line 13This is not an Oracle error - this is the mail server saying "+hey, I don't like that e-mail address you are supplying, I'm not accepting it!+".
    If you look at RFC821 (Request For Comments memo 821 describes the SMTP specifications), you'll see that the sender and recipient needs to be supplied in the format +<[email protected]>+, e.g. +<[email protected]>+.
    I have found that not all SMTP servers are equal in this regard. Some may insist on the brackets around the address, some may not.
    You need to confirm the format of the addresses you use in the "+MAIL FROM+" and "+RCPT TO+" commands.. and ensure that these formats are accepted by your SMTP server - and if not, change your code to use an acceptable format.
    The easiest way to do this is using telnet - and interacting directly and manually with the server. SMTP is a clear text protocol and easy to use manually. Try it. It is the best way to test SMTP interaction and validate the approach and SMTP commands and arguments used by your code.

  • Send email notification when the baseline and actual values are different in project

    Hi
    I am working with MS Project 2013 and Project Server 2013.
    I need to the send email notification to the program manager (or to a user) whenever the project manager changes the task finish date for a task. Comparison should happen with the baseline finish and the difference needs to be updated to the Program Manager
    over mail.
    How to configure/customize email notification for changes in MPP.
    Please suggest.
    Regards,
    Sudhir

    If you are not having developer skills it will be complicated for you.
    You need to create event handler by code, as in the below link:
    http://msdn.microsoft.com/en-us/library/office/gg615466%28v=office.14%29.aspx
    Then compare your values and finally send email by code.
    Twitter : @MShoubaki | http://jo.linkedin.com/in/mshoubaki

  • Sending Localized Notification using Template feature of Notification Hub

    I am using Template feature of Notification Hub for sending localized Toasts to my app. It is working fine.I am using this ref - Localized
    News Using Notification Hub.
    In this reference they indicate that We have to send Key-Value (News_en-"message in English") pair for each culture.
    Suppose I am supporting 100 cultures in my app and I only want to send localized news to two culture only-> mean all other culture should get he default news in English.
    So should I have to send 100 key-value pairs also in this case ?
    Is it possible somehow that we send only required localized key-value pairs and other will get the default English toasts.

    Hi Tanuj,
    Unfortunately you have to send 100 key value pairs, if you have 100 cultures.
    I’m wondering, if you want some cultures to receive notifications only in English, why don’t you register them in en format (News_en) though local is different. That way you can reduce number of key value pairs.
    Thanks,
    Sateesh
    Mark Post as helpful if it provides any help.Otherwise,leave it as it is.

  • Notifications Using Notify-OSD and Dbus

    I am writing a quick script to show a Notify-OSD bubble whenever I switch songs in MPD. The easiest way I can think of doing this is to make an MPD controller in Python that uses pynotify to show the bubble. This works, but the problem comes whenever I try to change songs quickly. Notify-osd shows the first bubble for several seconds, then the next for severals seconds, and so on. This is obviously not the desired functionality: I want the notifications to update immediately on song change.
    Luckily, pynotify has an "update" ability which does exactly what I want. Unfortunately, it requires a Python object handle to the notification. This handle dies after the python program exits, so this method won't work unless I have my python controller sit in the background and watch for keypresses, which I don't want to do.
    I know notify-osd can use dbus, and I have been able to send a message to it through Dbus, but I can't find sufficient documentation to be able to use notify-osd's "update" feature. Without it, I get the message pileup described above.
    Does anyone know of notify-osd documentation specifically regarding Dbus, or have a better way to do this in general?

    Never mind, I have been able to hack together a solution. For those interested, I use python's Pyro module to start a server that serves up a pynotify object. Meanwhile, I have another script that runs on a keypress. This script connects to the Pyro server, accesses the object, and updates the info. Not pretty, but it is fast and does what I want it to.

  • Sending email notification  using email template in OIM 11g

    HI all
    I want to send an email to the user in OIM 11 g using API's
    I have created a email template using oim 11g's design console.
    now i want to access that email template from design console and send mail to user.
    previously in OIM 9i there was class com.thortech.xl.dataobj.util.tcEmailNotificationUtil;
    which was having utilities method like send-email etc.where we were able to access the email template from design console and send mail to user.
    I want such API's to send mail to user in OIM 11g.Iam unable to find the tcEmailNotificationUtil class in OIM 11g;
    Thanks in advance
    Bipin patil

    Thanks kuldeep
    I have one single question,.
    I have gone through the 11g docs but it is not present in the oim 11g docs any reasons for it .

  • Can I send a fax using my eMac and just a Cable Modem and no phone line?

    If so ...can you point me in that direction of how to...Please
    Thank you inadvance,
    Deb
    eMac 2005 1.42ghz Combo 75gb 1gb Ram
      Mac OS X (10.4)  
    2 WD FW HD's 160gb & 320gb Creative Speakers

    Thank you for that info...Sorry it took me awhile to reply...I've been packing and moving...
    I will check out that link.
    Deb
    eMac 2005 1.42ghz Combo 75gb 1gb Ram
      Mac OS X (10.4)  
    2 WD FW HD's 160gb & 320gb Creative Speakers

  • What are the possibilities sending notifications using TTY

    What are the possibilities sending notifications using TTY? And how to integrate TTY with Siebel

    Here are the possibilities of Content search webparts
    http://office.microsoft.com/en-in/office365-sharepoint-online-enterprise-help/configure-a-content-search-web-part-in-sharepoint-HA104119042.aspx
    http://office.microsoft.com/en-in/office365-sharepoint-online-enterprise-help/when-to-use-the-content-query-web-part-or-the-content-search-web-part-in-sharepoint-HA104206662.aspx
    Compare the strengths and limitations of the Web Parts
    It’s important that you understand the strengths and limitations of the two Web Parts because if you choose the wrong one, your site could run into performance problems. You can use both Web Parts to show content that is based on a query. In a simplified
    world, here’s how you can decide between the two:
    Use the CQWP when you have a limited amount of content, your query is simple, and you don’t expect your content to grow much in the future.
    Use the CSWP in all other scenarios when you want to show content that is based on a query.
    The table below gives a comparison of the two Web Parts:
    Web Part behavior
    Content Query Web Part
    Content Search Web Part
    Query configuration
    Easy
    You’ll need to know about certain search features such as
    managed properties.
    Query across large amounts of content
    Limited
    Yes
    Handle complex queries
    Limited
    Yes
    Scale to handle future content growth
    Limited
    Yes
    Display content from other site collections
    No
    Yes (see
    section below)
    Design of query results can be customized
    Yes, by using XSLT.
    Yes, by using HTML.
    Maintenance cost in a complex site architecture
    High
    Small (see
    section below)
    Narrow down the query results that are displayed in the Web Part
    No
    Yes, in combination with the
    Refinement Web Part.
    It was not there previously but then it was added to Office 365
    http://blogs.office.com/2013/10/29/search-innovations-for-site-and-portal-design-in-sharepoint-online/
    If this helped you resolve your issue, please mark it Answered

  • * Can We Send Email Notifications Only using User Task in Oracle BPM ?? *

    Hi All,
    Can we send any email notification to initiator, only from Oracle BPM User / Human task without using any notification activity.
    Is it possible to send email notifications using BPM User task alone.
    Any Help appreciated.
    Regards
    Satya

    Hi Satya,
    To send an email to the person who initiated the work item instance in the process when the instance reaches a human task:
    1. Ensure that the id of person who initiated the instance is stored in the process predefined variable called "creator".
    2. In the Interactive activity's input data mapping, map this "creator" process predefined variable to the corresponding "creator" attribute in the human task's execData.
    3. Open the human task -> click the "Notification" tab -> click the "+" icon in the upper right -> on the new row added to the bottom of the list, leave the task status dropdown set to "Assign" and change the recipent (the middle column) to "Initiator".
    Dan

  • BPMOn: Is it possible to send email notification to different groups based on filter value for IDOC?

    Hi there,
                  I have setup the monitoring for idoc through interface monitoring and I am getting the alerts for the same. The alert is generated for different status values for the same idoc. Now my question is, is it possible to send email notification to two different groups based on the status values?? I mean for example , for a single idoc for some status values I want to send email notification to group1 only and for other status values I want to send notification to group2.Any help will be apperitiated.
    Thanks and regards,
    Rutvik Upadhyay

    We currently do not support that level of control for sending email notifications. If you think others are interested in this you should add an idea here: http://forums.adobe.com/community/formscentral?view=idea
    We use that to help us prioritize our work.
    Thanks,
    Randy

  • Send A file Using JMS

    I want to send a file Using JMS.. and want to have
    These Details in the message that send.
    Receivers IP address & The file
    That mean I want to send a File from one client to another client Using a Queue
    Can Anyone help me to solve this problem
    thanks

    Read the file then use a JMS BytesMessage or TextMessage. Add your own JMS header for the recievers ip and any other info you want to annotate the message with.
    Watch out for character encoding and max file size problems.
    If your client / server are not on the same network you're likely to run into firewall issues.
    Don't kid yourself that this will be a transactional solution.
    Assumes both clients are Java (JMS headers are a pain to read otherwise)

  • Email Notifications Using Macro's

    Hi Experts
    What is the prerequesite for Sending email notifications using Macros in the APO DP & SNP, as we have the Document Function(Macro Element) in the Macro Builder.
    How to use Document Macro Element?
    Sai

    Hi Sai,
        We have created same macro for client requirement. Just check the following logic Take appropriate logic & apply.
    Logic:
    IF key figure 1 > ( 5% of Key figure 2 + Key figure 2) then system show warring Massage,Alert & send to Users.
    IF key figure 1 > ( 10% of Key figure 2 + Key figure 2) then system show Error Massage,Alert & send to Users.
    Macro:
    New macro
    step1: calculation : ( 1 Iterations : W 25.2008; W 25.2008 )
    Row: New macro aux. row1 ( Frm W 25.2008 ) =
    ( ( ( 5 / 100 ) *
    Row: Additional Field 2 ( Frm W 25.2008 )
    ) +
    Row: Additional Field 2 ( Frm W 25.2008 )
    Row: New macro aux. row2 ( Frm W 25.2008 ) =
    ( ( ( 10 / 100 ) *
    Row: Additional Field 2 ( Frm W 25.2008 )
    ) +
    Row: Additional Field 2 ( Frm W 25.2008 )
    step : send message : ( 1 Iterations : W 25.2008; W 25.2008 )
    IF
    New condition
    Row: Additional Field 1 ( Frm W 25.2008 ) greater than Row: New macro aux. row1 ( Frm W 25.2008 )
    IF
    New condition
    Row: Additional Field 1 ( Frm W 25.2008 ) less than Row: New macro aux. row2 ( Frm W 25.2008 )
    Information ( warning )
    MAIL WITH WARNING
    ELSEIF
    New condition
    Row: Additional Field 1 ( Frm W 25.2008 )
    greater than
    Row: New macro aux. row2 ( Frm W 25.2008 )
    Information ( error )
    MAIL WITH ERROR
    ENDIF
    ENDIF
    Hope this will help you...
    Regards
    Sujay

  • Problem sending Apple Push Notification using Java and REST.

    Hello there,
    Am using the javapns library to send an Apple Push Notification through a REST based web service...
    Here are the steps that I have completed:
    iPhone Developer Program Portal (IDPP):
    (1) Created the App ID and APNS based SSL Certificate and Keys.
    (2) Created and installed the provisioning profile.
    (3) Installed the SSL Certificate and Key on the server.
    (4) Set up my iPhone app to register for remote notifications.
    XCode:
    Was able to obtain my device token when I built and deployed my app onto my device.
    As soon as my iPhone app deployed, the dialog came up on my iPhone indicating that my app would like to send push notifications and also asked for permission to allow them.
    When I invoked my web service, through my Log4J statements, I was able to see that my REST based web service was indeed invoked but I never received a push notification on my iPhone app!
    ApnsManager class:
    public class ApnsManager {
        /** APNs Server Host **/
        private static final String HOST = "gateway.sandbox.push.apple.com";
        /** APNs Port */
        private static final int PORT = 2195;
        public void sendNotification(String deviceToken)
        throws Exception {
           try {
               PayLoad payLoad = new PayLoad();
               payLoad.addAlert("My alert message");
               payLoad.addBadge(45);
               payLoad.addSound("default");
               PushNotificationManager pushManager =
                  PushNotificationManager.getInstance();
               pushManager.addDevice("iPhone", deviceToken);
               log.warn("Initializing connectiong with APNS...");
               // Connect to APNs
               pushManager.initializeConnection(HOST, PORT,
               "/etc/Certificates.p12", "password",
               SSLConnectionHelper.KEYSTORE_TYPE_PKCS12);
               Device client = pushManager.getDevice("iPhone");
               // Send Push
               log.warn("Sending push notification...");
               pushManager.sendNotification(client, payLoad);
               pushManager.stopConnection();
           catch (Exception e) {
               e.printStackTrace("Unable to send push ");
    RESTful Web Service:
    @Path(ApnService.URL)
    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
    public class ApnService {
        public static final String URL = "/apns";
        @GET
        @Path("send")
        @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
        public String send() throws JSONException, IOException {
            String msg = "";
            try {
                log.debug("Inside ApnService.send() method.");
                log.debug("Sending notification to device");
                ApnManager.sendNotification("32b3bf28520b977ab8eec50b482
                25e14d07cd78 adb69949379609e40401d2d1de00000000738518e5c
                000000003850978c38509778000000000000000000398fe12800398f
                e2e0398fe1040000");
             } catch(Exception e ) {
                   e.printStackTrace();
                   msg = "fail";
             msg = "success";
             StringWriter sw = new StringWriter();
             JsonFactory f = new JsonFactory();
             JsonGenerator g = f.createJsonGenerator(sw);
             g.writeStartObject();
             g.writeStringField("status", msg);
             g.writeEndObject();
             g.close();
             return sw.toString();
    }Now, when I deploy my app to my app server and open up a rest client and type in:
    http: // localhost:8080/myapp/apns/send
    The rest client returns this:
    HTTP/1.1 200 OK
    The following log messages are outputted to my console:
    01:47:51,985 WARN  [ApnsManager] Initializing connectiong with APNS...
    01:47:52,318 WARN  [ApnsManager] Sending push notification... However, I don't receive the push notification on my app (residing on my iPhone)!
    Am really stumped at this point...
    What could I possibly be doing wrong? :(
    Is it a problem with the way I set up my RESTful web service (sorry I am a newbie to REST)?
    Would really appreciate it if someone could assist me with this...
    Thank you for taking the time to read this...

    Please show me where is answer for this..

Maybe you are looking for

  • Report to see the Blocked Sales orders

    Hi friends,    Is there any standard report to view the Blocked Sales orders in SAP. Please help me out. Thanks in Advance, Regards, Anvita.

  • Error while running XL Reporter

    Hi I am using SAP 2007 B with Patch Level 9 and MS-Office 2007. When I am generating Reports through XL Reporter the system is showing following Error !! ''A required COM add-in program for XL Repoter has not been loaded and prohibits Microsoft Excel

  • Strange Button Behaviour

    All of a sudden flash is mistaking my entire flash movies for buttons. Its very strange. When you put the mouse over a swf in a web page (not in the flash export preview area) it acts as if the entire movie was a button. At the same time my real butt

  • Mac Pro laptop running very slow and freezing often

    Recently my Mac has been acting funny. I will be surfing the net or just trying to check my email and the spinning wheel will come up and spin forever. Sometimes it stops and lets me continue, sometimes and stops for a few minutes and does it again,

  • I'm having problems with forgotten id and password

    I had an Ipod but had to sell it because of childrens needs and now I cant remember either user name or passwords and I have had to create a new account and have lost all the music that I have purchased over the last year ...