Construction of Virgo environment based on OSGi (I.)--Environment chapter

Source: Internet
Author: User

1. Background

With the recent modularity of Web projects to support hot-swappable, dynamic scaling, we began to look at how OSGi can be introduced into Web projects. For OSGi, you can refer to OSGi research and summary. Now that the mainstream Java EE framework is inseparable from spring, the seamless integration of OSGi with spring becomes the key to introducing OSGi. Fortunately, as early as 08, Spring has supported OSGi and developed a sub-project, SPRINGDM, to integrate seamlessly with OSGi. However, since the 3.2 release, in order to gradle,spring abandon OSGi (for the reasons why you abandon OSGi, you can refer to Http://www.infoq.com/news/2012/10/spring-osgi-gradle), With regard to the application of OSGi in the Java EE, there is also some controversy about the benevolent see, after all, or the lack of depth of OSGi research, which makes OSGi not play a key role in the project to become cumbersome.

In short, people who haven't tried OSGi have no say, based on this background, let's build the spring Tools Suite (STS) + Virgo development environment and lay a solid foundation for our next dive into the application of OSGi in Web projects.

2. Pre-knowledge

Before you begin, let's briefly introduce the concept of terminology involved, and learn about OSGi and Virgo students who can ignore it directly.

What is OSGi?

Simply put, it is a set of specifications and standards that support the Java language Modular system. Our common eclipse is developed based on the OSGi standard. Details about http://developer.51cto.com/art/200909/152190.htm)

What is an STS?

A set of IDE development tools based on eclipse, simply said, is the Eclipse + STS plugin.

What is Virgo Tomcat Server?

Is the server that wraps Tomcat and integrates with the OSGI environment. Detailed introduction of http://www.ha97.com/5152.html.

What is maven?

This is not much to say, Google a bit clear.

3. Environment Construction

Well, we're officially starting to build the process.

3.1 Step One:

Download STS development environment, address http://spring.io/tools/sts/all, only download the latest version, divided into green decompression version and installation version, download the decompression version. Of course, if you can download the Spring Tool Suite plug-in directly into your eclipse environment, the plugin will probably be around 130M.

3.2 Step Two:

Download Virgo Server, address http://www.eclipse.org/virgo/download/, we are using Tomcat-based.

3.3 Step Three:

Configure Virgo Server.

We need to integrate the downloaded Virgo server into the STS environment, first, install the Virgo Tools plug-in in the STS IDE and, through Help->install New software, pop up the following interface.

Installing Virgo tools in the STS IDE, with Help->install New software, pops up the following interface.

Click Add, enter

Name:virgo

Location:http://download.eclipse.org/virgo/milestone/tooling

Tick the Eclipse Virgo tools plugin, then next to download and install.

Restart the STS when the installation is complete.

Then, configure server, which is the Virgo application server we are using.

Click Add and select Eclipsert below Virgo Runtime in the popup configuration screen.

Select the Virgo runtime below Eclipsert and tick create a new local server.

Note: The Eclipsert option is only available if the Virgo Tools plugin is successfully installed.

Fill in the name of the Virgo server, click Browser to select the path of the Virgo server to download.

When you are finished, you can see the virgoserver we created in the server view, and the following Vmwarevfabric TC Server is the version of the STS environment that comes with it, without a tube.

3.4 Step Four:

Configure Maven. (If you don't know what maven is, you can go to Google, here is maven download address http://maven.apache.org/download.cgi)

After rebooting, select Windows->preferences->maven to configure Maven.

It is recommended not to use embedded embedded maven, "maven combat" said not very stable, see "maven Combat" on the 47th page 2.7.3.

Finally, let's test the built environment and start Virgo Server in the Sts.

can see Virgo

Plug-ins that load individual OSGi after launch

Open Browser, enter http://localhost:8080/

Get the default startup page as follows

Click Admin Console in the top right corner

Enter user name and password: admin, SpringSource

To administer the page

Well, we're done, our Sts+virgo preliminary environment is set up, and the next section we'll show you how to integrate snaps into Virgo server and demonstrate several official demos.

Construction of Virgo environment based on OSGi (I.)--Environment chapter

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.