|
Re: [TEXO] Touch ModelPackage [message #837370 is a reply to message #837357] |
Thu, 05 April 2012 15:33 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Gary,
Unfortunately, a model package is not initialized before it really gets touched, and it is not known in any registry if
it is not initialized.
It is not really possible in java to dynamically detect all available subclasses in all jar files. At least not without
doing jar-scanning, I know solutions like Weld from Jboss does these things. But I don't know if java standard this
(afaik it doesn't).
So instead of the nsuri in the configuration, I think a solution can be to use the full class name of the model package.
gr. Martin
On 04/05/2012 05:21 PM, Gary Godfrey wrote:
> Hi,
>
> Is it possible to dynamically determine which ModelPackage should be initialized? My application will support multiple
> models and depending on a configuration parameter I want to 'touch' the correct model.
>
> I know I can touch the model directly. e.g. LibraryModelPackage.initialize();
> How though do I use the NS_URI to wake up the relevant model for the current run. I have tried:
> ModelPackage mpack = ModelResolver.getInstance().getModelPackage("http:slashslashwww.foo.com/bar");
> The namespace being used matches the value in the TEXO generated ModelPackage class.
>
> Regards,
> Gary
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
Powered by
FUDForum. Page generated in 0.03036 seconds