Microsoft Enterprise Cache 5.0 (Isolated Cache) is not Expiring !!!

Hi,
I am using the Enterprise Cache from Microsot Practise. this is Isolated cache. which is storing into SQL server. when i am giving the Expiration time less then 5 min is working fine. if i give more than 5 min its not expiring from the DB.
Note : time : 5 min , CacheExpiryType : Absolute
refere the code below:
public void Add(string value, string objectvalue,int timeout, string CacheManagerValue)
DateTime dt;
ICacheManager AddCacheManager = CacheFactory.GetCacheManager(CacheManagerValue.ToUpper());
int timeoutinminute;
if (timeout != 0)
timeoutinminute = timeout;
else
timeoutinminute = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["DagCacheTimeout"].ToString());
string Cachetype = System.Configuration.ConfigurationManager.AppSettings["CacheExpiryType"].ToString();
if (Cachetype.Trim().ToUpper() == "SLIDING")
AddCacheManager.Add(value, objectvalue, CacheItemPriority.Normal, null, new SlidingTime(TimeSpan.FromMinutes(timeoutinminute)));
else if (Cachetype.Trim().ToUpper() == "ABSOLUTE")
dt = System.DateTime.Now.Add(TimeSpan.FromMinutes(timeoutinminute));
AddCacheManager.Add(value, objectvalue, CacheItemPriority.Normal, null, new AbsoluteTime(dt));
else
AddCacheManager.Add(value, objectvalue, CacheItemPriority.Normal, null, new NeverExpired());

