Thursday, October 12, 2017

Salesforce Integrations

Salesforce supports REST,SOAP integrations. Rest protocal is HTTPS, it supports both JSON,XML data also as response. SOAP supports only XML response , By using WSDL we will convert that to apex classes.

Tuesday, July 12, 2016

Saturday, March 23, 2013

Thursday, November 22, 2012

What is OpenID?

OpenID is a decentralized authentication protocol that makes it easy for people to sign up and access web accounts.

Yahoo, Google and facebook are all OpenID providers, so simply implementing it on your site will be enough for your users to be able to login using them

OpenID allows you to use an existing account to sign in to multiple websites, without needing to create new passwords.

You may choose to associate information with your OpenID that can be shared with the websites you visit, such as a name or email address. With OpenID, you control how much of that information is shared with the websites you visit.

With OpenID, your password is only given to your identity provider, and that provider then confirms your identity to the websites you visit. Other than your provider, no website ever sees your password, so you don’t need to worry about an unscrupulous or insecure website compromising your identity.

Source: http://openid.net/get-an-openid/what-is-openid/

Spring security 3 - OpenId Login with Google Provider also posible


Wednesday, June 6, 2012

Crystal Report Memory problem

how to ensure proper cleanup of reports
 
It is particularly important if your application comes under load.Reports left open take up resources, which, if left unchecked, can starve your app of resources, leading to performance degradation, report request denial, and out of memory problems.And one more thing is it will block the database resources also.
Destroy every  ReportSource
Every time a ReportClientDocument opens a report rpt file,the reference count for that report instance is incremented.  Every time an unique ReportSource is retrieved from the ReportClientDocument, the count is incremented.Every time a ReportClientDocument is closed, the reference count is decremented.  Every time a ReportSource is destroyed, the count is decremented.If ReportClientDocument or ReportSource is not cleaned up, then the instance will remain live and taking up resources until timeout garbage collects the object.
One important consideration is the following: even if you invoke ReportClientDocument.close(), that report may still not be closed. 
Here's a simple test: 
 (1) open a report with a ReportClientDocument.
(2) retrieve a ReportSource using the method ReportClientDocument.getReportSource().
(3) invoke the ReportClientDocument.close() method for that instance.
 (4) test the value of ReportClientDocument.isOpen() - you'll see that it's true!.
(5) pass the ReportSource object to the CrystalReportViewer, and invoke CrystalReportViewer.dispose().
(6) now check ReportClientDocument.isOpen() again - you'll see that it's false, i.e., that the instance  has been cleaned up.
Another consideration:   the only way to dispose the ReportSource is to pass it to a viewer object 
Invoking viewer dispose() will in turn invoke the proper dispose method for the ReportSource.
 
we will prove this in one more way
before opening of report in application open the sql editor and run the below query  
 
SHOW FULL PROCESSLIST
 
IT DISPLAYS NO OF PROCESS ID'S  
 
after that open the report and again run the above query one more process id created even after closing of the report process id not decreasing 
that is why with crystal reports code we are facing some memory problems. So better to use crviewer.dispose() .
        

Browser event firing when closing the browser ?.

<script>   
      var hook = true;
      window.onbeforeunload = function() {
        if (hook) {
alert("action");
                   }
      }
      function unhook() {
         alert("2");
        hook=false;
      }
</script>