cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <dani...@nada.kth.se>
Subject Re: Java components in blocks
Date Mon, 18 Apr 2005 17:07:55 GMT
Glen Ezkovich wrote:

>
> On Apr 18, 2005, at 7:05 AM, Daniel Fagerstrom wrote:
>
>>>
>>> The portal definition files define how individual portlets are 
>>> invoked and rendered.  As I stated before, ideally these would be 
>>> separate blocks. However, since many will contain java code, it 
>>> sounds like many portlets would have to be a block with a matching 
>>> bundle.
>>
>>
>> A block can contain code. It is just (at least in the first step) not 
>> allowed to expose components. So if the portlet components need to be 
>> accessible from other parts of the system you need both a bundle and 
>> a block. But if the components only are needed internally and the 
>> portlet can expose all its functionality as pipeline functionality, 
>> it is enough with a block.
>
>
> Sorry to be late to the party, but I was unsure where this discussion 
> was headed and choose to keep my mouth shut. I'm glad to see to that 
> blocks can have code again.;-)  I think the issue of exposing 
> components is a non issue.

Did you read 
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=111339143403364&w=2 ?

> We are after all talking about java byte code, if some one wants to 
> use the jar/class file it just needs to be on the classpath.

Sure, but what if two blocks contain different versions of a jar?

> The issue here is one of deployment, where to locate the class and 
> which ClassLoader will load the class. It seems to me that if we have 
> two component deployment levels, global and sitemap, we can pretty 
> much accomplish the same thing as exposing or not exposing components.

If all jars from all blocks are put in a global sitemap it just don't 
scale. It is hard enough to keep jars in different blocks in synch 
whithin the Cocoon SVN. When external developers start to develop and 
distribute their own blocks it will stop working.

Because of that classloader isolation is needed so that a block only is 
exposed to the classes it actually depend on from its parent 
classloader. And that is complicated stuff, if you don't think so you 
can take a look at kernel in whiteboard. Things get more complicated and 
creates IMO unnecessary dependencies between blocks when you combine it 
with sitemap functionallity. Because of that complexity Pier and I 
prefer to separate the problems.

/Daniel


Mime
View raw message