WSO2TORIAL: Connection to WSO2 Carbon Server within Developer Studio

Posted by Rob Blaauboer on 10 Mar, 2016
Find me on:

In this episode of our WSO2 tutorial: One of the best ways to get acquainted with WSO2 Enterprise Service Bus (ESB) is to download the product and play around a bit with it. One of the easiest ways is to also download the WSO2 Developer Studio from WSO2 that offers a graphical development environment to create proxies and other ESB services. The alternative is of course to take a WSO2 training course, for instance on WSO2 Enterprise Service Bus Fundamentals which will give you both hands on and guided experience working with the WSO2 ESB as well as the needed background on the why and how you should work with the ESB.

Developing and deploying

This WSO2 tutorial will not go in detail how to develop services but will focus on one specific aspect : starting WSO2 Carbon servers. 

The WSO2 Carbon middleware platform is the core platform on which WSO2 middleware products are built. It is based on Java OSGi technology, which allows components to be dynamically installed, started, stopped, updated, and uninstalled, and it eliminates component version conflicts. In Carbon, this capability translates into a solid core of common middleware enterprise components, including clustering, security, logging, and monitoring, plus the ability to add components for specific features needed to solve a specific enterprise scenario.

It is quite common to start a WSO2 server from the WSO2 Developer Studio (also sometimes called Eclipse, the product on which it is based).

Start WSO2 Server from Developer Studio - WSO2 tutorial

Until now we have used a local WSO2 Carbon 4.4 server in Eclipse. The advantage is that the console is available from Eclipse so it is easy to see what is going well and what is going wrong.

Define a new server WSO2 Carbon 4.4.

New WSO2 Carbon 4.4. based server server

As you can see you select the kind of server you want (in this case Carbon 4.4) and set the port offset and other relevant stuff. This includes enabling the OSGI console (that will allow you to enter the OSGI console), whether or not you want the Management UI (called Carbon_home) to load in your default browser and if you want to enable hot update of published server modules.

After clicking finish and starting the server (right click the server and choose Start) the server starts and the output is visible on the console tab.

console_tab_WSO2_Carbon_4.4.png

In Eclipse you can also deploy a remote CARBON server, i.e. pointing to a server that is running on another machine or even a local server that you started with the WSO2SERVER command.

I will now show you how to start a remote WSO2 server from Eclipse.

JavaEE WSO2 Carbon 4.4 based server at localhost Eclipse

Go to the server tab and right click the server or, if there is no server currently defined select ‘create new server’.

Type in remote and in the scroll windows (with the up/down arrows) select the WSO2 Carbon remote server. 

Define a New Server WSO2 Carbon 4.4.

Click next to continue. On the screen that will follow type in the required data.

Remote Carbon Server WSO2

You can test the server by clicking the Test connection button.  If all is well you will get the message:

Carbon Server URL-Server exists-WSO2

The data you need to fill in comes from the console startup. The userid and password (admin / admin) are the standard userid and password of all WSO2 products.

WSO2 tutorial Connecting ro a remote WSO2 within Developer Studio

The server is added and you should now be able to get it up and running. Be aware that a remote server and a server started from within Eclipse cannot be on the same port (like any two WSO2 products). Change the port offset of either product to make it work).

Server WSO2 Carbon 4.4. based server at localhost

So interested in other WSO2 products like the WSO2 API Manager or WSO2 Identity Server as well? Have a look here.  In case you need WSO2 support, contact the Yenlo WSO2 Guru team to get WSO2 Development Support or WSO2 Operational Support.

WSO2TORIALS help you to change, update or improve WSO2 products and are based on our experiences with the products. WSO2TORIALS will guide you step by step with minimal knowledge required.   WSO2TORIAL.jpeg    
   

 

Check our webinars

Topics: WSO2, WSO2 Carbon

Written by Rob Blaauboer

Rob Blaauboer
Rob is a Senior Business Consultant and Solution Architect with more than twenty years experience. In addition to his work he is an active blogger working on a number of articles on the ‘Internet of Things’ and a WSO2 ‘Getting Started with …’ series (WSO2 tutorial) in which he talks about WSO2 components and their purpose especially aimed at non technical readers. Rob is a WSO2 expert and official WSO2 trainer.

Find me on: