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.
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.
I was able to get my application working by removing the dependency
declaration from the processor components that was causing the cyclic
error. The processors then look up the components anyway. Things work
now, but I don't really like it as the loop is still there. If the
container ever
gets stricter about what components it allows to be returned for a given
component, this would break again.
Cheers,
Leif
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]