Re: [Hibernate] Configuration artifact precedence

2005-08-18 Thread Max Rydahl Andersen

But the
drawback is that I need to delay all the binding operation till the
actual buildSessionFactory() launch, and thus keeping a list of classes
and Document to be processed. This consumes more memory (higher peak
until the buildSessionFactory call), but its probably not a show stopper.


That would be a pretty *big* memory peak - any reason why we just not take
the first thing that hibernate gets configured with instead of this magic ?


Well, just to let you know and to help me to find a good configuration
property name.


What kind of values does it take ?



---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


RE: [Hibernate] Configuration artifact precedence

2005-08-18 Thread Gavin King



I don't understand what is the problem you are trying to 
solve?


From: 
[EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of 
Emmanuel BernardSent: Thursday, 18 August 2005 8:54 
PMTo: hibernate-devel@lists.sourceforge.netSubject: 
[Hibernate] Configuration artifact precedence
Artifacts (ie hbm files and annotated classes) were not able to point 
to the same entity-name (== class name for annotations) in an 
AnnotationConfiguration object: a duplicate mapping exception were raised. 
I've added an hibernate.artifact property (we need to find a good 
name), to allow precedence from one artifact over an 
other.hibernate.artifact hbm, class (default)   
will prioritize hbm files over annotated classes for the same 
entity-name.hibernate.artifact class, hbm   will 
prioritize annotated classes over hbm files for the same 
entity-name.hibernate.artifact class   will ignore 
any hbm file passed to AnnotationConfigurationThis is a much more 
powerful version of hibernate.archive (slightly diff semantic but same 
final goal, I'll remove hibernate.archive).There are a limitation though, 
you cannot mix annotated classes and hbm files in a mapped class 
hierarchy.I'll add ejb3xml when implemented. I think this concept might 
come to Hibernate core at some point (at least the infrastructure code). But the 
drawback is that I need to delay all the binding operation till the actual 
buildSessionFactory() launch, and thus keeping a list of classes and Document to 
be processed. This consumes more memory (higher peak until the 
buildSessionFactory call), but its probably not a show stopper.Well, 
just to let you know and to help me to find a good configuration property 
name.


Re: [Hibernate] Configuration artifact precedence

2005-08-18 Thread Max Rydahl Andersen


When the users has both hbm.xml and annotations in his project (most  
likely doing their migration phase).


I don't get why it needs special attention (besides just take what comes  
first), but if there is
a reason for it then it sounds like hibernate.mappingprecedence would be a  
better name.


But I don't like this requirment of queuing up all the dom4js to be able  
to decide it - will just

give us trouble I think.

/max



I don't understand what is the problem you are trying to solve?



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Emmanuel Bernard
Sent: Thursday, 18 August 2005 8:54 PM
To: hibernate-devel@lists.sourceforge.net
Subject: [Hibernate] Configuration artifact precedence


Artifacts (ie hbm files and annotated classes) were not able to point to
the same entity-name (== class name for annotations) in an
AnnotationConfiguration object: a duplicate mapping exception were
raised.
I've added an hibernate.artifact property (we need to find a good name),
to allow precedence from one artifact over an other.

hibernate.artifact hbm, class (default)
   will prioritize hbm files over annotated classes for the same
entity-name.

hibernate.artifact class, hbm
   will prioritize annotated classes over hbm files for the same
entity-name.

hibernate.artifact class
   will ignore any hbm file passed to AnnotationConfiguration

This is a much more powerful version of hibernate.archive (slightly diff
semantic but same final goal, I'll remove hibernate.archive).
There are a limitation though, you cannot mix annotated classes and hbm
files in a mapped class hierarchy.

I'll add ejb3xml when implemented. I think this concept might come to
Hibernate core at some point (at least the infrastructure code). But the
drawback is that I need to delay all the binding operation till the
actual buildSessionFactory() launch, and thus keeping a list of classes
and Document to be processed. This consumes more memory (higher peak
until the buildSessionFactory call), but its probably not a show
stopper.

Well, just to let you know and to help me to find a good configuration
property name.






---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] Configuration artifact precedence

