Professional Documents
Culture Documents
Architecture Overview
JBoss Microkernel for Java Middleware
Topics
Professional Open Source™
– JBoss Microkernel
– Services in Microkernel
– Deployer Architecture
– Classloaders Architecture
– JBoss Invokers
– Smart Proxies and Client Interceptors
1
JMX Architecture: Microkernel
Professional Open Source™
JBoss:name=ServiceA
MBean
MBean Server
Service
Service A
A
JBoss:name=ServiceC
JBoss:name=ServiceB
Server
Service
Service C
C
Service
Service B
B
2
JMX Architecture: Invocation
Professional Open Source™
setAttribute(ObjectName, Attribute)
JBoss:name=ServiceA
MBean
Service
Service A
MBean Server
A
JBoss:name=ServiceC
Service
Service CC
Server
lookup Version
Version 1.0
1.0
MBean Registry
JBoss:name=ServiceC
JBoss:name=ServiceC Java Reference
Service
Service CC
JBoss:name=ServiceA ...
Version
Version 1.1
1.1
... ...
Attributes JBoss:name=ServiceC
MBean
MBean Server
Operations
Notifications
Service
Service C
C
Server
JBoss:name=ServiceA getMBeanInfo
Service
Service A
A
3
JMX Architecture: Type System
Professional Open Source™
Invocations are not typed at compile time, compiler won’t catch errors
– Same problem as with using Java reflection
MBean
MBean Server
Service
Service A
A
Server
Service
Service C
C
shutdown()
You win: flexibility in the framework which gives you 24x7 uptime
You lose: safety net provided by Java compilers
– You still have type safety at run-time (JVM)
4
Professional Open Source™
JBoss Deployers
Loading Services and Applications to JBoss
JBoss Deployers
Professional Open Source™
Enterprise
Enterprise
Resource
Resource Archive
Archive Java
Java
Adapter
Adapter Archive
Archive
Web
Web EJB
EJB
Archive
Archive Archive
Archive
5
JBoss Deployers
Professional Open Source™
Microkernel
2 Deploy(URL)
DeploymentScanner
DeploymentScanner MainDeployer
MainDeployer SARDeployer
SARDeployer
EJBDeployer
EJBDeployer
6
Deployers: Bringing in the Services
Professional Open Source™
Microkernel
Transaction
Transaction
DeploymentScanner
DeploymentScanner SARDeployer
SARDeployer Service
Service
MainDeployer
MainDeployer EARDeployer
EARDeployer Message
MessageService
Service
EJBDeployer
EJBDeployer Security
SecurityService
Service
Naming
NamingService
Service
WARDeployer
WARDeployer
EJB
EJBContainers
Containers
Data
DataSources
Sources
*.xAR
Machine 1 Machine 2
Microkernel Microkernel
DeploymentScanner
DeploymentScanner Load Services DeploymentScanner
DeploymentScanner
MainDeployer
MainDeployer MainDeployer
MainDeployer
Deployment
Web Server Packages
Administrator
7
Professional Open Source™
CL
CL Top Level Deployment
The JBoss classloading architecture
manages the classloaders to avoid type
conflicts (where possible)
– These classloaders potentially have duplicate
class definitions
– Classloaders are added to repositories
Nested Deployments
8
JBoss 4.x Classloader Repository
Professional Open Source™
Loader
Loader Repository
Repository
Class is identified
Java
Java Class
Class by its name in the
classloading
domain
Scoped Repositories
Professional Open Source™
Parent
Repository
Shared JARs
Scoped Scoped
Repository Repository
9
Professional Open Source™
Lock
Synchronization
Synchronization
Transaction
Synchronization
Connection
Transaction
Connection
Relation
Security
Relation
Security
Cache
Cache
Lock
Lock
Call
Invocation
Call
10
JBoss Invokers
Professional Open Source™
Server JVM
Invocation MBean
MBean
JMX
JMX Microkernel
Microkernel
MBean
JBoss Invokers
Professional Open Source™
Invocation
Port 4321
– They may support different
protocols (JRMP, IIOP, HTTP, RemoteInvoker
RemoteInvoker
SOAP, Custom Socket, etc.) Service MBean
– You can create your own for
your specific needs
– Each invoker binds itself to a
physical port on the node
11
JBoss Invokers
Professional Open Source™
Port 1234
RemoteInvoker
RemoteInvoker
JMX
JMX Microkernel
Client JVM
EJB Container MBean
Typed
Microkernel
Interface Invocation
011101010101
Client
Client RemoteInvoker
RemoteInvoker
Port 4321
Service MBean
Client Proxy
12
Professional Open Source™
Client Proxies
“Downloading Smart Behavior to the Client”
Client JVM
Typed
Typed Component
Reference to InvocationHandler
implementation
Component Interface
Transaction
Transaction
Invocation
Transport
Invocation
Transport
Security
Handler
01110101
Security
Handler
Client
Client
Interface
Stub to server
side invoker
13
Client Side Interceptors
Professional Open Source™
Client JVM
Component
Component Interface
Transaction
Transaction
Invocation
Transport
Invocation
Transport
Security
Handler
Security
Handler
011101010101
Interface
14
Architectural Overview: Conclusion
Professional Open Source™
Microkernel design
– Independent cycling and loading
Unified ClassLoaders
– Class visibility with any 3rd party and stack integration
Unified Deployers
– Hot deploy all types
– Responsible for UCL creation
Detached invokers
– Independent of MBeans present
– multiple protocol support
Client Proxy
– Dynamic proxies and client interceptor stack
The SUPER-SERVER theory for MBeans (EJB is an example)
15