Direct update not working when dynamically changing server url during runtime- MobileFirst 7.1 - ibm-mobilefirst

I have implemented dynamically changing server URL at runtime. I followed the instruction given in this link. The results were good I was able to connect different servers basically development servers like MFP Server in eclipse. But direct update does not work when a new server is connected. Similarly, if I try the same thing with stand-alone servers like our QA or UAT, then direct update works.
How can I make the direct update work for development servers?

Related

How to deploy a local eclipse worklight project in cloud server?

I developed an android based hybrid app in the IBM MFP-7.0., My app is fetching the data from the Java service which is running in Tomcat Server. Here the app adapters are running in my local system MFP server to get the data from the Java service, So that I can only run the app in my local system android emulator. Now, we want to deploy the app in the cloud so that we can give this app to our users. Can some body help me how to run our MFP app in the cloud? Is it required to place eclipse in the cloud to run my MFP server like the way I am running in my local system?
Thanks in advance.
It looks to me like your understanding is completely lacking in this subject matter. Also note that this question has got nothing to do with programming.
You need a host machine. On this server you will run an application server (Tomcat, WebSphere Full profile, WebSphere Liberty profile - either single or a farm, depending on your required network topology and security & scalability needs).
On this application server you deploy MobileFirst
You will also need a database
This host machine needs to be accessible (with appropriate security) to the public Internet so that it could serve apps installed in end-users' devices
The application needs to be configured to send requests to the server (or to any front-side server like a Load Balancer, again, depending on your topology)
The generated application needs to be submitted to an App Store so that users could download and install it on their devices
I suggest that you will do some reading before asking any question. Since you're using IBM MobileFirst, start by reading the user documentation: http://www-01.ibm.com/support/knowledgecenter/SSNJXP/welcome.html

MobileFirst application not using deployed adapter, attempting to use development server adapter instead

I'm running MobileFirst 7.0 on a Liberty installation.
Having successfully deployed my application and adapter into the runtime, the preview, when run from the servers operations console, is apparently trying to communicate with the adapter from the development server rather than the one running on Liberty.
[/MaximoMobile/apps/services/api/PhyCount/common/query] failure. state: 404, response: undefined
The runtime on the server is not called MaximoMobile, that is just the name of the project within Eclipse. It shouldn't be being referenced at all outside of the local copy of Mobilefirst.
I've looked up documentation in instructing the application to use the deployment server rather than the development server using JNDI entries in the server.xml file (http://www-01.ibm.com/support/knowledgecenter/SSHSCD_6.3.0/com.ibm.worklight.deploy.doc/admin/t_using_JNDI_lookup_to_override_WL_properties.html), but I can't see anything incorrectly set, or anything even relating to the adapter.
I have managed to set the endpoint to /worklight as required using Eclipse, but it's still returning 404 and attempting to access a non-existent file.
Answering my own question for people who may later stumble upon this looking for an answer:
The preview on the server doesn't work in the same way as the local preview does, and any part of the interface that requires an adapter won't function.
If you need to test the connection to the server, deploying to a device will allow you to do so!

Disable Direct Update for worklight6.1 development platform

Right now i am developing an app on remote DEV server. Every time when i update the code (js,html,css etc) then test on the device locally. There is a popup to force me to update the app. But my app need to connect DEV server for testing some backend feature like login.
DEV server is a remote Websphere running WL6.1 for development purpose. Why i need it because my app connect to some web services like Auth server via internal environment (actually is VPN). And those services i cannot set up easily in local environment. That makes using localhost for development is not really possible.
My problem is feeling the development process not really handy. Every time i change the code and want to run on the devices. I need to upload the .wlapp via console. It takes time! Everyday i change the code thousands time. That's why i need a solution.
And now i am seeking for 2 possible ways:
Auto push the .wlapp to remote server when i run and build. Can ANT do that? i read the Doc and find it's a bit of complicated.
Disable Direct Update. Actually i do a tricky hack inside worklight.js to override this feature. But i think it is not a good solution. So, is there any server config can switch the that off?
And i read this thread IBM Worklight - How to disable Direct Update?
Not working.
From what you are describing, things seem to work exactly as they should.
You have your local Worklight Development Server (that's the Worklight Studio plug-in you've installed in your Eclipse).
You have a remote server - here I am presuming this is actually some application server with Worklight Server deployed on it (that is, not the plug-in, but an actual installation of the server component) as well as your deployed project's .war file.
If that's not your setup, you need to think again about your 'testing setup'.
Auto push the .wlapp file to remote server. So the dev server always
keep the latest resource. Not to force me "update" the older version
on the server.
No. You can't do this. You need to manually build your app with the correct connectivity settings for the remote server via Run As > Build Settings and Remote Target.
In addition to the native project that will now contain these connectivity settings for the actual app, you will also have a .wlapp file in the bin folder. You will need to manually deploy it each time you're changing your app's contents. That's why you do development testing in the local development server... when moving to a remote server, that's for QA/UAT/PROD purposes usually.
Just disable this annoying feature in DEV environment.
You will need to do this in both servers via their respective Worklight Console as described in the question you've linked to, so that once you deploy the .wlapp file, it will not send a Direct Update request.
Instead, you'll need to manually re-install the app each time.
I suspect you didn't do this action on the remote server?
If you did, then you need to explain your setup, as the only thing you've wrote about was its name... "dev".
No. You need to manually deploy the .wlapp to your remote server.

