server day 2009: jboss 5.0 by alessio soldano

Post on 19-May-2015

1.073 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

Alexis Moussine-Pouchkine presentation at the Application Server Day 2009, discussing the latest innovations in Glassfish 3

TRANSCRIPT

JBoss Application Server 5

Alessio Soldano

JBoss Web Service LeadJBoss, a Division of Red Hat

May 21th, 2009

Alessio Soldano

• JBoss WS[1] committer since early 2007

• JBoss / Red Hat employee since end of 2007

• JBoss Web Service Lead, 2008

• JBoss AS[2], JBoss Wise[3] contributor

• Current Red Hat representative at JSR-224 EG

[1] http://www.jboss.org/jbossws/[2] http://www.jboss.org/jbossas/[3] http://www.jboss.org/wise/

Agenda

• JBoss AS history• Microcontainer overview• Web Beans overview• Embedded Jopr overview• More features highlight• Work in progress• Q & A

JBoss AS history

20072006200520042003

JBos

s V

ersi

ons

Time

JBoss AS 4.0.0 – 4.0.5

JBoss AS 4.2.0 – 4.2.3

JBoss AS 5: Alphas, Betas, CRsand finally 5.0.0.GA, 5.0.1.GA

JBoss AS 3.2.0 – 3.2.8

JBoss AS 5.1 Beta1, CR1

20092008

J2EE 1.3 certification, JDK 1.3

J2EE 1.4 certificationJDK 1.4

JEE 5.0 compatible,not certified (95% pass)JDK5.0

JavaEE 5 certification, JDK5 & 6

Recent JBoss AS innovation

• JBoss AS 5.0.x– JavaEE 5 certified– JBoss Microcontainer– Major component upgrades

• JBoss AS 5.1.x– Web Beans– Embedded Jopr– Further component upgrades

5.1.0.CR1 currently available,5.1.0.GA coming soon!

JBoss AS 5: The big picture

Aspectized User Applications

JVM

JBoss AS 5 Runtime

JBoss MicroContainer

PO

JO

Java

EE

OS

Gi

MB

ean

Spr

ing

Virtual Deployer Framework Transactions

Security

Clustering

Messaging

Component Deployers

Web Server

WS

OR Mapping

Enterprise Services

jboss-beans

.earspring beans

OSGibundle.war

service.xml

Runtime components wired together by the MC with dependencies [and aspects] applied across component models!

Support any component model that makes sense, but do not get married to it!

JBoss Microcontainer

• Refactoring of JMX MicroKernel– Service management– POJO deployment– Also standalone use

• A complete IoC framework• Tight JBoss AOP integration• Virtual deployment framework

– Deployment dependencies– Structural deployers– Aspectized deployers– Deployment stages

• Fully extensibleReflection

VFS

Kernel

MDR

Deployers

Reliance

Classloading

OSGi

Managed

JMX

WebBeans – JSR299 RI (1)

JSR-299 defines a unifying dependency injection and contextual lifecycle model for Java EE 6

• a completely new, richer dependency management model• designed for use with stateful objects• integrates the “web” and “transactional” tiers• makes it much easier to build web applications using JSF and

EJB together• includes a complete SPI allowing third-party frameworks to

integrate cleanly in the EE 6 environment• provides a typesafe approach to dependency injection

JSR299 was heavily influenced by Seam and Google Guice.The Expert Group is lead by Red Hat.

Fill in a gap in JavaEE: shared componentamong web tier and transactional tier.

WebBeans – JSR299 RI (2)

• Pre-defined by the specification:– (Almost) any Java class– EJB session beans– Objects returned by producer methods– Java EE resources (Datasources, JMS topics/queues,

etc)– Persistence contexts (JPA EntityManager)– Web service references– Remote EJBs references

• Plus anything else you can think of!

What can be injected?

WebBeans – Simple examples

public class Printer {

@Current Hello hello;

public void hello() {

System.out.println( hello.hello("world") );

}

}

public class Printer {

private Hello hello;

@Initializer

public Printer(Hello hello) { this.hello=hello; }

public void hello() {

System.out.println( hello.hello("world") );

}

}

@Current is the default(built-in) binding type

Mark the constructor to becalled by the container

public class Hello { public String hello(String name) { return "hello" + name; }} Java Bean

@Statelesspublic class Hello { public String hello(String name) { return "hello" + name; }} EJB 3

Constructors are injectedby default; @Current isthe default binding type.

WebBeans – Names

@Named("hello")

public class Hello {

public String hello(String name) {

return "hello" + name;

}

}

@Named

public class Hello {

public String hello(String name) {

return "hello" + name;

}

}

<h:commandButton value=”Say Hello”action=”#{hello.hello}”/>

JSF page

By default not available through EL.

If no name is specified, then adefault name is used. Both thesebeans have the same name

Calling an action on a bean through EL

WebBeans – Binding type

@Casual

public class Hi extends Hello {

public String hello(String name) {

return "hi" + name;

}

}

public class Printer {

@Casual Hello hello;

public void hello() {

System.out.println( hello.hello("JBoss") );

}

}

public@BindingType@Retention(RUNTIME)@Target({TYPE, METHOD, FIELD, PARAMETER})@interface Casual {}

Creating a binding type is easy...

We specify the @Casual binding type,otherwise @Current would be assumed

Here we inject the Hello beanand require an implementationwhich is bound to @Casual

WebBeans – Deployment type

public@DeploymentType@Retention(RUNTIME)@Target({TYPE, METHOD})@interface Italian {}

Creating a deployment type is easy...

@Italian

public class Buongiorno extends Hello {

public String hello(String name) {

return "Buongiorno " + name;

}

}

Same API, different implementation

<Beans> <Deploy> <Standard /> <Production> <i8ln:Italian> </Deploy></Beans>

web-beans.xml

A strongly ordered list of enabled deployment types.Notice how everything is an annotation and so typesafe.

Only Web Bean implementations which have enableddeployment types will be deployed to the container.

WebBeans – Much more...

• Scopes and contexts:– @SessionScoped– @ConversationScoped– @RequestScoped– custom ...

• Interceptors: eg. @Transactional• Events:

– @Observes– @Observable

• Decorators: @Decorator• ...

Loose coupling

Decouple technical concernsfrom business logic

Allow business concernsto be compartmentalized

Decouple event producersfrom event consumers

Management console

Home page: http://jboss.org/embjoprDemo: http://jboss.org/embjopr/demo

Target• Non-JBoss-guru developers• Admins

Simplified GUI, Seam based• Deployment• Configuration & monitoring

– Datasources– Message queues– User applications

• Available from JBoss AS 5.1.0.CR1

Embedded Jopr: screenshots (1)

Traversing resources

Statistics for a web app

Embedded Jopr: screenshots (2)

Making persistentupdates to theconfiguration

Embedded Jopr: screenshots (3)

Running operations on resources

More JBoss 5.0.x/5.1.x highlights

• JBoss Messaging– High performance JMS1.1 compliant provider, MANY

features...

• JBoss Clustering– SFSB replication, MVCC, improved EJB3 caching, ...

• JBoss Web (Tomcat)– High concurrency, performance improvements

• JBoss Transaction– Bullet proof reliability

• JBoss Web Services– Multiple ws stack integration including Apache CXF, Sun

Metro

• JBoss Security and Negotiations– SPNEGO support, password encryption, ...

• ...

Work in progress

• EJB3.1 / Web Profile / Java EE 6– JBoss AS 6 ?

• Complete OSGi support– Facade on top of Microcontainer API, no NHI syndrome

• Component projects' roadmap– Innovation in all fields

• Document, explain, blog, experiment, test-drive, have fun and spread the word :-)

• A Fedora/RHEL type of split for JBoss

• Community Project (JBoss AS)

– JBoss As We Know It

– Sponsored by JBoss/Red Hat

– Allow innovation at a faster pace

• Enterprise Application Platform (EAP)

– Forks the community project at stable points

– Integrates with JBoss Developer Studio / JBoss Operations Network

– Rigorously tested (performance, scalability, SpecJ, etc.)

– Certified on 17 OS and JVM combinations, 5 DBs

– 3 month Cumulative Patch cycles

– Supported for 5 years.

JBoss AS vs. JBoss EAP

Forking EAP from JBoss AS

AS 4.2.0 AS 4.2.1 AS 4.2.2

EAP 4.2

4.2_

CP02AS 4.2.0 AS 4.2.2 ...AS 4.2.1

CP02

Trunk

Branch_4_2

EAP 4.2Fork

EAP

4.2

EAP

4.3

… AS 4.2.3

CP01

Branch_5_x

EAP 5Fork

AS 5.1.0Branch_5_0

AS 5.0.0 AS 5.0.1

Follow us on the web...

http://www.jboss.org/jbossmc/

http://oddthesis.org/

http://www.jboss.org/

http://twitter.com/JBossNews

Some pages ...

http://www.jboss.org/feeds/

Blogs, Twitter, ...

... or just use Google ;-)

http://www.seamframework.org/WebBeans

Q & A

top related