There are many use cases that would require running unattended background processes in your application. The following are just a few possible alternatives how you can schedule jobs in SAP NetWeaver Cloud:


This post is about the last option. In my opinion it is the simplest one to setup and would cover the majority of the use cases.


The EJB Timer Service is the standard way in Java EE for triggering "timed notifications" for EJB beans (except for stateful session beans). The Java EE 6 Tutorial explains thoroughly how EJB Timers are used. In this post I will show the necessary steps to create an EJB Timer in SAP NetWeaver Cloud.


First, you need to download the 2.x Beta SDK instead of the 1.x SDK. The reason is that the EJB container is introduced with the 2.x Beta SDK as part of the Java EE 6 Web Profile. In 1.x SDK there is no EJB container and hence no EJB Timer Service. You can find the 2.x Beta SDK on the Tools Site, under the SDK tab, at the very bottom of the page.


Next is to configure the 2.x Beta SDK in your Eclipse IDE. This is the same procedure like with the 1.x SDK. However, if you already have the 1.x SDK configured, I highly recommend to use a separate Eclipse workspace for the 2.x Beta SDK to avoid unnecessary confusion.


You can now create new Dynamic Web project as usual. Just make sure you select version 3.0 and target it on the SAP NetWeaver Cloud runtime, so you get the EJB API properly added to the build environment of your project. Now you can use the EJB Timer wizard (File > New > Other > EJB > EJB Timer) to create a session bean with automatic timer method.


Below is a sample code of an EJB Timer that logs a message every 10 seconds between 8:00 and 23:00 from Monday to Friday:


package test;
import javax.ejb.Schedule;
import javax.ejb.Stateless;
import javax.ejb.Timer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class MyTimer {
    private final static Logger logger = LoggerFactory.getLogger(MyTimer.class);
     * Default constructor. 
    public MyTimer() {
        // TODO Auto-generated constructor stub
    @Schedule(second="*/10", minute="*", hour="8-23", dayOfWeek="Mon-Fri",
      dayOfMonth="*", month="*", year="*", info="MyTimer")
    private void scheduledTimeout(final Timer t) {
        logger.error("Automatic timer called at: {}", new java.util.Date());


The last step is just to deploy the web project on the local server or in the cloud. When the server is started the EJB Timer is scheduled automatically and you can see the log entries appear in the ljs_trace.log file.


Note. The EJB Timer Service is not part of the Java EE 6 Web Profile specification. Therefore, it is not yet officially supported API in the 2.x Beta SDK. If there is interest in the community we may consider including the EJB Timer Service as official part of the NW Cloud API.

As the SAP NetWeaver Cloud is getting momentum on big events like SAP TechEd, in parallel we continue with our SAP CodeJam tour where the motto is "developer meet developers". On November 14th, I and Vladimir Pavlov had the pleasure to attend SAP CodeJam Bratislava and hack on the cloud together with the local Slovak geeks.


We took the plane from Sofia to Vienna one day earlier. After a short flight we immediately jumped on the bus to Bratislava and within an hour we were in the heart of Slovakia. We had a few hours for a short rest, to walk around the Old Town and to taste the great Slovak cuisine. We also had the chance to have a great view from the castle to the UFO:

   Photo by esquimo_2ooo


On the next day we arrived at the office of SAP Slovakia where the venue was perfectly prepared. Soon the cloud enthusiasts start arriving and we quickly gathered about 20 developers eager to put their fingers into the cloud.

Vlado started with the a 15 minutes overview of the platform. After a short Q & A session we jumped into the real work - coding.

What really impressed me was that almost all of the attendees came prepared - they had already requested their free perpetual trial accounts on SAP NetWeaver Cloud and installed the Eclipse Tools. So, literally in minutes we had the first step completed - running the Hello World application on the cloud. As a next step most of the participants started exploring the SAP UI5 framework and the Persistence service, other focused on uploading files to the Document service.


After a couple of hours of learning the various capabilities of the platform, I was asked a very natural question: "Could you give us some data to play with?". Fortunately, there was something that we could use right away - the SAP Netweaver Gateway Demo System saved the day. It provides a free access on the Internet to a demo Gateway system that exposes several services of a standard SAP Business Suite installation. We were able to easily connect to it and display business data in web pages built with SAP UI5. However, it was a good lesson learned for us - in order to feed the hunger of the developers who try out SAP NetWeaver Cloud we must provide them with some example data sets that can be easily plugged in the Persistence and the Document services. This is really something we should look into.

Overall, this was an exciting event for me. I was impressed by the passion of our Slovak fellows and I am grateful for all the feedback we received. I would like to give my special thanks to Ondrej Jaura for his hospitality and showing us the charm of Bratislava in the evening.


Next stop - SAP CodeJam Skopje, November 24th. Stay tuned!

The today's update of the Eclipse Tools for SAP NetWeaver Cloud introduces a new tool for collecting support information. It is a wizard that can collect various information from the Eclipse installation like bundles info, log files, preferences, system properties, thread dump, heap dump, etc and pack it in a single ZIP file. This information is very useful for the SAP NetWeaver Cloud team and if provided with the issue report can greatly reduce the time to consult and resolve the reported problem.


You can find the support tool under the Help > Collect Support Information... menu. It is a single click away from generating the file at the specified location.


Typically, the information that is collected by default is enough to analyze most of the issues. You do not need to select any of the checkboxes in the Additional data list unless explicitly requested.


Important! Note that the collected support information may contain sensitive user information. You should check the content of the generated ZIP file before sharing it publicly or attaching it to a support ticket.


Special thanks to my colleague Christian Georgi for his dedicated work to make it possible to include this support tool in the Eclipse Tools for SAP NetWeaver Cloud.

Kaloyan Raev

Eclipse Juno SR1 is out!

Posted by Kaloyan Raev Sep 28, 2012

Hot news from the Eclipse open source community! Juno SR1 of the Eclipse Simultaneous Release is out and ready for consumption!


If you have installed the SAP NetWeaver Cloud Tools on top of the Juno version of the Eclipse IDE for Java EE Developers, you can update your IDE to Juno SR1 by calling a very simple action from the main menu:

Help > Check for Updates

After a minute the update wizard will prompt you with the available update.


Following the usual steps, you will have the latest and greatest stuff from the Eclipse open source community to hack on the SAP NetWeaver Cloud.



One of the interesting news this week is the release of the Spring Tool Suite 3.0.0. In addition to the new features, the highlight is that the complete project is now available as open source software on GitHub under the Eclipse Public License. This is really great news for the Eclipse community! More details about this move can be found on the SpringSource Blog.


After reading this news, I was thrilled to try developing a Spring application with STS 3.0 and deploying it on my trial account in SAP NetWeaver Cloud. I went to the STS download site, grabbed a package and installed it. Then I followed the usual steps for installing the Eclipse Tools for SAP NetWeaver Cloud on top of STS. Since STS 3.0 is based on Eclipse 4.2, the Eclipse Tools for SAP NetWeaver Cloud must be installed from the Juno update site:


STS comes with a nice dashboard that brings you up to speed with the Spring technology. Luckily there is a nice example project "spring-mvc-showcase" that demonstrates the capabilities of the Spring MVC web framework through small, simple examples. Just a single click and the project was fetched from GitHub and installed in my Eclipse workspace.


The Maven Integration for Eclipse resolved all required libraries and the project was ready to deploy. I quickly got a functional Spring application, so I will skip any real Spring development for now.


Deploying it on the SAP NetWeaver Cloud required a few more clicks. I just called the "Run on Server" action from the project's context menu and deployed it successfully on the Local Test Server and on my trial account in SAP NetWeaver Cloud.


Trying out Spring with SAP NetWeaver Cloud was a really easy win for me!

Soon after the first steps in developing web applications on SAP NetWeaver Cloud, developers often realize that the default context root of their applications is not exactly what they want. By default, the context root goes after the project name - if the name of your project is "HelloWorld" then it will be deployed with context root "/HelloWorld".


Changing the context root is a piece of cake. In this post we will see how you can do this in Eclipse and in the Neo Console Client.


Setting the context root when creating a new web project in Eclipse


As described in the Getting Started tutorial, when creating a new web application, you typically use the "New Dynamic Web Project" wizard. Instead of finishing it on the first wizard page, you should click on the Next button to advance to the "Web Module" wizard page. There you can set the context root of the application by modifying the value in the "Context root" text field. If you wish to deploy the application in the server's root then simply give "/" as context root.



Changing the context root of an existing web project in Eclipse


To change the context root of a web application that is already available in the Eclipse workspace, simply right-click on the web project and call the "Properties" action from the context menu. Then navigate to the "Web Project Settings" property page and you will find the text field where you can change the context root.



If your application is already deployed then you will need to redeploy it for the change to take effect.


Setting the context root when deploying a WAR using the Neo Console Client


Setting the context root using the Neo Console Client is as easy as in Eclipse. Simply name the WAR file you are deploying with the desired context root. For example, if you want to deploy your WAR in context root "/hello" then rename your WAR to hello.war. If you want to deploy it in the "/" context root then rename your WAR to ROOT.war (capital letters matter).


If your application is already started then you need to stop it and start it again for the change to take effect.

If you watch the Release Notes for SAP HANA Cloud Platform closely, you should have noticed that we - the SAP NetWeaver Cloud team - switched from monthly to bi-weekly updates of the platform. Together with the cloud runtime there are also updates delivered for the Neo SDK and the Neo Eclipse Tools. Although we keep the SDK, the Tools and the cloud platform compatible, we recommend to update the SDK and the Tools as soon as the new versions are available, so you can take advantage of the latest features and fixes.


You may already know that you can easily check if there is an update for the Neo Eclipse Tools by calling "Help > Check for Updates" from the main menu of the IDE. However, Eclipse provides a lazier way for this human task - the automatic updates.


To enable the automatic updates you should simply go to the "Automatic Updates" preference page and select the "Automatically find new updates and notify me" check box.


The default behavior is that an automatic check will be done each time Eclipse starts and the updates found will be downloaded only when you confirm this. This can be changed by taking advantage of the rest of the options available in the preference page.


Once any updates are found you will be prompted by a notification in the bottom right corner of the IDE. Clicking on the notification opens the wizard for updating Eclipse.



Updating the Neo SDK


Everything described above is valid when updating the Neo Eclipse Tools. It does not cover the update of the Neo SDK. It is still a manual process that requires you to download the new version of the SDK from the tools page, extract it on the local file system and configure Eclipse to use it. A comprehensive guide is available in the documentation. It is highly recommended to follow it strictly, because not all of the steps are completely intuitive. Our roadmap envisages a wizard that will automate the process of updating the SDK, but this is for one of the future updates to come. 

Today is a very special day for all people who are close to the Eclipse community. On the last Wednesday of June every year the Eclipse community releases the so called Eclipse Simultaneous Release - a coordinated release of all major projects - also known as the "release train". Traditionally each of this yearly releases is named after a Jupiter moon, a scientist or something else related to space and mythology. The release this year is named "Juno".


You may visit the Juno landing page to learn what's new. One of the greatest highlights is that with this release the Eclipse distributions switch from the 3.x generation of the platform to the new 4.x generation. And, of course, this comes with tons of new features and improved user experience.



What does this mean for SAP NetWeaver Cloud?


In the documentation we recommend to download the Eclipse IDE for Java EE Developers from the download site of the Eclipse Foundation. Until today the default version on this download site was Indigo SR2. From today on it is the Juno version.


The Eclipse Tools for SAP NetWeaver Cloud already supports both Indigo and Juno versions of Eclipse. The only thing you should care about is to select the correct update site to install the tools from:


Note: Don't forget to consult the installation instructions before installing the Eclipse Tools for SAP NetWeaver Cloud. If you run into issues with the installation, take a look first at this FAQ page.


Upgrading from Indigo to Juno


If you have already setup an IDE based on Indigo, it is possible to upgrade it to Juno in a few simple steps:

  1. Open the Install Manager: Help > Install New Software...
  2. Register the Eclipse Juno update site: enter in the "Work with" field and hit Enter. Wait for the update site to resolve and show its content. Do not install anything from there.
  3. Register the Neo Tools update site for Juno: enter in the "Work with" field and hit Enter. Wait for the update site to resolve and show its content. Do not install anything from there.
  4. Exit the Install Manger: hit the Cancel button.
    This is not really intuitive, but this entry point of the Install Manager is not powerful enough to update the features from more than one update sites at the same time.
  5. Call Help > Check For Updates.
    This entry point has the real power. It will check all registered update sites for updates of the already installed features and will suggest to update them in one step.
  6. Follow the wizard to complete the update process.



Is it mandatory to upgrade to Juno?


No. It is absolutely OK to stay on Indigo for now. It's up to you to decide if you choose Indigo or Juno. Our plan is to support the last two official Eclipse releases. Today this means Indigo and Juno. Next year same time this will mean Juno and Kepler. Therefore, we will support Indigo for at least one more year.


Enjoy Eclipse Juno and have fun with SAP NetWeaver Cloud!


Filter Blog

By author:
By date:
By tag: