gemini web and virgo
DESCRIPTION
TRANSCRIPT
Hands on Gemini, Virgo, Libra
Hristo Iliev, Violeta Georgieva, Borislav Kapukaranov
March 22, 2011
LibraOSGi Tooling, Creating Web Application Bundle
© 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
© 2011 SAP AG. All rights reserved. 4
Web Application BundleCreation
Gemini WebWeb Application Bundles (WAB), JSF
© 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
© 2011 SAP AG. All rights reserved. 7
Gemini WebBuilding and Running
VirgoConcepts
© 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
© 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
© 2011 SAP AG. All rights reserved. 12
Regions
DeploymentHot deploy, Artifacts, Plans
© 2011 SAP AG. All rights reserved. 14
Running application on Virgo
How?
Hot Deploy (pickup directory)
Admin Console
Programmatically
© 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
© 2011 SAP AG. All rights reserved. 16
Hot deploymentBundles
© 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
© 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
© 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>
© 2011 SAP AG. All rights reserved. 21
Hot deploymentPlan
© 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
© 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
Usage hintsDebug, Security, Supportability
© 2011 SAP AG. All rights reserved. 25
Debugging
Debug options:
-debug <port>
-suspend
Serviceability :
Logs
Dumps
Heap dumps
© 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
© 2011 SAP AG. All rights reserved. 27
Feedback
Mailing list:
https://dev.eclipse.org/mailman/listinfo/vir
go-dev
Virgo forums:
http://www.eclipse.org/forums/index.php
?t=thread&frm_id=159
Thank You!
Contact information:
Hristo Iliev ([email protected])
Borislav Kapukaranov ([email protected])
Violeta Georgieva ([email protected])