[jboss-dev-forums] [Embedded JBoss Development] - Re: ShrinkWrap - Descriptors

aslak do-not-reply at jboss.com
Mon Sep 28 09:35:20 EDT 2009


"epbernard" wrote : Another remark is that you can't compose multiple time 
  | (also I dont' understand why you have so many classes liek descriptor container, asserts etc)
  | 

You can and will be able to compose multiple times, it just not implemented at the moment.. 

The reason for all the different Containers is that the different Archive extensions like WebArchive and EnterpriseArchive all consist of types of Containers but not necessarily the same. ie, a WebArchive is a MetadataContainer + a ResourceContainer + a ClassContainer, while a EnterpriseArchive is a MetadataContainer + a ResourceContainer but does not support the ClassContainer..

A Asset is more or less just a internal abstraction over how to get/open the Stream of data to be stored at a specific path.

The Descriptor name just came in now, because i made it on the 'outside', this could in theory be a part of the WebContainer interface.

They all 'share' the same base Archive impl as a backing, so there is no problem having code like this:


  | WebArchive war = new WebArchiveImpl(new MemoryMapArchiveImpl());
  | EnterpriseArchive ear = new EnterpriseArchiveImpl(war.getInternalArchive());
  | 
or

  | EnterpriseArchive ear = new EnterpriseArchiveImpl(new MemoryMapArchiveImpl());
  | WebArchive war = ear.getWebModule("my.war");
  | 


This should of course be hidden away in some 'specializes' like api, but the point is the same.

The 'external' user api is still not 100%, that's why you see new WebArchiveImpl(new MemoryMapArchiveImpl()) etc..  :)

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4257370#4257370

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4257370



More information about the jboss-dev-forums mailing list