Re: Using two mapping file in the same project ?

2006-05-31 Thread Armin Waibel
Hi, ABOU LINA wrote: It have a big impact !!! ; beacause in DTD they are lot of initialisation (default value) so here i tried all solutions :( if you can send me a example that work , i will be greatfull I just checked in a test MetadataTest#testReadRepository() which use a InputStrea

Re: Using two mapping file in the same project ?

2006-05-31 Thread ABOU LINA
It have a big impact !!! ; beacause in DTD they are lot of initialisation (default value) so here i tried all solutions :( if you can send me a example that work , i will be greatfull thx On 5/31/06, ABOU LINA <[EMAIL PROTECTED]> wrote: Hi, i need to use InputStream so i tested a lot but

Re: Using two mapping file in the same project ?

2006-05-31 Thread ABOU LINA
Hi, i need to use InputStream so i tested a lot but i got the same error repository.dtd not found. so i delete the DOCTYPE from the secondary repository file it work without problem. In your opinion is that a good things or this solution will have any impact on my application . ??? thx On 5

Re: Using two mapping file in the same project ?

2006-05-25 Thread Armin Waibel
ABOU LINA wrote: i tested the two way but i got the same problem : dtd not found . InputStream input = this.getClass ().getClassLoader().getResourceAsStream(descriptor2); MetadataManager mm = MetadataManager.getInstance(); mm.setEnablePerThreadChanges(true);

Re: Using two mapping file in the same project ?

2006-05-25 Thread ABOU LINA
i tested the two way but i got the same problem : dtd not found . InputStream input = this.getClass ().getClassLoader().getResourceAsStream(descriptor2); MetadataManager mm = MetadataManager.getInstance(); mm.setEnablePerThreadChanges(true); DescriptorR

Re: Using two mapping file in the same project ?

2006-05-24 Thread Armin Waibel
ABOU LINA wrote: is in the same place : project-name/appli-conf / mappin2.xml , repository.dtd and the project-name/appli-conf is in the classpath. the mappin2.xml is retrieved with success but the dtd is not found and ojb try to found it from c:\eclipse\ the base directory. !!! locally I

Re: Using two mapping file in the same project ?

2006-05-24 Thread ABOU LINA
is in the same place : project-name/appli-conf / mappin2.xml , repository.dtd and the project-name/appli-conf is in the classpath. the mappin2.xml is retrieved with success but the dtd is not found and ojb try to found it from c:\eclipse\ the base directory. !!! On 5/24/06, Armin Waibel <[

Re: Using two mapping file in the same project ?

2006-05-24 Thread Armin Waibel
ABOU LINA wrote: I have a problem to load the new profile : 1. i put the mapping2.xml in the classpath of the project 2. i use the mm.readDescriptorRepository(InputStream map) insteadof (String map) i get : java.io.FileNoteFound : c:\eclipse\repository.dtd ... ! if i used InputStream is bea

Re: Using two mapping file in the same project ?

2006-05-24 Thread ABOU LINA
I have a problem to load the new profile : 1. i put the mapping2.xml in the classpath of the project 2. i use the mm.readDescriptorRepository(InputStream map) insteadof (String map) i get : java.io.FileNoteFound : c:\eclipse\repository.dtd ... ! if i used InputStream is beacause i want to ma

Re: Using two mapping file in the same project ?

2006-05-24 Thread Armin Waibel
ABOU LINA wrote: That's very good idea using threadLocal :) , thx very much about these informations :). My pleasure! All code for "metadata profiles" (by using ThreadLocale) is handled by class MetadataManager. If you have problems using "metadata profiles" look at this class. http://svn.a

Re: Using two mapping file in the same project ?

2006-05-24 Thread ABOU LINA
That's very good idea using threadLocal :) , thx very much about these informations :). On 5/24/06, Armin Waibel <[EMAIL PROTECTED]> wrote: ABOU LINA wrote: > thx for your reply . > > looking the example : > > // get MetadataManager instance (1) > MetadataManager mm = MetadataManager.getInsta

Re: Using two mapping file in the same project ?

2006-05-24 Thread Armin Waibel
ABOU LINA wrote: thx for your reply . looking the example : // get MetadataManager instance (1) > MetadataManager mm = MetadataManager.getInstance(); // enable per thread mode if not done before mm.setEnablePerThreadChanges(true); (2) > // Load additional object metadata by parsing an repo

Re: Using two mapping file in the same project ?

2006-05-24 Thread ABOU LINA
thx for your reply . looking the example : // get MetadataManager instance MetadataManager mm = MetadataManager.getInstance(); // enable per thread mode if not done before mm.setEnablePerThreadChanges(true); // Load additional object metadata by parsing an repository file DescriptorRepository

Re: Using two mapping file in the same project ?

2006-05-24 Thread Armin Waibel
Hi, ABOU LINA wrote: Hi; i have two mapping file : repository1.xml and repository2.xml. the difference between these two file are the value of auto-* [auto-retrieve, auto-update ..] ; at runtime sometimes i need to use repository1.xml and somtimes the repository2.xml . what is the best and op

Using two mapping file in the same project ?

2006-05-24 Thread ABOU LINA
Hi; i have two mapping file : repository1.xml and repository2.xml. the difference between these two file are the value of auto-* [auto-retrieve, auto-update ..] ; at runtime sometimes i need to use repository1.xml and somtimes the repository2.xml . what is the best and optimal solution about