2005-08-19 Thread Emmanuel Bernard



Max Rydahl Andersen wrote:


But the
drawback is that I need to delay all the binding operation till the
actual buildSessionFactory() launch, and thus keeping a list of classes
and Document to be processed. This consumes more memory (higher peak
until the buildSessionFactory call), but its probably not a show 
stopper.



That would be a pretty *big* memory peak - any reason why we just not 
take
the first thing that hibernate gets configured with instead of this 
magic ?


We could hardcode that, but there is no reason to prefer hbm over 
ejb3xml for example.





Well, just to let you know and to help me to find a good configuration
property name.



What kind of values does it take ?







---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] Configuration artifact precedence

2005-08-19 Thread Max Rydahl Andersen


We could hardcode that, but there is no reason to prefer hbm over  
ejb3xml for example.


when will we ever have a user add both a hbm.xml AND ejb3xml file ?
And if we have - again, why not just choose the first one that gets added
to the configuration by the user ?

/max




Well, just to let you know and to help me to find a good configuration
property name.



What kind of values does it take ?







---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle  
Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing &  
QA

Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel





---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] Configuration artifact precedence

2005-08-19 Thread Emmanuel Bernard
Duplicate mapping exceptions while detecting artifacts in a .par file. 
Esp on smooth migration from hbm files to annotated classes.


Gavin King wrote:


I don't understand what is the problem you are trying to solve?


*From:* [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] *On Behalf Of 
*Emmanuel Bernard

*Sent:* Thursday, 18 August 2005 8:54 PM
*To:* hibernate-devel@lists.sourceforge.net
*Subject:* [Hibernate] Configuration artifact precedence

Artifacts (ie hbm files and annotated classes) were not able to point 
to the same entity-name (== class name for annotations) in an 
AnnotationConfiguration object: a duplicate mapping exception were 
raised.
I've added an /hibernate.artifact/ property (we need to find a good 
name), to allow precedence from one artifact over an other.


/hibernate.artifact hbm, class/ (default)
   will prioritize hbm files over annotated classes for the same 
entity-name.


/hibernate.artifact class, hbm/
   will prioritize annotated classes over hbm files for the same 
entity-name.


/hibernate.artifact class/
   will ignore any hbm file passed to AnnotationConfiguration

This is a much more powerful version of /hibernate.archive /(slightly 
diff semantic but same final goal, I'll remove hibernate.archive).
There are a limitation though, you cannot mix annotated classes and 
hbm files in a mapped class hierarchy.


I'll add ejb3xml when implemented. I think this concept might come to 
Hibernate core at some point (at least the infrastructure code). But 
the drawback is that I need to delay all the binding operation till 
the actual buildSessionFactory() launch, and thus keeping a list of 
classes and Document to be processed. This consumes more memory 
(higher peak until the buildSessionFactory call), but its probably not 
a show stopper.


Well, just to let you know and to help me to find a good configuration 
property name.





---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] Configuration artifact precedence

2005-08-19 Thread Emmanuel Bernard



Max Rydahl Andersen wrote:



That would be a pretty *big* memory peak


13k per Document object => 13Mo for 1000 docs. Do you want to maintain 
manually a 1000 file list in your hibernate.cfg.xml or persistence.xml 
to save 13Mo temporary used!





---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] Configuration artifact precedence

2005-08-19 Thread Emmanuel Bernard
When Christian migrate CaveatEmptor to HEM, the encounters issues with 
the discovery mechanism, because there were no notion of precedence. I 
think the idea of configurable precedence came from here. I have to 
admit I liked the idea to ease migrations. It's a bit like the BIOS boot 
ordering, you never used it, until you have to.
The problem is that I discover them in the jar file, they are not added 
by the user. So I have no idea of the ordering.



when will we ever have a user add both a hbm.xml AND ejb3xml file ?
And if we have - again, why not just choose the first one that gets added
to the configuration by the user ?

