Hi Dave,
The issue here is just that when you change from using a single binding
to using multiple bindings you need to change the form of the call to
the BindingDirectory.getFactory() method. The call with only a class
parameter expects one and only one binding to that class. Change to the
call that takes two parameters, the binding name and the class. Note,
though, that you only need to pass the binding name when *the particular
class you're passing is used in more than one binding*. If your bindings
are mostly using different classes (with only a few shared classes), you
can still use the single parameter call and just pass in one of the
distinct classes.
You're fine compiling multiple bindings separately as long as they don't
overlap on packages. If the same packages are used by more than one
binding you need to compile them at once. This is because JiBX deletes
unused code from the modified packages and classes each time it's run.
- Dennis
Irving, Dave wrote:
Hi,
We have many (about 30) core classes which are mapped (identically - via
rubbishy copy and paste) in several jibx binding files.
This is because we have several independent high-level services and do
not want one huge binding file:
The version of Jibx we are using does not let us define bindings in a
modular way - so we have to repeat each binding definition in each
separate binding file for these reused classes.
So far we've got away with it.
We use the ant task that ships with jibx to do our binding compilation
and run it once ** for each ** binding file.
This worked fine in the past - but it turns out that it wasn't mapping
just one of our classes correctly. We'd never used it in an XML document
until now - and it doesn't work (cant find the "xxx_access" class for
it).
After a look at some previous bug reports, it looks like you are
supposed to compile multiple bindings files in one hit. So I've changed
my build file to compile all 6 mapping files in one go using the ant
task.
This is not working at all: Every time I try to unmarshall Im told there
are "Multiple bindings defined for class xxx" in the form of a
JiBXException.
Can anyone help me out with how we need to compile / change our bindings
to get this to work?
Thanks in advance,
Dave
This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an intended
recipient then please promptly delete this e-mail and any attachment and all
copies and inform the sender. Thank you.
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&opÌk
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users