gemini web and virgo

26
Hands on Gemini, Virgo, Libra Hristo Iliev, Violeta Georgieva, Borislav Kapukaranov March 22, 2011

Upload: hristo-iliev

Post on 01-Dec-2014

4.198 views

Category:

Documents


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Gemini WEB and Virgo

Hands on Gemini, Virgo, Libra

Hristo Iliev, Violeta Georgieva, Borislav Kapukaranov

March 22, 2011

Page 2: Gemini WEB and Virgo

LibraOSGi Tooling, Creating Web Application Bundle

Page 3: Gemini WEB and Virgo

© 2011 SAP AG. All rights reserved. 3

Overview

Integrates the existing WTP and PDE

tooling. Provides standard tools for OSGi

Enterprise application development.

Features:

Creation of deployable artifacts

Converting existing Java EE artifacts

Editing and validation of artifact metadata

OSGi server adapter

Page 4: Gemini WEB and Virgo

© 2011 SAP AG. All rights reserved. 4

Web Application BundleCreation

Page 5: Gemini WEB and Virgo

Gemini WebWeb Application Bundles (WAB), JSF

Page 6: Gemini WEB and Virgo

© 2011 SAP AG. All rights reserved. 6

Overview

Model for Java EE Web Applications in

OSGi. Interoperability between Java EE

Web Application and OSGi

Features:

Installation of WAR files and Web

Application Bundles (WABs)

Web application lifecycle control

Control of configuration properties via URL

parameters

Page 7: Gemini WEB and Virgo

© 2011 SAP AG. All rights reserved. 7

Gemini WebBuilding and Running

Page 8: Gemini WEB and Virgo

VirgoConcepts

Page 9: Gemini WEB and Virgo

© 2011 SAP AG. All rights reserved. 10

Overview

Module-based Java application server,

designed to run enterprise Java and

Spring-powered applications.

Features:

Application isolation

Kernel isolation

Provisioning

Hot deployment

Web container

Spring 3

Legacy library support

Supportability

Page 10: Gemini WEB and Virgo

© 2011 SAP AG. All rights reserved. 11

Features

Group Highlights

Isolation Scoping

User region

Provisioning Hot deployment

Deploy artifacts

Repositories

Type dependencies

Web Jetty

Gemini Web + Tomcat

Libraries Spring

Synthetic bundle context

Supportability Logging

Deadlock detection

Heap dumps

Page 11: Gemini WEB and Virgo

© 2011 SAP AG. All rights reserved. 12

Regions

Page 12: Gemini WEB and Virgo

DeploymentHot deploy, Artifacts, Plans

Page 13: Gemini WEB and Virgo

© 2011 SAP AG. All rights reserved. 14

Running application on Virgo

How?

Hot Deploy (pickup directory)

Admin Console

Programmatically

Page 14: Gemini WEB and Virgo

© 2011 SAP AG. All rights reserved. 15

Deploy bundles

1. Unzip Virgo from the

resources/virgo/virgo-tomcat-server-

3.0.0.M03.zip file, located in the

tutorial materials

2. Start Virgo using either startup.bat or

startup.sh

Page 15: Gemini WEB and Virgo

© 2011 SAP AG. All rights reserved. 16

Hot deploymentBundles

Page 16: Gemini WEB and Virgo

© 2011 SAP AG. All rights reserved. 17

Deploy bundles

1. Export from Eclipse & Deploy the

model bundle

2. Export & Deploy the web application

bundle

3. Check both bundles in Admin Console

https://localhost:8080/admin

user: admin

password: springsource

4. Request the web application here

http://localhost:8080/comics/series.jsf

Page 17: Gemini WEB and Virgo

© 2011 SAP AG. All rights reserved. 18

Application packaging

Bundle, WAR

Standard

Well known

PAR

Archive with all modules Atomic

No ordering

Plan

Ordering

Scoping, Atomicity

Configuration

Page 18: Gemini WEB and Virgo

© 2011 SAP AG. All rights reserved. 19

Plans

<?xml version="1.0" encoding="UTF-8"?>

<plan name="multi-artifact.plan“ version="1.0.0”

scoped="true“ atomic="true"

xmlns=“…" xmlns:xsi=“…" xsi:schemaLocation=“…“>

<artifact type="configuration”

name="app-properties" version="1.0.0"/>

<artifact type="bundle”

name="com.acme.exciting.app" version="[2.0.0, 3.1.0)"/>

</plan>

Page 19: Gemini WEB and Virgo

© 2011 SAP AG. All rights reserved. 21

Hot deploymentPlan

Page 20: Gemini WEB and Virgo

© 2011 SAP AG. All rights reserved. 22

Deploy plans

1. Stop the model bundle (this time lets

use the Admin Console

https://localhost:8080/admin

user: admin

password: springsource)

2. Request the web application in a new

browser

http://localhost:8080/comics/series.jsf -

what happens?

3. Undeploy both bundles

Page 21: Gemini WEB and Virgo

© 2011 SAP AG. All rights reserved. 23

Deploy plans - atomicity

1. Copy both bundles in repository/usr

2. Create a plan for our application using

the already existing one as a skeleton

3. Deploy the created plan via Admin

Console

4. Check how stopping the model bundle

will affect the application this time

Page 22: Gemini WEB and Virgo

Usage hintsDebug, Security, Supportability

Page 23: Gemini WEB and Virgo

© 2011 SAP AG. All rights reserved. 25

Debugging

Debug options:

-debug <port>

-suspend

Serviceability :

Logs

Dumps

Heap dumps

Page 24: Gemini WEB and Virgo

© 2011 SAP AG. All rights reserved. 26

Productive usage

Restrict access:

Remove Admin console

Bind OSGi telnet to localhost

Optimize:

Move artifacts watched external

Pre-compile JSPs

Page 26: Gemini WEB and Virgo

Thank You!

Contact information:

Hristo Iliev ([email protected])

Borislav Kapukaranov ([email protected])

Violeta Georgieva ([email protected])