I want to have the code of persistence manager

Asked By 50 points N/A Posted on -
qa-featured

I want to continue the index of a group whether it’s visible or collapsed group, and their navigation area of the control using XamOutlookBar. I would like to have the code for this since Persistence Manager is not working for me. Kindly help me with this application.   

SHARE
Answered By 0 points N/A #109065

I want to have the code of persistence manager

qa-featured

Hi,

The code for Persistence Manager is like this:

  PersistenceManager pm=PMF.get().getPersistenceManager();

        String query="select from "+PayPal_Message.class.getName()+" where processed == false order by time desc";

        List<PayPal_Message> messages=(List<PayPal_Message>)pm.newQuery(query).execute();

        if (messages.isEmpty())

        {}

        else{

          for (PayPal_Message g : messages)

          {

            Contact_Info_Entry A_Contact_Entry=Process_PayPal_Message_To_Get_A_License(g.getContent().getValue());

            pm=PMF.get().getPersistenceManager();

            try {

              pm.makePersistent(A_Contact_Entry);

              g.setProcessed(true);

              pm.makePersistent(g);

            }

            catch (Exception e) {

              Send_Email(Email_From,"[email protected]","Servlet Error Message [ "+time+" ]",new Text(e.toString()));

            }

//            finally { pm.close(); }

}}

   pm.close();

 

If you’re code is similar like this and it is not working then you have two ways to solve it.

1.       Batch processing

2.       Transaction

Compile codes with this two method then run Persistence Manager. I hope this will help.

Login/Register to Answer

Related Questions