WebView - loadHTMLString - synchronously?

I just refactored my app so the initial view is a webview with controls placed on it. The html for the webview is in a file bundled with the app. I have a Default.png that appears while the app loads -- it's essentially a screenshot of the initial screen. When my initial view was a "regular" UIView, it replaced the screenshot when the app loads somewhat invisibly -- you didn't notice the switch. Now that I have a webView, I'm loading the content in the viewController's loadView, and the view replaces the screenshot before the html content has loaded -- so I get a white view with controls for a half-second before the html is is done loading.
So I'd like to have that loadHTMLString load synchronously -- I've used the webView's delegate method didFinishLoading (or whatever it is) in other places where I control the view transition -- I get a request to go to another view, load the HTML, then display the view. But in this case (and with another view controller that is on the tabbar), I don't control that. I've tried to load the html in the viewController's init, but at that point my webView doesn't exist yet. I've tried loading the content in loadView using a separate thread and waiting in the current thread with a while loop that does a [NSThread sleepForTimeInterval] until the content is loaded, but it locks things up - apparently sleepForTimeInterval doesn't allow other threads to get cpu time?
It's unacceptable as it is. Any ideas how I might get the content pre-loaded before the webView displays itself?
Thanks,
Brian McLaughlin

Ok, that makes more sense. The viewWillAppear and viewDidAppear methods are UIViewController methods, so they wouldn't be used in a UIWebView subclass.
You might consider taking the logic for the content out of the view and put it in a model class. Then the controller is responsible for creating the model and requesting the data and loading it into the view.
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/Coco aDesignPatterns/chapter5_section4.html

