How does MobileFirst Server update a single WAR file? does it update the existing or add with new version? can we have multiple war files with same application versions?
In an IBM MobileFirst Development environment (= Eclipse Studio plug-in or CLI tool), after any change made to files that reside in the your-project\server folder, an updated .war file is generated for you and is automatically being re-deployed to the server. You could say that the existing .war file is replaced with the new .war file.
In a QA/UAT/Production environment (= WebSphere Full profile/Liberty profile with IBM MobileFirst Server running on top of it), you as the person who administers the application server must re-deploy the updated .war file by either manually replacing the file or by using the IBM-provided Ant task scripts. As in the development environment, this action also replaces the existing .war with the new .war file.
A MobileFirst Server is able to run multiple projects (.war files) at the same time.
It is not clear from the question what do you mean by "can we have multiple war files with same application versions?"
If you mean multiple .war files of the same project, each being an exact replica of the other - it sounds useless to me, but as long as each .war file is given a different context root in the server.xml file, you should be able to do that.
If that is not what you mean, well, take the time to better explain yourself.
Before that, read the documentation: http://www-01.ibm.com/support/knowledgecenter/SSHS8R_6.3.0/com.ibm.worklight.installconfig.doc/topics/c_install_config.html
Related
As we know, when I deploy a WAR file that has been built using WL 6.2 to MFP7.1, the server migrate the WAR file from 6.2 to 7.1 automatically using its own worklight-jee-library.jar file, making the runtime to function as WAR 7.1 (Please correct me if I’m wrong). However, based on the note mentioned in the URL:
https://www.ibm.com/support/knowledgecenter/SSHS8R_7.1.0/com.ibm.worklight.upgrade.doc/devenv/t_upgrading_projects_session_depend.html
Note: Clients that were created using a version of IBM MobileFirst Platform Foundation earlier than V7.1.0 do not work with a MobileFirst Server that is operating in the new session-independent mode. So, to serve users who are using the session-independent mode, as well as existing users who are using session-dependent mode, you must deploy the new V7.1.0 WAR with its V7.1.0 artifacts, but WITHOUT removing the old WAR.
What does it mean "WITHOUT removing the old WAR.”? There won’t be old WAR as the WAR version now is V7.1! which has been communicated to us that we can't deploy old WAR without doing the migration.
During the WAR deployment, we get this:
[configureapplicationserver] INFO: FWLST2017I: The project WAR file was successfully migrated from version 6.2.0.01.20150329-1923 to version 7.1.0.00.20160401-2103. The migrated project WAR file is located in '/tmp/wla5601747575/MobileBanking.war'.
[configureapplicationserver] ** Created migrated war file
What is the WAR deployed now? is it version 7.1 or still 6.2?
Edit:
Project is built and complied using WL 6.2
artifacts created are WAR - WLAPP and adapters using WL 6.2 ant tasks.
Need to deploy all those artifacts to MFP 7.1 as it is. No
Migration done to those artifacts as to serve my live clients.
I'm taking all those artifacts to MFP server and start the deployment.
The WAR file is being migrated to 7.1 during the deployment (Deployment is done using MFP Ant task).
After the runtime is created. I'm deploying the 6.2 WLAPP and 6.2 Adapters inside the runtime.
When MFP server deploy the WAR file which is built from 6.2, what is the WAR version after the deployment?
If the WAR is still 6.2, why do I see "mfp.session.independent" property inside my runtime?
If the server is migrating the WAR by itself and making it 7.1, then how can I deploy an old WAR to MFP7.1 without any modification on it?
When building your project with the v7.1 Studio or the 7.1 Ant tasks, this will create the 7.1 war file.
You can still deploy your old war from 6.2 along side your 7.1 war file. It implies you're supposed to back it up.
Is a war file deployment required for changes in java file in the server folder in a worklight project?
Yes. Any changes done under the your-project\server folder trigger a re-generation of the .war file, where such data resides. This updated .war file then needs to be re-deployed to the application server.
I have installed Mobile first Server (not the development server that comes with eclipse)
I have created a project in eclipse with 2 applications. Then i deployed the war file using the configuration tool. And finally i uploaded the wlapp files using the worklight web console. Everything is ok but i have one question:
Should I deploy a different war each time i create an application in a different project in eclipse? Should i create all apps under the same project, so no other war should be deployed? How does this work?
Yes you can deploy different war files so MobileFirst runtimes in the same application server. The context root of course must be different for each war.
In the MobileFirst console you will see the different runtimes deployed in your application server. Then for deploying the applications/adapters you have to select one runtime.
If you put applications under a project in Eclipse you could deploy the applications under another project but only in some circumstances (several projects using the same security tests for example or no security defined). But it is better to deploy all the applications on the project where they are created. Because for example you could reference in your application security tests or push notifications that don't exist in the runtime where they are deployed.
Migrating my project(made up of 3 apps and 2 adapters) from Worklight v6.0 to Worklight v6.1 i'm facing problems over adapters migration.
I had already deployed .war, .wlapp and .adapter files in production environment using an Ant script(for .war file).
The application server used is Websphere, the dbms server used is Derby.
I upgraded the worklight studio's plugin to the latest version, created a new, clean workspace, exported the project from the old workspace and imported in the new one.
For what concerns development environment everything works.
For what concerns production environment i successfully deployed all the applications(but don't work yet becouse the adapters lack).
When i try to deploy the adapter(each one) i get the following exception:
Failed to deploy adapter 'adapter1.adapter'. The 'adapter' version '6.0.0' is different than the version of the Worklight project '6.1.0.00.20131219-1900'. Use Worklight Studio '6.1.0.00.20131219-1900' to build and deploy the application.
I tried also to create a new adapter and deploy it but i'm still getting the same error.
Edited the answer entirely based on edits to the question
All artifacts produced by Worklight Studio: .adapter, .wlapp and .war must be generated using the same Worklight Studio version.
Make sure that after importing the project to Worklight 6.1, that you are building all the the project's applications and adapters.
Next, you need to deploy the re-generated .war file and then deploy the .wlapp and .adapter files.
To verify that the adapter is of the same version as the project's .war file, extract the .adapter file from the bin folder and open the XML file. You should see the platform version like this:
<ns2:adapter xmlns:ns2="http://www.worklight.com/integration"
name="test" platformVersion="6.1.0.00.20131126-0630">
IBM Worklight Information Center topics to read:
Installing and configuring
Upgrading from one version of IBM Worklight to another
You can also see this in Worklight Console > About > Additional Support Information:
I personally tried the installation process of our Consumer WL 6.0.0.1 IBM Installation Manager Repository version on my Mac OSx 10.8 with IBM Installation Manager .macosx.cocoa.x86_64_1.6.3001.20130528_1750. A colleague reports the same problem from a Linux install.
When selecting Tomcat 7 and new Derby as install destination, the Installation Manager only puts the WL Application Center things into the Tomcat web.xml and webapps folder etc, but fails to do the necessary steps to deploy a developed WL application right away:
we had to hunt down the worklight-jee-library.jar and put it ourselves into the /lib folder of the Tomcat
we checked the Derby DB that the Installation Manager created, the databases were there, but no tables were created in there by the Installation Manager. So we had to execute the table sql scripts ourselves manually.
Is this problem with the Installation Manager and Tomcat + Derby known?
The IBM Installation Manager for Worklight 6.0.0.0 currently DOES NOT install Worklight.
What it actually does is extract the Worklight framework files and Ant task scripts, which you then need to configure and run, for the framework files as well as your Worklight project's .war file to be deployed on the Application Server. I believe the database is being created/filled via the Ant task script as well.
The process is well documented in the Information Center for Worklight 6.0.