How to export setting of glassfish server to another glassfish server? - glassfish-3

How to save all the configuration of glassfish server to another glassfish server?

See this question: GlassFish v3 - portability of settings
the domain.xml in the glassfish\domains\\config\ directory contains resource, queue information about the server.

Related

How to configure Windows Server 2016 to work with Glassfish as a web server?

I need to migrate my Glassfish 4.1 from Windows Server 2008 to Windows Server 2016.
I've copied the Glassfish folder and pasted it in the new Windows Server 2016, but it is working only locally (http://localhost:80/myWebApp); if I try to access myWebApp via browser through another computer (http://172.29.13.228:80/myWebApp), it doesn't work.
After adding the Web Server feature (using the Server Manager), then I can access normally a IIS page via browser, which means the web server is working; but it still doesn't work when I try to access the Glassfish.
Does anyone knows what feature to add or what to configure in the Windows Server to get access to the Glassfish ?
I've researched and find out that I just needed to create a rule on the firewall on Windows Server and give permission on desired ports, there's no need to add any Windows web server feature.

deploy war into NGINX

I need to host a java application on an NGINX server instead of on Tomcat7(current configuration), as the application is just a light-weight parser working as a data acquisition service for a sensor based device.
I know that deployment of war files is no-go on NGINX,so please suggest steps to port the application server from Tomcat7 to NGINX.
Jetty might be the option.
As far as I see it requires no code rewriting, just unpacking the .war file you already have.

HttpAdapter to JavaServlet commnication

Initially we had the application server as a separate one. The communication to the Application Server from worklight servers using adapters. But currently we are moving the Application Server code to the Worklight's Server folder. We are able to call the java class (Simple java class not servlets) using HTTPAdapter. But it is difficult to communicate with the servlet (which is included in the server folder) using HTTPAdapter. Plese provide any solution?
If I understand correctly, you have put some servlet classes in your Worklight server folder. As they are Java classes they are now visible to your adapters. However servlets to be true servlets must be deployed to a JEE servlet engine, with appropriate configuration. You can deploy Servlets (in a WAR file of their own) as a separate JEE application on the same server as Worklight, but you cannot package them inside Worklight itself.
edited in response to your clarification:
You want to consolidate your servlet application, which is providing data accessed via the worklight adapter onto the same server instance as the worklight server. The Worklight Server is actually a JEE application deployed to one of the supported JEE servers, usually WebSphere Liberty which is supplied with Worklight, and the Worklight Server is in fact packaged as a WAR file. Your Data Provider servlet will also be packaged as a WAR file, all you need to do is deploy that WAR to the Liberty server you are currently using for worklight.
If you are doing this is development in Worklight Studio you can find the relevent folders by looking under "Worklight Development Server". You can drop the WAR into the apps folder and if necessary edit the server.xml to add any extra configuration:
WorklightServerConfig/servers/worklight/server.xml
See: http://www-01.ibm.com/support/knowledgecenter/SSCKBL_8.5.5/com.ibm.websphere.wlp.nd.doc/ae/twlp_dep_war.html
a second edit to try to explain again.
The Worklight Project represents your application, when you deploy to the Worklight Server a WAR file is created let's call this MyApp.WAR, that can be deployed to a WebSphere Application Server, inside Worklight Studio you are automatically given a WebSphere Liberty Profile. That Liberty Profile's configuration can be seen in the Project Worklight Development Server. Key Idea here you have one App Server that Liberty Profile, and you deploy the MyApp.WAR file to create what we usually call the Worklight server, it's the MyApp.WaR that is serving your Worklight console. That WAR file is derived from the contents of your project's server folder, this folder's name is a little misleading it's not the "server" itself it's your project-specific WAR information.
Now in addition you want to run a Servlet you already have packaged as a WAR file, let's call this Data.WAR. The key point is that you need to run Data.WAR on the Worklight Developmennt Server, the Liberty Profile. You are not including this DATA.WAR file into your project's server folder, that would effectively put DATA.war inside MyApp.WAR. Instead all you need to do is put Data.WAR in the Worklight Developmennt Server's apps folder and adjust the server.xml.
So: Step 1. Get Data.WAR running in the Development Server. Verify that from a browser you can call your expected servlet. Note the URL that works. Do not make any attempt to use your adapter until you have verified this.
Step 2. Adjust you adapter to call that URL.

How to separately deploy alfresco share application and alfresco repository on different tomcat server?

Currently, I am deploying both "share.war" and "alfresco.war" on same tomcat server.
So, how can I separately deploy "share.war" and "alfresco.war" on different tomcat servers?
I want to deploy "share.war" on tomcat server 1, deploy "alfresco.war" on tomcat server 2.
If you're looking for a way to embed Alfresco in your application, you should check this old but still mostly valid webinar.
If you want to have a quick start at running Alfresco outside any application container (i.e. directly bootstrapping the Spring context) the FirstFoundationClient sample in the Alfresco SDK is what you need.
This is really much more simple than it seems. Deploy the wars on separate tomcats, and then configure share-config-custom.xml inside /shared/alfresco/web-extension on the Share deployment to point to the Alfresco repository. It's that easy.
From a copy-paste of the official documentation :
You can run the Share application in a separate Tomcat instance from
the instance running the Alfresco WAR. This additional instance can be
installed on the same server as the original Tomcat instance, or it
can be installed on a separate server.
Install a new Tomcat instance on the same server at the original Tomcat instance.
Modify the /conf/server.xml file for the new Tomcat instance:
Change the port number (for example, to 8006) in this line:
<Server port="8005" shutdown="SHUTDOWN">
Change the port number (for example, to 8180) in this line:
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector port="8080" ....
Move the share.war file from the original Tomcat /webapps directory to the new Tomcat /webapps directory.
(Optional) Configure the original Alfresco Tomcat deployment.
Start the original Tomcat.
You can use Alfresco supplied batch files.
If you are running the Share Tomcat instance on a separate machine, you must modify the override file in the Share Tomcat web-extension directory:
Open the share-config-custom.xml file.
Change any instance of the server and port to the correct name or IP address of the Alfresco server.
http://yourserver:8080
Save the file.
Start the new Share Tomcat instance.

Need to run GlassFish server using Netbeans

I am using netbeans 6.9.1 with glassFish server.I created a web application with glassfish server. while running the application, its running in address http://localhost:29927/. But i want to view my application in browser in the address http://vigneshsr (vigneshsr is my computer name). How to do it,where to change the port number in glassfish (as we do it in apache tomcat).Guide me.
Thanks in advance.
You can configure glassfish using the admin web gui at http://localhost:4848
Here you can configure your network listeners to change the port etc.
If you want to use a different address on your local system, you'll need to configure your hosts file, this link explains how to do this:- Edit Hosts File

Resources