/max




Well, just to let you know and to help me to find a good configuration
property name.




What kind of values does it take ?







---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle  
Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing 
&  QA
Security * Process Improvement & Measurement * 
http://www.sqe.com/bsce5sf

___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel










---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] Configuration artifact precedence

2005-08-19 Thread Max Rydahl Andersen


well I guess its the lesser of two evils ;)




Max Rydahl Andersen wrote:



That would be a pretty *big* memory peak


13k per Document object => 13Mo for 1000 docs. Do you want to maintain  
manually a 1000 file list in your hibernate.cfg.xml or persistence.xml  
to save 13Mo temporary used!








---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] Configuration artifact precedence

2005-08-19 Thread Max Rydahl Andersen


Yes I know the problem - and I also didn't find any hint in the spec about
how they plan to define the precedence with respect to ejb3 xml in  
relation to annotations...any news on that ?


And I guess having precedence as something you can change to allow for  
easier migration would be a good thing.


As it is now Annotations/ejb3xml wins first - correct ?

But couldn't we just say hbm.xml wins first and then users can remove the  
hbm.xml when they want the annotations
to take over ? Or will that not have any affect because the annotation  
process occurs before users get the chance to

add their hbm.xml files...

Just thinking out loud...

/max


When Christian migrate CaveatEmptor to HEM, the encounters issues with  
the discovery mechanism, because there were no notion of precedence. I  
think the idea of configurable precedence came from here. I have to  
admit I liked the idea to ease migrations. It's a bit like the BIOS boot  
ordering, you never used it, until you have to.
The problem is that I discover them in the jar file, they are not added  
by the user. So I have no idea of the ordering.



when will we ever have a user add both a hbm.xml AND ejb3xml file ?
And if we have - again, why not just choose the first one that gets  
added

to the configuration by the user ?

/max



Well, just to let you know and to help me to find a good  
configuration

property name.




What kind of values does it take ?







---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle   
Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing  
&  QA
Security * Process Improvement & Measurement *  
http://www.sqe.com/bsce5sf

___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel













---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] Configuration artifact precedence

2005-08-19 Thread Jordan Laughlin
Wouldn't it make sense for it to throw an exception if the mappings are 
different, otherwise who cares? In migrating, if one
makes a mistake it would be good to know - "xxx has two different 
configurations" and not pick one which has precedence (I'm coming from the 
standpoint of someone who may be migrating soon). Unless, of course, the 
configuration artifacts are always different between those mapped by 
Annotations/ejb3xml and those mapped by hbm.xml. It would also definately 
make sense if this was configurable.


I'm thinking out loud too :P

-JL

- Original Message - 
From: "Max Rydahl Andersen" <[EMAIL PROTECTED]>

To: "Emmanuel Bernard" <[EMAIL PROTECTED]>
Cc: 
Sent: Friday, August 19, 2005 5:23 AM
Subject: Re: [Hibernate] Configuration artifact precedence




Yes I know the problem - and I also didn't find any hint in the spec about
how they plan to define the precedence with respect to ejb3 xml in 
relation to annotations...any news on that ?


And I guess having precedence as something you can change to allow for 
easier migration would be a good thing.


As it is now Annotations/ejb3xml wins first - correct ?

But couldn't we just say hbm.xml wins first and then users can remove the 
hbm.xml when they want the annotations
to take over ? Or will that not have any affect because the annotation 
process occurs before users get the chance to

add their hbm.xml files...

Just thinking out loud...

/max


When Christian migrate CaveatEmptor to HEM, the encounters issues with 
the discovery mechanism, because there were no notion of precedence. I 
think the idea of configurable precedence came from here. I have to 
admit I liked the idea to ease migrations. It's a bit like the BIOS boot 
ordering, you never used it, until you have to.
The problem is that I discover them in the jar file, they are not added 
by the user. So I have no idea of the ordering.



when will we ever have a user add both a hbm.xml AND ejb3xml file ?
And if we have - again, why not just choose the first one that gets 
added

to the configuration by the user ?

/max



Well, just to let you know and to help me to find a good 
configuration

property name.




What kind of values does it take ?







---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing 
&  QA
Security * Process Improvement & Measurement * 
http://www.sqe.com/bsce5sf

___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel













---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
Practices

Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel





---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


RE: [Hibernate] Configuration artifact precedence

2005-08-19 Thread Gavin King
I must admit, that this makes sense to *me*
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jordan
Laughlin
Sent: Friday, 19 August 2005 2:46 PM
To: hibernate-devel@lists.sourceforge.net
Subject: Re: [Hibernate] Configuration artifact precedence

Wouldn't it make sense for it to throw an exception if the mappings are
different, otherwise who cares? In migrating, if one makes a mistake it
would be good to know - "xxx has two different configurations" and not
pick one which has precedence (I'm coming from the standpoint of someone
who may be migrating soon). Unless, of course, the configuration
artifacts are always different between those mapped by
Annotations/ejb3xml and those mapped by hbm.xml. It would also
definately make sense if this was configurable.

I'm thinking out loud too :P

-JL

- Original Message -
From: "Max Rydahl Andersen" <[EMAIL PROTECTED]>
To: "Emmanuel Bernard" <[EMAIL PROTECTED]>
Cc: 
Sent: Friday, August 19, 2005 5:23 AM
Subject: Re: [Hibernate] Configuration artifact precedence


>
> Yes I know the problem - and I also didn't find any hint in the spec
about
> how they plan to define the precedence with respect to ejb3 xml in 
> relation to annotations...any news on that ?
>
> And I guess having precedence as something you can change to allow for

> easier migration would be a good thing.
>
> As it is now Annotations/ejb3xml wins first - correct ?
>
> But couldn't we just say hbm.xml wins first and then users can remove
the 
> hbm.xml when they want the annotations
> to take over ? Or will that not have any affect because the annotation

> process occurs before users get the chance to
> add their hbm.xml files...
>
> Just thinking out loud...
>
> /max
>
>
>> When Christian migrate CaveatEmptor to HEM, the encounters issues
with 
>> the discovery mechanism, because there were no notion of precedence.
I 
>> think the idea of configurable precedence came from here. I have to 
>> admit I liked the idea to ease migrations. It's a bit like the BIOS
boot 
>> ordering, you never used it, until you have to.
>> The problem is that I discover them in the jar file, they are not
added 
>> by the user. So I have no idea of the ordering.
>>
>>> when will we ever have a user add both a hbm.xml AND ejb3xml file ?
>>> And if we have - again, why not just choose the first one that gets 
>>> added
>>> to the configuration by the user ?
>>>
>>> /max
>>>
>>>>>
>>>>>> Well, just to let you know and to help me to find a good 
>>>>>> configuration
>>>>>> property name.
>>>>>
>>>>>
>>>>>
>>>>> What kind of values does it take ?
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> ---
>>>> SF.Net email is Sponsored by the Better Software Conference & EXPO
>>>> September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
>>>> Practices
>>>> Agile & Plan-Driven Development * Managing Projects & Teams *
Testing 
>>>> &  QA
>>>> Security * Process Improvement & Measurement * 
>>>> http://www.sqe.com/bsce5sf
>>>> ___
>>>> hibernate-devel mailing list
>>>> hibernate-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/hibernate-devel
>>>
>>>
>>>
>>>
>>>
>>
>
>
>
>
> ---
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
> Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing
& QA
> Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
> ___
> hibernate-devel mailing list
> hibernate-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hibernate-devel
> 



---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing &
QA
Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] Configuration artifact precedence

2005-08-19 Thread Emmanuel Bernard
There is no hbm/classes listing needed in a persistence archive, no 
possibility to comment them.


Max Rydahl Andersen wrote:



It's a matter of taste, but keeping your hbm files in the same place  
they were make a lot of sens in a migration process. from a 
technical  POV, there is no longer hardwire processing order.



Its a matter of commenting it out from the hibernate.cfg.xml or your 
code  - correct ?