Hello Sathishkumar,
For issues regarding Microsoft Enterprise Libraries, there is a specific forum, i would suggest that you could post it to that forum:
https://entlib.codeplex.com/
Thanks for your understanding.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Enterprise Cache (Isolated Cache) is not Expiring for Absolute time

    Hi,
    I am using the Enterprise Cache from Microsot Practise. this is Isolated cache. which is storing into SQL server. when i am giving the Expiration time less then 5 min is working fine. if i give more than 5 min its not expiring from the DB.
    Note : time : 5 min , CacheExpiryType : Absolute
    refere the code below:
     public void Add(string value, string objectvalue,int timeout, string CacheManagerValue)
                DateTime dt;
                ICacheManager AddCacheManager = CacheFactory.GetCacheManager(CacheManagerValue.ToUpper());
                int timeoutinminute;
                if (timeout != 0)
                    timeoutinminute = timeout;                              
                else
                    timeoutinminute = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["DagCacheTimeout"].ToString());               
                string Cachetype = System.Configuration.ConfigurationManager.AppSettings["CacheExpiryType"].ToString();
                if (Cachetype.Trim().ToUpper() == "SLIDING")
                    AddCacheManager.Add(value, objectvalue, CacheItemPriority.Normal, null, new SlidingTime(TimeSpan.FromMinutes(timeoutinminute)));
                else if (Cachetype.Trim().ToUpper() == "ABSOLUTE")
                    dt = System.DateTime.Now.Add(TimeSpan.FromMinutes(timeoutinminute));
                    AddCacheManager.Add(value, objectvalue, CacheItemPriority.Normal, null, new AbsoluteTime(dt));
                else
                    AddCacheManager.Add(value, objectvalue, CacheItemPriority.Normal, null, new NeverExpired());

    Hello Sathishkumar,
    For issues regarding Microsoft Enterprise Libraries, there is a specific forum, i would suggest that you could post it to that forum:
    https://entlib.codeplex.com/
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Method not found: 'Void Microsoft.ApplicationServer.Caching.DataCacheFactoryConfiguration.set_DataCacheServiceAccountType('...

    After install SharePoint 2013 SP 1, I have a broken list Workflows.
    The logs contants the following error:
    05/13/2014 14:49:03.86  w3wp.exe (0x2FB4)                               0x0774  SharePoint Foundation      
        DistributedCache                air4g
    Monitorable     Token Cache: Failed to initialize SPDistributedSecurityTokenCache  Exception: 'System.MissingMethodException: Method not found: 'Void Microsoft.ApplicationServer.Caching.DataCacheFactoryConfiguration.set_DataCacheServiceAccountType(Microsoft.ApplicationServer.Caching.DataCacheServiceAc
    countType)'.    
    at Microsoft.SharePoint.DistributedCaching.SPDistributedCachePointerWrapper.InitializeDataCacheFactory()    
    at Microsoft.SharePoint.DistributedCaching.SPDistributedCache..ctor(String name, TimeSpan timeToLive, SPDistributedCacheContainerType containerType, Boolean encryptData)    
    at
     Microsoft.SharePoint.IdentityModel.SPDistributedSecurityTokenCache..ctor(String name, TimeSpan timeToLive, SPDistributedCacheContainerType containerType, Boolean encrptyData, TimeSpan minimumTokenExpirationWindow)
    at Microsoft.SharePoint.IdentityModel.SPDistributedSecurityTokenCacheInitializer.Init(Object state)'. 
    As I understand, I have to install some update in the system, but windows update don't show any available updates.
    Any ideas?

    Hi,
    According to your post, my understanding is that you got a broken list Workflows after install SharePoint 2013 SP1.
    I recommend to check is that your cachecluster is up and running through:
    Get-CacheHostConfig -ComputerName $env:computername -CachePort 22233
    when your cache is up and running, run the following 2 commands:
    Remove-SPDistributedCacheServiceInstance
    Add-SPDistributedCacheServiceInstance
    For more information, you can refer to:
    Distrubited Cache in SharePoint 2013
    SharePoint 2013 - Distributed Cache: ErrorCode ERRCA0017 SubStatus ES0006 e ES0001
    Replacing missing named caches to a SharePoint Distributed Cache cluster
    Thanks,
    Linda Li                
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • Error with Microsoft.ApplicationServer.Caching.VelocityPacketTooBigException

    Hello All
    I am getting the below error while I am searching for a huge record (more than 8.5 MB).
    Microsoft.ApplicationServer.Caching.VelocityPacketTooBigException: Size of message to be sent is 8837220 bytes which is larger than the maximum message size 8388608 specified in configuration.
    I have tried to change the settings in web.config cloud as below:-
    <dataCacheClient name="default" isCompressionEnabled="true">
    <autoDiscover isEnabled="true" identifier="foo" />
    <!--<localCache isEnabled="true" sync="TimeoutBased" objectCount="100000" ttlValue="300" />-->
    <transportProperties maxBufferSize="67108864"/>
    </dataCacheClient>
    But no luck...
    Please help me as am new to Azure.
    Thanks in Advance
    Deepak Gupta
    [email protected]
    919910164863

    Hi Deepak,
    Looks like, you only changed the Cache client config setting in app.config/web.config.
    You have to set the maxbuffersize on both the client and server.
    You also need to set the maxBufferSize for the server. To do this
    Right click your role
    Add -> New Item -> XML File
    Name it "CacheSettings.xml"
    Paste the following XML:
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    <configSections>
    <section name="dataCache" type="Microsoft.ApplicationServer.Caching.DataCacheSection, Microsoft.ApplicationServer.Caching.Core" allowLocation="true" allowDefinition="Everywhere" />
    </configSections>
    <dataCache size="Small">
    <advancedProperties>
    <transportProperties maxBufferSize="XXXX" maxBufferPoolSize="XXXX" />
    </advancedProperties>
    </dataCache>
    </configuration>
    Regards,
    Manu Rekhar

  • Microsoft.ApplicationServer.Caching.AzureClientHelper.dll in Caching 2.3.1.0 can not be copied locally

    There is a problem with Microsoft.ApplicationServer.Caching.AzureClientHelper.dl.
    Here is the problem :
    I have Web assembly which does not use caching. Caching is used by other assembly and it is in another assembly. But the config is in web. Caching nuget package is added in Services assembly and all the implementations and usages go there.
    At the end everything must be copied to Web/bin for the app to load all of its dependencies. The problem is here - Settings CopyLocal = True for Microsoft.ApplicationServer.Caching.AzureClientHelper.dll in Service assembly copies it locally to the Service/bin/Debug
    but not in Web/bin because I do not reference it in Web assembly.
    The problem could be solved easily with a type variable somewhere but the problem is that all the types of this assembly are internal.
    Any proposal to solve this?
    Thanks.

    Hi,
    From my experience, we could use startup task to do this, startup tasks are actions that are taken before your roles begin, we could copy the dll file to the folder where we want to. see more details at:
    http://msdn.microsoft.com/en-us/library/hh180155.aspx
    Best Regards
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Microsoft.ApplicationServer.Caching.DataCacheException: ErrorCode ERRCA0017 :SubStatus ES0002 :

    Hello everyone!
    For a long time I've been using the shared cache feature without any trouble with a Windows Azure Website (using session cache).
    The last couple of days, I've been receiving a slew of errors: 
    Microsoft.ApplicationServer.Caching.DataCacheException: ErrorCode<ERRCA0017>:SubStatus<ES0002>:
    It continues by saying this:
    There is a temporary failure. Please retry later. (The request did not find the primary.). 
    I really don't understand why this is happening now. It was working fine. And all my configuration settings in my web.config are correct.
    The URL is right, and my key is right.  What could be wrong?
    Thanks!
    -Eric
    Eric

    Hi,
    Did you update your azure SDK? Or encounter this issue without doing anything? From my research, I found an article,
    Please have a look at it:
    http://blogs.msdn.com/b/akshar/archive/2011/05/01/azure-appfabric-caching-errorcode-lt-errca0017-gt-substatus-lt-es0006-gt-what-to-do.aspx 
    Hope this helps
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Folder %USERPROFILE%\Appdata\local\Microsoft\Windows\caches created everywhere

    Everywhere in all folders that I access a new (empty) folder is created called:
    %USERPROFILE%\Appdata\local\Microsoft\Windows\caches
    Apparently some application/service is not able to resolve %USERPROFILE%. Which application is it and what is the cause?

    Hi,
    Could you please share more information with me? I don't quite understand this issue
    "Everywhere in all folders that I access a new (empty) folder is created called:
    %USERPROFILE%\Appdata\local\Microsoft\Windows\caches"
    Or you can share some screenshots with us.
    What is the result if you manually delete it?
    Regards
    Yolanda
    TechNet Community Support

  • Error creating site collection - Could not load file or assembly 'Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0

    Hi,
    When creating a Site collection using Central admin, i am getting the error "One or more types failed to load. Please refer to the upgrade log for more details." . Microsoft.ApplicationServer.Caching.Core dll version on my machine is 1.0.4632 (App
    Fabric 1.1). 
    Stack Trace
    SharePoint Foundation Upgrade SPSiteWssSequence ajywy ERROR Exception: Could not load file or assembly 'Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot
    find the file specified. dd64ad9c-0f90-e07d-aaaa-13533e0e9e4f
    Thanks,
    Thomas

    Hi Thomas,
    According to your description, my understanding is that you got an error when you created a site collection in SharePoint 2013.
    I found a similar thread with yours, maybe it also was created by you. Anyway ,in the thread, the workaround is Changing the virtual directory web config of CA (Option 1 and 2 mentioned at
    http://technet.microsoft.com/en-us/library/dn473937.aspx ) and it worked.
    More information, please take a look at:
    http://sharepoint.stackexchange.com/questions/111439/error-creating-site-collection-could-not-load-file-or-assembly-microsoft-appl
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Does SSRS Cache report generate a new cache automatically after expiration?

    When you cache a report in SSRS 2008 and set it to expire after a number of minutes, for example 30 minutes, Does the report refresh after it expires and generate a new cached report automatically or it refreshes only when the report is requested or run?
    For example, if I run the report at 10:00AM, it will expire at 10:30AM, then when someone else runs the report at 11:15AM, Will there have been a new Cached report or it will be processed as new(in other words, it is not based on a Cached report)?
    Thanks!

    Hi,
    When the expire time is reached, the new cache will not be created until the next time the report is requested.
    If someone runs the report at 11:15AM, the last used time would be 11:15AM and it will be expired at11:20AM. There is no cached report, unless you have a cache refreah plan.
    You can check the ExecutionCache table in the ReportServerTempDB to verify if a new cache is created or not.
    Reference:
    Caching Reports (SSRS)
    http://technet.microsoft.com/EN-US/library/ms155927.aspx
    Thanks.
    Tracy Cai
    TechNet Community Support

  • Applet cache is not working on Mountain Lion(Mac 10.8)

    Applet cache is not working on Mountain Lion(Mac 10.8)
    OS Details:  Mac 10.8
    Applet cache is not working on Safari 6 and Firefox 15.0.1 with java 7(provided by oracle) on Mac 10.8(mountain Lion) and even applets are not working  on chrome because its not supporting java 7(64 bit).
    In order to run applets on Firefox and Safari we need to install Java SE6 which provided by Apple otherwise “PlugInProcess” does not work and it show the below warning message.
    For your information I given screen shots below
    ) Safari screen shot with Java Plug-in
         2.) Firefox screen shot with Java Plug-in
         3) Chrome screen shot( it does not have java plugin)
    4) Java cache viewer console
    5) Applet Java console and it is using Java 7
    Kindly review above mentioned problem and suggest us.

    Problem solved.
    I switched to a Western Digital powered Hard Drive from the Toshiba Canvio I was using.
    I suspect the USB 3.0 did not mount correctly after the first save.
    Fortnuately the Canvio does work on my Windows 7 machine.
    Thanks for yur suggestions

  • Cache update not yet started In PI 7.1

    Hi
    Iu2019m using PI 7.1, facing the issue with Cache Update
    Under Integration Builder -> Environment -> Cache Notifications
    Central Adapter Engine, Mapping Runtime Cache (Central Adapter Engine) both are in gray color status  (Cache update not yet started) .
    Cache Connectivity Test in RWB
    RWB -->Component Monitoring --> Cache Connectivity Test
    For both Central Adapter Engine, Mapping Runtime Cache on Central Adapter Engine
    Showing the warning
          "--Attempt to fetch cache data from Integration Directory not yet started or still in process"_  
    Please help me out to update the Cache successfully
    Thanks
    Vadde

    Hi Sekher
    Thank you very much for your time,
    1  RFC- INTEGRATION_DIRECTORY_HMI is working fine.
    2. I du2019t find the com.sap.aii.af.cpa.svc  service in NWA  ,
    3  Under Config Tool
        template - Usage_Type_All_in_One - Services - com.sap.aii.af.cpa.svc
       "CacheType" has  the value "DIRECTORYu201D only
    Thanks
    Vadde

  • Adapter engine cache is not display in sxi_cache PI7.1

    Hi All expert  ,
    I am doing post installation step for Pi7.1 . during initial setup configuration . I have got error message . u201CProtocol of Step 'Executing BAPI SXMB_SET_ROLE_TO_ISu201D .  I have try to resolve this error but I am not able to do so  skip this step and completed resume setup .
    after that I have check in SXI_CACHE, here I found that adapter engine cache is not display.  please help me to resolve this issue.
    Regards,
    Amit

    Hi
    Answer is pure assumption
    I checked the service.sap.com and found a OSS note related "BAPI SXMB_SET_ROLE_TO_IS"
    Pls check the OSS note - Note 1319873 - PI CTC: Error in "Executing BAPI SXMB_SET_ROLE_TO_IS"
    Pls take opinion from SAP / Basis before implementing the OSS note
    Regards
    Madhan D

  • How to tell if loaded file came from cache or not?

    Trying to work out how I can tell if a downloaded file came from the cache or was freshly downloaded over the net. I need this because users will download multiple files and I am trying to give make an accurate downloader for them. I have made them download a sample file which I have made not to cache by doing the following:
    private var _loader:URLLoader;
    private var _rootPath:String; = "http:/example.com/speedTest/f4v/";
    private var _startDownloadTime:int;
    private var _targetSpeed:Number //set elsewhere
    private function loadTestSpeedFile():void
                var fileRequest:URLRequest = new URLRequest();
                fileRequest.url = _fullFilePath + "speedTest.f4v";
                var variables:URLVariables = new URLVariables(); 
                variables.nocache = new Date().getTime();
                fileRequest.data = variables;
                _startDownloadTime = flash.utils.getTimer();
                _loader.load(fileRequest);
    private function speedTestHandler(e:Event):void
                var endDownloadTime:int = flash.utils.getTimer();
                var timeElapsed:Number =   endDownloadTime - _startDownloadTime;
                timeElapsed = timeElapsed/1000;
                var bytesPerSec:Number = (SIZE_OF_TEST_FILE/timeElapsed);
                var currentSpeedFactor:Number = bytesPerSec/_targetSpeed;
                trace("Speed Test file downloaded in " + timeElapsed + " secs at " + bytesPerSec + " bytes a sec : speedFactor " + currentSpeedFactor);
                   //remove this handler and download as normal from a list of files
                _loader.removeEventListener(Event.COMPLETE, speedTestHandler);
                _loader.addEventListener(Event.COMPLETE, completeHandler);
              //download the rest of the files
                download();
    I could work out if the other files are downloading much more quickly (say 20X quicker) than the speedTest rate worked out here and then discount it from calculating the download speed and estimated time remaining.
    However, it would be much better if there was a way to access properties on the URLoader on the Event.COMPLETE handler to see if the file 'downloaded' was taken from the cache or not. Anyone know of way of doing it more elegantly than the hack described in the last sentence?

    Kglad,
    Thanks for the interest and reply. Yes, you are right the file load preventing the file being cached is stictly a different matter from that which is bugging me.  I am, however,  using the Progress Event (as in flash.events.ProgressEvent ) in the following event handler listening to it:
    private function progressHandler(e:ProgressEvent):void
                var percent:Number = (e.bytesLoaded/e.bytesTotal)*100;
                  //other code to resize the gui loader ie scaling it to the percentage.
    Again this just tells me how much has been loaded each time the event is fired. On the Event.COMPLETE handler I am getting the load timings pretty much as per the
    speedTestHandler(e:Event) I posted. The only difference there is that it loads from an array of filenames (most but not all of which can change on later replays - hence some will be cached and some not) What i need to know is where the file is loaded from - either from the server or the local systems cache. The only way round this is to discard very quick downloads (which must be from the cache) from true calculating download speeds but that is a bit hit and miss. I am asking for a better solution. Hope that makes sense...

  • No-cache not expiring web page

    In the below servlet A i am able to get the no cache to work so when i hit the back button the page is expired.
    I am using this same exact code in another servlet. The only differenc i can think of is the i am using the PRG patten with it. So i do a process then it redirects to servlet B and displays the invoice page. However if i hit back from here the page is not expired and will still display.
    any ideas?
    thanks john
    SERVLET A
    public class NewRegistration extends HttpServlet{
         public void doGet(HttpServletRequest request,
                   HttpServletResponse response)
         throws IOException, ServletException
              HttpSession session = request.getSession();
              User user = (User) session.getAttribute("user");      
              Cart cart = (Cart) session.getAttribute("cart");
              session.setAttribute("cart", cart);
              session.setAttribute("user", user);
              //session.setAttribute("Checked", "CHECKED");
              session.setAttribute("isChecked", "isChecked");
              response.setHeader("Pragma", "No-cache");
              response.setHeader("Cache-Control", "no-cache");
              response.setDateHeader("Expires", 1);
              String url = "/register.jsp";
              RequestDispatcher dispatcher =
                   getServletContext().getRequestDispatcher(url);
              dispatcher.forward(request, response);
         public void doPost(HttpServletRequest request,
                   HttpServletResponse response)
         throws IOException, ServletException
              doGet(request, response);
    }SERVLET B
    public class DisplayInvoiceServlet extends HttpServlet
        public void doGet(HttpServletRequest request,
                HttpServletResponse response)
                throws IOException, ServletException
            HttpSession session = request.getSession();
             String Error = (String) session.getAttribute("Error");
             String processerror = (String) session.getAttribute("processerror");
                                    response.setHeader("Pragma", "No-cache");
              response.setHeader("Cache-Control", "no-cache");
              response.setDateHeader("Expires", 1);
              String url = "";
              if(Error !=null){
                   url = "/confirm.jsp";
                   session.setAttribute("Error", Error);
              else if(processerror != null){
                   session.setAttribute("processerror", processerror);
                   url = "/carderror.jsp";
              else{
                   url = "/invoice.jsp";     
            RequestDispatcher dispatcher =
                    getServletContext().getRequestDispatcher(url);
            dispatcher.forward(request, response);
         public void doPost(HttpServletRequest request,
                   HttpServletResponse response)
         throws IOException, ServletException
              doGet(request, response);
    }

    The redirect in this servlet goes to servlet B. This is the servlet described in the first post that i didnt include.
    public class SubmitOrderServlet  extends HttpServlet
         public void doGet(HttpServletRequest request,
                   HttpServletResponse response)
         throws IOException, ServletException
              String cardType = request.getParameter("Ecom_Payment_Card_Type");
              String cardName = request.getParameter("Ecom_Payment_Card_Name");
              String cardNum = request.getParameter("Ecom_Payment_Card_Number");
              String expMonth = request.getParameter("Ecom_Payment_Card_ExpDate_Month");
              String expYear = request.getParameter("Ecom_Payment_Card_ExpDate_Year");
              String cvvCheck = request.getParameter("group2");
              String cvv2 = request.getParameter("Ecom_Payment_Card_Verification");
              String bankPhone = request.getParameter("bankphone");
              HttpSession session = request.getSession();
              User user = (User) session.getAttribute("user");    
              Cart cart = (Cart) session.getAttribute("cart");
              Icharge icharge = new Icharge();
              Cardvalidator validate = new Cardvalidator();
              GenericValidator validator = new GenericValidator();
              DecimalFormat format = new DecimalFormat("0.00");
              String Error = "";
              boolean proceede = true;
              try {
                   validate.reset();
                   if(cardType.equalsIgnoreCase("0")){
                        Error = "Please Select Card Type";
                        proceede = false;
                        session.setAttribute("Error", Error);
                   if(proceede){
                        if(!cardName.equalsIgnoreCase(user.getformatBName())){
                             Error = "Cardholder name must match billing Information";
                             proceede = false;
                             session.setAttribute("Error", Error);
                   if(proceede){
                        if(expMonth.equalsIgnoreCase("Month")){
                             Error = "Please Select Exp. Month";
                             proceede = false;
                             session.setAttribute("Error", Error);
                   if(proceede){
                        if(expYear.equalsIgnoreCase("Year")){
                             Error = "Please Select Exp. Year";
                             proceede = false;
                             session.setAttribute("Error", Error);
                   if(proceede){
                        if(expMonth != null && expMonth.length() >0 && !expMonth.equalsIgnoreCase("Month")){
                             validate.setCardExpMonth(Integer.parseInt(expMonth));
                   if(proceede){
                        if(expYear != null && expYear.length() >0 && !expYear.equalsIgnoreCase("Year")){
                             validate.setCardExpYear(Integer.parseInt(expYear));
                   if(proceede){
                        if(cvvCheck.equalsIgnoreCase("cscY")){
                             if(cvv2 == null || cvv2.equals("")){
                                  Error = "Please enter Card Security Code";
                                  proceede = false;
                                  session.setAttribute("Error", Error);
                             else if(cvv2 != null && (cvv2.length() < 3 || cvv2.length() > 4)){
                                  Error = "Please enter a valid Card Security Code";
                                  proceede = false;
                                  session.setAttribute("Error", Error);
                             else if(!validator.isInt(cvv2)){
                                  Error = "CSC must be numeric";
                                  proceede = false;
                                  session.setAttribute("Error", Error);
                   if(proceede){
                        if(bankPhone == null || bankPhone.equals("")){
                             Error = "Please enter issuing bank phone number";
                             proceede = false;
                             session.setAttribute("Error", Error);
                   if(proceede){
                        validate.setCardNumber(cardNum);
                        validate.validateCard();
                   if(proceede){
                        if(validate.isDateCheckPassed() && validate.isDigitCheckPassed()){
                             try{
                                  icharge.resetData();
                                  icharge.setGateway(1);
                                  icharge.setTransactionDesc("Ibiz Test Transaction");
                                  String total = cart.getTotalPrice();
                                  total = total.substring(1);
                                  icharge.setTransactionAmount(total);
                                  icharge.setCardCVV2Data(cvv2);
                                  icharge.setCardNumber(cardNum);
                                  icharge.setCardExpMonth(expMonth);
                                  icharge.setCardExpYear(expYear);
                                  icharge.setCustomerFirstName(user.getBillfirstName());
                                  icharge.setCustomerLastName(user.getBilllastName());
                                  icharge.setCustomerAddress(user.getBilladdress1());
                                  icharge.setCustomerCity(user.getBillcity());
                                  icharge.setCustomerState(user.getBillstate());
                                  icharge.setCustomerZip(user.getBillzip());
                                  //icharge.setInvoiceNumber("12345");
                                  icharge.setTimeout(30);
                                  icharge.authorize();
                                  if(icharge.isTransactionApproved()){
                                       session.setAttribute("processerror", null);
                                       System.out.println("AVS " +icharge.getResponseAVS());
                                       System.out.println("resp " +icharge.getResponseCode());
                                       System.out.println("cvv " +icharge.getResponseCVV2());
                                       //System.out.println("respD " +icharge.getResponseData());
                                       System.out.println("resptext " +icharge.getResponseText());
                                       System.out.println("transId " +icharge.getResponseTransactionId());
                                       System.out.println("apprCode " +icharge.getResponseApprovalCode());
                                       java.util.Date today = new java.util.Date();
                                       CCData cardData = new CCData();
                                       cardData.setAvsResp(icharge.getResponseAVS());
                                       cardData.setCardholder(user.getBillfirstName() + " " + user.getBilllastName());
                                       cardData.setCardNum(cardNum);
                                       cardData.setCardType(validate.getCardTypeDescription());
                                       cardData.setCvvResp(icharge.getResponseCVV2());
                                       cardData.setRespApprCode(icharge.getResponseApprovalCode());
                                       cardData.setRespText(icharge.getResponseText());
                                       cardData.setRespTransId(icharge.getResponseTransactionId());
                                       Invoice invoice = new Invoice();
                                       invoice.setUser(user);
                                       invoice.setInvoiceDate(today);
                                       invoice.setLineItems(cart.getItems());
                                       if(cart.getTax() > 0){
                                            invoice.setIsTax("Y");
                                            invoice.setTax(cart.getTax());
                                       else{
                                            invoice.setIsTax("N");
                                       invoice.setSubtotal(cart.getSubtotal());
                                       invoice .setTotal(Double.parseDouble(total));
                                       Tender tender = new Tender();
                                       tender.setAmount(Double.parseDouble(total));
                                       tender.setTenderType(validate.getCardTypeDescription());
                                       InvoiceDB.insert(invoice,cardData,tender);
                                       StringUtils strUtil = new StringUtils();
                                       String items = "";
                                       for(int i = 0; i < cart.getItems().size(); i++){
                                            LineItem item = cart.getItems().get(i);
                                            Product p = item.getProduct();
                                            items = strUtil.addToRecWSAftr(items, String.valueOf(item.getQuantity() + strUtil.fillRight(String.valueOf(p.getItemNum()),17)) +
                                                      strUtil.fillRight(p.getDesc2(),29) + strUtil.fillRight(String.valueOf(p.getPriceFormat()),12));
                                       // Send an email to the user to confirm the order.
                                       String to = user.getEmail();
                                       String from = "[email protected]";
                                       String subject = "Order Confirmation";
                                       String body = "Dear " + user.getFormatSName() + ",\n\n" +
                                       "Thanks for ordering from us. " +
                                       "You should receive your order in 3-5 business days. " +
                                       "Please contact us if you have any questions.\n\n" +
                                       "Order Summary\n\n" +
                                       "Qty          Item No.          Description            Price\n"+
                                       "-----------------------------------------------------------\n"+
                                       items + "\n";
                                       boolean isBodyHTML = false;
                                       try
                                            MailUtil.sendMail(to, from, "", subject, body, isBodyHTML);
                                       catch(MessagingException e)
                                            this.log(
                                                      "Unable to send email. \n" +
                                                      "You may need to configure your system as " +
                                                      "described in chapter 15. \n" +
                                                      "Here is the email you tried to send: \n" +
                                                      "=====================================\n" +
                                                      "TO: " + to + "\n" +
                                                      "FROM: " + from + "\n" +
                                                      "SUBJECT: " + subject + "\n" +
                                                      "\n" +
                                                      body + "\n\n");
                                       session.setAttribute("invoice", invoice);
                                  else{
                                       session.setAttribute("processerror", icharge.getResponseText());
                                       System.out.println("resptext " +icharge.getResponseText());
                                       System.out.println("resp " +icharge.getResponseCode());
                                       System.out.println("respD " +icharge.getResponseData());
                             catch(IBizPayException ex){
                                  System.out.println("IPWorks exception thrown: " + ex.getCode() + " [" + ex.getMessage() + "].");
                             catch(Exception ex){
                                  System.out.println(ex.getMessage());
                        else{
                             proceede = false;
              catch (IBizPayException ex) {
                   Error = ex.getMessage();
                   proceede = false;
                   session.setAttribute("Error", Error);
              catch (Exception e1) {
                   System.out.println(e1.getMessage());
              if(!proceede){
                   session.setAttribute("cardI", cardType);
                   session.setAttribute("expmI", expMonth);
                   session.setAttribute("expyI", expYear);
                   session.setAttribute("cardN", cardNum);
                   session.setAttribute("cvv", cvv2);
                   session.setAttribute("bphone", bankPhone);
              else{
                   session.setAttribute("cardI", null);
                   session.setAttribute("expmI", null);
                   session.setAttribute("expyI", null);
                   session.setAttribute("cardN", null);
                   session.setAttribute("cvv", null);
                   session.setAttribute("bphone", null);
                   session.setAttribute("Error", null);
              response.setHeader("Pragma", "No-cache");
              response.setHeader("Cache-Control", "no-cache");
              response.setDateHeader("Expires", 1);
              response.sendRedirect("DisplayInvoice");
         public void doPost(HttpServletRequest request,
                   HttpServletResponse response)
         throws ServletException, IOException
              doGet(request, response);
    }

  • Cache folders not visible

    Has anyone else noticed that the cache folders are not visible under OS X 10.7?  I found a forum where a user had posted a supposed 'fix' by using the Termial App, and the following command:
    chflags nohidden ~/Library/
    However, this did not seem to work for me.
    As an aside, I bought my frist Apple IIe when I was in 7th grade, been a LOYAL Apple user ever since.  However, Lion just flat out *****.  No pretty way to say it.  Hangs, Safari crashes, email crashes, Time Machine hang ups, etc, etc, etc....  If I had a dollar for every minute  I have sat and whatched the pinwheel................
    Thanks for any help/advice.

    Yes.   That must be the issue.  When I tried your suggestion, I received the following message:
    The file /Users/yourHome/Library/Caches does not exist.
    I first noticed this issue when I was trying to locate the cache folder for Opera (browser).  I can see it is saving files to `Library/caches/Opera/temporary files.  I just can't locate the Opera cache folder.
    Thanks for the suggetion.

Maybe you are looking for

  • Lot of build errors in project created for debug CRM 5.0

    Hi SDN! I want to setup java debugging for CRM 5.0 modified application. According to note 1154496 I created project "crm_b2b". I took file src.zip from server\usr\sap\<system name>\<instance>\j2ee\cluster\<server number>\apps\sap.com\crmb2b at first

  • How do I copy a block of memory (image) in LV array

    Hi, I need to read and copy image data from memory to LV array. I use HWaccess VI (read a byte) but the loop time is too long, is there any solution with specific DLL which realise a total copy in LV array ? Thanks Francois. My system: P4/Win2000/LV

  • Lexmark  4550 printer wont work on snow leopord 10.6

    HI All i recently upgraded my os from tiger to snow leopord  and was trying to instail my lexmark x4550 wireless printer on my mac with OS 10.6.8  when instail my printer it says ..it has incounred and unexpected error and closed  i  i had no probs u

  • Diskwarrior4.1 and techtool4.6.1 and leopard 10.5.2

    I have used both of these utilities with Tiger and had no problems. I upgraded DW4 and TT4 for Leopard. This description is for both utilities. Inserted the software, clicked on restart, waited for the start up sound, pressed and held the C key until

  • Need to transfer files using Firewire to USB3, adapter???

    I have a backup from my old MBP on a portable hard drive, it uses Firewire. My new Rentina MBP has Thunderbolt and USB3. Is there an adapter that doesn't cost an arm and a leg, maybe just a half an arm I can use? I want to move the documents from the