Keep application in active state infinitely in background

Hi all
Now I am performing location services in iOs. Application has to saving user 's location even if it is working in background !
I tried to use applicationDidEnterBackground but the application can keep active state (when it can save user 's location ) only in 10 minutes.
Please advice me to solve this problem.
Thank you very much !
The following is my listing :
- (void) applicationDidEnterBackground:(UIApplication *)application
    //run timer in background .
    self.bgTask= [application beginBackgroundTaskWithExpirationHandler:^{
        [application endBackgroundTask:self.bgTask];
        self.bgTask = UIBackgroundTaskInvalid;
    // Start the long-running task and return immediately.
    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
        //startingMultitaskingTimer
        [self performSelector:@selector(TimerExecution) withObject:nil] ;
        [application endBackgroundTask:self.bgTask];
        self.bgTask = UIBackgroundTaskInvalid;
-   (void) TimerExecution
    if(self.timer) {
        [self.timer invalidate];
        self.timer = nil;
    self.timer = [NSTimer scheduledTimerWithTimeInterval:2 target:APPDELEGATE.viewController.locationManager selector:@selector(updateTracklog)      userInfo:nil repeats:YES];
updateTracklog is function that execute according to timer for saving coordinates .

Hi,
1. What if you are trying to access the application page, does it come up ?
2. Use the below wlst command to get the actual state of the deployed application:
The deploy command returns a WLSTProgress object that you can access to check the status of the command. The WLSTProgress object is captured in a user-defined variable, in this case, progress.
wls:/mydomain/serverConfig/Servers> progress= deploy(appName='businessApp',path='c:/myapps/business',createplan='true')
The previous example stores the WLSTProgress object returned in a user-defined variable, in this case, progress. You can then use the progress variable to print the status of the deploy command. For example:
wls:/mydomain/serverConfig/Servers> progress.printStatus()
Current Status of your Deployment:
Deployment command type: deploy
Deployment State       : completed
Deployment Message     : null
wls:/mydomain/serverConfig/Servers>
3. Restart all the servers, instances, related DB and check if it helps.
Thanks,
Sharmela

Similar Messages

  • Application is in 'Prepared' state instead of 'Active' state.

    I m using below code to deploy an application on weblogic 11g
    import java.io.*;
    import java.util.Hashtable;
    import weblogic.deploy.api.tools.*;  //SesionHelper
    import weblogic.deploy.api.spi .*;  //WebLogicDeploymentManager
    import javax.enterprise.deploy.spi.TargetModuleID;
    import javax.enterprise.deploy.spi.status.ProgressObject;
    import javax.enterprise.deploy.spi.status.DeploymentStatus;
    import javax.enterprise.deploy.shared.ModuleType;
    import javax.enterprise.deploy.spi.Target;
    import javax.management.MBeanServerConnection;
    import javax.management.remote.JMXConnector;
    import javax.management.remote.JMXConnectorFactory;
    import javax.management.remote.JMXServiceURL;
    import javax.naming.Context;
    public class WeblogicTest
         public static void main(String ar[]) throws Exception
              System.out.println("Start Deploying");
              WebLogicDeploymentManager deployManager=SessionHelper.getRemoteDeploymentManager( "t3", "10.0.0.47", "7003", "weblogic",
              "weblogic123");
              System.out.println("Deploy Manager  :  " + deployManager);
              DeploymentOptions options = new DeploymentOptions();
              options.setName("TC33");          //TODO
              Target targets[] = deployManager.getTargets();
              System.out.println("Target  :  " + targets);
              Target deployTargets[]=new Target[1];     
              int temp=0;
              for (temp=0; temp < targets.length; temp++){
                   if(targets[temp].getName().equals("managed_2")){
                        deployTargets[0]=targets[temp];
              ProgressObject processStatus=deployManager.distribute(deployTargets, new                
                        File("\\\\10.0.0.47\\Builds\\VertexTest\\domain1\\tc3.3b74_6.2.2011.19\\test.ear"), null,options);
              DeploymentStatus deploymentStatus=processStatus.getDeploymentStatus() ;
              System.out.println("UnDeploymentStayus.getMessage(): "+deploymentStatus.getMessage() );
    System.out.println("Start sleeping");
              Thread.sleep(10000);
    System.out.println("End sleeping");
              TargetModuleID[] targetModuleIDs=deployManager.getAvailableModules(ModuleType.EAR, deployTargets);
              System.out.println("\n\t targetModuleIDs [] = "+targetModuleIDs);
              for (int j=0;j<targetModuleIDs.length;j++){
                   System.out.println("\n\t "+targetModuleIDs[j]);
                   deployManager.start(targetModuleIDs);
                   deployManager.start(targetModuleIDs);
    }This code successfully deployed my application on desired managed server but my application is in 'Prepared' state instead of 'Active' state.
    Currently, I have to manually update my application's state to 'Active'.
    Can anybody tell me if I am missing something in my code.

    It actually looks fine, but what could be the problem is the time to deploy your application and
    the sleep command of ten seconds. When your sleep is finished, is your application deployment finished?
    Maybe you can add a while loop using the isCompleted method of the DeploymentStatus class, for example,
    ProgressObject processStatus = deployManager.distribute(deployTargets, new File("\\\\10.0.0.47\\Builds\\VertexTest\\domain1\\tc3.3b74_6.2.2011.19\\test.ear"), null,options);
    DeploymentStatus deploymentStatus = processStatus.getDeploymentStatus() ;
    while (!deploymentStatus.isCompleted()) {
        Thread.sleep(1000);
    TargetModuleID[] targetModuleIDs = deployManager.getAvailableModules(ModuleType.EAR, deployTargets);
    System.out.println(targetModuleIDs);
    if (targetModuleIDs.length > 0) {
        deployManager.start(targetModuleIDs);
    }Or something else along those lines.

  • Issue with active state on navigation of vertical slide website. Please help!

    Hey guys!
    I'm using the Adtile vertical-slide example at http://www.adtile.me/fixed-nav/ and am having some issues with the navigation...
    When I add nav buttons for external pages, the navigation active state doesn't follow through the menu to the active slide (it does on the external pages as I'm using a separate css selector PHP script though). Without the additional buttons for the external pages they work fine.
    Here's the link to the working example WITHOUT the additional buttons for external pages.
    Here's the link for the page WITH the additional buttons for external pages.
    Does anyone know how I can get the active state to work for the slides section of the website?
    Thank you!
    SM

    Try this:
    .nav-collapse a:hover,
    .nav-collapse a:active,
    .nav-collapse a:focus {
      background: #e8e8e8;
    Nancy O.

  • Deployments are in Active state on Cluster but in Prepared state on server

    Hi,
    We initially deployed our application (Oracle Identity Manager 11gR2) on standalone managed server and then convert it into cluster using wlst commands.
    readDomain('/app/oracle/Middleware_OAM/user_projects/domains/oim_domain')
    setDistDestType('JRFWSAsyncJmsModule', 'UDD')
    setDistDestType('OIMJMSModule', 'UDD')
    create('oim_cluster','Cluster')
    assign('Server','oim_server1','Cluster','oim_cluster')
    updateDomain()
    The cluster is created fine and we can start the application successfully and access it. However the problem is that all the deployments are in 'Active' state only under Cluster but in prepared state under the server oim_server1 (though application access working on managed server port). Please advise where we are missing and what could be the wrong?
    Thanks

    Hi,
    1. What if you are trying to access the application page, does it come up ?
    2. Use the below wlst command to get the actual state of the deployed application:
    The deploy command returns a WLSTProgress object that you can access to check the status of the command. The WLSTProgress object is captured in a user-defined variable, in this case, progress.
    wls:/mydomain/serverConfig/Servers> progress= deploy(appName='businessApp',path='c:/myapps/business',createplan='true')
    The previous example stores the WLSTProgress object returned in a user-defined variable, in this case, progress. You can then use the progress variable to print the status of the deploy command. For example:
    wls:/mydomain/serverConfig/Servers> progress.printStatus()
    Current Status of your Deployment:
    Deployment command type: deploy
    Deployment State       : completed
    Deployment Message     : null
    wls:/mydomain/serverConfig/Servers>
    3. Restart all the servers, instances, related DB and check if it helps.
    Thanks,
    Sharmela

  • Job remains in active state indefinitely

    hello everyone,
    i had a request to create a spool for a background job.
    i was getting numerous spools getting created after my coding.i some how rectified the issue and a single spool is generated now.
    but the job remains in active state only.
    please suggest

    check at workprocess level, if the job doing nothing and showing Active on SM37 cancel it and rerun.
    -SS

  • JTA transaction is not present or the transaction is not in active state

    Hi,
    I am trying to execute an asynchronous bpel process. the bpel process has 5 OSB calls and is taking approximately 100 seconds for completion. The OSB calls in the BPEL are taking 90 seconds for completion. In the end of the BPEL process, after completion I get the following error:
    [2010/07/22 01:56:44] BPEL process instance "1220007" completed
    [2010/07/22 01:56:44] There is a system exception while performing the BPEL instance, the reason is "JTA transaction is not present or the transaction is not in active state. The current JTA transaction is not present or it is not in active state when processing activity or instance "1,220,007". The reason is The execution of this instance "1220007" for process "BPELProcess1" is supposed to be in a jta transaction, but the transaction is not present or in active state, please turn on the application server transaction debug logs to get more information.. Please consult your administrator regarding this error. ". Please check the error log file for more infromation. Please try to use bpel fault handlers to catch the faults in your bpel process. If this is a system exception, please report this to your system administrator. Administrator could perform manual recovery of the instance from last non-idempotent activity or dehydration point.
    We do not want to increase the transaction-timeout properties in the server in the Transaction-manager.xml or in the orion-ejb-jar.xml since we have other projects with synchronous processes running in the same server.
    Can anybody please suggest a workaround to overcome this issue apart from increasing the transaction-timeout?

    Hi 783703,
    As Sridhar suggested for your problem you have to set transaction-time out in j2ee/home/config/transaction-manager.xml.
    If you use Idempotent as false for your partnerlinks, BPEL PM will store the status till that invoke(Proof that this invoke gets executed).
    So better to go for increasing the time instead of going for idempotent as it has some side effects.
    And coming to dehydration ....Ideally performance will be more if there are no much dehydration poitns in our process. But for some scenarios it is better to have dehydration(ex: we can know the status of the process...etc)
    Dehydration store will not get cleared after completion of the process. Here dehydration means ....it will store these dtails in tables(like Cube_instance,cube_scope...etc).
    Regards
    PavanKumar.M

  • Password keeper application

    lost password keeper application after upgrading my bold 9700 with software version 6.0 bundle 2115. How do i get the application back. I tried using application from the desktop manager sofware but could not locate it

    It would only be active and can be restored, if the bundle that you currently have has the same application in it.
    Click "Accept as Solution" if your problem is solved. To give thanks, click thumbs up Blackberry Battery Saving Tips | Follow me on Twitter

  • Error Deployer BEA-149231 Unable to set the activation state to true

    Hi Friends ,
    We are using weblogic 10.3.5.0, one of the deployment module is in failed status.
    In the application logs we could see the following error
    ERROR Util: Initial Spring Application Context creation failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'datasource' defined in class path resource [spring.xml]: Invocation of init method failed; nested exception is javax.naming.NoPermissionException: User &lt;anonymous&gt; does not have permission on comp.env.cpt to perform lookup operation
    in the weblogic server logs we could find the follow error
    <24-Jan-2013 08:47:43 o'clock CET> <Warning> <HTTP> <BEA-101162> <User defined listener org.apache.myfaces.webapp.StartupServletContextListener failed: java.lang.ExceptionInInitializerError.java.lang.ExceptionInInitializerError
    at com.db.cpt.biz.Utilities.Util.<clinit>(Util.java:114)
    at com.db.cpt.web.listener.MyPhaseListener.<clinit>(MyPhaseListener.java:26)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    Truncated. see log file for complete stacktrace
    Caused By: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'datasource' defined in class path resource [spring.xml]: Invocati
    on of init method failed; nested exception is javax.naming.NoPermissionException: User <anonymous> does not have permission on comp.env.cpt to perform lookup operation.
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1170)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
    Truncated. see log file for complete stacktrace
    Caused By: javax.naming.NoPermissionException: User <anonymous> does not have permission on comp.env.xxx to perform lookup operation.
    at weblogic.jndi.internal.ServerNamingNode.checkPermission(ServerNamingNode.java:443)
    at weblogic.jndi.internal.ServerNamingNode.checkLookup(ServerNamingNode.java:423)
    at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:180)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
    Truncated. see log file for complete stacktrace
    >
    <24-Jan-2013 08:47:43 o'clock CET> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application 'xxx'.
    weblogic.application.ModuleException:
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1510)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    Truncated. see log file for complete stacktrace
    Caused By: javax.naming.NoPermissionException: User <anonymous> does not have permission on comp.env.cpt to perform lookup operation.
    at weblogic.jndi.internal.ServerNamingNode.checkPermission(ServerNamingNode.java:443)
    at weblogic.jndi.internal.ServerNamingNode.checkLookup(ServerNamingNode.java:423)
    at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:180)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
    Truncated. see log file for complete stacktrace
    Can you please advise us how can we resolve this issue which with i am struggling
    Raja

    Kumar,
    thanks for the update.
    we fixed the issue,
    for a particular user we didnt add his membership in a group in security realm, we added the user to a particular group, and then restarted weblogic, and deployed the module, and then status of deployment becomes successful.
    Raja

  • Applying Active state of top level nav. menu to child pages

    I am trying to keep a consistent look across the child pages of a top level site. I'd like the main navigation bar to remain in an active state for the parent page while the user navigates the child pages associated with that page using submenus. Ideally, I'd like the active state to remain on the top level menu so that the user knows they are still within that parent while they drill down to the specific information they are looking for.
    Brand new at this and am truly your 'no HTML' experience, just design work gal. Any help or suggestions would be appreciated.

    Samianne11
    It seems as if your problem is similar to mine posted on October 2nd 2012, which
    got the following answer from 1.adobelance.
    1.adobelance, 
    Oct 2, 2012 2:22 PM   in reply to ballyd
    Muse menus don't currently support this, although it is on our list of features to add in the future.

  • HT4623 please help ive put in ee sim in my iphone5 and it keeps coming up activation required what do i do

    hi ive put my ee sim card in my iphone 5 and its keeps coming up activation required can anybody help me

    The iPhone will activate only with a SIM from the carrier that your phone is locked to.  From where did you purchase your phone?

  • How to transfer file from application server to presentation server in background?

    Hi Experts,
    How to transfer file from application server to presentation server in background?
    Thanks in advance
    Namita

    Thanks Raman and Challa,
    We want to move file from application server to Shared folder, not on local machine. We checked FM which you guys have provided but those are not able to read file from application server.
    We need this program to run in background so that we can use this in daily process chain.
    Appreciate your inputs on this.
    Thanks,
    Namita

  • My reader will not open a PDF file that I have downloaded from a government web site (an application form) - it states that the file is not good.  I can open on the web site but not from my mac computer

    My reader will not open a PDF file that I have downloaded from a government web site (an application form) - it states that the file is not good.  I can open on the web site but not from my mac computer.

    Maybe this: http://helpx.adobe.com/acrobat/kb/pdf-error-1015-11001-update.html ?
    Do you have a link to that document?

  • How do I keep applications from automatically opening when I power up my Macbook Air?

    How do I keep applications from automatically opening when I power up my Macbook Air?

    When you Shutdown or restart, uncheck this option.
    Regards,
    Captfred

  • A top level menu item should display its active state if any of its submenu items are active

    Example case: I'm designing a Muse site which is basically a portfolio of our work. We design books, doing page layout and covers. We have numerous book categories and sub categories which I put in a horizontal menu. When a given top level category menu item doesn't have a submenu, it is a hyperlink and it displays active state when the browser displays its linked page. But when a given page is displayed from a submenu link, its top level menu item does NOT display active state. I think it should.
    For example, we have a "Nostalgia" category which has "Film" and "TV" subcategories. Because the menu item, "Nostalgia" has a submenu containing "Film" and "TV", the label "Nostalgia" is not a hyperlink. The submenu attached to it has the two hyperlinked items "Film" and "TV". When the browser is displaying either linked page, the submenu is hidden. So it would be nice if the top level item, "Nostalgia" would display in an active state.

    Hello Daniel,
    As of now this feature is not there in Adobe Muse.
    I would suggest you to please log this as a feature request in our "Ideas for features in Adobe Muse" section. (http://forums.adobe.com/community/muse/ideas)
    Hope this helps.
    Regards,
    Sachin

  • How to stop the new health application from Count the steps/ woking background?

    how to stop the new health application from Count the steps/ woking background?
    I really need your help

    I agree with Mr. Hall that using mx.controls.Alert in Flex may be a better route.
    Show the Alert like this:
    // show an alert with a question and yes and no choices
    Alert.show( "Would you like to go to the Adobe Forums?", "Question",
         Alert.YES | Alert.NO, this, closeHandler, null, Alert.YES );
    Then handle the response in the closeHandler() function:
    protected function closeHandler( closeEvent:CloseEvent ):void
    if( event.detail == Alert.YES )
         navigateToURL( new URLRequest('http://forums.adobe.com'), '_self' );
    else if( event.detail == Alert.NO )
         // they chose no
    The following documentation on Alerts may be helpful:
    http://www.flexafterdark.com/docs/ActionScript-Alert
    Let me know if that helps...
    Ben Edwards

Maybe you are looking for