(unless you are thinking about the addJar() facility)

/max



Just thinking out loud...

/max


When Christian migrate CaveatEmptor to HEM, the encounters issues  
with  the discovery mechanism, because there were no notion of  
precedence. I  think the idea of configurable precedence came from  
here. I have to  admit I liked the idea to ease migrations. It's a 
bit  like the BIOS boot  ordering, you never used it, until you 
have to.
The problem is that I discover them in the jar file, they are not  
added  by the user. So I have no idea of the ordering.



when will we ever have a user add both a hbm.xml AND ejb3xml file ?
And if we have - again, why not just choose the first one that 
gets   added

to the configuration by the user ?

/max



Well, just to let you know and to help me to find a good   
configuration

property name.






What kind of values does it take ?







---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development 
LifecyclePractices
Agile & Plan-Driven Development * Managing Projects & Teams *  
Testing  &  QA
Security * Process Improvement & Measurement *   
http://www.sqe.com/bsce5sf

___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel















---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle  
Practices
Agile & Plan-Driven Development * Managing Projects & Teams * 
Testing &  QA
Security * Process Improvement & Measurement *  
http://www.sqe.com/bsce5sf

___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel













---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] Configuration artifact precedence

2005-08-19 Thread Emmanuel Bernard
And how do you compare a bunch (think inheritance) of hbms and a bunch 
of annotated classes? Even a single cfg file and an annotated class? By 
creating a specific comparison code? By creating the metamodel for both 
and comparing them? All that work for an exception...


Gavin King wrote:


I must admit, that this makes sense to *me*


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jordan
Laughlin
Sent: Friday, 19 August 2005 2:46 PM
To: hibernate-devel@lists.sourceforge.net
Subject: Re: [Hibernate] Configuration artifact precedence

Wouldn't it make sense for it to throw an exception if the mappings are
different, otherwise who cares? In migrating, if one makes a mistake it
would be good to know - "xxx has two different configurations" and not
pick one which has precedence (I'm coming from the standpoint of someone
who may be migrating soon). Unless, of course, the configuration
artifacts are always different between those mapped by
Annotations/ejb3xml and those mapped by hbm.xml. It would also
definately make sense if this was configurable.

I'm thinking out loud too :P

-JL

- Original Message -
From: "Max Rydahl Andersen" <[EMAIL PROTECTED]>
To: "Emmanuel Bernard" <[EMAIL PROTECTED]>
Cc: 
Sent: Friday, August 19, 2005 5:23 AM
Subject: Re: [Hibernate] Configuration artifact precedence


 


Yes I know the problem - and I also didn't find any hint in the spec
   


about
 

how they plan to define the precedence with respect to ejb3 xml in 
relation to annotations...any news on that ?


And I guess having precedence as something you can change to allow for
   



 


easier migration would be a good thing.

As it is now Annotations/ejb3xml wins first - correct ?

But couldn't we just say hbm.xml wins first and then users can remove
   

the 
 


hbm.xml when they want the annotations
to take over ? Or will that not have any affect because the annotation
   



 


process occurs before users get the chance to
add their hbm.xml files...

Just thinking out loud...

/max


   


When Christian migrate CaveatEmptor to HEM, the encounters issues
 

with 
 


the discovery mechanism, because there were no notion of precedence.
 

I 
 

think the idea of configurable precedence came from here. I have to 
admit I liked the idea to ease migrations. It's a bit like the BIOS
 

boot 
 


ordering, you never used it, until you have to.
The problem is that I discover them in the jar file, they are not
 

added 
 


by the user. So I have no idea of the ordering.

 


when will we ever have a user add both a hbm.xml AND ejb3xml file ?
And if we have - again, why not just choose the first one that gets 
added

to the configuration by the user ?

/max

   

Well, just to let you know and to help me to find a good 
configuration

property name.
 



What kind of values does it take ?



   



---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
Practices

Agile & Plan-Driven Development * Managing Projects & Teams *
 

Testing 
 


