avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: [Fortress] Cyclic loops
Date Mon, 07 Jul 2003 13:52:27 GMT
Leif Mortenson wrote:
> I have been playing around with JMF off and on for a few years. This
> weekend I attempted to upgrade a project that I have had on the back
> burner for a few months to the latest and greatest Fortress and am
> running into a problem.
> 
> I have defined a series of Media Processors, and Capture Devices, each
> of which implement a TJMFDataSourceProvider interface. I have set up
> the Processor components so that their configurations each specify the
> name another TJMFDataSourceProvider data source provider. This worked
> great because I could easily chain together a series of data source
> providers
> from the config file without any special coding.
> 
> capture -> sharpen -> detect-motion -> output
> 
> The problem that I am now running into is because all of components
> implement the TJMFDataSourceProvider role and the processor
> components also depend on other TJMFDataSourceProvider implementations,
> fortress will throw a CyclicDependencyException because the cyclic checks
> are based on role rather than the actual component instances.

Hmmm.  This can be a problem as Cocoon has the same type of setup.
The issue of course is one of assembly--or ensuring that component
implementations are set correctly.

One way around it is to specify the longer form of ${ROLE}/${type}
which for the above could be translated to:

org.leif.mortenson.TJMFDataSourceProvider/capture
org.leif.mortenson.TJMFDataSourceProvider/sharpen
org.leif.mortenson.TJMFDataSourceProvider/detect-motion
org.leif.mortenson.TJMFDataSourceProvider/output

It would work, technically speaking.  It's not the best, but
for the short term it is OK.

Even better would be to turn off the cyclic dependency checking
with an option for meta-data generation.  At runtime when there
is proper assembly information available we can ensure that any
one path is not cyclic.

> I can't think of any way that Fortress could handle this any better because
> the actual instance is only known at run time from within the component as
> its configure method is running. I just wanted to get the thought of the
> possibility of applications out there in case anyone has any ideas.

WOuld the above help?


-- 

"They that give up essential liberty to obtain a little temporary safety
 deserve neither liberty nor safety."
                - Benjamin Franklin


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message