Apache Geronimo: Leveraging Open Source - PowerPoint PPT Presentation

1 / 49
About This Presentation
Title:

Apache Geronimo: Leveraging Open Source

Description:

Learn about Apache Geronimo and how you can leverage its open source components ... Plugins galore - Terracotta plugin. Management/Monitoring tools. Much, much more... – PowerPoint PPT presentation

Number of Views:302
Avg rating:3.0/5.0
Slides: 50
Provided by: dub71
Category:

less

Transcript and Presenter's Notes

Title: Apache Geronimo: Leveraging Open Source


1
Apache Geronimo Leveraging Open Source
  • Jeff Genender
  • CTO
  • Savoir Technologies, Inc
  • and
  • Member - Apache Software Foundation

2
Goal of Your Talk
What Your Audience Will Gain
Learn about Apache Geronimo and how you can
leverage its open source components to build your
own application server stack customized for your
own needs.
IJTC 2007 Session XXXX
www.dubjug.org
3
Jeff Genender
Apache CXF
JSR 316 - Java EE 6
IJTC 2007 Session XXXX
www.dubjug.org
4
Agenda
  • What is Apache Geronimo?
  • Architecture
  • Using Geronimo
  • Configuring Geronimo
  • Using Geronimo NOW
  • Whats Next?

IJTC 2007 Session XXXX
www.dubjug.org
5
What is Apache Geronimo?
Is It Java EE?
IJTC 2007 Session XXXX
www.dubjug.org
6
What is Apache Geronimo?
  • Java EE 5 Certified
  • For more details see
  • http//java.sun.com/javaee/overview/compatibility.
    jsp

IBM WASCE 2.0
IJTC 2007 Session XXXX
www.dubjug.org
7
Why - Another JavaEE/J2EE App Server?
  • Java EE and J2EE are commodity
  • Apache License 2.0
  • Best of breed using open source
  • Written for developers by developers
  • Tired of heavy 1 Gigabyte stacks
  • Slow startup times
  • Only use a small subset of the entire JavaEE
    framework
  • Future certified stacks

IJTC 2007 Session XXXX
www.dubjug.org
8
What is Apache Geronimo?
  • Top Level Apache Project
  • Java EE 5 API
  • J2EE/Java EE 5 implementations
  • GBuild
  • DevTools/Tooling (Eclipse)
  • Subprojects
  • Yoko,
  • XBean
  • (Helped to bring in OpenEJB, ServiceMix, ActiveMQ)

IJTC 2007 Session XXXX
www.dubjug.org
9
Apache Geronimo Eco-System
Apache CXF
IJTC 2007 Session XXXX
www.dubjug.org
10
Build Your Own App Server Stack!
IJTC 2007 Session XXXX
www.dubjug.org
11
Pre-configured Assemblies
  • Collection of configurations
  • Examples
  • geronimo-tomcat6-javaee5
  • geronimo-tomcat6-minimal
  • geronimo-jetty-javaee5
  • geronimo-jetty-minimal

IJTC 2007 Session XXXX
www.dubjug.org
12
Agenda
  • What is Apache Geronimo?
  • Architecture
  • Using Geronimo
  • Configuring Geronimo
  • Using Geronimo NOW
  • Whats Next?

IJTC 2007 Session XXXX
www.dubjug.org
13
Geronimo Architecture
IJTC 2007 Session XXXX
www.dubjug.org
14
Geronimo Architecture - Kernel
  • Kernel - This is Geronimo!
  • Controls component lifecycle
  • Manages dependencies
  • IoC (Inversion of Control) container

IJTC 2007 Session XXXX
www.dubjug.org
15
Architecture - GBeans
  • Whats a GBean?
  • The Glue
  • The Wrapper
  • The Plugin to the Kernel
  • JSR-77 (J2EE Management Specification)
  • Lifecycle Running States
  • Extension to the spec

IJTC 2007 Session XXXX
www.dubjug.org
16
Architecture - GBean
public interface GBeanLifecycle public
void doStart() public void doStop()
public void doFail()
IJTC 2007 Session XXXX
www.dubjug.org
17
Architecture - GBean IoC with the Plan File
... ltgbean gbeanName"geronimo.servernameDirec
toryService" class"org.apache.geronim
o.directory.DirectoryGBean"gt ltattribute
name"providerURL"gtousystemlt/attributegt
ltattribute name"securityAuthentication"gtsimplelt/a
ttributegt ltattribute name"securityPrincipal"gt
uidadmin,ousystemlt/attributegt ltattribute
name"securityCredentials"gtsecretlt/attributegt
ltattribute name"anonymousAccess"gttruelt/attributegt
ltattribute name"enableNetworking"gttruelt/attr
ibutegt ltattribute name"host"gt0.0.0.0lt/attribu
tegt ltattribute name"port"gt1389lt/attributegt
ltreference name"ServerInfo"gt
ltmodulegtgeronimo/j2ee-system/1.1-SNAPSHOT/carlt/mod
ulegt ltnamegtServerInfolt/namegt
lt/referencegt lt/gbeangt ...
IJTC 2007 Session XXXX
www.dubjug.org
18
Architecture - GBean
  • Simple Development
  • Implement the GBeanLifecycle
  • Declare the GBean and deploy it!
  • Its what plugins are made of
  • Should I care?
  • Yes, because its how you configure Geronimo
  • No, because you probably will never write one
    (this is architecture)

Enough already! Lets get on to the good stuff...
IJTC 2007 Session XXXX
www.dubjug.org
19
Agenda
  • What is Apache Geronimo?
  • Architecture
  • Using Geronimo
  • Configuring Geronimo
  • Whats not there yet
  • Using Geronimo NOW
  • Whats Next?

IJTC 2007 Session XXXX
www.dubjug.org
20
Using Geronimo
  • Download it
  • Unzip it
  • Run it

IJTC 2007 Session XXXX
www.dubjug.org
21
Directory Structure
GERONIMO_HOME ---/bin ---/deploy ---/lib
---/repository ---/schema ---/var
IJTC 2007 Session XXXX
www.dubjug.org
22
VAR Directory Structure
GERONIMO_HOME/var ---activemq ---catalina
---config---
---client-log4j.properties
--config.xml
---server-log4j.properties
---derby
---deployer-log4j.properties

---geronimo.log
---log-------------------------
---security------keystores---
----geronimo-default
---shared ---users.properties
---temp ---groups.properti
es ---txlog
IJTC 2007 Session XXXX
www.dubjug.org
23
REPOSITORY Directory Structure
GERONIMO_HOME/repository ---/... ---/common
s-logging Group Id
/commons-logging Artifact Id
/1.0.4 Version

/commons-logging-1.0.4.jar ---/...
IJTC 2007 Session XXXX
www.dubjug.org
24
BIN Directory Structure
GERONIMO_HOME/bin ---/client.jar ---/server
.jar ---/upgrade.jar ---/deploy.sh
(bat) ---/geronimo.sh (bat) ---/setjavaenv.s
h (bat) ---/startup.sh (bat) ---/shutdown.sh
(bat)
IJTC 2007 Session XXXX
www.dubjug.org
25
Starting Geronimo
  • startup.sh
  • geronimo.sh
  • java -jar ./server.jar
  • And for 2.1...
  • gsh - The G-Shell

IJTC 2007 Session XXXX
www.dubjug.org
26
Stopping Geronimo
  • shutdown.sh
  • geronimo.sh stop
  • java -jar shutdown.jar
  • The 2-finger salute Ctrl-C

IJTC 2007 Session XXXX
www.dubjug.org
27
Geronimo Running Foreground...
100 11s
Startup complete Listening on Ports
1050 127.0.0.1 CORBA Naming Service 1099
0.0.0.0 RMI Naming 1527 0.0.0.0 Derby
Connector 2001 127.0.0.1 OpenEJB ORB Adapter
4201 0.0.0.0 OpenEJB Daemon 6882
127.0.0.1 OpenEJB ORB Adapter 8009 0.0.0.0
Tomcat Connector AJP AJP 8080 0.0.0.0
Tomcat Connector HTTP BIO HTTP 8443 0.0.0.0
Tomcat Connector HTTPS BIO HTTPS 9999 0.0.0.0
JMX Remoting Connector 61613 0.0.0.0
ActiveMQ Transport Connector 61616 0.0.0.0
ActiveMQ Transport Connector Started Application
Modules EAR org.apache.geronimo.configs/
webconsole-tomcat/2.0.2/car JAR
org.apache.geronimo.configs/mejb/2.0.2/car
RAR org.apache.geronimo.configs/activemq-ra/2.0.2
/car RAR org.apache.geronimo.configs/system-d
atabase/2.0.2/car WAR org.apache.geronimo.con
figs/dojo-tomcat/2.0.2/car WAR
org.apache.geronimo.configs/remote-deploy-tomcat/2
.0.2/car WAR org.apache.geronimo.configs/welc
ome-tomcat/2.0.2/car
IJTC 2007 Session XXXX
www.dubjug.org
28
Geronimo Running Foreground...
... Web Applications / /console
/console-standard /dojo
/remote-deploy Geronimo Application Server
started
IJTC 2007 Session XXXX
www.dubjug.org
29
Web Startup
IJTC 2007 Session XXXX
www.dubjug.org
30
Web Console
IJTC 2007 Session XXXX
www.dubjug.org
31
Web Console Continued.
IJTC 2007 Session XXXX
www.dubjug.org
32
Deploying Applications
  • Web Console
  • The deployer directory
  • Use for development only...Not recommended for
    production
  • The deployer tool - deployer.sh (bat) script
  • deployer.sh --user system --password manager
    deploy \war/jar/ear plan file

IJTC 2007 Session XXXX
www.dubjug.org
33
Agenda
  • What is Apache Geronimo?
  • Architecture
  • Using Geronimo
  • Configuring Geronimo
  • Using Geronimo NOW
  • Whats Next?

IJTC 2007 Session XXXX
www.dubjug.org
34
How do you configure Geronimo?
  • Plan file
  • Vendor specific XML file
  • config.xml
  • Serialized running state
  • Editing the config.xml
  • By hand
  • Console
  • Plugins
  • Everything in Geronimo is a plugin

IJTC 2007 Session XXXX
www.dubjug.org
35
Plan Files
  • What is a plan file?
  • Descriptor to define and extend an application
  • geronimo-application.xml - embedded
  • geronimo-web.xml - embedded
  • geronimo-ra.xml - embedded
  • Any name you desire - external
  • Describes...
  • GBeans attributes and references
  • GBeans dependencies

IJTC 2007 Session XXXX
www.dubjug.org
36
Plan Files
  • Many different types of plans to describe
    information
  • Web, Application, Resource Adapters, Security
  • Security, Naming References, EJB
  • Schemas found in the schema directory

IJTC 2007 Session XXXX
www.dubjug.org
37
Elements of a plan file
ltmodule xmlns"http//geronimo.apache.org/xml/ns/d
eployment-1.2"gt ltenvironmentgt ltmoduleIdgt
ltgroupIdgtorg.apache.geronimo.configslt/groupIdgt
ltartifactIdgtdirectorylt/artifactIdgt
ltversiongt1.2-SNAPSHOTlt/versiongt
lttypegtcarlt/typegt lt/moduleIdgt
ltdependenciesgt ltdependencygt
ltgroupIdgtorg.apache.geronimo.moduleslt/groupIdgt
ltartifactIdgtgeronimo-directorylt/artifactIdgt
ltversiongt1.1.1lt/versiongt
lttypegtjarlt/typegt ltimportgtclasseslt/importgt
lt/dependencygt ... ltdependenciesgt
lthidden-classes/gt ltnon-overridable-classes/
gt lt/environmentgt ...
IJTC 2007 Session XXXX
www.dubjug.org
38
... ltgbean gbeanName"geronimo.servernameDi
rectoryService" class"org.apache.geroni
mo.directory.DirectoryGBean"gt ltattribute
name"providerURL"gtousystemlt/attributegt
ltattribute name"securityAuthentication"gtsimplelt/a
ttributegt ltattribute name"securityPrincipal"gt
uidadmin,ousystemlt/attributegt ltattribute
name"securityCredentials"gtsecretlt/attributegt
ltattribute name"anonymousAccess"gttruelt/attributegt
ltattribute name"enableNetworking"gttruelt/attr
ibutegt ltattribute name"host"gt0.0.0.0lt/attribu
tegt ltattribute name"port"gt1389lt/attributegt
ltreference name"ServerInfo"gt
ltnamegtServerInfolt/namegt lt/referencegt
lt/gbeangt lt/modulegt
IJTC 2007 Session XXXX
www.dubjug.org
39
Web app plan file geronimo-web.xml
ltweb-app xmlns"http//geronimo.apache.org/xml/ns/
j2ee/web/tomcat-1.1"
xmlnssec"http//geronimo.apache.org/xml/ns/secur
ity"gt ltenvironmentgt ltmoduleIdgt
ltgroupIdgtorg.apache.geronimo.configslt/groupIdgt
ltartifactIdgtldap-demo-tomcatlt/artifactIdgt
ltversiongt2.0.2lt/versiongt lttypegtcarlttypegt
lt/moduleIdgt ltdependenciesgt ...
lt/dependenciesgt lthidden-classes/gt
ltnon-overridable-classes/gt lt/environmentgt
ltcontext-rootgt/ldap-demolt/context-rootgt ...
IJTC 2007 Session XXXX
www.dubjug.org
40
... ltsecurity-realm-namegtldap-realmlt/security-
realm-namegt ltsecuritygt ltdefault-principal
realm-name"ldap-realm"gt ltprincipal
class"org.apache.geronimo.security.realm.provider
s.GeronimoUserPrincipal"
name"system"/gt lt/default-principalgt
ltrole-mappingsgt ltrole role-name"content-admin
istrator"gt ltrealm realm-name"ldap-realm"gt
ltprincipal class"org.apache.geronimo.secur
ity.realm.providers.GeronimoGroupPrincipal"
name"admin" designated-run-as"true
"/gt ltprincipal class"org.apache.geronimo.
security.realm.providers.GeronimoUserPrincipal"
name"system"/gt lt/realmgt
lt/rolegt ltrole role-name"guest"gt
ltrealm realm-name"ldap-realm"gt
ltprincipal class"org.apache.geronimo.security.rea
lm.providers.GeronimoGroupPrincipal"
name"guest" designated-run-as"true"/gt
ltprincipal class"org.apache.geronimo.securit
y.realm.providers.GeronimoUserPrincipal"
name"user1"/gt ltprincipal
class"org.apache.geronimo.security.realm.provider
s.GeronimoUserPrincipal"
name"user2"/gt lt/realmgt lt/rolegt
lt/role-mappingsgt lt/securitygt lt/web-appgt
IJTC 2007 Session XXXX
www.dubjug.org
41
Configuring Geronimo - config.xml
ltattributes xmlns"http//geronimo.apache.org/xml/
ns/attributes-1.1"gt ... ltmodule
name"org.apache.geronimo.configs/tomcat6/2.0.2/ca
r"gt ... ltgbean name"TomcatWebConnector"gt
ltattribute name"host"gt0.0.0.0lt/attributegt
ltattribute name"port"gt8080lt/attributegt
ltattribute name"redirectPort"gt8443lt/attributegt
lt/gbeangt ltgbean name"TomcatWebSSLConnector
" load"false"gt lt/gbeangt ltgbean
gbeanInfo"org.apache.geronimo.tomcat.HostGBean"
name"org.apache.geronimo.configs/tomcat6/2.0.2/c
ar?ServiceModuleorg.apache.geronimo.configs/tomca
t6/2.0.2/car,j2eeTypeHost,nameTomcatVirtualHost_
1"gt ltattribute name"className"gtorg.apache.c
atalina.core.StandardHostlt/attributegt
ltattribute name"initParams"gt
namewww.example.com appBase
workDirworklt/attributegt ltattribute
name"aliases"gtwww.example.net,www.example.orglt/at
tributegt lt/gbeangt ...
lt/configurationgt ... lt/attributesgt
IJTC 2007 Session XXXX
www.dubjug.org
42
Configuring Application Servers
IJTC 2007 Session XXXX
www.dubjug.org
43
Configuring Geronimo - Web Console
IJTC 2007 Session XXXX
www.dubjug.org
44
DEMO
Lets Build our own Stack!
45
Using Geronimo NOW
  • Why do I want to use Geronimo?
  • Lightwieght
  • Build your own application server for your needs
  • Can I use Geronimo Now? Is it ready for
    PrimeTime?
  • YES!!!
  • Its new, is it ready for the Enterprise?
  • YES!!! Java EE Certified...it is guaranteed to
    run your applications
  • Check it out for yourself! Geronimo has some
    great company!
  • http//java.sun.com/javaee/overview/compatibility.
    jsp

IJTC 2007 Session XXXX
www.dubjug.org
46
Whats Next for 2.1
  • Even More User Friendly Configuration and
    Application Management.
  • G-shell
  • Plugins galore - Terracotta plugin
  • Management/Monitoring tools
  • Much, much more...

IJTC 2007 Session XXXX
www.dubjug.org
47
Get Involved!
IJTC 2007 Session XXXX
www.dubjug.org
48
Get Involved!
  • Visit us at
  • IRC
  • irc//irc.freenode.net/geronimo
  • Mailing lists
  • http//geronimo.apache.org/mailing.html

IJTC 2007 Session XXXX
www.dubjug.org
49
QA
  • Jeff Genender
Write a Comment
User Comments (0)
About PowerShow.com