&  QA
Security * Process Improvement & Measurement * 
http://www.sqe.com/bsce5sf

___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel
 





   




---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
Practices

Agile & Plan-Driven Development * Managing Projects & Teams * Testing
   


& QA
 


Security * Process Improvement & Measurement *
   


http://www.sqe.com/bsce5sf
 


___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

   





---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing &
QA
Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testin

RE: [Hibernate] Configuration artifact precedence

2005-08-19 Thread Gavin King
Well, Hibernate will throw an exception if you try to map the same class
twice to the same entityName. 

-Original Message-
From: Emmanuel Bernard [mailto:[EMAIL PROTECTED] 
Sent: Friday, 19 August 2005 5:22 PM
To: Gavin King
Cc: Jordan Laughlin; hibernate-devel@lists.sourceforge.net
Subject: Re: [Hibernate] Configuration artifact precedence

And how do you compare a bunch (think inheritance) of hbms and a bunch
of annotated classes? Even a single cfg file and an annotated class? By
creating a specific comparison code? By creating the metamodel for both
and comparing them? All that work for an exception...

Gavin King wrote:

>I must admit, that this makes sense to *me*
> 
>
>-Original Message-
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] On Behalf Of 
>Jordan Laughlin
>Sent: Friday, 19 August 2005 2:46 PM
>To: hibernate-devel@lists.sourceforge.net
>Subject: Re: [Hibernate] Configuration artifact precedence
>
>Wouldn't it make sense for it to throw an exception if the mappings are

>different, otherwise who cares? In migrating, if one makes a mistake it

>would be good to know - "xxx has two different configurations" and not 
>pick one which has precedence (I'm coming from the standpoint of 
>someone who may be migrating soon). Unless, of course, the 
>configuration artifacts are always different between those mapped by 
>Annotations/ejb3xml and those mapped by hbm.xml. It would also 
>definately make sense if this was configurable.
>
>I'm thinking out loud too :P
>
>-JL
>
>- Original Message -
>From: "Max Rydahl Andersen" <[EMAIL PROTECTED]>
>To: "Emmanuel Bernard" <[EMAIL PROTECTED]>
>Cc: 
>Sent: Friday, August 19, 2005 5:23 AM
>Subject: Re: [Hibernate] Configuration artifact precedence
>
>
>  
>
>>Yes I know the problem - and I also didn't find any hint in the spec
>>
>>
>about
>  
>
>>how they plan to define the precedence with respect to ejb3 xml in 
>>relation to annotations...any news on that ?
>>
>>And I guess having precedence as something you can change to allow for
>>
>>
>
>  
>
>>easier migration would be a good thing.
>>
>>As it is now Annotations/ejb3xml wins first - correct ?
>>
>>But couldn't we just say hbm.xml wins first and then users can remove
>>
>>
>the
>  
>
>>hbm.xml when they want the annotations to take over ? Or will that not

>>have any affect because the annotation
>>
>>
>
>  
>
>>process occurs before users get the chance to add their hbm.xml 
>>files...
>>
>>Just thinking out loud...
>>
>>/max
>>
>>
>>
>>
>>>When Christian migrate CaveatEmptor to HEM, the encounters issues
>>>  
>>>
>with
>  
>
>>>the discovery mechanism, because there were no notion of precedence.
>>>  
>>>
>I
>  
>
>>>think the idea of configurable precedence came from here. I have to 
>>>admit I liked the idea to ease migrations. It's a bit like the BIOS
>>>  
>>>
>boot
>  
>
>>>ordering, you never used it, until you have to.
>>>The problem is that I discover them in the jar file, they are not
>>>  
>>>
>added
>  
>
>>>by the user. So I have no idea of the ordering.
>>>
>>>  
>>>
>>>>when will we ever have a user add both a hbm.xml AND ejb3xml file ?
>>>>And if we have - again, why not just choose the first one that gets 
>>>>added to the configuration by the user ?
>>>>
>>>>/max
>>>>
>>>>
>>>>
>>>>>>>Well, just to let you know and to help me to find a good 
>>>>>>>configuration property name.
>>>>>>>  
>>>>>>>
>>>>>>
>>>>>>What kind of values does it take ?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>---
>>>>>SF.Net email is Sponsored by the Better Software Conference & EXPO 
>>>>>September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
>>>>>Practices Agile & Plan-Driven Development * Managing Projects & 
>>>>>Teams *
>>>>>  
>>>>>
>Testing
>  
>
>>>>>&  QA
>>>>>Security * Proces

