View Source

{section}
{column}

h1. Introduction

The following diagrams aim to describe the composition of the Fractal components of Petals ESB.

By naming convention, if not specified, the default name of the interface 'server' is "{{service}}".
To have readable diagrams, some interface links are not drawn:
* the links between the interfaces "{{server}}" of a composite and the interfaces "{{server}}" of its internal components,
* the links between the interfaces "{{client}}" of internal components of a composite and the interfaces "{{client}}" of the composite.
Into a composition, only links between internal components are drawn.

{tip}
The following diagrams, except the legend, are exported as JPEG image from the slides contained in [Fractal-Diagrams.odp]. The export is done with following parameters:
* width: 27.99 cm,
* height: 21.01 cm,
* resolution: 37 pixel/cm
* color: 24bits,
* quality: 100%

The legend is included in the Open Office Presentation but exported using a screeen shot resized with Gimp.
{tip}

{column}
{column:width=35%}
{panel:title=Table of contents}{toc:outline=true}{panel}
{panel:title=Contributors}{contributors:order=name|mode=list|showAnonymous=true|showCount=true|showLastTime=true}{panel}
{column}
{section}

h1. Fractal tips

{anchor:composite_startup}
h2. Composite startup

The sub-components of a Fractal composite are started sequentially, so you *MUST* declare the sub-component in the right order in the Fractal ADL.
{petalslink}
Explications de Philippe MERLE:
Par défaut, Fractal a un algo de démarrage des composants assez basique, i.e., séquentiellement.
Tout peut être raffiné dans Fractal donc on pourrait imaginer un type de composite qui analyse les bindings entre ses sous-composants et en déduisent un ordre de démarrage non bloquant. et si il y a un cycle alors ce composite crée des threads.
Facile à écrire dans un mail. Un peu plus difficile à implanter efficacement.
Après c'est une balance entre implanter un mécanisme rarement utile ou bien appliquer un codage pour ces cas particuliers (ordre dans le composite ou bien policy=Policy.ASYNCHRONOUS)
Comme nous avons rencontré ce cas de figure que très rarement sur les 10 dernières années alors nous n'avons jamais fait l'effort d'implanter un algo de démarrage + intelligent.
{petalslink}


h1. Diagrams

Each Fractal diagram is drawn using the following legend:
!legend.png|align=center!

h2. Petals Composite

!petals.jpg|align=center!

h2. System Composite

!system.jpg|align=center!

h2. Container Composite

A component {{SharedLibraryLifeCycleImpl}} is instantiated each time a JBI shared library is installed into the JBI container. It is dynamically created.
A component {{ComponentLifeCycleImpl}} and {{Installer}} is instantiated each time a JBI component is installed into the JBI container. It is dynamically created.
A component {{ServiceAssemblyLifeCycleImpl}} is instantiated each time a JBI service assembly is deployed into the JBI container. It is dynamically created.

!container.jpg|aligne=center!

h2. JBI Management Composite

!jbi-mngt.jpg|align=center!

h2. JBI Messaging Composite

!jbi-messaging.jpg|align=center!

h2. Communication Composite

!comm.jpg|align=center!

h2. Transporter Composite

!transporter.jpg|align=center!

h3. NioTransportProtocol

!NioTransportProtocol.jpg|align=center!

h2. ExtensionsManager composite

Each extension is instantiated dynamically when Petals ESB is started according to the content of the Petals ESB classloader.

!extensions.jpg|align=center!

h3. Extensions

h4. Autoloader composite

!autoloader.jpg|align=center!

h4. Artifact repository composite

!artifactrepository.jpg|align=center!

h4. WsApi composite

!wsapi.jpg|align=center!

h1. Known problems

h2. Deadlock when starting a composite

*Symptoms*:

The startup of Petals blocks into the startup of the Fractal composite into the thread "main" with a similar thread dump:
{code}
"main" prio=10 tid=0x00007f83d4007800 nid=0x981 in Object.wait() [0x00007f83db58f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000c038a388> (a org.objectweb.fractal.julia.generated.Cbd2013d7_0)
at java.lang.Object.wait(Object.java:485)
at org.objectweb.fractal.julia.generated.Cbd2013d7_0.incrementFcInvocationCounter(BasicControllerMixin.java:4216)
at org.objectweb.fractal.julia.generated.Cec3b28ec_0.startScanner(INTERCEPTOR[DirectoryScanner])
- locked <0x00000000c038a388> (a org.objectweb.fractal.julia.generated.Cbd2013d7_0)
at org.objectweb.fractal.julia.generated.Cc2597297_0.startScanner(INTERFACE[DirectoryScanner])
at org.ow2.petals.jbi.management.autoload.AutoLoaderServiceImpl.start(AutoLoaderServiceImpl.java:221)
at org.ow2.petals.jbi.management.autoload.AutoLoaderServiceImpl.startFc(AutoLoaderServiceImpl.java)
at org.objectweb.fractal.julia.generated.Cbd2013d7_0.setFcContentState(BasicControllerMixin.java:8128)
at org.objectweb.fractal.julia.generated.Cbd2013d7_0.setFcStarted(BasicControllerMixin.java:8068)
- locked <0x00000000c038adc8> (a org.objectweb.fractal.julia.generated.Cbd2013d7_0)
at org.objectweb.fractal.julia.generated.C18c4c884_0.setFcStarted(INTERFACE[LifeCycleCoordinator])
at org.objectweb.fractal.julia.generated.C4eddf8e0_0.startFc$$0(BasicControllerMixin.java:4097)
at org.objectweb.fractal.julia.generated.C4eddf8e0_0.startFc(BasicControllerMixin.java:5095)
at org.objectweb.fractal.julia.generated.C18c4c884_0.startFc(INTERFACE[LifeCycleCoordinator])
at org.ow2.petals.kernel.server.FractalHelper.startComponent(FractalHelper.java:356)
at org.ow2.petals.kernel.server.PetalsServerImpl.startPetalsComposite(PetalsServerImpl.java:412)
at org.ow2.petals.kernel.server.PetalsServerImpl.start(PetalsServerImpl.java:186)
at org.ow2.petals.launcher.PetalsLauncher.launchPetalsServer(PetalsLauncher.java:154)
at org.ow2.petals.launcher.PetalsLauncher.main(PetalsLauncher.java:391)
{code}

*Solution*:
Update the ADL of the Fractal composite to [set the sub-components in the right order|#composite_startup].