Cisco Unified Application Environment Developer Forums

Combination View Flat View Tree View
Threads [ Previous | Next ]
We are trying to get the MakeCall using CSharp example to work.  Right now we can upload the application, and the CUAE admin shows the application as enable, and running as no.  How do we get the application to show as running?
Thanks
Tim

RE: Etch
Answer
2/12/10 8:00 AM as a reply to Timothy Redekop.
Hi Tim,
 
Your application will show up as 'Enabled Running' once you run it from your IDE.
Your application will remain registered and running
until either you stop your application or the application loses
connectivity to the CUAE server.
 
Thanks,
Neha

RE: Etch
Answer
2/15/10 11:08 PM as a reply to Neha Dar.
Is there a way to do this without using the IDE. For example, can I make this a windows service that runs on the server, if so, how?
Thanks!
Tim

RE: Etch
Answer
2/27/10 8:11 PM as a reply to Timothy Redekop.
Suppose you're using visual studio to develop, after generating the base code for your app, open the project in visual studio and change the output type to library. Next, rewrite the generated main method so that the code to start  and register of your application to the app server is in a different method from the one to stop it. Next, create a new windows service application project, and add your etch project as a reference. create an instance of your etch project from your windows service app. on service start event, you'll call the code to start and register your app to the application server.  On service stop event, you'll call the code to stop your app in the app server. My restructured etch app looked like this:
 
public class MainMyAppClient : MyAppHelper.MyAppClientFactory
    {
        private RemoteMyAppServer server = null;
        private ImplMyAppClient client = null;

        public MainMyAppClient(string name, string uri)
        {
              server = MyAppHelper.NewServer(uri, null, this);
        }
       
        public void Start()
        {
            try
            {
                server._StartAndWaitUp(4000);
                string key = server.registerApplication("MyApp", "default", "myusername", "mypassword");
            }
            catch (Exception ex)
            {
            }
        }

        public void Stop()
        {
            // Disconnect from the cuae app service
            try
            {
                server._StopAndWaitDown(4000);
            
            }
            catch (Exception ex)
            {
                Logger.Error(string.Format("{0} - Stop application failed unexpected", client.ApplicationName), ex);
            }
        }
     public MyAppClient NewMyAppClient( RemoteMyAppServer server )
        {
            client = new ImplMyAppClient( server );
            return client;
        }
}