Re: [Hibernate] Configuration artifact precedence

2005-08-19 Thread Jordan Laughlin
Well I guess if it's too difficult or slow to compare them, then issuing a 
warning along with the action Hibernate took (configurable somewhere) seems 
fine.


-JL

- Original Message - 
From: "Emmanuel Bernard" <[EMAIL PROTECTED]>

To: "Gavin King" <[EMAIL PROTECTED]>
Cc: "Jordan Laughlin" <[EMAIL PROTECTED]>; 


Sent: Friday, August 19, 2005 2:21 PM
Subject: Re: [Hibernate] Configuration artifact precedence


And how do you compare a bunch (think inheritance) of hbms and a bunch of 
annotated classes? Even a single cfg file and an annotated class? By 
creating a specific comparison code? By creating the metamodel for both 
and comparing them? All that work for an exception...


Gavin King wrote:


I must admit, that this makes sense to *me*

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jordan
Laughlin
Sent: Friday, 19 August 2005 2:46 PM
To: hibernate-devel@lists.sourceforge.net
Subject: Re: [Hibernate] Configuration artifact precedence

Wouldn't it make sense for it to throw an exception if the mappings are
different, otherwise who cares? In migrating, if one makes a mistake it
would be good to know - "xxx has two different configurations" and not
pick one which has precedence (I'm coming from the standpoint of someone
who may be migrating soon). Unless, of course, the configuration
artifacts are always different between those mapped by
Annotations/ejb3xml and those mapped by hbm.xml. It would also
definately make sense if this was configurable.

I'm thinking out loud too :P

-JL

- Original Message -
From: "Max Rydahl Andersen" <[EMAIL PROTECTED]>
To: "Emmanuel Bernard" <[EMAIL PROTECTED]>
Cc: 
Sent: Friday, August 19, 2005 5:23 AM
Subject: Re: [Hibernate] Configuration artifact precedence




Yes I know the problem - and I also didn't find any hint in the spec


about

how they plan to define the precedence with respect to ejb3 xml in 
relation to annotations...any news on that ?


And I guess having precedence as something you can change to allow for





easier migration would be a good thing.

As it is now Annotations/ejb3xml wins first - correct ?

But couldn't we just say hbm.xml wins first and then users can remove


the

hbm.xml when they want the annotations
to take over ? Or will that not have any affect because the annotation





process occurs before users get the chance to
add their hbm.xml files...

Just thinking out loud...

/max




When Christian migrate CaveatEmptor to HEM, the encounters issues


with

the discovery mechanism, because there were no notion of precedence.


I
think the idea of configurable precedence came from here. I have to 
admit I liked the idea to ease migrations. It's a bit like the BIOS



boot

ordering, you never used it, until you have to.
The problem is that I discover them in the jar file, they are not


added

by the user. So I have no idea of the ordering.



when will we ever have a user add both a hbm.xml AND ejb3xml file ?
And if we have - again, why not just choose the first one that gets 
added

to the configuration by the user ?

/max


Well, just to let you know and to help me to find a good 
configuration

property name.



What kind of values does it take ?






---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
Practices

Agile & Plan-Driven Development * Managing Projects & Teams *


Testing

&  QA
Security * Process Improvement & Measurement * 
http://www.sqe.com/bsce5sf

___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel









---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
Practices

Agile & Plan-Driven Development * Managing Projects & Teams * Testing


& QA


Security * Process Improvement & Measurement *


http://www.sqe.com/bsce5sf