Similar Messages

  • Best view for help page

    Hi, I am working on a iphone App and I am wondering if you can help me select the most appropriate view for the Help or Information page. In my main window, I have a tool bar. In the bar, there is a small icon (UIButtonTypeInfoDark). If user click it, I would open a new Help page. My page will be long, so it can bot fit in my page. I prefer use can flip up / down so the whole content can be views. Just like we visit a web page on iphone. What kind of view should I use?
    I am think about a webview, but the help page content will resides on he iphone, not through a URL connection.
    Thank you very much
    fm

    NSBundle *bundle = [NSBundle bundleForClass:[SuccessScreenController class]];
    NSString *successFile = [bundle pathForResource:@"success"
    ofType:@"html" inDirectory:@"files"];
    NSString *content = [NSString
    stringWithContentsOfURL:[NSURL fileURLWithPath:successFile]];
    NSString *baseUrl = [bundle pathForResource:@"files" ofType:nil];
    [webView loadHTMLString:content
    baseURL:[NSURL fileURLWithPath:baseUrl]];

  • IPhone SDK - Display HTML page from WITHIN package

    Hi all,
    As part of my iPhone app, I want to display an HTML page.
    Now, I've got a browser component working just fine, and have no problem displaying anything on the web, but i don't know how to reference an html page that is WITHIN my application package.
    I'd much rather do it this way, so that my app can be used offline.
    I'm sure its a simple thing to do... anyone know what i need to do here to make this work?

    NSString *welcomeFile = [bundle pathForResource:@"welcome" ofType:@"html" inDirectory:@"files"];
    NSString *content = [NSString stringWithContentsOfURL:[NSURL fileURLWithPath:welcomeFile]];
    NSString *baseUrl = [bundle pathForResource:@"files" ofType:nil];
    [webView loadHTMLString:content baseURL:[NSURL fileURLWithPath:baseUrl]];

  • [iPhone] Autorotation and Problem Resizing UIWebView

    I'm loading a UIViewController with a UIWebView embedded in it. However, the UIWebView doesn't always resize correctly. Here are the steps I follow:
    a) I view the UIWebView in portrait mode...
    b) I autorotate to landscape mode...
    c) I load a new HTML string using [webView loadHTMLString:self.htmlText baseURL:nsurl];
    webView is an instance of UIWebView.
    nsurl points to a local HTML file.
    d) I rotate back to portrait mode... this is where the text extends beyond the right border of the screen. It appears that the UIWebView keeps the horizontal landscape dimensions after I rotate back to portrait mode.
    The strange thing is that this only happens after I call [webView loadHTMLString:self.htmlText baseURL:nsurl];
    I'm running the latest OS and the programming using the newest SDK.
    Any thoughts?

    The solution to my other UIWebView/Autorotation problem also solved this. I added the viewport meta tag to each HTML page. I dynamically changed this tag using some javascript every time the device rotated and explicitly set the width to 320 and height to 480, or vice versa. If you use this solution, make sure you include spaces before and after the "=" in the meta tag. See the examples on the following page: http://developer.apple.com/documentation/AppleApplications/Reference/SafariHTMLR ef/Articles/HTMLExtensions.html#//appleref/doc/uid/TP40002066-DontLinkElementID13

  • WebView - When to call loadHTMLString?

    My app has a few windows that contain WebViews. These are defined in IB and the actual WebViews are bound to IBOutlets in my AppDelegate. Each WebView displays HTML text that I generate at runtime. I set the content via loadHTMLString on my WebView's mainFrame.
    The problem is, I can't figure out WHEN to properly call loadHTMLString. The WebView documentation seems to assume you're always loading from a URL source. I've tried doing this in init, initWithFrame, awakeFromNib and viewWillDraw. The latter sort of works, but it gets called during scrolling which causes flashing.
    Any ideas? Can a WebDataSource be used to provide generated content?

    Ok, that makes more sense. The viewWillAppear and viewDidAppear methods are UIViewController methods, so they wouldn't be used in a UIWebView subclass.
    You might consider taking the logic for the content out of the view and put it in a model class. Then the controller is responsible for creating the model and requesting the data and loading it into the view.
    http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/Coco aDesignPatterns/chapter5_section4.html

  • WebView not displaying my html.

    I have made a window, and its controller has this:
    -(id) init {
    if(![super initWithWindowNibName: @"Post"])
    return nil;
    return self;
    -(void)windowDidLoad:(id)sender {
    NSLog(@"Post window opned");
    [webView.mainFrame loadHTMLString:@"<html><body>hi test.</body></html>" baseURL:[NSURL URLWithString:@"http://google.com/"]];
    The webview is hooked up to a WebView from interface builder. Why wouldn't the text be displayed?

    I ended up working it out.

  • WebView glyph (?) substitution: how to override?

    I have some HTML with both English and Greek. I put it into a WebView with loadHTMLString:baseURL: Some of the Greek is in parentheses. Just normal, vanilla ASCII parentheses. When it shows up in the WebView, the ASCII parentheses are swapped out for 0xFF08 and 0xFF09, which look awful, since they pull away from the surrounding text. It ends up looking like there's a space between, say, the right parenthesis and the period that follows.
    If this were a font substitution or CSS issue, I think I would know how to correct it. But since it has to do with how WebView lays out the characters that are handed to it, I don't know what to do. I realize this is not a very 101 question, but I'm new to WebKit, and hope someone might be able to answer. How do I get normal ASCII parentheses there? Do I have to use HTML character entities, or is there another way?

    Moved to "Developer" forum.

  • Viewing downloaded html-code in a webview -AppleEventhandler failed(-10000)

    I am trying to view downloaded html-code in a webview in AppleScript Studio. Showing the raw html text in the textwindow works ok, but I am getting an error message trying to output the code to the webview.
    I really googled for a solution to this before posting, but haven´t found anything.
    It´s the last line "call method "loadHTMLString:baseURL:"....." that is giving me the error.
    What´s wrong?
    on launched theObject
    -- this downloads the source from www.google.com into the variable myhtml
    -- and displays the source in a text view window:
    set myhtml to do shell script "curl www.google.com"
    set contents of text view "textwindow" of scroll view "textwindow" of window "textwindow" to myhtml
    -- this should give a variable that points to the webview in the webview window
    -- everything in this window is labeled "webwindow" in the applescript properties in IB:
    set webwindow to call method "mainFrame" of object (view "webwindow" of window "webwindow")
    call method "loadHTMLString:baseURL:" of webwindow with parameters {myhtml, null}
    end launched
    AppleScript Error
    AppleEvent handler failed. (-10000)
    [Session started at 2008-12-30 14:09:48 +0100.]
    2008-12-30 14:09:49.395 webkladd2[15485:10b] * -[NSCFNumber absoluteURL]: unrecognized selector sent to instance 0x2cea40
    2008-12-30 14:09:49.397 webkladd2[15485:10b] An exception was thrown during execution of an NSScriptCommand...
    2008-12-30 14:09:49.399 webkladd2[15485:10b] * -[NSCFNumber absoluteURL]: unrecognized selector sent to instance 0x2cea40

    Hello
    IF I'm not mistaken, you should provide "http://www.google.com/" for baseURL of your html source obtained from "http://www.google.com" unless this page defines its own base.
    So you might try something like -
    --SNIPPET
    set myhtml to do shell script ("curl " & "http://www.google.com")
    set nsstring to call method "stringWithString:" of class "NSString" with parameter "http://www.google.com/"
    set urlstring to call method "stringByAddingPercentEscapesUsingEncoding:" of nsstring with parameter 4 -- UTF-8
    set nsurl to call method "URLWithString:" of class "NSURL" with parameter urlstring
    set webwindow to call method "mainFrame" of object (view "webwindow" of window "webwindow")
    call method "loadHTMLString:baseURL:" of webwindow with parameters {myhtml, nsurl}
    --END OF SNIPPET
    cf.
    http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ObjC_classic /
    Snippet is NOT tested, though I did go by the book as best I could.
    Good luck,
    H

  • Images not getting displayed in the WebView

    Hi every1,i am facing a problem in displaying images in the WebView. when a particular page or HTML is loaded in a WebView ,images are not coming and i am not able to go to other pages on clicking another link in that page. can ny1 help me?

    @ is a default value as per ALV internal process. This is used in icons .
    I think this is causing the confusion.
    Check in the fieldcat if there is any adjsutment to be made to handle this.
    Br,
    Vijay

  • Issue in Synchronous File Read in clustered environment

    Hi,
    We are using clustered environment (4 managed servers) in Unix. In a OSB 11gR3 proxy service we are using Synchronous File Read. Randomly we are getting the below error. Let us know what could cause the issue. But the same code is working fine in a single stand-alone server configuration.
    Error Code : BEA-380002 , Error Reason : Invoke JCA outbound service failed with connection error, exception: com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/wsdlPathAndName [ SynchRead_ptt::SynchRead(Empty,body) ] - WSIF JCA Execute of operation 'SynchRead' failed due to: No Data to process.
    No Data to process.
    File /root/oracle/domains/osb/11.1.1.4/cluster/data/osb2/FolderName/Filename.txt to be processed was not found or not available or has no content ; nested exception is:
    BINDING.JCA-11007
    No Data to process.
    No Data to process.
    File /root/oracle/domains/osb/11.1.1.4/cluster/data/osb2/FolderNamer/Filename.txt to be processed was not found or not available or has no content Please make sure that the file exists in the specified directory.
    com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/wsdlPathAndName [ SynchRead_ptt::SynchRead(Empty,body) ] - WSIF JCA Execute of operation 'SynchRead' failed due to: No Data to process.
    No Data to process.
    File /root/oracle/domains/osb/11.1.1.4/cluster/data/osb2/FolderName/Filename.txt to be processed was not found or not available or has no content ; nested exception is:
    BINDING.JCA-11007
    No Data to process.
    No Data to process.
    File /root/oracle/domains/osb/11.1.1.4/cluster/data/osb2/FolderName/Filename.txt to be processed was not found or not available or has no content Please make sure that the file exists in the specified directory.
    at com.bea.wli.sb.transports.jca.binding.JCATransportOutboundOperationBindingServiceImpl.invoke(JCATransportOutboundOperationBindingServiceImpl.java:153)
    at com.bea.wli.sb.transports.jca.JCATransportEndpoint.sendRequestResponse(JCATransportEndpoint.java:209)
    at com.bea.wli.sb.transports.jca.JCATransportEndpoint.send(JCATransportEndpoint.java:170)
    at com.bea.wli.sb.transports.jca.JCATransportProvider.sendMessageAsync(JCATransportProvider.java:598)
    at sun.reflect.GeneratedMethodAccessor1115.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.wli.sb.transports.Util$1.invoke(Util.java:83)
    at $Proxy142.sendMessageAsync(Unknown Source)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageAsync(LoadBalanceFailoverListener.java:148)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToServiceAsync(LoadBalanceFailoverListener.java:603)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToService(LoadBalanceFailoverListener.java:538)
    at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageToService(TransportManagerImpl.java:558)
    at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageAsync(TransportManagerImpl.java:426)
    at com.bea.wli.sb.pipeline.PipelineContextImpl.doDispatch(PipelineContextImpl.java:670)
    at com.bea.wli.sb.pipeline.PipelineContextImpl.dispatchSync(PipelineContextImpl.java:551)
    at stages.transform.runtime.WsCalloutRuntimeStep$WsCalloutDispatcher.dispatch(WsCalloutRuntimeStep.java:1391)
    at stages.transform.runtime.WsCalloutRuntimeStep.processMessage(WsCalloutRuntimeStep.java:236)
    at com.bea.wli.sb.stages.StageMetadataImpl$WrapperRuntimeStep.processMessage(StageMetadataImpl.java:346)
    at com.bea.wli.sb.stages.impl.SequenceRuntimeStep.processMessage(SequenceRuntimeStep.java:33)
    at com.bea.wli.sb.pipeline.PipelineStage.processMessage(PipelineStage.java:84)
    at com.bea.wli.sb.pipeline.PipelineContextImpl.execute(PipelineContextImpl.java:1055)
    at com.bea.wli.sb.pipeline.Pipeline.processMessage(Pipeline.java:141)
    at com.bea.wli.sb.pipeline.PipelineContextImpl.execute(PipelineContextImpl.java:1055)
    at com.bea.wli.sb.pipeline.PipelineNode.doRequest(PipelineNode.java:55)
    at com.bea.wli.sb.pipeline.Node.processMessage(Node.java:67)
    at com.bea.wli.sb.pipeline.PipelineContextImpl.execute(PipelineContextImpl.java:1055)
    at com.bea.wli.sb.pipeline.Router.processMessage(Router.java:214)
    at com.bea.wli.sb.pipeline.MessageProcessor.processRequest(MessageProcessor.java:96)
    at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:593)
    at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:591)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
    at com.bea.wli.sb.pipeline.RouterManager.processMessage(RouterManager.java:590)
    at com.bea.wli.sb.transports.TransportManagerImpl.receiveMessage(TransportManagerImpl.java:375)
    at com.bea.wli.sb.transports.jca.binding.JCATransportInboundOperationBindingServiceImpl$4.run(JCATransportInboundOperationBindingServiceImpl.java:415)
    at com.bea.wli.sb.transports.jca.binding.JCATransportInboundOperationBindingServiceImpl$4.run(JCATransportInboundOperationBindingServiceImpl.java:413)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at weblogic.security.Security.runAs(Security.java:61)
    at com.bea.wli.sb.transports.jca.binding.JCATransportInboundOperationBindingServiceImpl.sendMessage(JCATransportInboundOperationBindingServiceImpl.java:413)
    at com.bea.wli.sb.transports.jca.binding.JCATransportInboundOperationBindingServiceImpl.invokeOneWay(JCATransportInboundOperationBindingServiceImpl.java:126)
    at com.bea.wli.sb.transports.jca.binding.JCAInboundRequestListener.post(JCAInboundRequestListener.java:39)
    at oracle.tip.adapter.sa.impl.inbound.JCAInboundListenerImpl.onMessage(JCAInboundListenerImpl.java:170)
    at oracle.tip.adapter.fw.jca.messageinflow.MessageEndpointImpl.onMessage(MessageEndpointImpl.java:502)
    at oracle.tip.adapter.file.inbound.Publisher.onMessageDelegate(Publisher.java:493)
    at oracle.tip.adapter.file.inbound.Publisher.publishMessage(Publisher.java:419)
    at oracle.tip.adapter.file.inbound.InboundTranslatorDelegate.xlate(InboundTranslatorDelegate.java:484)
    at oracle.tip.adapter.file.inbound.InboundTranslatorDelegate.doXlate(InboundTranslatorDelegate.java:121)
    at oracle.tip.adapter.file.inbound.ProcessorDelegate.doXlate(ProcessorDelegate.java:388)
    at oracle.tip.adapter.file.inbound.ProcessorDelegate.process(ProcessorDelegate.java:174)
    at oracle.tip.adapter.file.inbound.ProcessWork.run(ProcessWork.java:349)
    at weblogic.work.ContextWrap.run(ContextWrap.java:41)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/wsdlPathAndName [ SynchRead_ptt::SynchRead(Empty,body) ] - WSIF JCA Execute of operation 'SynchRead' failed due to: No Data to process.
    No Data to process.
    File /root/oracle/domains/osb/11.1.1.4/cluster/data/osb2/FolderName/Filename.txt to be processed was not found or not available or has no content ; nested exception is:
    BINDING.JCA-11007
    No Data to process.
    No Data to process.
    File /root/oracle/domains/osb/11.1.1.4/cluster/data/osb2/FolderName/Filename.txt to be processed was not found or not available or has no content Please make sure that the file exists in the specified directory.
    at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.request(JCABindingReferenceImpl.java:259)
    at com.bea.wli.sb.transports.jca.binding.JCATransportOutboundOperationBindingServiceImpl.invoke(JCATransportOutboundOperationBindingServiceImpl.java:150)
    ... 56 more
    Caused by: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/wsdlPathAndName [ SynchRead_ptt::SynchRead(Empty,body) ] - WSIF JCA Execute of operation 'SynchRead' failed due to: No Data to process.
    No Data to process.
    File /root/oracle/domains/osb/11.1.1.4/cluster/data/osb2/FolderName/Filename.txt to be processed was not found or not available or has no content ; nested exception is:
    BINDING.JCA-11007
    No Data to process.
    No Data to process.
    File /root/oracle/domains/osb/11.1.1.4/cluster/data/osb2/FolderName/Filename.txt to be processed was not found or not available or has no content Please make sure that the file exists in the specified directory.
    at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.performOperation(WSIFOperation_JCA.java:662)
    at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeOperation(WSIFOperation_JCA.java:353)
    at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:312)
    at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.invokeWsifProvider(JCABindingReferenceImpl.java:350)
    at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.request(JCABindingReferenceImpl.java:253)
    ... 57 more
    Caused by: BINDING.JCA-11007
    No Data to process.
    No Data to process.
    File /root/oracle/domains/osb/11.1.1.4/cluster/data/osb2/FolderName/Filename.txt to be processed was not found or not available or has no content Please make sure that the file exists in the specified directory.
    at oracle.tip.adapter.file.outbound.FileReader.readFile(FileReader.java:277)
    at oracle.tip.adapter.file.outbound.FileReader.executeFileRead(FileReader.java:181)
    at oracle.tip.adapter.file.outbound.FileInteraction.executeFileRead(FileInteraction.java:331)
    at oracle.tip.adapter.file.outbound.FileInteraction.execute(FileInteraction.java:395)
    at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.performOperation(WSIFOperation_JCA.java:529)
    ... 61 more
    Edited by: 842347 on Jul 6, 2011 3:11 AM

    I face the same issue and I have given all permissions to the folder for OS user.
    Because of this error my server is not starting up . Is there any way I can undeploy this composite to get my server running.
    I cant do this from EM because SOA server is failing to start up.
    I have tried removing it from $DOMAIN_HOME/deployed-composites but still when i try restarting the soa server the composite comes up there. Do we need to delete the entry some where else too. Kindly help.
    Thanks,
    Sri.

  • Oracle db to SAP R/3 synchronous solution ?

    Hi,
    I am looking for some comments from SDN members to come up with a solution.
    <u>Requirement:</u> Automatically update the R/3 system based on the updates in the "external" Oracle database.
    In order to accomplish this, currently we are working on the JDBC (Sender)> XI> R/3 ( RFC receiver) asynchronous scenario using poll interval to pull the data from Oracle db to R/3.
    Instead we are looking for a synchronous sort of solution where Oracle pushes the data into R/3 as soon as update happens in the Oracle tables.
    One of the possibility is to have a trigger in the database to generate the XML files using XMLGen.getxml utility.
    Thanks for your time,
    Sunil

    Hi Sunil.
    If I understand correctly, you want to push data from Oracle to XI rather than polling the database from XI and retrieving data.
    You may consider exposing your outbound interface in XI as a web service and then calling the web service from the triggers in Oracle. Thus data would be passed from the Oracle trigger to XI over SOAP.
    This link would help you on how to call web service from PL/SQL
    http://www.oracle.com/technology/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html
    These links would help you on how to expose a web service from XI.
    http://help.sap.com/saphelp_nw04/helpdata/en/31/daa0404dd52b54e10000000a1550b0/frameset.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/336365d3-0401-0010-9884-a651295aeaa9
    You can write the trigger for the appropriate action (INSERT, UPDATE, DELETE) on the database table and then call the web service.
    Hope this help ,
    Gaurav

  • Slave instance can not synchronized with the master for a long time

    Hi,
    Slave instance can not synchronized with the master for a long time, and the gap of LSNs between slave and master are more and more larger. The transfer bytes per second between master and slave is 118MB/s , upper limit to the ethernet card. Why???
    ENVIRONMENT:
    1. A network program which we called mcdb is based on BDB 4.8.30. It is used to accept get/set requests and then query data from bdb or save data to bdb.
    2. mcdb implements replication with bdb replication manager api. The default start replication policy is DB_REP_ELECTION, rep ack policy is DB_REPMGR_ACKS_ONE_PEER and rep priority is 100.
    3. The bdb data files, bdb log files, region files and rep files are all in the same home directory.
    4. There are two instances of the mcdb are separately on two standalone servers which has no other programs. These two instances are in one replication group which can elect a master automatically.
    5. The master instance is online, which has lots of requests (get, set, delete).
    ACTIONS:
    1. Start two mcdb instances on two servers and the two instance make a replication group. Slave has already synchronized with the master.
    2. Stop the slave for a long time (more than 20 hours).
    3. Start the slave instance to synchronize data with master.
    RESULT:
    1. the gap of LSNs between slave and master are more and more larger.
    2. db_stat of master and slave:
    master db_stat:
    467170     Number of PERM messages not acknowledged
    9245     Number of messages queued due to network delay
    172415     Number of messages discarded due to queue length
    25880     Number of existing connections dropped
    3407     Number of failed new connection attempts
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    DB_REPMGR site information:
    10.67.15.146 (eid: 0, port: 30011)
    Environment configured as a replication master
    331726/3574994     Next LSN to be used
    0/0     Not waiting for any missed log records
    328872/466092     Maximum permanent LSN
    0     Next page number expected
    0     Not waiting for any missed pages
    0     Number of duplicate master conditions originally detected at this site
    2147M     Current environment ID (2147483647)
    100     Current environment priority
    49     Current generation number
    50     Election generation number for the current or next election
    2323     Number of duplicate log records received
    0     Number of log records currently queued
    6768     Maximum number of log records ever queued at once
    55284     Total number of log records queued
    120M     Number of log records received and appended to the log (120475988)
    111     Number of log records missed and requested
    2147M     Current master ID (2147483647)
    2     Number of times the master has changed
    0     Number of messages received with a bad generation number
    8505306     Number of messages received and processed
    12     Number of messages ignored due to pending recovery
    471869     Number of failed message sends
    12M     Number of messages sent (12959945)
    0     Number of new site messages received
    1     Number of environments believed to be in the replication group
    990543     Transmission limited
    0     Number of outdated conditions detected
    0     Number of duplicate page records received
    0     Number of page records received and added to databases
    0     Number of page records missed and requested
    Startup complete
    6244678     Number of transactions applied
    0     Number of startsync messages delayed
    1     Number of elections held
    1     Number of elections won
    No election in progress
    0.057097     Duration of last election (seconds)
    8944103     Number of bulk buffer sends triggered by full buffer
    0     Number of single records exceeding bulk buffer size
    5273M     Number of records added to a bulk buffer (5273592170)
    10M     Number of bulk buffers sent (10490865)
    0     Number of re-request messages received
    0     Number of request messages this client failed to process
    0     Number of request messages received by this client
    slave db_stat:
    0     Number of PERM messages not acknowledged
    0     Number of messages queued due to network delay
    0     Number of messages discarded due to queue length
    1454     Number of existing connections dropped
    0     Number of failed new connection attempts
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    DB_REPMGR site information:
    10.67.15.147 (eid: 0, port: 30011)
    Environment configured as a replication client
    329544/2916048     Next LSN expected
    330433/2013808     LSN of first log record we have after missed log records
    329543/5500501     Maximum permanent LSN
    0     Next page number expected
    0     Not waiting for any missed pages
    0     Number of duplicate master conditions originally detected at this site
    2147M     Current environment ID (2147483647)
    100     Current environment priority
    49     Current generation number
    50     Election generation number for the current or next election
    5256M     Number of duplicate log records received (5256599432)
    3925284     Number of log records currently queued
    3925285     Maximum number of log records ever queued at once
    4880561     Total number of log records queued
    3578038     Number of log records received and appended to the log
    1912297     Number of log records missed and requested
    0     Current master ID
    1     Number of times the master has changed
    0     Number of messages received with a bad generation number
    12M     Number of messages received and processed (12980442)
    2     Number of messages ignored due to pending recovery
    0     Number of failed message sends
    1912307     Number of messages sent
    0     Number of new site messages received
    0     Number of environments believed to be in the replication group
    0     Transmission limited
    0     Number of outdated conditions detected
    0     Number of duplicate page records received
    0     Number of page records received and added to databases
    0     Number of page records missed and requested
    Startup incomplete
    110568     Number of transactions applied
    80     Number of startsync messages delayed
    0     Number of elections held
    0     Number of elections won
    No election in progress
    0     Number of bulk buffer sends triggered by full buffer
    0     Number of single records exceeding bulk buffer size
    0     Number of records added to a bulk buffer
    0     Number of bulk buffers sent
    0     Number of re-request messages received
    0     Number of request messages this client failed to process
    0     Number of request messages received by this client
    Edited by: 899585 on 2013-1-4 下午10:54
    Edited by: 899585 on 2013-1-4 下午10:55

    Hi,
    Unfortunately, this issue is beyond the level of what is supported over the forum. Performance related issues are extremely complex and require an in-depth understanding of your environment and dedicated support. In a generic sense, you can look at this as a basic queueing problem. You have a server that went down and work is still coming in. When the server gets started it is possible that it may never catch up depending on new work coming in and the rate at processing the old work.
    So what would you do in this case --- one thing would be to reduce the new work coming in. In HA terms this would be slowing the master down and you can increase DB_REP_ACK_TIMEOUT for this. Another thing you could do is add fresh servers to help reduce the workload. In HA terms, this would be the equivalent of restarting the client and give it a fresh look at everything. Another thing you could do is replan the system and load balance. In HA terms, it would mean something like take a hot backup of the master and reinit a client from scratch.
    If you are interested in getting a dedicated support person working on this concern, please let me know and we can move forward down that path. Just respond to the thread with your email address and I will get in contact with you so we can pursue that approach.
    thanks
    mike

  • How can I reset the value of an indicator in a while loop, from another synchronous while loop?

    I am running 2 synchronous while loops, one which is keep track of time, and the other is measuring periods. In the while loop that is measuring periods, I have a boolean indicator displaying whether the signal is on or off. My problem is that when the signal is off, the VI I use to measure the periods is waiting for the next signal, and displays the boolean value from the previous period measurement. While this VI is waiting, I want the indicator to display false and not the value from the last iteration of the loop.
    I am using LV 5.1 for MAC.

    Two things you can try:
    In preface to the first, the most common (perhaps ONLY) use of local variables should be in transferring data between parallel loops. This is a matter of discipline, and creates programs that are easier to understand, take less time and memory, and are just plain cleaner. Having said that, to transfer data between loops, use a local variable.
    Second solution: Instead of setting the value to false, just hide the indicator in question by using control references (property nodes for prev. version of LabVIEW). Control references are a great way to control items on a dialog or HMI screen.

  • Synchronous RFC Receiver inside of a Loop in BPM

    Hi there,
    we have a RFC -> XI scenario where a BPM needs to receive messages from a RFC inside of a loop, to bundle these messages, just like the first example here: <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/08/16163ff8519a06e10000000a114084/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/08/16163ff8519a06e10000000a114084/frameset.htm</a>.
    But the problem is that the RFC is set as synchronous (best effort), thus we need to use a receiver in "Open S/A Bridge" mode, but this mode is not available for receivers inside a loop.
    Actually, we have managed to get the scenario working by creating another BPM which just receives the RFC messages in a S/A Bridge, sends the asynchronous message to the main BPM and sends a response back to RFC, closing the S/A bridge. But I think this solution is kind of "messy".
    Is there any other cleaner way of doing it?
    Thanks in advance,
    Henrique.

    Hi Henrique,
    Read this page carefully:
    http://help.sap.com/saphelp_nw04/helpdata/en/43/d92e428819da2ce10000000a1550b0/frameset.htm
    "Do Not Transfer Application Logic
    Do not use integration processes to transfer application logic from the application systems to the Integration Server.
    No Replacement for Mass Interfaces
    Check whether it would not be better to execute particular processing steps, for example, collecting messages, on the sender or receiver system."
    I so recommend to rewrite the sending interface to collect the messages before sending.
    Andother idea is sending the messages with an asynchronous call.
    Regards
    Stefan

  • I've done everything I know in order to get my calendar in iCloud synchronized with my macBook, my IPad and my iPhone, but get no success. I've checked if all devices are set to the same account. Can you help me?

    I've done everything I know in order to get my calendar in iCloud synchronized with my macBook, my IPad and my iPhone, but get no success. I've checked if all devices are set to the same account. Can you help me?

    The only thing I can see strange is that when I login my iCloud account through my principal email address, when I check my preferences is marked an @me.com address that is old and I don't use it anymore, but I can't erase it or even change it.

