When jibx modifies a class's byte code it adds a string JiBX_bindingList 
field that specifies the fully qualified name of the generated binding 
factory.  So it does not matter which class you use for the looking up 
the BindingFactory. The binding factory contains information to 
marshall/unmarshall all the classes you have specified in the mapping 
files. Usually its a BindingFactory per project, is this not the case 
for you? You can split out your jibx mappings into multiple files using 
the include element. You need not get a binding directory each time. You 
need to keep a marshaller\unmarshaller per thread (works best if they 
are threadlocal variables) if your access is multithreaded.

cheers
Varghese

[EMAIL PROTECTED] wrote:
> Hi All,
>  
> I was after some advice on creating a generic marshaller/unmarshaller 
> using Jibx and specifically the BindFactory
>  
> Marshalling is fine as in this case I can take the passed in Object 
> and call getClass() for the BindFactory i.e
>  
> IBindingFactory fact = BindingDirectory. getFactory(obj.getClass());
>  
> For UnMarshalling, I don't know what the xml contains to know what 
> Object Model to create from it. For the different object models, there 
> is going to be a different bind file. Can multiple classes be registered?
>  
> Also Each time I want to marshal/unmarshal, do I need to do a 
> BindingDirectory. getFactory?
>  
> Any advice is welcome
>  
> Regards,
>  
>  
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ------------------------------------------------------------------------
>
> _______________________________________________
> jibx-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>   


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to