How to run WSO2 EMM Jaggery Web App in a WSO2 EMM Carbon Server? - wso2

I have been using WSO2 EMM product for a while. I imported emm jaggery web app project, which is located under modules/apps/ folder. into the WSO2 Eclipse Developer Studio and it is imported as a regular jaggery web app project.
I want to quickly change and run just the emm jaggery web app project (lets say some hbs files, page-layout etc.) and quickly review the impacts of the new design. Is there a way to do this quickly?
Best

You can simply do this by changing the necessary files then reloading the emm project from web-browser as you normally do for other web applications written in HTML, js & css. This can be tested by changing the files in emm jaggery application in WSO2 EMM product & there is no need for using a separate server.

Finally i have found a simple solution to reflect the Jaggery Web App changes to the running system via symbolic links.
After you have build the system successfully, the zip archive file is created at the product-emm/modules/distribution/target/wso2emm-1.1.0 directory.
Unzip the file and for linking Jaggery Web Apps locate to the product-emm/modules/distribution/target/wso2emm-1.1.0/repository/deployment/server/jaggeryappsdirectory where the web applications are bundled.
And give symbolic links by removing the old bundled ones and linking apps like ln -s ../../../../../../../apps/emm/ . to the product-emm/modules//apps/ location where the real development is going on.
Final picture will look like something like this. After this you can change the code and see the effect without reloading the server.

Related

WSO2 P.PaaS : Accessing the AS and other WSO2 products

So I have got WSO2 P.PaaS installed and running. I want to deploy .war file to the Application Server. It seems the AS on P.PaaS does not accept .war file; but the stand-alone one does. See here. Also, I want to use the WSO2 products deployed into the PaaS. I am not sure what URL or port I should use. Is there a tutorial that I can use to experiment?
Sorry for the brevity, but, I am new to WSO2.
What PPaaS version you have installed, 4.0.0 or from current master branch which is 4.1.0 milestone 1 version?
Here is the quick start guide Quick start guide .
You can access the management console as https://STRATOS_DOMAIN:9443/console.
Assuming you are using PP 4.0.0 version,
Log into management console
Go to cartridges page. There you can find the available cartridges, you should find Application Server as a cartridge.
Click on AS cartridge in order to subscribe for it. At subscribing process you would be asked a GIT repository URL.
After you subscribe, PP will clone what is in your GIT repository url in to Application server. So if you provide a url which has your web application, those application would be automatically deployed into the Application server. Here is a sample GIT repository , you can include your web apps under "webapps" folder.
There after if you modify your web apps (say web app version 2) and commit the changes to your repository, Stratos/PP automatically update Application server with the new web apps.
Since you have already deployed PP, you can have a loot at this screencast to see how you can deploy a web app

WSO2 ESB How to upload app config xml files

I need to work around a weird behaviour of WSO2 ESB. Whenever the ESB is started, all carbon files are redeployed. This means to reset all changes made in files after last deploy(restart), such us, configuration xml files (endpoints, custom config files...) .
So I guess the only way to avoid modifing this configuration files during the start up is to take them out from the carbon file. Thus, I would upload app files as carbon app, and app config files (EP, custom config files...) using an alternative way.
So, in this situation, how could I upload these config files in and easy and automatic way?
Regards
I presume you are using a CApp (Carbon Application) to deploy the esb artifacts like endpoints. The number rule for this procedure is that you need to do all the modifications you need to do via the WSO2 Developer Studio, build a CApp, and re-deploy it in WSO2 ESB. You should try to avoid using management console to perform esb artifact (proxy services, endpoints, sequences, templates etc.) modifications. You can of course use the management console for other administrative tasks like configuring data-sources, BAM mediation data publishing etc.
If you are using the Management console to modify artifacts, then you can do that too, but avoid using CApps as the method of deploying esb artifacts. You should probably copy all the config xml files to relevant folders at $ESB_HOME/repository/deployment/server/synapse-configs/default/. And then go ahead with your modifications via mgt console.

