+ All Categories
Home > Documents > Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

Date post: 04-Feb-2022
Category:
Upload: others
View: 7 times
Download: 0 times
Share this document with a friend
25
1 1 CD 2004 – Edinburgh, UK – May 2004 Francisco Reverbel, Bill Burke, Marc Fleury Dynamic Deployment of IIOP-Enabled Components in the JBoss Server Francisco Reverbel CS Department, University of São Paulo Bill Burke JBoss, Inc. Marc Fleury JBoss, Inc. 2 CD 2004 – Edinburgh, UK – May 2004 Francisco Reverbel, Bill Burke, Marc Fleury Outline Introduction JBoss Background JMX, Service Components, Meta-Level Architecture The IIOP Module Proxy Factories IIOP Invoker and IOR Factory Internals Related Work Concluding Remarks
Transcript
Page 1: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

1

1 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

Francisco ReverbelCS Department, University of São Paulo

Bill BurkeJBoss, Inc.

Marc FleuryJBoss, Inc.

2 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Outline� Introduction� JBoss Background

� JMX, Service Components, Meta-Level Architecture� The IIOP Module� Proxy Factories� IIOP Invoker and IOR Factory Internals� Related Work� Concluding Remarks

Page 2: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

2

3 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Introduction

• Introduction

• JBoss Background

• The IIOP Module• Proxy Factories

• IIOP Invoker and IOR Factory Internals

• Related Work

• Concluding Remarks

4 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Software Components in the JBoss Server

� Application components� Server-side parts of distributed applications

� Middleware components� Provide middleware (system-level) services to

application components

Both kinds of components can be dynamicallydeployed into a running server

Page 3: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

3

5 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Component Models� Application components follow J2EE standards

� EJB model: for business components (“enterprise beans”) whose methods can be invoked either by remote clients or by local clients

� Servlet/JSP model: for “web components”� Middleware components employ an extension

of the JMX model� This extension is JBoss-specific

6 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

IIOP-Enabled EJB Components� IIOP support is mandatory for EJB compliance

� IIOP support is a feature that can by dynamically added to a running server

� IIOP-enabled EJBs are dynamically deployable components themselves

� No extra compilation steps for IIOP stub/skeleton generation

� JBoss uses reflective techniques instead

JBoss supports IIOP in a dynamic way:

Page 4: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

4

7 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Hot Deployment� Users can deploy IIOP-enabled EJBs into a

running server simply by dropping deployment units (such as EJB-JAR files) in the server’s deployment directory

� These deployment units contain no IIOP stubs and no IIOP skeletons

� They contain no JBoss-specific classes (such as EJB container or CORBA servant classes)

A change to a JBoss-specific deployment descriptor is all that is needed to

convert a non-IIOP-enabled deployment unit into an IIOP-enabled one

8 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

JBoss Background

• Introduction

• JBoss Background

• The IIOP Module• Proxy Factories

• IIOP Invoker and IOR Factory Internals

• Related Work

• Concluding Remarks

Page 5: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

5

9 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

JMX Architecture

Java Virtual Machine

Agent Level InstrumentationLevel

MgmtClient

Browser

DistributedServices Level

Connector

ProtocolAdapter

AgentServices(as MBeans)

ManagedResources(as MBeans)

MBeanServer

10 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

The JMX component model� The instrumentation and agent levels define an

in-process component model� The MBean server provides a registry for JMX

components (MBeans)� Each MBean is assigned an object name that

is unique in the context of the MBean server� Clients use object names to refer to MBeans� MBean operation invocations always go

through the MBean server

Page 6: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

6

11 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Method invocation on a dynamic MBean

Java Virtual Machine

Client

��������������������� ���������������������������� �� ��������� ���������������� �������� � ����� ���� ! !�"�#"�# $ $�%%�&�')(�*&�')(�*�++�$�,�-�($�,�-�(�..�&& / /0�1�20�1�2�3 3�4�576984�57698 :�;�<);:�;�<);�==?>> @ @A�B�CA�B�C D D�E�F7G9HJI�D�F�EE�F7G9HJI�D�F�E�KK�B�LMC)NB�LMC)N�OO

MBeanRegistry

MBeanServer

MBean

D�E�P�Q�R�ND�E�P�Q�R�N�SSTA�B�CA�B�C DD�E�FE�F Q Q�UU�N�C)K�BN�C)K�B�DD�Q�E�V�KQ�E�V�K�WW�NN X XY�Z�[Y�Z�[�N N�\�B7G9H\�B7G9H U�K�C)KU�K�C)K�WW?II X XA�B�CA�B�C D D�E�F7G9HJI�D�F�EE�F7G9HJI�D�F�E�KK�B�LMC)NB�LMC)N�OO

] The client holds no direct Java references to the MBean] It does not need to know the MBean’s Java class/interfaces] This very simple arrangement favors adaptation

12 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Issues not covered by JMX^ Dependencies between MBeans^ Service lifecycle^ Packaging and deployment of MBeans

JBoss addresses these issues with the notions of service MBean and deployable MBean

Page 7: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

7

13 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

The JBoss model formiddleware components

� Service MBeans:� MBeans whose management interfaces include

service lifecycle operations� Also called service components

� Deployable MBeans:� Service MBeans packaged according to EJB-like

conventions, in deployment units called service archives (SARs)

� A SAR includes a service descriptor, an XML file that conveys information needed at deployment time

� Also called deployable services� They are a JBoss- specific extension to JMX

14 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Meta-level architecture for EJB: the case of a non-IIOP client

Server Virtual Machine

MBeanServer

ContainerMBean

Server-SideInterceptors

EJBComponent

Client Virtual Machine

Client-SideInterceptors

InvocationHandler

DynamicProxy

EJB Client

InvokerProxy

EJBContainer

InvokerMBeanClient-Side

Proxy

Meta Level

Base Level

Page 8: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

8

15 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Reified method invocations

� No interface along the reified invocation path depends on base-level application types

FO� � D� V���� ,� Q� Y

R FD��� W� L ������ �2�

E� M� HF������ R� EM��� H� F� W1 "! DP#�$ H� �%M& D' Y(

D�'*) O+ D' Q, J�-*) U. H/ IO0�+ HF/�1 W2 �) 03 HW/42 K5 R6

G7 P8

H/ W2 KR5 6 G�7*92:

E; M< HF=�> W? >@BAC DD UE JF VG �H,I QJ YK

RFL"M DN WO LP RQL�J &Q

RL QWJ4O H[RTS WO LP QYJ K RL FM DN WLO"P RL QJ &RQ L QWJTO HR [S WO �U

�V ��VWVX

16 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Remote invocation architecture for non-IIOP clients (1 of 2)

Y EJB containers expose a type-independent LZ Q[ Y

\R]

NH*_ operation` Protocol-specific invoker MBeans make this

operation accessible to remote clients through various protocols (JRMP, HTTP, SOAP)

` Client-side stubs are dynamic proxy instances

` They convert calls to the typed interfaces seen by clients into LZ Q[ Y

\R]

NH*_ calls on remote invokers

ServerVM

MBeanServer

ContainerMBean

InvokerMBean

Page 9: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

9

17 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Remote invocation architecture for non-IIOP clients (2 of 2)

� Each client-side proxy has an invocation handler that performs remote calls on a given invoker, over the protocol supported by the invoker

� Client side proxies and their invocation handlers are instantiated by the server and dynamically sent out to clients as serialized objects

Client Virtual Machine

Client-SideInterceptors

InvocationHandler

DynamicProxy

EJB Client

InvokerProxy

InvokerMBeanClient-Side

Proxy

Meta Level

Base Level

18 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

JBoss invokers� Deployable MBeans that act as protocol-specific

gateways to multiple EJB containers� Interface exposed by the JRMP invoker:

� Other non-IIOP invokers implement either thisinterface or very similar ones

� ������������� ���������������������������������������������������� � ����� ����!!#""�$$&%%�''(""*)) ++ %%�,,�--�++ . ./ /�00211433�55�66 7 7�88�99;:: 88�<<>==?88�<<4@@�AA?BBC99�DD�EE�FF�88 G GIH HKJJL L�MM�NN�OO�PP�QQ R R�SSUTT�VV?WW O OXX4YY S SCTT�VV P P�ZZ�QQ R R�VV;SS R R�SSUTT�VV P P�ZZ�QQ R RCVV�SS [[]\\^ ^

Page 10: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

10

19 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Invoker proxies� A client-side proxy

(or, more precisely, its invocation handler) must “know a remote invoker”

� This knowledge is protocol-specific

� It is encapsulated within an invoker proxy

Client Virtual Machine

Client-SideInterceptors

InvocationHandler

DynamicProxy

EJB Client

InvokerProxy

InvokerMBeanClient-Side

Proxy

Meta Level

Base Level

20 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

The IIOP Module

• Introduction

• JBoss Background

• The IIOP Module• Proxy Factories

• IIOP Invoker and IOR Factory Internals

• Related Work

• Concluding Remarks

Page 11: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

11

21 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

The IIOP module consists of...

… three deployable MBeans:� &�

2�

5� %� $�

2�

U� E� 6� H U� YL��

FH �� Thin wrapper around a third-party IIOP engine� JacORB is the default IIOP engine in the JBoss

distribution� &�

R� U� E� D� 1� D� P�

L�

Q� J� 6H�� U� Y L�

F H� In-process CORBA naming service� Reuses (through inheritance) code from the

JacORB naming service� ,� ,� 2

�3� ,� Q� Y

�R� N� H� U

22 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

The IIOP invoker! Unlike all other invokers, it does not follow the

JBoss “invoker pattern”! IIOP is treated as an special case" Reason: interoperability with CORBA clients written

in other languages" The “invoker pattern” leads to an IIOP invoker that

expects IIOP requests with the verb LQYRNH in their operation fields

# But IDL-generated stubs send out IIOP requests whose operation fields contain application-specific verbs

Page 12: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

12

23 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Meta-level architecture for EJB: the case of an IIOP client

Server Virtual Machine

MBeanServer

ContainerMBean

EJBComponent

Client Virtual Machine

EJBContainer

IIOP InvokerMBean

Meta Level

Base Level

CORBAServant

POA

Server-SideInterceptors

EJBClient

IIOPStub

Server-SideORB

Client-SideORB

calls to base-level interfaces

calls to ORB-specific interfs.

IIOP request

call to OMG-defined interface

flow of reified invocations

24 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Proxy Factories

• Introduction

• JBoss Background

• The IIOP Module• Proxy Factories

• IIOP Invoker and IOR Factory Internals

• Related Work

• Concluding Remarks

Page 13: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

13

25 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

EJB references� An EJB reference is either a reference to an

(�

-� %� 2�

E� M� H� F� W or a reference to an (-%��� +� R�

P�

H�� EJB containers have the responsibility of creating such references, which in various situations they pass to EJB clients or to EJB implementations

� JBoss supports two general kinds of EJB references:� Java references to dynamic proxy instances, which

are sent out to other VMs as serialized Java objects� CORBA references, passed across process boundaries in the standard IOR format

26 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

The proxy factory interface

SX��� E� O� L� F�� L� Q� W� HU� � I! D"$#&%�&� (' -( %) 3* UR+-, [.

\/

)0 DF132 W4 R, U\+ /H5 [W. 4 H5 Q6 G7 V�8 &

9R, QW6:4 DL1<; Q6 H5 U+ 3O*>= X? J@ L; Q6 A

�B ��B�B2C

ED ME HF5&2GF4 J@ HW5:4 (' -( %+)�H RP,:I H5 �J �K �L2M

EN MO HFP&QGRS JT HWP S 6U WS

DWV S HOP3W HP VX VX 6HU:P VX VX LY RQZG[ (\ -] %2^ M EMN_O HP FQ WS

���J KaL2M

EN MO HFP&QGRS JT HWP S 6U WS

DWV S HIP�b Xc OW 6U HVP3X VX LY RZ Q([3\ -] %2EM N MHO�P FQ W

S�J

2M

EN MHO�P FQdRS VX HVP3X VX LY RZ Q,[�e Gf ��KaL2M

EN MO HFP&QGRS JT HWP S (\ Q[ WLS Y W\S>g

(\ -] %2EM N MO HP FQ W

S�J

2M

EN MHO�P FQdRS Sh ULikj Pl

Dm Ui \.ndo

Hp \n

�q �r&s

Rt Ou OHu_p Fv Ww Lj RQtGx Jy HWp&w (Qz_x Ww Lj Ww \&n s

Rt Ou Ou HFp&v Ww Lj RQtdx �{&s

ROtGu Ou Hp Fv WLw<j Rt Qx Sh ULikj Pl

Dm Ui \.ndo

Hp \n

V| ��qar}

Page 14: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

14

27 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Implementations of the EJBProxyFactory interface� 3�

U� R� [�

\�

)� D� F� W R�

U\� � Instances of this class create dynamic stubs that

talk to remote invokers over various protocols � 3�

U� R� [�

\�

)� D� F� W R�

U� \+���

$

Instances of this class create dynamic stubs used in clustered JBoss environments� The “HA” suffix stands for “high availability”

� ,� 2�

5� )� D� F� W R�

U\� � Instances of this class create CORBA references

28 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Relationship between invokers, proxy factories and containers

Server Virtual Machine

MBeanServer

ContainerMBean

EJBComponent

EJBContainer

IIOP InvokerMBean

CORBAServant

POA

Server-SideInterceptors

Server-SideORB

HTTP InvokerMBean

JRMP InvokerMBean

ProxyFactory

ProxyFactory

IORFactory

Page 15: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

15

29 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Proxy factory configurations� EJB deployer MBean� Handles the deployment of EJB components� Reads container configurations from XML files and

creates containers� Container configuration� Has all the information the EJB deployer needs to

create a container MBean, its plug-ins and its interceptors

� Includes information on the container’s proxy factories� One proxy factory configuration per protocol

30 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Information in a proxy factory configuration� The proxy factory class (a Java class)� The invoker MBean (the protocol!)� Additional parameters, depending on the proxy

factory class� In the case of non-IIOP access, XML elements in

the proxy factory configuration fully specify the chain of client-side interceptors

� No similar elements exist in the configuration of a proxy factory for IIOP access (,

�2�

5� )� DFW��� R�

U \� )

� Interceptors instantiated at the server side would not make sense for non- Java clients

Page 16: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

16

31 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Global configuration file� Default container configurations for standard

kinds of EJBs:� Stateless session beans� Stateful session beans� Entity beans� Message-driven beansThese configurations support RMI over JRMP

� Alternative container configurations:� IIOP support� clustering� ...

32 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Local configuration file� JBoss-specific deployment descriptor

� Optionally included with a given EJB� May refer to an alternative container

configuration by its name� Perhaps to specify other protocol, such as IIOP

� May fully define a new container configuration� May use a predefined configuration and

enhance it with aditional proxy factory configurations, also taken from the global configuration file

� EJB accessible via multiple protocols

Page 17: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

17

33 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

IIOP Invoker andIOR Factory Internals

• Introduction

• JBoss Background

• The IIOP Module• Proxy Factories

• IIOP Invoker and IOR Factory Internals

• Related Work

• Concluding Remarks

34 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

CORBA servants� Two CORBA servants per IIOP-enabled EJB� home servant and bean servant� They must implement IDL interfaces not known in

advance!� Our servants use the stream-based ORB API� Each servant knows the object name of the target

container MBean� Each servant has marshalling knowledge specific to

the IDL interface it implements� Map from IDL operation names to ��������������� ������ ������������������������������

objects

Page 18: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

18

35 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

POA usage� Our choice of lifetimes for CORBA references:� Session bean instances : transient references� Entity bean instances : persistent references� EJB homes : persistent references� In terms of POAs:� Session bean servants are registered with POAs

with the TRANSIENT lifespan policy� Entity bean and home servants are registered with POAs with the PERSISTENT lifespan policy� These POAs may be per-servant or shared� Default: per- servant POAs created at deployment time

36 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Lazy generation of RMI/IIOP stub classes (1 of 3)

� An ,2���

5� ) D F� W� R U� \� can be optionally associated

with a web class loader that generates RMI/IIOP stub classes in a lazy way� :�

HE��� &/���

is a subclass of URLClassLoader� It has a method � ����������� ��"!! #%$'&)(+*#%$'&)(,*�&&�$%-/.10$�-2.10)3354)-6-4)-6- 7�8'9768'9 ::; When a :<

HE=�> &?

/@ is asked to load )A RB

RBB�C

6D WXE�F EG , itH performs Java introspection on interface I IKJJ�JJL applies the Java to IDL mapping on I IMJJ'JJL uses code generation techniques to create a byte code array with the class file for NMO6O�PNMO�O,P/QQ5R�SR%S�TTU keeps this array in a hash map, to be returned by V VXWZYWZY5[[]\\+YYXWW+^^_ creates a ` `�a'b)cadb)c6cc instance from the byte code array

Page 19: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

19

37 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Lazy generation of RMI/IIOP stub classes (2 of 3)

� An in-process web server allows remote clients to download classes via HTTP

� A client downloads a class file by issuing an HTTP request to a resource name that includes� the id of a :

�H� E� &�

/� instance that can load the class� the full name of the class file

� When the web server receives such a request, it uses the :HE

���&� / given by the resource name

� to create a &�

OD��� V� V� object� to retrieve the corresponding class file

38 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Lazy generation of RMI/IIOP stub classes (3 of 3)

Default ,25����� )� D� FW��� R� U� \� configuration:� Every ,� 2� 5� )� D� F� W� R� U\� � has its :HE&/

���� � instance� An ,2��� 5� )� D� F� W� R� U� \� includes information on its

web class loader in each IOR it generates� The IOR has a tagged component that specifies a

codebase URL for stub downloading� The path component in this URL identifies the web

class loader of the ,! 2"

5)#%$ D� F& W' RU(*) \+ that created the

IOR

Page 20: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

20

39 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Related Work

• Introduction

• JBoss Background

• The IIOP Module• Proxy Factories

• IIOP Invoker and IOR Factory Internals

• Related Work

• Concluding Remarks

40 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Some related middleware systems

� Flexinet (Hayton et al)� Flexible remote invocation paths� Dynamic stubs

� OpenCOM (Clarke et al)� Lightweight component model� Based on a subset of COM� Dependence management, reconfiguration, method

call interception� Hadas (Ben-Shaul et al) � Fractal component model (Bruneton et al)

Page 21: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

21

41 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Commercial J2EE servers� Most use compilation-based approaches� IONA’s ART framework

� relies on the chain of responsibility pattern� basis for various middleware products, including a J2EE

server� Nearly all commercial offerings require vendor-

specific EJB container or CORBA servant classes to be generated as part of the deployment process

� In the case of IIOP-enabled EJBs, all other servers require extra compilation steps for stub and skeleton generation

42 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Concluding Remarks

• Introduction

• JBoss Background

• The IIOP Module• Proxy Factories

• IIOP Invoker and IOR Factory Internals

• Related Work

• Concluding Remarks

Page 22: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

22

43 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

JBoss/IIOP... � Supports IIOP-enabled components without

sacrificing the levels of flexibility, developer friendliness and ease of use that JBoss had already reached in the non-IIOP case

� Strong reliance on reflection to make EJB deployment easy

44 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Dynamic deployment issues... � Instantiation of CORBA servants for IDL

interfaces not known in advance� Creation of POAs at deployment time� Lazy generation of RMI/IIOP stubs

We believe that our techniques are equally applicable to CCM servers

and to other highly dynamic component environments.

Page 23: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

23

45 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Thank you for your attention!� Q & A ...

Francisco [email protected]

Bill Burke Marc [email protected] [email protected]

http://www.jboss.org

46 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Backup Slides

Page 24: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

24

47 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Dynamic proxy usage� A dynamic proxy is an object adapter that

converts the type-independent interface of its invocation handler into a list of interfaces specified at runtime

� Dynamic proxies bridge the gap between the interfaces that are application-specific and those exposed by middleware components

48 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

The dynamic stub idiom� In Java RMI:

� Serializable types are normally passed by value� Remote types are normally passed by reference� What about a remote object that is also serializable?

� If it has not been exported through the RMI system, then it will be passed by value (in serialized form)

� This allows the creation of custom stubs, which interact over a custom protocol with the remote objects they represent

� JBoss uses dynamic proxies as custom stubs� The dynamic proxy implements application interfaces� Its customized part is the invocation handler

Page 25: Dynamic Deployment of IIOP-Enabled Components in the JBoss Server

25

49 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

Generalized EJB containers� A container MBean is created when an EJB is

deployed� It provides middleware services to its EJB

(instance pooling, instance caching, persistence, security, transactions...)

� … by merely aggregating aspects that do the real work

� Container configurations (XML files)� For standard kinds of EJBs� For JBoss-specific extensions� Customized containers for generalized EJBs

50 CD 2004 – Edinburgh, UK – May 2004Francisco Reverbel, Bill Burke, Marc Fleury

JBoss... � Demonstrates that application servers can be

built out of dynamically deployed components that provide middleware services to application components

� Brings reflective middleware to the world of mainstream computing


Recommended