How to use Service Activity Monitoring and Service Locator of Talend ESB 4.2 Learn how to use Service Activity Monitoring and Service Locator when using Talend ESB Enterprise Edition.






This tutorial was made with Talend ESB Studio version 4.2 and can not be followed with the new 5.0 Talend Enterprise ESB Studio.
But new 5.0 tutorials have been created! For more information, click here.


In this tutorial, you will see how to install and use Talend ESB Enterprise Edition, in particular Service Activity Monitoring and Service Locator.

Prerequisites:
To follow this tutorial, you will need to install:
- the Talend ESB runtime (talend-esb-ee-4.2.0.zip).
- the Talend ESB Studio Enterprise Edition (talend-esb-studio-ee-4.2.0.zip).
- the Talend Administration Center ESB Enterprise Edition (talend-esb-tac-ee-4.2.0.zip).
- Apache Tomcat application server latest version, here: version 6 (http://tomcat.apache.org/download-60.cgi).
- Apache Derby database server latest version, here: version 10.8.1.2 (http://db.apache.org/derby/derby_downloads.html).
- the two data service jobs created in the [How to create a simple WSDL-first data services with Talend ESB Studio version 4.2] tutorial.

If you do not have Talend ESB Enterprise Edition and are interested in obtaining an evaluation, please contact us.

Download it!

Do you want to practice?

Download tutorialProject.zip includes all the jobs needed to carry out this tutorial. Please, download it!

You can also:
Send it!

Share it!

 


Prepare and start the Talend ESB runtime environment


Apache Tomcat will run Talend Service Activity Monitoring and Talend Administration Center.

To start Apache Tomcat:

Go to the folder in which you installed it, here: C:\Program Files\Apache Software Foundation\Tomcat 6.0.

Open the bin directory.

Double-click tomcat6.exe.
Tomcat is running.

Next
To check if Tomcat is running:

Open your browser.

Go to http://localhost:8080/.

Tomcat's default home page displays.

Next
The Derby database will store Talend Service Activity Monitoring information.

To start Derby server:

Go to the directory in which you installed it, here: C:\talend\db-derby-10.8.1.2-bin.

Open the bin directory.

Double-click startNetworkServer.bat.
Derby is running.

Next
A commandline window opens, notifying you that Derby has started.

Next
Apache Zookeeper will run Talend Service Locator.

To start Zookeeper:

Go to the directory in which you installed the Talend ESB runtime, here: C:\talend\talend-esb-ee-4.2.

You can see that Zookeeper is one of the components.

Next
Zookeeper needs to be started from the commandline.

So, open a commandline window and go to Zookeeper's bin directory, here we used the command: cd C:\talend\talend-esb-ee-4.2\zookeeper\bin and press Enter.

From the C:\talend\talend-esb-ee-4.2\zookeeper\bin> prompt, type in zkServer.cmd start and press Enter.

Zookeeper is started.

Next
Now, deploy the Service Activity Monitoring server into Tomcat.

To do so:

Go to the directory in which you installed the Talend ESB runtime and browse to the add-ons > sam directory.

Copy the sam-server-war.war file.

Next
Go to the Tomcat directory.

Open the webapps directory.

Paste the sam-server-war.war file.

After a few seconds a sam-server-war folder appears, this means Service Activity Monitoring is deployed into Tomcat.

Next
As Service Activity Monitoring is deployed and the Derby database is running, you can now check if the Service Activity Monitoring is running. To do so:

Open your browser.

Go to http://localhost:8080/sam-server-war/.

Talend ESB Service Activity Monitoring server's home page displays.

Click services to see the Web service available.

Next
The Web service's endpoint of Service Activity Monitoring displays: http://localhost:8080/sam-server-war/services/MonitoringServiceSOAP.

You can copy it for a further use, when configuring the Service Activity Monitoring agent.

Next
Now, deploy Talend Administration Center into Tomcat.

To do so:

Go to the directory in which you extracted it and browse to the org.talend.administrator.war file.

Copy it.

Next
Go to Tomcat directory.

Open the webapps directory.

Paste the org.talend.administrator.war file.

After a few moment, a org.talend.administrator folder appears, this means Talend Administration Center is deployed into Tomcat.

Next
To check if the Administration Center is running:

Open your browser.

Go to http://localhost:8080/org.talend.administrator/.

Talend Administration Center's Database configuration page displays.

To log to this page, type in admin in the Password field of the Login window and click OK.

Next
Upon validation of the password, a series of check is performed.

As no license was set yet, click Set new license to open the New license set wizard.

Next
In the New license set wizard:

Click Browse... to browse to the corresponding license.

Click Upload.
The license is now set.

Next
When all the checking steps are validated, click Go to login page at the bottom of the page.

Next
In the Login area of Talend ESB Administration Center's home page:

In the Login and Password field, type in the login and password provided by Talend.

Click Login.

Next
First of all, we need to create a new user that will be able to access the Service Activity Monitoring and Service Locator modules:

Click Users in the Menu view.

In the Users page:

Click Add in the tool bar at the top of the page. A Data form displays.

In the Data form:

Fill in the Login, First name, Last name and Password of this new user.
Click the Role button to assign him a role.

Next
In the Roles Selection wizard:

Select the Operation manager check box.

Click Validate.

Next
At the bottom of the Data form:

Click Save to save the configuration and create the new user.

The new user displays in the Users list under a Role: Operation manager node.

Now, click logout at the bottom left hand corner of the application to switch users.

Next
In the Login area:

In the Login and Password field, connect with the information of the new user you just created.

Click Login.

Next
New nodes and modules appear in the Menu view, in particular, the ESB Infrastructure node with its two Service Locator and Service Activity Monitoring modules.

Now that the Administration Center is ready, let's continue the configuration of the ESB runtime.

Next
Go to the directory in which you installed the Talend ESB runtime and browse to the container > etc directory.

Edit the org.talend.esb.sam.agent.cfg file to configure Service Activity Monitoring agent.

Next
In the org.talend.esb.sam.agent.cfg file:

Scroll to the bottom of the file.

In the service.url line, replace the default URL: http://localhost:8080/services/MonitoringServiceSOAP by the URL of the Web service's endpoint of Service Activity Monitoring you copied before: http://localhost:8080/sam-server-war/services/MonitoringServiceSOAP.

Press Ctrl+S to save your change and close the file.

Next
Now go to the Talend ESB Container's bin directory: talend-esb-ee-4.2\container\bin.

Double-click the tesb.bat executable file to start it.

Next
A commandline window opens and the tesb container starts.

Next
Activate Service Locator and Service Activity Monitoring and export the jobs as OSGI


Open your Talend ESB Studio and if you followed the previous Simple WSDL-first data services tutorial, two data service jobs: SimpleConsumer and SimpleProvider are already available under the Job Designs node in the Repository view.

If you did not follow the previous tutorial, simply import the tutorial project from the Download it! section of this tutorial.

Next
In the Repository view:

Double-click the SimpleProvider data service job to open it.

Once open, click the tESBProviderRequest component to select it and click the Component view at the bottom of the studio to display its properties.

In the ESB Service Settings area, select the User Service Locator and Use Service Activity Monitoring check boxes to activate them.

Press Ctrl+S to save your changes.

Next
The same way, open the SimpleConsumer data service job.

And in the Component view of the tESBConsumer component, in the ESB Service Settings area, select the Use Service Locator and Use Service Activity Monitoring check boxes to activate them.

Press Ctrl+S to save your changes.

Next
In the Repository view:

Right-click the SimpleProvider job and select Export Job in the menu to open the Export Jobs wizard.

Next
In the Export Jobs wizard:

In the Export type area, select OSGI Bundle For ESB.

In the Job Version area, select the version of the job you want to export.

Click the Browse... button next to the To archive file field and select the directory in which you want to save the jar file.

Click Finish.
The export starts.

Next
Follow the same procedure to export the SimpleConsumer job.

Next
Deploy the jobs in the Talend ESB Container


Go back to the Talend ESB Container.

After the karaf@tesb> prompt, type in list and press Enter to display the list of the bundles available in this container.

We can see that, by default, there are already 167 ready to be used bundles available in the container.

Next

To deploy the two exported data service jobs:

Type in the commands:
-install -s file:///c:/talend/SimpleProvider_0.1.jar and press Enter.
-install -s file:///c:/talend/SimpleConsumer_0.1.jar and press Enter.
(Replace c:/talend by the path you used.)

The jobs have been deployed as new bundles in the container, with Bundle IDs of 168 and 169.

Type in the list command to see the updated list of bundles and press Enter.

Next
The two jobs we deployed display in the list of bundles (bundles number 168 and 169).

As they are special bundles: data service jobs, we can list them with a particular command, so type in job:list and press Enter.

The two jobs are listed.

Next
Run the jobs and see the results in Talend Administration Center


As we deployed the jobs in the container, we can now try to execute them. So:

Type in job:start SimpleProvider and press Enter.
The provider job is launched and starts to listen for requests.

Next
If you go back to Talend Administration Center and click Service Locator in the Menu view.

In the Service Locator page that displays:

Click Refresh in the tool bar at the top of the page and the service endpoint displays in the list.

Next
Go back to the Talend ESB Container to execute the SimpleConsumer job.

Type in the same command for the consumer job: job:start SimpleConsumer and press Enter.
The job is launched and the result displays in the commandline.

Note: we can see that the result displayed in the commandline is the same as the one displayed in the console when executed in the studio in tutorial Simple WSDL-first data services.

Next
If you go back to Talend Administration Center and click Service Activity Monitoring in the Menu view.

In the Service Activity Monitoring page that displays:

Click Refresh in the tool bar at the top of the page and the two requests we sent to the consumer now display in the list.

If you go on the Details view of the page and click the envelope icon in the Request OUT area of the Consumer, you will see the exact data that has been sent.

Next
As you can see, in the code node, the data we inputted, here: DE, displays.

Note: you can see the same result if you click the envelope of the Response IN area of the Provider.


 

    Download it!     Send it!     Share it!

Do you want to practice?

Download tutorialProject.zip includes all the jobs needed to carry out this tutorial. Please, download it!

Friends / colleagues may be interested in this tutorial? Send it to them!

You liked this tutorial ? Support it!

[ top ]