Deploying Different WSO2 product as single carbon application project

I am using WSO2 DSS, ESB and BPS for my project.
They are working fine in respective servers. But my idea is to integrate DSS, ESB & BPS into one car file(or some other deployment archive file) and thus making the deployment easier.
I have a Carbon application project created in Developer studio which has DSS project, ESB Config project, BPEL workflow and a Web application in it.
When I export it, it exports only the ESB & BPS and excludes Web application.
Is there a way to generate one deployment archive which would contain all the mentioned project? And is it possible to deploy a java application in WSO2 server since it has tomcat in it?
Thanks in Advance.
You can deploy webapplications in WSO2 Application server. Refer this. There is a server role which is defined in the server and also in the CAR file for each deployable artifacts. So if you are going to use one server lets say application server with DSS,ESB and BPS installed you need to add DSS's ESB's and BPS's server roles so artifacts which has respective servers role can be deployed in bundled server. Please refer following for server role management.
http://docs.wso2.org/wiki/display/AS510/Introduction+to+Server+Roles
Q>
Is there a way to generate one deployment archive which would contain all the mentioned project?
Ans>> Yes. It is possible. Carbon Application Archive(CAR) file is the single deployable module to package all the above mentioned different artifacts type to a single deployable archive.
You can use either IDE or Maven to generate the CAR file for your artifacts. Please refer to Dev Studio Documentation for more information.
Q> And is it possible to deploy a java application in WSO2 server since it has tomcat in it?
Ans>> You can deploy a Java application in WSO2 Application Server but in order to do that you need to convert your application to a Web-Services since WSO2 provides mechanism to expose your applications as Web Services. For that you can use either Axis2 Web Service or Jax-WS web-Service.
WSO2 Developer Studio supports creation of Axis2 Web-Services as well as Jax-WS web services. Please refer to Axis2 Artifact and Jax-WS Artifact Documentation for more information.
Also if you have a Java based Web-Application, you may deploy that Web-Application in WSO2 Application Server and WSO2 Dev Studio supports implementing Web-Applications as well.
Thanks and Regards,
Harshana

Unable to add/import WSO2 JAX-RS service into StratosLive Application Server

I have a WSO2 Application Server, version 5.0.1 installed on my local machine.
I created a JAX-RS service and tested it locally.
The WAR file was built and deployed to the local Application Server successfully. When I log in to the local Application server Admin console, I see it displayed under Applications as type JaxWebApp with 'Find Services' listed under the Actions column.
I have a StratosLive subscription and I am trying to ADD/UPLOAD this JAX-RS service as a WAR file to the StratosLive Application Server. The Admin Console for the StratosLive Application Server is different. On the Main tab, It displays Web Applications and Web Services rather than the Applications and Services on the Admin console for the 5.0.1 Application Server I am running locally.
Consequently, I do not see an option to ADD/UPLOAD my JAX-RS service as a WAR file. The only option is to add a Web Application WAR file (I tried this and it does not work properly - thinks it's a web app) or JAX-WS Web Service as a annotated JAR file.
It looks like the StratosLive Application Server I am using may be a different version (earlier maybe) than the 5.0.1 I am using locally.
Has anyone else been able to ADD/UPLOAD a JAX-RS service to a StratosLive Application Server?
Usually it takes small time to upgrade StratosLive version of a product to latest standalone product version. Now StratosLive has been upgraded to latest Application Server version and you should able to run above use case on StratosLive without any issue.

Web Services with Netbeans

After having done a web service with netbeans and having tested it. What is it that I should upload to the server so I can use it? I have been going around tutorials but none (of the ones I've found) say what to upload. They just finish when you deploy the web service =/.
Right, you'll package it as a WAR file and deploy that to the app server. A WAR file is what you need.
How you deploy depends on your situation and your app server. If you're using Tomcat, you can either put the WAR in the /webapps directory or use the admin console to deploy.
If you're using a hosting service, you'll have to ask them how to do it.