___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel






---
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing &
QA
Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.so

Re: [Hibernate] Configuration artifact precedence

2005-08-19 Thread Emmanuel Bernard

Then you reduce the usability of auto discovery.

Gavin King wrote:


Well, Hibernate will throw an exception if you try to map the same class
twice to the same entityName. 


-Original Message-
From: Emmanuel Bernard [mailto:[EMAIL PROTECTED] 
Sent: Friday, 19 August 2005 5:22 PM

To: Gavin King
Cc: Jordan Laughlin; hibernate-devel@lists.sourceforge.net
Subject: Re: [Hibernate] Configuration artifact precedence

And how do you compare a bunch (think inheritance) of hbms and a bunch
of annotated classes? Even a single cfg file and an annotated class? By
creating a specific comparison code? By creating the metamodel for both
and comparing them? All that work for an exception...

Gavin King wrote:

 


I must admit, that this makes sense to *me*


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of 
Jordan Laughlin

Sent: Friday, 19 August 2005 2:46 PM
To: hibernate-devel@lists.sourceforge.net
Subject: Re: [Hibernate] Configuration artifact precedence

Wouldn't it make sense for it to throw an exception if the mappings are
   



 


different, otherwise who cares? In migrating, if one makes a mistake it
   



 

would be good to know - "xxx has two different configurations" and not 
pick one which has precedence (I'm coming from the standpoint of 
someone who may be migrating soon). Unless, of course, the 
configuration artifacts are always different between those mapped by 
Annotations/ejb3xml and those mapped by hbm.xml. It would also 
definately make sense if this was configurable.


I'm thinking out loud too :P

-JL

- Original Message -
From: "Max Rydahl Andersen" <[EMAIL PROTECTED]>
To: "Emmanuel Bernard" <[EMAIL PROTECTED]>
Cc: 
Sent: Friday, August 19, 2005 5:23 AM
Subject: Re: [Hibernate] Configuration artifact precedence




   


Yes I know the problem - and I also didn't find any hint in the spec
  

 


about


   

how they plan to define the precedence with respect to ejb3 xml in 
relation to annotations...any news on that ?


And I guess having precedence as something you can change to allow for
  

 




   


easier migration would be a good thing.

As it is now Annotations/ejb3xml wins first - correct ?

But couldn't we just say hbm.xml wins first and then users can remove
  

 


the


   


hbm.xml when they want the annotations to take over ? Or will that not
 



 


have any affect because the annotation
  

 




   

process occurs before users get the chance to add their hbm.xml 
files...


Just thinking out loud...

/max


  

 


When Christian migrate CaveatEmptor to HEM, the encounters issues


   


with


   


the discovery mechanism, because there were no notion of precedence.


   


I


   

think the idea of configurable precedence came from here. I have to 
admit I liked the idea to ease migrations. It's a bit like the BIOS


   


boot


   


ordering, you never used it, until you have to.
The problem is that I discover them in the jar file, they are not


   


added


   


by the user. So I have no idea of the ordering.



   


when will we ever have a user add both a hbm.xml AND ejb3xml file ?
And if we have - again, why not just choose the first one that gets 
added to the configuration by the user ?


/max

  

 

Well, just to let you know and to help me to find a good 
configuration property name.


   


What kind of values does it take ?



  

 


---
SF.Net email is Sponsored by the Better Software Conference & EXPO 
September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
Practices Agile & Plan-Driven Development * Managing Projects & 
Teams *


   


Testing


   


&  QA
Security * Process Improvement & Measurement * 
http://www.sqe.com/bsce5sf 
___

hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


   



  

 


---
SF.Net email is Sponsored by the Better Software Conference & EXPO 
September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
Practices Agile & Plan-Driven Development * Managing Projects & Teams 
* Testing
  

 


& QA


   


Security * Process Improvement & Measurement *
  

 


http://www.sqe.com/bsce5sf


   


___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

  

 



---
SF.Net email is Sponsored by the Better Software Conference & EXPO 
September 19-22, 200