[snip]
Simon Laws wrote:
Alongside the separation of loading and resolution there is a more
simplistic point here I think about the current implementation to do with
how a composite location is specified. As users of SCADomain I think Mike
and I fell into the trap of believing that
SCADomain.newInstance("my.composite")
would load and resolve my.composite. When actually it means that the
runtime
will look for where my.composite is in the file system and load
everything
there.
How many files are loaded and when is an internal implementation detail,
newInstance("my.composite") means boot an SCA domain and include the
my.composite deployable composite in that domain; my.composite is
assumed to be in an SCA contribution, you can pass the location URL of
the contribution or let the runtime determine it automatically if its
root is on the current classloader's classpath.
Luciano has explained this in detail previously in this thread
(thanks Lucinao for taking the time to lay it out for us) and so is not a
suprise now.
In the case where contributions are coming from the file system how do
you
specify a specific contribution root when you only have relative paths to
play with? For example, if I had
somedir
mydir1/
my.composite
mydir2/
myother.composite
Where somedir is added to the classpath. How do I configure the
runtime to
load only the contribution starting at the mydir1 directory?
SCADomain.newInstance("my.composite") - won't find it as my.composite
is not
directly on the classpath
SCASCADomain.newInstance("mydir1/my.composite") - will find it but
deduces
that the root contribution dir is still somedir
SCASCADomain.newInstance("http://localhost",
"file:///c:/some/abolsute/path/somedir/mydir1/", "my.composite") - may
find
it (haven't tried) but contains absolute path information
Should I be relying on jar packaging or completely independent folder
structures with no common root on the classpath? Or is there a sneaky
way to
configure the location URL to make this work?
Can you try SCADomain.newInstance("http://whatever/uri", "mydir1",
"my.composite")?
--
Jean-Sebastien
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]