We are using Avalon - Excalibur/Fortress complete package.
At the time we started our project, this combination seemed to have the best support by the avalon community.


Dominique

Timothy Bennett wrote:

Niclas Hedhman wrote:

On Saturday 24 April 2004 05:33, Dominique Paquin wrote:

I need some pointers on best practices.



You didn;t mention the environment...


If it is Merlin I would strong recommend that each component is kept within its own Jar (or Maven artifact to be precise), since Merlin is capable of assembling applications from blocks that have the Maven identification and by giving one or more central repositories to look for those artifacts.

That means that your "application" could possibly be a matter of a few kilobytes of distributed material (block.xml, configuration overriders, bin/ and some of your own stuff), and share tons of Jars between applications.


Furthermore, if you are using Merlin, I highly suggest you take advantage of Merlin's block composition feature. This basically allows you to encapsulate a set of blocks (which itself it composed of one or more components) into a single functional entity as a sort of standalone sub-container. Composites can export one or more services to be used by a broader application.


Use the <include ...> directive which is described at:

http://avalon.apache.org/merlin/reference/containment/directives/include/index.html


and you can also check out the merlin tutorials on composition at:


http://avalon.apache.org/merlin/starting/advanced/composite.html

Note that compositions themselves contain their own internal block.xml which defines the classloader, assembly and configuration of the sub-container. In this way, a composite is very useful in building re-usable, self-contained, functional software entities.

Here's an example of a block.xml of very complicated application hosted in merlin that was greatly simplified due to Merlin's composite feature.

<container name="my-app">
<classloader>
<classpath>
<repository>
<!-- merlin database facility API -->
<resource id="avalon-db:avalon-db-api" version="0.9.0"/>
<!-- expose some application utility services -->
<resource id="my-app:my-app-utils-api" version="1.0"/>
<!-- expose the directory watchdog services -->
<resource id="my-app:my-app-watchdog-api" version="1.0"/>
<!-- expose security services -->
<resource id="my-app:my-app-security-api" version="0.9.0"/>
</repository>
</classpath>
</classloader>
<!-- Avalon/HSQLDB server facility -->
<include name="hsql-server" id="avalon-db:avalon-db-hsql" version="0.9.0"/>
<!-- Utility components, include database table creation -->
<include name="utilities" id="my-app:my-app-utils-impl" version="1.0.0"/>
<!-- Avalon-Jetty web server/servlet container composite -->
<include name="web-server" id="my-app:my-app-web-impl" version="1.0.0"/>
<!-- Directory Watchdog composite -->
<include name="watchdog" id="my-app:my-app-watchdog-impl" version="1.0.0"/>
<!-- Security Services implementation -->
<include name="security" id="my-app:my-app-security-impl" version="1.0.0"/>
</container>



Bye, bye to Jar Hell :o)


Indeed!

Timothy


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


-- Dominique Paquin Concepteur Logiciel / Software Designer _____________________________________________________________________ OKIOK Solutions de s�curit� d'entreprise et d'affaires �lectroniques Enterprise and e-business security solutions

Tel. : (450) 681.1681
http://www.okiok.com



This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary, confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender and erase this e-mail message immediately.


Le pr�sent message �lectronique (y compris les pi�ces qui y sont annex�es, le cas �ch�ant) s'adresse au destinataire indiqu� et peut contenir des renseignements de caract�re priv� ou confidentiel. Si vous n'�tes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire. Si ce message vous a �t� transmis par erreur, veuillez en informer l'exp�diteur et le supprimer imm�diatement.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to