how to setup worklight on public http server

I am building worklight project using eclipse environment when i run the project , i need to connect my tablet to local network then only i works for me for all the server updates and all.
I just want to move worklight server on http server which i can access using http://publicurl/anyprject which runs on apache. Now i want to work on eclipse but whenever i deploy the project it should deploy on public so that i can access it from anywhere.
Just tell me the process and what the thing i need to move on public server.
Since you've come here to ask a question, please also take a moment to write properly structured and coherent sentences in English. This will only benefit everyone and you will get a better answer, and faster too.
Try the following:
Instead of choosing Build All and Deploy, try choosing Build for Remote Server; there you should input the external (public) IP address of your machine. Next, run the generated project in your device. This should allow it to connect to the Worklight Server.
Note that both the Worklight Server (or rather, the machine that hosts it) and the device must be on the same network, in this case - connected to the public Internet.
Based on your comment, you can:
I would seriously try to open your own machine to public access
If not possible, I would try to move to develop on the Linux machine instead
If not possible, then you must install Worklight Server on the Linux machine and whenever you make changes to the project - deploy the updated .war, .wlapp and .adapter files to your installation on the Linux machine
Build the app with Build for Remote Server so that it will connect to the Linux machine instead of the local development machine
Step 3 above means you'll need to maintain 2 development environments, which is not so easy.
If you are during development, you should aspire for options 1 or 2; in other words, create a proper development environment. In Mobile, this requires public Internet access (usually).
Are you a stand alone developer, Business Partner or a Customer of IBM?

Server-Client Data Exchange using MySQL (VB.Net)

Here's the situation. I developed a simple examination system with registration forms. I used VB.Net as the programming language. I haven't tried manual coding for my problem yet.
Anyway this is a project for the company from which I am an intern.
The plan is to get every client pc to have this examination/registration application and this application will send the personal info and the score to a central database(server pc).
I used MySql as the dbms and developed the application on the same machine which means that the Database server I used is only on the local host.
Now I was about to try to implement the application to one client pc(as a beta test) and installed the necessary files(.net framework) and I also installed MySQL Server(and workbench) in the server pc.
When I run the application in the client PC it didn't detect/connect to the ServerPC's MySQL server instance and therefore was not able to record the dummy values I input in the client application. Take note I changed the connection string of my app to point to the ip address of the serverPC.
Now my questions are the following:
1)What have I done wrong?
2)Should I install the MySQL Server(and Workbench) to every ClientPC so that I can create a server instance that uses the REMOTE HOST option and configure it such that it will connect to the SERVERPC's Database?
3)How should I setup the server so it gives access to the application I installed in all clientPCs?
I'm pretty new to VB.net and mostly learned from internet sources. I haven't tried manual coding. Mainly because the tools in VB.net are slightly easy to understand thanks to intellisense,the drag and drop tools and also the help topics.
Anyway I hope anyone helps me. Advance Thanks and If the information i've given is not quite complete please point out to me which info I forgot to add.
EDIT:
Additional info, the client pcs and the server pc is in one network.
I also granted every privelege to the serverPC settings of MySQL.(it's just for the test run)
Did you enable the MySQL user for localhost only access? You can check this in MySQL control center by browsing to your 'mysql' database, 'users' table, am ensure the host field of the user is set to % and not localhost, allowing them to connect on any NIC, not just the loopback (localhost) adapter.