I don't understand how the functionality implied by connections.xml and the container utilities api is usable in a real-life situation. The problems seem to stem from the fact that in an ADF program the URL's must be known and specified at design time rather than evaluated at runtime.
Use case #1: I write an ADF Mobile application that accesses my development server. I test the application on my iPAD and it works fine. Now I deploy the server-side code to my testing server (web services, other remote html content) and I want to run the same application from my iPAD but this time I want it to connect to the testing server instead of the development server. And I want to do that without modifying the iPAD application, i.e. no coding changes or redeployments of the iPAD app. I would think that I could use the preferences api to allow the iPAD user to specify a different server name (i.e. my testing server instead of my development server) and everything should work fine. But because full url's need to be specified at design time it doesn't look like this would be possible. I should be able to switch back and forth between any number of external servers (development, testing, production, training, etc) without impacting my mobile application. Can someone (maybe from Oracle) explain how to do this? The connections.xml and container utillities api doesn't handle it.
Use case #2: I write an ADF Mobile application that accesses remote content on my application server (webservices and other remote html content). Now I want to distribute that application for my customers to use. The customers are all running my application server on site at their premises, i.e. there are many application servers out there in the world. I want the customers to be able to configure the ADF Mobile application at runtime to connect to their own application server. When I design it it appears to me that I have to hard-code the URL's for my own application server into the ADF Mobile application itself. I want each of them to be able to launch the application, configure it to their own application server, and then run it. Can someone explain how to handle this use case? Again, I just don't think that connections.xml and the container utilities api handles this situation.
In all likelihood I just don't understand how it works, and the product is built to handle this, but I would really appreciate some guidance because right now I am puzzled.
First, one clarification. In a web app, connections.xml can be dynamically updated after the application deployment on the app server. However, for an ADF Mobile application, connections.xml is embedded and deployed to the device, so it can't just be updated with some management console and/or MBean interface. So Larry what you stated is a valid question.
To support your exact scenario, you can set up a Configuration Server for this purpose. Unfortunately this is one feature where we had built it out but missed it in documentation. What you see in the developer guide is the part where you can invoke the Configuration Server to download a new connections.xml file, but it missed explaining how it works and how to set up the configuration server. The Configuration Server is basically a WLS server that supports WebDav interface. When you invoke the container utilities API method to download the configuration change, it would connect to this WLS Server, download the new connections.xml, and the subsequent WS request would be leveraging the newly downloaded connections.xml. Typically you would interject these calls to the applicationLifeCycle impl class - Start method, and then configure your application to invoke the applicationLifeCycle impl class.
I (or a colleague of mine) will gather up the instructions and create a blog article on this. In the meantime we would ensure these content made into the ADF Mobile Developer Guide by next release. Also, if you need urgently to set this up, please ping me directly as I work to gather these materials.