Maybe you are looking for

  • HOW TO USE FUNCTION Deletion of Requests from the Change Log IN PRCSES CHAN

    Respected all i used Deletion of Requests from PSA from the prcess chain and found good results, now i have only one request at the psa and thus i am doing good space utililisation. but when i am using Deletion of Requests from the Change Log i am no

  • Document control failed due to error in [DOCMGR-CANCEL] with a return code

    i am getting this error while calceling the purchase order "Document control failed due to error in [DOCMGR-CANCEL] with a return code of [OTHER]. " I am doing the calcel like this Nav: buyer work centre --> order searche the po and then select order

  • Access the Parameters of a SequenceCall via API

    I would like to access several characteristics, like name and value, of the parameter(s) of a SequenceCall via the TestStand API, but it didn't work. First I get the object reference of the Class SequenceCallParameters via Class SequenceCallModule.Pa

  • No sound from iTunes movie download, while playing on appletv, iPad, or other

    Downloaded a movie from iTunes. The video is fine; it displays on all iOS devices. However there is no sound while being played on any iOS device, appletv, iPad, iPad mini, iPhone, etc. How do I request another download that contains audio? Thanks, D

  • Mac can't connect to exchange server

    Hello everyone, I'm having an issue with our mail environment. Windows users and phone users (iOS and Android) are working But when I try to configure a Exchange mailbox it doesn't work. It says: Username and password is incorrect. Even with Domain i